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

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

    HistorySync.NotificationSettings = (function() {

        /**
         * Properties of a NotificationSettings.
         * @memberof HistorySync
         * @interface INotificationSettings
         * @property {string|null} [messageVibrate] NotificationSettings messageVibrate
         * @property {string|null} [messagePopup] NotificationSettings messagePopup
         * @property {string|null} [messageLight] NotificationSettings messageLight
         * @property {boolean|null} [lowPriorityNotifications] NotificationSettings lowPriorityNotifications
         * @property {boolean|null} [reactionsMuted] NotificationSettings reactionsMuted
         * @property {string|null} [callVibrate] NotificationSettings callVibrate
         */

        /**
         * Constructs a new NotificationSettings.
         * @memberof HistorySync
         * @classdesc Represents a NotificationSettings.
         * @implements INotificationSettings
         * @constructor
         * @param {HistorySync.INotificationSettings=} [properties] Properties to set
         */
        function NotificationSettings(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * NotificationSettings messageVibrate.
         * @member {string} messageVibrate
         * @memberof HistorySync.NotificationSettings
         * @instance
         */
        NotificationSettings.prototype.messageVibrate = "";

        /**
         * NotificationSettings messagePopup.
         * @member {string} messagePopup
         * @memberof HistorySync.NotificationSettings
         * @instance
         */
        NotificationSettings.prototype.messagePopup = "";

        /**
         * NotificationSettings messageLight.
         * @member {string} messageLight
         * @memberof HistorySync.NotificationSettings
         * @instance
         */
        NotificationSettings.prototype.messageLight = "";

        /**
         * NotificationSettings lowPriorityNotifications.
         * @member {boolean} lowPriorityNotifications
         * @memberof HistorySync.NotificationSettings
         * @instance
         */
        NotificationSettings.prototype.lowPriorityNotifications = false;

        /**
         * NotificationSettings reactionsMuted.
         * @member {boolean} reactionsMuted
         * @memberof HistorySync.NotificationSettings
         * @instance
         */
        NotificationSettings.prototype.reactionsMuted = false;

        /**
         * NotificationSettings callVibrate.
         * @member {string} callVibrate
         * @memberof HistorySync.NotificationSettings
         * @instance
         */
        NotificationSettings.prototype.callVibrate = "";

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

        /**
         * Encodes the specified NotificationSettings message. Does not implicitly {@link HistorySync.NotificationSettings.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.NotificationSettings
         * @static
         * @param {HistorySync.INotificationSettings} message NotificationSettings message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        NotificationSettings.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageVibrate != null && Object.hasOwnProperty.call(message, "messageVibrate"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageVibrate);
            if (message.messagePopup != null && Object.hasOwnProperty.call(message, "messagePopup"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.messagePopup);
            if (message.messageLight != null && Object.hasOwnProperty.call(message, "messageLight"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageLight);
            if (message.lowPriorityNotifications != null && Object.hasOwnProperty.call(message, "lowPriorityNotifications"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.lowPriorityNotifications);
            if (message.reactionsMuted != null && Object.hasOwnProperty.call(message, "reactionsMuted"))
                writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reactionsMuted);
            if (message.callVibrate != null && Object.hasOwnProperty.call(message, "callVibrate"))
                writer.uint32(/* id 6, wireType 2 =*/50).string(message.callVibrate);
            return writer;
        };

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

        /**
         * Decodes a NotificationSettings message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.NotificationSettings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.NotificationSettings} NotificationSettings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        NotificationSettings.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.NotificationSettings();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageVibrate = reader.string();
                        break;
                    }
                case 2: {
                        message.messagePopup = reader.string();
                        break;
                    }
                case 3: {
                        message.messageLight = reader.string();
                        break;
                    }
                case 4: {
                        message.lowPriorityNotifications = reader.bool();
                        break;
                    }
                case 5: {
                        message.reactionsMuted = reader.bool();
                        break;
                    }
                case 6: {
                        message.callVibrate = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a NotificationSettings message.
         * @function verify
         * @memberof HistorySync.NotificationSettings
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        NotificationSettings.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.messageVibrate != null && message.hasOwnProperty("messageVibrate"))
                if (!$util.isString(message.messageVibrate))
                    return "messageVibrate: string expected";
            if (message.messagePopup != null && message.hasOwnProperty("messagePopup"))
                if (!$util.isString(message.messagePopup))
                    return "messagePopup: string expected";
            if (message.messageLight != null && message.hasOwnProperty("messageLight"))
                if (!$util.isString(message.messageLight))
                    return "messageLight: string expected";
            if (message.lowPriorityNotifications != null && message.hasOwnProperty("lowPriorityNotifications"))
                if (typeof message.lowPriorityNotifications !== "boolean")
                    return "lowPriorityNotifications: boolean expected";
            if (message.reactionsMuted != null && message.hasOwnProperty("reactionsMuted"))
                if (typeof message.reactionsMuted !== "boolean")
                    return "reactionsMuted: boolean expected";
            if (message.callVibrate != null && message.hasOwnProperty("callVibrate"))
                if (!$util.isString(message.callVibrate))
                    return "callVibrate: string expected";
            return null;
        };

        /**
         * Creates a NotificationSettings message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.NotificationSettings
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.NotificationSettings} NotificationSettings
         */
        NotificationSettings.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.NotificationSettings)
                return object;
            var message = new $root.HistorySync.NotificationSettings();
            if (object.messageVibrate != null)
                message.messageVibrate = String(object.messageVibrate);
            if (object.messagePopup != null)
                message.messagePopup = String(object.messagePopup);
            if (object.messageLight != null)
                message.messageLight = String(object.messageLight);
            if (object.lowPriorityNotifications != null)
                message.lowPriorityNotifications = Boolean(object.lowPriorityNotifications);
            if (object.reactionsMuted != null)
                message.reactionsMuted = Boolean(object.reactionsMuted);
            if (object.callVibrate != null)
                message.callVibrate = String(object.callVibrate);
            return message;
        };

        /**
         * Creates a plain object from a NotificationSettings message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.NotificationSettings
         * @static
         * @param {HistorySync.NotificationSettings} message NotificationSettings
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        NotificationSettings.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.messageVibrate = "";
                object.messagePopup = "";
                object.messageLight = "";
                object.lowPriorityNotifications = false;
                object.reactionsMuted = false;
                object.callVibrate = "";
            }
            if (message.messageVibrate != null && message.hasOwnProperty("messageVibrate"))
                object.messageVibrate = message.messageVibrate;
            if (message.messagePopup != null && message.hasOwnProperty("messagePopup"))
                object.messagePopup = message.messagePopup;
            if (message.messageLight != null && message.hasOwnProperty("messageLight"))
                object.messageLight = message.messageLight;
            if (message.lowPriorityNotifications != null && message.hasOwnProperty("lowPriorityNotifications"))
                object.lowPriorityNotifications = message.lowPriorityNotifications;
            if (message.reactionsMuted != null && message.hasOwnProperty("reactionsMuted"))
                object.reactionsMuted = message.reactionsMuted;
            if (message.callVibrate != null && message.hasOwnProperty("callVibrate"))
                object.callVibrate = message.callVibrate;
            return object;
        };

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

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

        return NotificationSettings;
    })();

    HistorySync.AvatarUserSettings = (function() {

        /**
         * Properties of an AvatarUserSettings.
         * @memberof HistorySync
         * @interface IAvatarUserSettings
         * @property {string|null} [fbid] AvatarUserSettings fbid
         * @property {string|null} [password] AvatarUserSettings password
         */

        /**
         * Constructs a new AvatarUserSettings.
         * @memberof HistorySync
         * @classdesc Represents an AvatarUserSettings.
         * @implements IAvatarUserSettings
         * @constructor
         * @param {HistorySync.IAvatarUserSettings=} [properties] Properties to set
         */
        function AvatarUserSettings(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * AvatarUserSettings fbid.
         * @member {string} fbid
         * @memberof HistorySync.AvatarUserSettings
         * @instance
         */
        AvatarUserSettings.prototype.fbid = "";

        /**
         * AvatarUserSettings password.
         * @member {string} password
         * @memberof HistorySync.AvatarUserSettings
         * @instance
         */
        AvatarUserSettings.prototype.password = "";

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

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

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

        /**
         * Decodes an AvatarUserSettings message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.AvatarUserSettings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.AvatarUserSettings} AvatarUserSettings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AvatarUserSettings.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.AvatarUserSettings();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.fbid = reader.string();
                        break;
                    }
                case 2: {
                        message.password = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies an AvatarUserSettings message.
         * @function verify
         * @memberof HistorySync.AvatarUserSettings
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AvatarUserSettings.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.fbid != null && message.hasOwnProperty("fbid"))
                if (!$util.isString(message.fbid))
                    return "fbid: string expected";
            if (message.password != null && message.hasOwnProperty("password"))
                if (!$util.isString(message.password))
                    return "password: string expected";
            return null;
        };

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

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

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

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

        return AvatarUserSettings;
    })();

    HistorySync.PastParticipant = (function() {

        /**
         * Properties of a PastParticipant.
         * @memberof HistorySync
         * @interface IPastParticipant
         * @property {string|null} [userJid] PastParticipant userJid
         * @property {HistorySync.PastParticipant.LeaveReason|null} [leaveReason] PastParticipant leaveReason
         * @property {number|Long|null} [leaveTs] PastParticipant leaveTs
         */

        /**
         * Constructs a new PastParticipant.
         * @memberof HistorySync
         * @classdesc Represents a PastParticipant.
         * @implements IPastParticipant
         * @constructor
         * @param {HistorySync.IPastParticipant=} [properties] Properties to set
         */
        function PastParticipant(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * PastParticipant userJid.
         * @member {string} userJid
         * @memberof HistorySync.PastParticipant
         * @instance
         */
        PastParticipant.prototype.userJid = "";

        /**
         * PastParticipant leaveReason.
         * @member {HistorySync.PastParticipant.LeaveReason} leaveReason
         * @memberof HistorySync.PastParticipant
         * @instance
         */
        PastParticipant.prototype.leaveReason = 0;

        /**
         * PastParticipant leaveTs.
         * @member {number|Long} leaveTs
         * @memberof HistorySync.PastParticipant
         * @instance
         */
        PastParticipant.prototype.leaveTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

        /**
         * Encodes the specified PastParticipant message. Does not implicitly {@link HistorySync.PastParticipant.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.PastParticipant
         * @static
         * @param {HistorySync.IPastParticipant} message PastParticipant message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PastParticipant.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.leaveReason != null && Object.hasOwnProperty.call(message, "leaveReason"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.leaveReason);
            if (message.leaveTs != null && Object.hasOwnProperty.call(message, "leaveTs"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.leaveTs);
            return writer;
        };

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

        /**
         * Decodes a PastParticipant message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.PastParticipant
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.PastParticipant} PastParticipant
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PastParticipant.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.PastParticipant();
            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.leaveReason = reader.int32();
                        break;
                    }
                case 3: {
                        message.leaveTs = reader.uint64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a PastParticipant message.
         * @function verify
         * @memberof HistorySync.PastParticipant
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PastParticipant.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.userJid != null && message.hasOwnProperty("userJid"))
                if (!$util.isString(message.userJid))
                    return "userJid: string expected";
            if (message.leaveReason != null && message.hasOwnProperty("leaveReason"))
                switch (message.leaveReason) {
                default:
                    return "leaveReason: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.leaveTs != null && message.hasOwnProperty("leaveTs"))
                if (!$util.isInteger(message.leaveTs) && !(message.leaveTs && $util.isInteger(message.leaveTs.low) && $util.isInteger(message.leaveTs.high)))
                    return "leaveTs: integer|Long expected";
            return null;
        };

        /**
         * Creates a PastParticipant message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.PastParticipant
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.PastParticipant} PastParticipant
         */
        PastParticipant.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.PastParticipant)
                return object;
            var message = new $root.HistorySync.PastParticipant();
            if (object.userJid != null)
                message.userJid = String(object.userJid);
            switch (object.leaveReason) {
            default:
                if (typeof object.leaveReason === "number") {
                    message.leaveReason = object.leaveReason;
                    break;
                }
                break;
            case "LEFT":
            case 0:
                message.leaveReason = 0;
                break;
            case "REMOVED":
            case 1:
                message.leaveReason = 1;
                break;
            }
            if (object.leaveTs != null)
                if ($util.Long)
                    (message.leaveTs = $util.Long.fromValue(object.leaveTs)).unsigned = true;
                else if (typeof object.leaveTs === "string")
                    message.leaveTs = parseInt(object.leaveTs, 10);
                else if (typeof object.leaveTs === "number")
                    message.leaveTs = object.leaveTs;
                else if (typeof object.leaveTs === "object")
                    message.leaveTs = new $util.LongBits(object.leaveTs.low >>> 0, object.leaveTs.high >>> 0).toNumber(true);
            return message;
        };

        /**
         * Creates a plain object from a PastParticipant message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.PastParticipant
         * @static
         * @param {HistorySync.PastParticipant} message PastParticipant
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PastParticipant.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.userJid = "";
                object.leaveReason = options.enums === String ? "LEFT" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.leaveTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.leaveTs = options.longs === String ? "0" : 0;
            }
            if (message.userJid != null && message.hasOwnProperty("userJid"))
                object.userJid = message.userJid;
            if (message.leaveReason != null && message.hasOwnProperty("leaveReason"))
                object.leaveReason = options.enums === String ? $root.HistorySync.PastParticipant.LeaveReason[message.leaveReason] === undefined ? message.leaveReason : $root.HistorySync.PastParticipant.LeaveReason[message.leaveReason] : message.leaveReason;
            if (message.leaveTs != null && message.hasOwnProperty("leaveTs"))
                if (typeof message.leaveTs === "number")
                    object.leaveTs = options.longs === String ? String(message.leaveTs) : message.leaveTs;
                else
                    object.leaveTs = options.longs === String ? $util.Long.prototype.toString.call(message.leaveTs) : options.longs === Number ? new $util.LongBits(message.leaveTs.low >>> 0, message.leaveTs.high >>> 0).toNumber(true) : message.leaveTs;
            return object;
        };

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

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

        /**
         * LeaveReason enum.
         * @name HistorySync.PastParticipant.LeaveReason
         * @enum {number}
         * @property {number} LEFT=0 LEFT value
         * @property {number} REMOVED=1 REMOVED value
         */
        PastParticipant.LeaveReason = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "LEFT"] = 0;
            values[valuesById[1] = "REMOVED"] = 1;
            return values;
        })();

        return PastParticipant;
    })();

    HistorySync.PastParticipants = (function() {

        /**
         * Properties of a PastParticipants.
         * @memberof HistorySync
         * @interface IPastParticipants
         * @property {string|null} [groupJid] PastParticipants groupJid
         * @property {Array.<HistorySync.IPastParticipant>|null} [pastParticipants] PastParticipants pastParticipants
         */

        /**
         * Constructs a new PastParticipants.
         * @memberof HistorySync
         * @classdesc Represents a PastParticipants.
         * @implements IPastParticipants
         * @constructor
         * @param {HistorySync.IPastParticipants=} [properties] Properties to set
         */
        function PastParticipants(properties) {
            this.pastParticipants = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * PastParticipants groupJid.
         * @member {string} groupJid
         * @memberof HistorySync.PastParticipants
         * @instance
         */
        PastParticipants.prototype.groupJid = "";

        /**
         * PastParticipants pastParticipants.
         * @member {Array.<HistorySync.IPastParticipant>} pastParticipants
         * @memberof HistorySync.PastParticipants
         * @instance
         */
        PastParticipants.prototype.pastParticipants = $util.emptyArray;

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

        /**
         * Encodes the specified PastParticipants message. Does not implicitly {@link HistorySync.PastParticipants.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.PastParticipants
         * @static
         * @param {HistorySync.IPastParticipants} message PastParticipants message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PastParticipants.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.pastParticipants != null && message.pastParticipants.length)
                for (var i = 0; i < message.pastParticipants.length; ++i)
                    $root.HistorySync.PastParticipant.encode(message.pastParticipants[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a PastParticipants message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.PastParticipants
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.PastParticipants} PastParticipants
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PastParticipants.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.PastParticipants();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.groupJid = reader.string();
                        break;
                    }
                case 2: {
                        if (!(message.pastParticipants && message.pastParticipants.length))
                            message.pastParticipants = [];
                        message.pastParticipants.push($root.HistorySync.PastParticipant.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a PastParticipants message.
         * @function verify
         * @memberof HistorySync.PastParticipants
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PastParticipants.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                if (!$util.isString(message.groupJid))
                    return "groupJid: string expected";
            if (message.pastParticipants != null && message.hasOwnProperty("pastParticipants")) {
                if (!Array.isArray(message.pastParticipants))
                    return "pastParticipants: array expected";
                for (var i = 0; i < message.pastParticipants.length; ++i) {
                    var error = $root.HistorySync.PastParticipant.verify(message.pastParticipants[i]);
                    if (error)
                        return "pastParticipants." + error;
                }
            }
            return null;
        };

        /**
         * Creates a PastParticipants message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.PastParticipants
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.PastParticipants} PastParticipants
         */
        PastParticipants.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.PastParticipants)
                return object;
            var message = new $root.HistorySync.PastParticipants();
            if (object.groupJid != null)
                message.groupJid = String(object.groupJid);
            if (object.pastParticipants) {
                if (!Array.isArray(object.pastParticipants))
                    throw TypeError(".HistorySync.PastParticipants.pastParticipants: array expected");
                message.pastParticipants = [];
                for (var i = 0; i < object.pastParticipants.length; ++i) {
                    if (typeof object.pastParticipants[i] !== "object")
                        throw TypeError(".HistorySync.PastParticipants.pastParticipants: object expected");
                    message.pastParticipants[i] = $root.HistorySync.PastParticipant.fromObject(object.pastParticipants[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a PastParticipants message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.PastParticipants
         * @static
         * @param {HistorySync.PastParticipants} message PastParticipants
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PastParticipants.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.pastParticipants = [];
            if (options.defaults)
                object.groupJid = "";
            if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                object.groupJid = message.groupJid;
            if (message.pastParticipants && message.pastParticipants.length) {
                object.pastParticipants = [];
                for (var j = 0; j < message.pastParticipants.length; ++j)
                    object.pastParticipants[j] = $root.HistorySync.PastParticipant.toObject(message.pastParticipants[j], options);
            }
            return object;
        };

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

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

        return PastParticipants;
    })();

    HistorySync.StickerMetadata = (function() {

        /**
         * Properties of a StickerMetadata.
         * @memberof HistorySync
         * @interface IStickerMetadata
         * @property {string|null} [url] StickerMetadata url
         * @property {Uint8Array|null} [fileSha256] StickerMetadata fileSha256
         * @property {Uint8Array|null} [fileEncSha256] StickerMetadata fileEncSha256
         * @property {Uint8Array|null} [mediaKey] StickerMetadata mediaKey
         * @property {string|null} [mimetype] StickerMetadata mimetype
         * @property {number|null} [height] StickerMetadata height
         * @property {number|null} [width] StickerMetadata width
         * @property {string|null} [directPath] StickerMetadata directPath
         * @property {number|Long|null} [fileLength] StickerMetadata fileLength
         * @property {number|null} [weight] StickerMetadata weight
         * @property {number|Long|null} [lastStickerSentTs] StickerMetadata lastStickerSentTs
         * @property {boolean|null} [isLottie] StickerMetadata isLottie
         * @property {string|null} [imageHash] StickerMetadata imageHash
         * @property {boolean|null} [isAvatarSticker] StickerMetadata isAvatarSticker
         */

        /**
         * Constructs a new StickerMetadata.
         * @memberof HistorySync
         * @classdesc Represents a StickerMetadata.
         * @implements IStickerMetadata
         * @constructor
         * @param {HistorySync.IStickerMetadata=} [properties] Properties to set
         */
        function StickerMetadata(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * StickerMetadata url.
         * @member {string} url
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.url = "";

        /**
         * StickerMetadata fileSha256.
         * @member {Uint8Array} fileSha256
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.fileSha256 = $util.newBuffer([]);

        /**
         * StickerMetadata fileEncSha256.
         * @member {Uint8Array} fileEncSha256
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.fileEncSha256 = $util.newBuffer([]);

        /**
         * StickerMetadata mediaKey.
         * @member {Uint8Array} mediaKey
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.mediaKey = $util.newBuffer([]);

        /**
         * StickerMetadata mimetype.
         * @member {string} mimetype
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.mimetype = "";

        /**
         * StickerMetadata height.
         * @member {number} height
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.height = 0;

        /**
         * StickerMetadata width.
         * @member {number} width
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.width = 0;

        /**
         * StickerMetadata directPath.
         * @member {string} directPath
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.directPath = "";

        /**
         * StickerMetadata fileLength.
         * @member {number|Long} fileLength
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * StickerMetadata weight.
         * @member {number} weight
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.weight = 0;

        /**
         * StickerMetadata lastStickerSentTs.
         * @member {number|Long} lastStickerSentTs
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.lastStickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * StickerMetadata isLottie.
         * @member {boolean} isLottie
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.isLottie = false;

        /**
         * StickerMetadata imageHash.
         * @member {string} imageHash
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.imageHash = "";

        /**
         * StickerMetadata isAvatarSticker.
         * @member {boolean} isAvatarSticker
         * @memberof HistorySync.StickerMetadata
         * @instance
         */
        StickerMetadata.prototype.isAvatarSticker = false;

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

        /**
         * Encodes the specified StickerMetadata message. Does not implicitly {@link HistorySync.StickerMetadata.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.StickerMetadata
         * @static
         * @param {HistorySync.IStickerMetadata} message StickerMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StickerMetadata.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.weight != null && Object.hasOwnProperty.call(message, "weight"))
                writer.uint32(/* id 10, wireType 5 =*/85).float(message.weight);
            if (message.lastStickerSentTs != null && Object.hasOwnProperty.call(message, "lastStickerSentTs"))
                writer.uint32(/* id 11, wireType 0 =*/88).int64(message.lastStickerSentTs);
            if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie"))
                writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isLottie);
            if (message.imageHash != null && Object.hasOwnProperty.call(message, "imageHash"))
                writer.uint32(/* id 13, wireType 2 =*/106).string(message.imageHash);
            if (message.isAvatarSticker != null && Object.hasOwnProperty.call(message, "isAvatarSticker"))
                writer.uint32(/* id 14, wireType 0 =*/112).bool(message.isAvatarSticker);
            return writer;
        };

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

        /**
         * Decodes a StickerMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.StickerMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.StickerMetadata} StickerMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StickerMetadata.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.StickerMetadata();
            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.weight = reader.float();
                        break;
                    }
                case 11: {
                        message.lastStickerSentTs = reader.int64();
                        break;
                    }
                case 12: {
                        message.isLottie = reader.bool();
                        break;
                    }
                case 13: {
                        message.imageHash = reader.string();
                        break;
                    }
                case 14: {
                        message.isAvatarSticker = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a StickerMetadata message.
         * @function verify
         * @memberof HistorySync.StickerMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        StickerMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.url != null && message.hasOwnProperty("url"))
                if (!$util.isString(message.url))
                    return "url: string expected";
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                    return "fileSha256: buffer expected";
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                    return "fileEncSha256: buffer expected";
            if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                    return "mediaKey: buffer expected";
            if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                if (!$util.isString(message.mimetype))
                    return "mimetype: string expected";
            if (message.height != null && message.hasOwnProperty("height"))
                if (!$util.isInteger(message.height))
                    return "height: integer expected";
            if (message.width != null && message.hasOwnProperty("width"))
                if (!$util.isInteger(message.width))
                    return "width: integer expected";
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                    return "fileLength: integer|Long expected";
            if (message.weight != null && message.hasOwnProperty("weight"))
                if (typeof message.weight !== "number")
                    return "weight: number expected";
            if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs"))
                if (!$util.isInteger(message.lastStickerSentTs) && !(message.lastStickerSentTs && $util.isInteger(message.lastStickerSentTs.low) && $util.isInteger(message.lastStickerSentTs.high)))
                    return "lastStickerSentTs: integer|Long expected";
            if (message.isLottie != null && message.hasOwnProperty("isLottie"))
                if (typeof message.isLottie !== "boolean")
                    return "isLottie: boolean expected";
            if (message.imageHash != null && message.hasOwnProperty("imageHash"))
                if (!$util.isString(message.imageHash))
                    return "imageHash: string expected";
            if (message.isAvatarSticker != null && message.hasOwnProperty("isAvatarSticker"))
                if (typeof message.isAvatarSticker !== "boolean")
                    return "isAvatarSticker: boolean expected";
            return null;
        };

        /**
         * Creates a StickerMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.StickerMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.StickerMetadata} StickerMetadata
         */
        StickerMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.StickerMetadata)
                return object;
            var message = new $root.HistorySync.StickerMetadata();
            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.weight != null)
                message.weight = Number(object.weight);
            if (object.lastStickerSentTs != null)
                if ($util.Long)
                    (message.lastStickerSentTs = $util.Long.fromValue(object.lastStickerSentTs)).unsigned = false;
                else if (typeof object.lastStickerSentTs === "string")
                    message.lastStickerSentTs = parseInt(object.lastStickerSentTs, 10);
                else if (typeof object.lastStickerSentTs === "number")
                    message.lastStickerSentTs = object.lastStickerSentTs;
                else if (typeof object.lastStickerSentTs === "object")
                    message.lastStickerSentTs = new $util.LongBits(object.lastStickerSentTs.low >>> 0, object.lastStickerSentTs.high >>> 0).toNumber();
            if (object.isLottie != null)
                message.isLottie = Boolean(object.isLottie);
            if (object.imageHash != null)
                message.imageHash = String(object.imageHash);
            if (object.isAvatarSticker != null)
                message.isAvatarSticker = Boolean(object.isAvatarSticker);
            return message;
        };

        /**
         * Creates a plain object from a StickerMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.StickerMetadata
         * @static
         * @param {HistorySync.StickerMetadata} message StickerMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        StickerMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.url = "";
                if (options.bytes === String)
                    object.fileSha256 = "";
                else {
                    object.fileSha256 = [];
                    if (options.bytes !== Array)
                        object.fileSha256 = $util.newBuffer(object.fileSha256);
                }
                if (options.bytes === String)
                    object.fileEncSha256 = "";
                else {
                    object.fileEncSha256 = [];
                    if (options.bytes !== Array)
                        object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                }
                if (options.bytes === String)
                    object.mediaKey = "";
                else {
                    object.mediaKey = [];
                    if (options.bytes !== Array)
                        object.mediaKey = $util.newBuffer(object.mediaKey);
                }
                object.mimetype = "";
                object.height = 0;
                object.width = 0;
                object.directPath = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.fileLength = options.longs === String ? "0" : 0;
                object.weight = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.lastStickerSentTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.lastStickerSentTs = options.longs === String ? "0" : 0;
                object.isLottie = false;
                object.imageHash = "";
                object.isAvatarSticker = false;
            }
            if (message.url != null && message.hasOwnProperty("url"))
                object.url = message.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 (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 (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 (message.mimetype != null && message.hasOwnProperty("mimetype"))
                object.mimetype = message.mimetype;
            if (message.height != null && message.hasOwnProperty("height"))
                object.height = message.height;
            if (message.width != null && message.hasOwnProperty("width"))
                object.width = message.width;
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                object.directPath = message.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 (message.weight != null && message.hasOwnProperty("weight"))
                object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight;
            if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs"))
                if (typeof message.lastStickerSentTs === "number")
                    object.lastStickerSentTs = options.longs === String ? String(message.lastStickerSentTs) : message.lastStickerSentTs;
                else
                    object.lastStickerSentTs = options.longs === String ? $util.Long.prototype.toString.call(message.lastStickerSentTs) : options.longs === Number ? new $util.LongBits(message.lastStickerSentTs.low >>> 0, message.lastStickerSentTs.high >>> 0).toNumber() : message.lastStickerSentTs;
            if (message.isLottie != null && message.hasOwnProperty("isLottie"))
                object.isLottie = message.isLottie;
            if (message.imageHash != null && message.hasOwnProperty("imageHash"))
                object.imageHash = message.imageHash;
            if (message.isAvatarSticker != null && message.hasOwnProperty("isAvatarSticker"))
                object.isAvatarSticker = message.isAvatarSticker;
            return object;
        };

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

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

        return StickerMetadata;
    })();

    HistorySync.AutoDownloadSettings = (function() {

        /**
         * Properties of an AutoDownloadSettings.
         * @memberof HistorySync
         * @interface IAutoDownloadSettings
         * @property {boolean|null} [downloadImages] AutoDownloadSettings downloadImages
         * @property {boolean|null} [downloadAudio] AutoDownloadSettings downloadAudio
         * @property {boolean|null} [downloadVideo] AutoDownloadSettings downloadVideo
         * @property {boolean|null} [downloadDocuments] AutoDownloadSettings downloadDocuments
         */

        /**
         * Constructs a new AutoDownloadSettings.
         * @memberof HistorySync
         * @classdesc Represents an AutoDownloadSettings.
         * @implements IAutoDownloadSettings
         * @constructor
         * @param {HistorySync.IAutoDownloadSettings=} [properties] Properties to set
         */
        function AutoDownloadSettings(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * AutoDownloadSettings downloadImages.
         * @member {boolean} downloadImages
         * @memberof HistorySync.AutoDownloadSettings
         * @instance
         */
        AutoDownloadSettings.prototype.downloadImages = false;

        /**
         * AutoDownloadSettings downloadAudio.
         * @member {boolean} downloadAudio
         * @memberof HistorySync.AutoDownloadSettings
         * @instance
         */
        AutoDownloadSettings.prototype.downloadAudio = false;

        /**
         * AutoDownloadSettings downloadVideo.
         * @member {boolean} downloadVideo
         * @memberof HistorySync.AutoDownloadSettings
         * @instance
         */
        AutoDownloadSettings.prototype.downloadVideo = false;

        /**
         * AutoDownloadSettings downloadDocuments.
         * @member {boolean} downloadDocuments
         * @memberof HistorySync.AutoDownloadSettings
         * @instance
         */
        AutoDownloadSettings.prototype.downloadDocuments = false;

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

        /**
         * Encodes the specified AutoDownloadSettings message. Does not implicitly {@link HistorySync.AutoDownloadSettings.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.AutoDownloadSettings
         * @static
         * @param {HistorySync.IAutoDownloadSettings} message AutoDownloadSettings message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AutoDownloadSettings.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.downloadImages != null && Object.hasOwnProperty.call(message, "downloadImages"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.downloadImages);
            if (message.downloadAudio != null && Object.hasOwnProperty.call(message, "downloadAudio"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.downloadAudio);
            if (message.downloadVideo != null && Object.hasOwnProperty.call(message, "downloadVideo"))
                writer.uint32(/* id 3, wireType 0 =*/24).bool(message.downloadVideo);
            if (message.downloadDocuments != null && Object.hasOwnProperty.call(message, "downloadDocuments"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.downloadDocuments);
            return writer;
        };

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

        /**
         * Decodes an AutoDownloadSettings message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.AutoDownloadSettings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.AutoDownloadSettings} AutoDownloadSettings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AutoDownloadSettings.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.AutoDownloadSettings();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.downloadImages = reader.bool();
                        break;
                    }
                case 2: {
                        message.downloadAudio = reader.bool();
                        break;
                    }
                case 3: {
                        message.downloadVideo = reader.bool();
                        break;
                    }
                case 4: {
                        message.downloadDocuments = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies an AutoDownloadSettings message.
         * @function verify
         * @memberof HistorySync.AutoDownloadSettings
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AutoDownloadSettings.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.downloadImages != null && message.hasOwnProperty("downloadImages"))
                if (typeof message.downloadImages !== "boolean")
                    return "downloadImages: boolean expected";
            if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio"))
                if (typeof message.downloadAudio !== "boolean")
                    return "downloadAudio: boolean expected";
            if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo"))
                if (typeof message.downloadVideo !== "boolean")
                    return "downloadVideo: boolean expected";
            if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments"))
                if (typeof message.downloadDocuments !== "boolean")
                    return "downloadDocuments: boolean expected";
            return null;
        };

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

        /**
         * Creates a plain object from an AutoDownloadSettings message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.AutoDownloadSettings
         * @static
         * @param {HistorySync.AutoDownloadSettings} message AutoDownloadSettings
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AutoDownloadSettings.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.downloadImages = false;
                object.downloadAudio = false;
                object.downloadVideo = false;
                object.downloadDocuments = false;
            }
            if (message.downloadImages != null && message.hasOwnProperty("downloadImages"))
                object.downloadImages = message.downloadImages;
            if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio"))
                object.downloadAudio = message.downloadAudio;
            if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo"))
                object.downloadVideo = message.downloadVideo;
            if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments"))
                object.downloadDocuments = message.downloadDocuments;
            return object;
        };

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

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

        return AutoDownloadSettings;
    })();

    HistorySync.GlobalSettings = (function() {

        /**
         * Properties of a GlobalSettings.
         * @memberof HistorySync
         * @interface IGlobalSettings
         * @property {HistorySync.IWallpaperSettings|null} [lightThemeWallpaper] GlobalSettings lightThemeWallpaper
         * @property {HistorySync.MediaVisibility|null} [mediaVisibility] GlobalSettings mediaVisibility
         * @property {HistorySync.IWallpaperSettings|null} [darkThemeWallpaper] GlobalSettings darkThemeWallpaper
         * @property {HistorySync.IAutoDownloadSettings|null} [autoDownloadWiFi] GlobalSettings autoDownloadWiFi
         * @property {HistorySync.IAutoDownloadSettings|null} [autoDownloadCellular] GlobalSettings autoDownloadCellular
         * @property {HistorySync.IAutoDownloadSettings|null} [autoDownloadRoaming] GlobalSettings autoDownloadRoaming
         * @property {boolean|null} [showIndividualNotificationsPreview] GlobalSettings showIndividualNotificationsPreview
         * @property {boolean|null} [showGroupNotificationsPreview] GlobalSettings showGroupNotificationsPreview
         * @property {number|null} [disappearingModeDuration] GlobalSettings disappearingModeDuration
         * @property {number|Long|null} [disappearingModeTimestamp] GlobalSettings disappearingModeTimestamp
         * @property {HistorySync.IAvatarUserSettings|null} [avatarUserSettings] GlobalSettings avatarUserSettings
         * @property {number|null} [fontSize] GlobalSettings fontSize
         * @property {boolean|null} [securityNotifications] GlobalSettings securityNotifications
         * @property {boolean|null} [autoUnarchiveChats] GlobalSettings autoUnarchiveChats
         * @property {number|null} [videoQualityMode] GlobalSettings videoQualityMode
         * @property {number|null} [photoQualityMode] GlobalSettings photoQualityMode
         * @property {HistorySync.INotificationSettings|null} [individualNotificationSettings] GlobalSettings individualNotificationSettings
         * @property {HistorySync.INotificationSettings|null} [groupNotificationSettings] GlobalSettings groupNotificationSettings
         * @property {ChatLockSettings.IChatLockSettings|null} [chatLockSettings] GlobalSettings chatLockSettings
         * @property {number|Long|null} [chatDbLidMigrationTimestamp] GlobalSettings chatDbLidMigrationTimestamp
         */

        /**
         * Constructs a new GlobalSettings.
         * @memberof HistorySync
         * @classdesc Represents a GlobalSettings.
         * @implements IGlobalSettings
         * @constructor
         * @param {HistorySync.IGlobalSettings=} [properties] Properties to set
         */
        function GlobalSettings(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * GlobalSettings lightThemeWallpaper.
         * @member {HistorySync.IWallpaperSettings|null|undefined} lightThemeWallpaper
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.lightThemeWallpaper = null;

        /**
         * GlobalSettings mediaVisibility.
         * @member {HistorySync.MediaVisibility} mediaVisibility
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.mediaVisibility = 0;

        /**
         * GlobalSettings darkThemeWallpaper.
         * @member {HistorySync.IWallpaperSettings|null|undefined} darkThemeWallpaper
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.darkThemeWallpaper = null;

        /**
         * GlobalSettings autoDownloadWiFi.
         * @member {HistorySync.IAutoDownloadSettings|null|undefined} autoDownloadWiFi
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.autoDownloadWiFi = null;

        /**
         * GlobalSettings autoDownloadCellular.
         * @member {HistorySync.IAutoDownloadSettings|null|undefined} autoDownloadCellular
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.autoDownloadCellular = null;

        /**
         * GlobalSettings autoDownloadRoaming.
         * @member {HistorySync.IAutoDownloadSettings|null|undefined} autoDownloadRoaming
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.autoDownloadRoaming = null;

        /**
         * GlobalSettings showIndividualNotificationsPreview.
         * @member {boolean} showIndividualNotificationsPreview
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.showIndividualNotificationsPreview = false;

        /**
         * GlobalSettings showGroupNotificationsPreview.
         * @member {boolean} showGroupNotificationsPreview
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.showGroupNotificationsPreview = false;

        /**
         * GlobalSettings disappearingModeDuration.
         * @member {number} disappearingModeDuration
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.disappearingModeDuration = 0;

        /**
         * GlobalSettings disappearingModeTimestamp.
         * @member {number|Long} disappearingModeTimestamp
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.disappearingModeTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * GlobalSettings avatarUserSettings.
         * @member {HistorySync.IAvatarUserSettings|null|undefined} avatarUserSettings
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.avatarUserSettings = null;

        /**
         * GlobalSettings fontSize.
         * @member {number} fontSize
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.fontSize = 0;

        /**
         * GlobalSettings securityNotifications.
         * @member {boolean} securityNotifications
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.securityNotifications = false;

        /**
         * GlobalSettings autoUnarchiveChats.
         * @member {boolean} autoUnarchiveChats
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.autoUnarchiveChats = false;

        /**
         * GlobalSettings videoQualityMode.
         * @member {number} videoQualityMode
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.videoQualityMode = 0;

        /**
         * GlobalSettings photoQualityMode.
         * @member {number} photoQualityMode
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.photoQualityMode = 0;

        /**
         * GlobalSettings individualNotificationSettings.
         * @member {HistorySync.INotificationSettings|null|undefined} individualNotificationSettings
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.individualNotificationSettings = null;

        /**
         * GlobalSettings groupNotificationSettings.
         * @member {HistorySync.INotificationSettings|null|undefined} groupNotificationSettings
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.groupNotificationSettings = null;

        /**
         * GlobalSettings chatLockSettings.
         * @member {ChatLockSettings.IChatLockSettings|null|undefined} chatLockSettings
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.chatLockSettings = null;

        /**
         * GlobalSettings chatDbLidMigrationTimestamp.
         * @member {number|Long} chatDbLidMigrationTimestamp
         * @memberof HistorySync.GlobalSettings
         * @instance
         */
        GlobalSettings.prototype.chatDbLidMigrationTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

        /**
         * Encodes the specified GlobalSettings message. Does not implicitly {@link HistorySync.GlobalSettings.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.GlobalSettings
         * @static
         * @param {HistorySync.IGlobalSettings} message GlobalSettings message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GlobalSettings.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.lightThemeWallpaper != null && Object.hasOwnProperty.call(message, "lightThemeWallpaper"))
                $root.HistorySync.WallpaperSettings.encode(message.lightThemeWallpaper, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaVisibility);
            if (message.darkThemeWallpaper != null && Object.hasOwnProperty.call(message, "darkThemeWallpaper"))
                $root.HistorySync.WallpaperSettings.encode(message.darkThemeWallpaper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.autoDownloadWiFi != null && Object.hasOwnProperty.call(message, "autoDownloadWiFi"))
                $root.HistorySync.AutoDownloadSettings.encode(message.autoDownloadWiFi, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.autoDownloadCellular != null && Object.hasOwnProperty.call(message, "autoDownloadCellular"))
                $root.HistorySync.AutoDownloadSettings.encode(message.autoDownloadCellular, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.autoDownloadRoaming != null && Object.hasOwnProperty.call(message, "autoDownloadRoaming"))
                $root.HistorySync.AutoDownloadSettings.encode(message.autoDownloadRoaming, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.showIndividualNotificationsPreview != null && Object.hasOwnProperty.call(message, "showIndividualNotificationsPreview"))
                writer.uint32(/* id 7, wireType 0 =*/56).bool(message.showIndividualNotificationsPreview);
            if (message.showGroupNotificationsPreview != null && Object.hasOwnProperty.call(message, "showGroupNotificationsPreview"))
                writer.uint32(/* id 8, wireType 0 =*/64).bool(message.showGroupNotificationsPreview);
            if (message.disappearingModeDuration != null && Object.hasOwnProperty.call(message, "disappearingModeDuration"))
                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.disappearingModeDuration);
            if (message.disappearingModeTimestamp != null && Object.hasOwnProperty.call(message, "disappearingModeTimestamp"))
                writer.uint32(/* id 10, wireType 0 =*/80).int64(message.disappearingModeTimestamp);
            if (message.avatarUserSettings != null && Object.hasOwnProperty.call(message, "avatarUserSettings"))
                $root.HistorySync.AvatarUserSettings.encode(message.avatarUserSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
            if (message.fontSize != null && Object.hasOwnProperty.call(message, "fontSize"))
                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.fontSize);
            if (message.securityNotifications != null && Object.hasOwnProperty.call(message, "securityNotifications"))
                writer.uint32(/* id 13, wireType 0 =*/104).bool(message.securityNotifications);
            if (message.autoUnarchiveChats != null && Object.hasOwnProperty.call(message, "autoUnarchiveChats"))
                writer.uint32(/* id 14, wireType 0 =*/112).bool(message.autoUnarchiveChats);
            if (message.videoQualityMode != null && Object.hasOwnProperty.call(message, "videoQualityMode"))
                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.videoQualityMode);
            if (message.photoQualityMode != null && Object.hasOwnProperty.call(message, "photoQualityMode"))
                writer.uint32(/* id 16, wireType 0 =*/128).int32(message.photoQualityMode);
            if (message.individualNotificationSettings != null && Object.hasOwnProperty.call(message, "individualNotificationSettings"))
                $root.HistorySync.NotificationSettings.encode(message.individualNotificationSettings, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
            if (message.groupNotificationSettings != null && Object.hasOwnProperty.call(message, "groupNotificationSettings"))
                $root.HistorySync.NotificationSettings.encode(message.groupNotificationSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
            if (message.chatLockSettings != null && Object.hasOwnProperty.call(message, "chatLockSettings"))
                $root.ChatLockSettings.ChatLockSettings.encode(message.chatLockSettings, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
            if (message.chatDbLidMigrationTimestamp != null && Object.hasOwnProperty.call(message, "chatDbLidMigrationTimestamp"))
                writer.uint32(/* id 20, wireType 0 =*/160).int64(message.chatDbLidMigrationTimestamp);
            return writer;
        };

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

        /**
         * Decodes a GlobalSettings message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.GlobalSettings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.GlobalSettings} GlobalSettings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GlobalSettings.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.GlobalSettings();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.lightThemeWallpaper = $root.HistorySync.WallpaperSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.mediaVisibility = reader.int32();
                        break;
                    }
                case 3: {
                        message.darkThemeWallpaper = $root.HistorySync.WallpaperSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.autoDownloadWiFi = $root.HistorySync.AutoDownloadSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.autoDownloadCellular = $root.HistorySync.AutoDownloadSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.autoDownloadRoaming = $root.HistorySync.AutoDownloadSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.showIndividualNotificationsPreview = reader.bool();
                        break;
                    }
                case 8: {
                        message.showGroupNotificationsPreview = reader.bool();
                        break;
                    }
                case 9: {
                        message.disappearingModeDuration = reader.int32();
                        break;
                    }
                case 10: {
                        message.disappearingModeTimestamp = reader.int64();
                        break;
                    }
                case 11: {
                        message.avatarUserSettings = $root.HistorySync.AvatarUserSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 12: {
                        message.fontSize = reader.int32();
                        break;
                    }
                case 13: {
                        message.securityNotifications = reader.bool();
                        break;
                    }
                case 14: {
                        message.autoUnarchiveChats = reader.bool();
                        break;
                    }
                case 15: {
                        message.videoQualityMode = reader.int32();
                        break;
                    }
                case 16: {
                        message.photoQualityMode = reader.int32();
                        break;
                    }
                case 17: {
                        message.individualNotificationSettings = $root.HistorySync.NotificationSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 18: {
                        message.groupNotificationSettings = $root.HistorySync.NotificationSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 19: {
                        message.chatLockSettings = $root.ChatLockSettings.ChatLockSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 20: {
                        message.chatDbLidMigrationTimestamp = reader.int64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a GlobalSettings message.
         * @function verify
         * @memberof HistorySync.GlobalSettings
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        GlobalSettings.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) {
                var error = $root.HistorySync.WallpaperSettings.verify(message.lightThemeWallpaper);
                if (error)
                    return "lightThemeWallpaper." + error;
            }
            if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility"))
                switch (message.mediaVisibility) {
                default:
                    return "mediaVisibility: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) {
                var error = $root.HistorySync.WallpaperSettings.verify(message.darkThemeWallpaper);
                if (error)
                    return "darkThemeWallpaper." + error;
            }
            if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) {
                var error = $root.HistorySync.AutoDownloadSettings.verify(message.autoDownloadWiFi);
                if (error)
                    return "autoDownloadWiFi." + error;
            }
            if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) {
                var error = $root.HistorySync.AutoDownloadSettings.verify(message.autoDownloadCellular);
                if (error)
                    return "autoDownloadCellular." + error;
            }
            if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) {
                var error = $root.HistorySync.AutoDownloadSettings.verify(message.autoDownloadRoaming);
                if (error)
                    return "autoDownloadRoaming." + error;
            }
            if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview"))
                if (typeof message.showIndividualNotificationsPreview !== "boolean")
                    return "showIndividualNotificationsPreview: boolean expected";
            if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview"))
                if (typeof message.showGroupNotificationsPreview !== "boolean")
                    return "showGroupNotificationsPreview: boolean expected";
            if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration"))
                if (!$util.isInteger(message.disappearingModeDuration))
                    return "disappearingModeDuration: integer expected";
            if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp"))
                if (!$util.isInteger(message.disappearingModeTimestamp) && !(message.disappearingModeTimestamp && $util.isInteger(message.disappearingModeTimestamp.low) && $util.isInteger(message.disappearingModeTimestamp.high)))
                    return "disappearingModeTimestamp: integer|Long expected";
            if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) {
                var error = $root.HistorySync.AvatarUserSettings.verify(message.avatarUserSettings);
                if (error)
                    return "avatarUserSettings." + error;
            }
            if (message.fontSize != null && message.hasOwnProperty("fontSize"))
                if (!$util.isInteger(message.fontSize))
                    return "fontSize: integer expected";
            if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications"))
                if (typeof message.securityNotifications !== "boolean")
                    return "securityNotifications: boolean expected";
            if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats"))
                if (typeof message.autoUnarchiveChats !== "boolean")
                    return "autoUnarchiveChats: boolean expected";
            if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode"))
                if (!$util.isInteger(message.videoQualityMode))
                    return "videoQualityMode: integer expected";
            if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode"))
                if (!$util.isInteger(message.photoQualityMode))
                    return "photoQualityMode: integer expected";
            if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) {
                var error = $root.HistorySync.NotificationSettings.verify(message.individualNotificationSettings);
                if (error)
                    return "individualNotificationSettings." + error;
            }
            if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) {
                var error = $root.HistorySync.NotificationSettings.verify(message.groupNotificationSettings);
                if (error)
                    return "groupNotificationSettings." + error;
            }
            if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings")) {
                var error = $root.ChatLockSettings.ChatLockSettings.verify(message.chatLockSettings);
                if (error)
                    return "chatLockSettings." + error;
            }
            if (message.chatDbLidMigrationTimestamp != null && message.hasOwnProperty("chatDbLidMigrationTimestamp"))
                if (!$util.isInteger(message.chatDbLidMigrationTimestamp) && !(message.chatDbLidMigrationTimestamp && $util.isInteger(message.chatDbLidMigrationTimestamp.low) && $util.isInteger(message.chatDbLidMigrationTimestamp.high)))
                    return "chatDbLidMigrationTimestamp: integer|Long expected";
            return null;
        };

        /**
         * Creates a GlobalSettings message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.GlobalSettings
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.GlobalSettings} GlobalSettings
         */
        GlobalSettings.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.GlobalSettings)
                return object;
            var message = new $root.HistorySync.GlobalSettings();
            if (object.lightThemeWallpaper != null) {
                if (typeof object.lightThemeWallpaper !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.lightThemeWallpaper: object expected");
                message.lightThemeWallpaper = $root.HistorySync.WallpaperSettings.fromObject(object.lightThemeWallpaper);
            }
            switch (object.mediaVisibility) {
            default:
                if (typeof object.mediaVisibility === "number") {
                    message.mediaVisibility = object.mediaVisibility;
                    break;
                }
                break;
            case "DEFAULT":
            case 0:
                message.mediaVisibility = 0;
                break;
            case "OFF":
            case 1:
                message.mediaVisibility = 1;
                break;
            case "ON":
            case 2:
                message.mediaVisibility = 2;
                break;
            }
            if (object.darkThemeWallpaper != null) {
                if (typeof object.darkThemeWallpaper !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.darkThemeWallpaper: object expected");
                message.darkThemeWallpaper = $root.HistorySync.WallpaperSettings.fromObject(object.darkThemeWallpaper);
            }
            if (object.autoDownloadWiFi != null) {
                if (typeof object.autoDownloadWiFi !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.autoDownloadWiFi: object expected");
                message.autoDownloadWiFi = $root.HistorySync.AutoDownloadSettings.fromObject(object.autoDownloadWiFi);
            }
            if (object.autoDownloadCellular != null) {
                if (typeof object.autoDownloadCellular !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.autoDownloadCellular: object expected");
                message.autoDownloadCellular = $root.HistorySync.AutoDownloadSettings.fromObject(object.autoDownloadCellular);
            }
            if (object.autoDownloadRoaming != null) {
                if (typeof object.autoDownloadRoaming !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.autoDownloadRoaming: object expected");
                message.autoDownloadRoaming = $root.HistorySync.AutoDownloadSettings.fromObject(object.autoDownloadRoaming);
            }
            if (object.showIndividualNotificationsPreview != null)
                message.showIndividualNotificationsPreview = Boolean(object.showIndividualNotificationsPreview);
            if (object.showGroupNotificationsPreview != null)
                message.showGroupNotificationsPreview = Boolean(object.showGroupNotificationsPreview);
            if (object.disappearingModeDuration != null)
                message.disappearingModeDuration = object.disappearingModeDuration | 0;
            if (object.disappearingModeTimestamp != null)
                if ($util.Long)
                    (message.disappearingModeTimestamp = $util.Long.fromValue(object.disappearingModeTimestamp)).unsigned = false;
                else if (typeof object.disappearingModeTimestamp === "string")
                    message.disappearingModeTimestamp = parseInt(object.disappearingModeTimestamp, 10);
                else if (typeof object.disappearingModeTimestamp === "number")
                    message.disappearingModeTimestamp = object.disappearingModeTimestamp;
                else if (typeof object.disappearingModeTimestamp === "object")
                    message.disappearingModeTimestamp = new $util.LongBits(object.disappearingModeTimestamp.low >>> 0, object.disappearingModeTimestamp.high >>> 0).toNumber();
            if (object.avatarUserSettings != null) {
                if (typeof object.avatarUserSettings !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.avatarUserSettings: object expected");
                message.avatarUserSettings = $root.HistorySync.AvatarUserSettings.fromObject(object.avatarUserSettings);
            }
            if (object.fontSize != null)
                message.fontSize = object.fontSize | 0;
            if (object.securityNotifications != null)
                message.securityNotifications = Boolean(object.securityNotifications);
            if (object.autoUnarchiveChats != null)
                message.autoUnarchiveChats = Boolean(object.autoUnarchiveChats);
            if (object.videoQualityMode != null)
                message.videoQualityMode = object.videoQualityMode | 0;
            if (object.photoQualityMode != null)
                message.photoQualityMode = object.photoQualityMode | 0;
            if (object.individualNotificationSettings != null) {
                if (typeof object.individualNotificationSettings !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.individualNotificationSettings: object expected");
                message.individualNotificationSettings = $root.HistorySync.NotificationSettings.fromObject(object.individualNotificationSettings);
            }
            if (object.groupNotificationSettings != null) {
                if (typeof object.groupNotificationSettings !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.groupNotificationSettings: object expected");
                message.groupNotificationSettings = $root.HistorySync.NotificationSettings.fromObject(object.groupNotificationSettings);
            }
            if (object.chatLockSettings != null) {
                if (typeof object.chatLockSettings !== "object")
                    throw TypeError(".HistorySync.GlobalSettings.chatLockSettings: object expected");
                message.chatLockSettings = $root.ChatLockSettings.ChatLockSettings.fromObject(object.chatLockSettings);
            }
            if (object.chatDbLidMigrationTimestamp != null)
                if ($util.Long)
                    (message.chatDbLidMigrationTimestamp = $util.Long.fromValue(object.chatDbLidMigrationTimestamp)).unsigned = false;
                else if (typeof object.chatDbLidMigrationTimestamp === "string")
                    message.chatDbLidMigrationTimestamp = parseInt(object.chatDbLidMigrationTimestamp, 10);
                else if (typeof object.chatDbLidMigrationTimestamp === "number")
                    message.chatDbLidMigrationTimestamp = object.chatDbLidMigrationTimestamp;
                else if (typeof object.chatDbLidMigrationTimestamp === "object")
                    message.chatDbLidMigrationTimestamp = new $util.LongBits(object.chatDbLidMigrationTimestamp.low >>> 0, object.chatDbLidMigrationTimestamp.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from a GlobalSettings message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.GlobalSettings
         * @static
         * @param {HistorySync.GlobalSettings} message GlobalSettings
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        GlobalSettings.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.lightThemeWallpaper = null;
                object.mediaVisibility = options.enums === String ? "DEFAULT" : 0;
                object.darkThemeWallpaper = null;
                object.autoDownloadWiFi = null;
                object.autoDownloadCellular = null;
                object.autoDownloadRoaming = null;
                object.showIndividualNotificationsPreview = false;
                object.showGroupNotificationsPreview = false;
                object.disappearingModeDuration = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.disappearingModeTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.disappearingModeTimestamp = options.longs === String ? "0" : 0;
                object.avatarUserSettings = null;
                object.fontSize = 0;
                object.securityNotifications = false;
                object.autoUnarchiveChats = false;
                object.videoQualityMode = 0;
                object.photoQualityMode = 0;
                object.individualNotificationSettings = null;
                object.groupNotificationSettings = null;
                object.chatLockSettings = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.chatDbLidMigrationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.chatDbLidMigrationTimestamp = options.longs === String ? "0" : 0;
            }
            if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper"))
                object.lightThemeWallpaper = $root.HistorySync.WallpaperSettings.toObject(message.lightThemeWallpaper, options);
            if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility"))
                object.mediaVisibility = options.enums === String ? $root.HistorySync.MediaVisibility[message.mediaVisibility] === undefined ? message.mediaVisibility : $root.HistorySync.MediaVisibility[message.mediaVisibility] : message.mediaVisibility;
            if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper"))
                object.darkThemeWallpaper = $root.HistorySync.WallpaperSettings.toObject(message.darkThemeWallpaper, options);
            if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi"))
                object.autoDownloadWiFi = $root.HistorySync.AutoDownloadSettings.toObject(message.autoDownloadWiFi, options);
            if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular"))
                object.autoDownloadCellular = $root.HistorySync.AutoDownloadSettings.toObject(message.autoDownloadCellular, options);
            if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming"))
                object.autoDownloadRoaming = $root.HistorySync.AutoDownloadSettings.toObject(message.autoDownloadRoaming, options);
            if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview"))
                object.showIndividualNotificationsPreview = message.showIndividualNotificationsPreview;
            if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview"))
                object.showGroupNotificationsPreview = message.showGroupNotificationsPreview;
            if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration"))
                object.disappearingModeDuration = message.disappearingModeDuration;
            if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp"))
                if (typeof message.disappearingModeTimestamp === "number")
                    object.disappearingModeTimestamp = options.longs === String ? String(message.disappearingModeTimestamp) : message.disappearingModeTimestamp;
                else
                    object.disappearingModeTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.disappearingModeTimestamp) : options.longs === Number ? new $util.LongBits(message.disappearingModeTimestamp.low >>> 0, message.disappearingModeTimestamp.high >>> 0).toNumber() : message.disappearingModeTimestamp;
            if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings"))
                object.avatarUserSettings = $root.HistorySync.AvatarUserSettings.toObject(message.avatarUserSettings, options);
            if (message.fontSize != null && message.hasOwnProperty("fontSize"))
                object.fontSize = message.fontSize;
            if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications"))
                object.securityNotifications = message.securityNotifications;
            if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats"))
                object.autoUnarchiveChats = message.autoUnarchiveChats;
            if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode"))
                object.videoQualityMode = message.videoQualityMode;
            if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode"))
                object.photoQualityMode = message.photoQualityMode;
            if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings"))
                object.individualNotificationSettings = $root.HistorySync.NotificationSettings.toObject(message.individualNotificationSettings, options);
            if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings"))
                object.groupNotificationSettings = $root.HistorySync.NotificationSettings.toObject(message.groupNotificationSettings, options);
            if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings"))
                object.chatLockSettings = $root.ChatLockSettings.ChatLockSettings.toObject(message.chatLockSettings, options);
            if (message.chatDbLidMigrationTimestamp != null && message.hasOwnProperty("chatDbLidMigrationTimestamp"))
                if (typeof message.chatDbLidMigrationTimestamp === "number")
                    object.chatDbLidMigrationTimestamp = options.longs === String ? String(message.chatDbLidMigrationTimestamp) : message.chatDbLidMigrationTimestamp;
                else
                    object.chatDbLidMigrationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.chatDbLidMigrationTimestamp) : options.longs === Number ? new $util.LongBits(message.chatDbLidMigrationTimestamp.low >>> 0, message.chatDbLidMigrationTimestamp.high >>> 0).toNumber() : message.chatDbLidMigrationTimestamp;
            return object;
        };

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

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

        return GlobalSettings;
    })();

    HistorySync.WallpaperSettings = (function() {

        /**
         * Properties of a WallpaperSettings.
         * @memberof HistorySync
         * @interface IWallpaperSettings
         * @property {string|null} [filename] WallpaperSettings filename
         * @property {number|null} [opacity] WallpaperSettings opacity
         */

        /**
         * Constructs a new WallpaperSettings.
         * @memberof HistorySync
         * @classdesc Represents a WallpaperSettings.
         * @implements IWallpaperSettings
         * @constructor
         * @param {HistorySync.IWallpaperSettings=} [properties] Properties to set
         */
        function WallpaperSettings(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * WallpaperSettings filename.
         * @member {string} filename
         * @memberof HistorySync.WallpaperSettings
         * @instance
         */
        WallpaperSettings.prototype.filename = "";

        /**
         * WallpaperSettings opacity.
         * @member {number} opacity
         * @memberof HistorySync.WallpaperSettings
         * @instance
         */
        WallpaperSettings.prototype.opacity = 0;

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

        /**
         * Encodes the specified WallpaperSettings message. Does not implicitly {@link HistorySync.WallpaperSettings.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.WallpaperSettings
         * @static
         * @param {HistorySync.IWallpaperSettings} message WallpaperSettings message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        WallpaperSettings.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.opacity != null && Object.hasOwnProperty.call(message, "opacity"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.opacity);
            return writer;
        };

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

        /**
         * Decodes a WallpaperSettings message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.WallpaperSettings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.WallpaperSettings} WallpaperSettings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        WallpaperSettings.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.WallpaperSettings();
            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.opacity = reader.uint32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a WallpaperSettings message.
         * @function verify
         * @memberof HistorySync.WallpaperSettings
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        WallpaperSettings.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.filename != null && message.hasOwnProperty("filename"))
                if (!$util.isString(message.filename))
                    return "filename: string expected";
            if (message.opacity != null && message.hasOwnProperty("opacity"))
                if (!$util.isInteger(message.opacity))
                    return "opacity: integer expected";
            return null;
        };

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

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

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

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

        return WallpaperSettings;
    })();

    HistorySync.GroupParticipant = (function() {

        /**
         * Properties of a GroupParticipant.
         * @memberof HistorySync
         * @interface IGroupParticipant
         * @property {string} userJid GroupParticipant userJid
         * @property {HistorySync.GroupParticipant.Rank|null} [rank] GroupParticipant rank
         * @property {E2E.IMemberLabel|null} [memberLabel] GroupParticipant memberLabel
         */

        /**
         * Constructs a new GroupParticipant.
         * @memberof HistorySync
         * @classdesc Represents a GroupParticipant.
         * @implements IGroupParticipant
         * @constructor
         * @param {HistorySync.IGroupParticipant=} [properties] Properties to set
         */
        function GroupParticipant(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * GroupParticipant userJid.
         * @member {string} userJid
         * @memberof HistorySync.GroupParticipant
         * @instance
         */
        GroupParticipant.prototype.userJid = "";

        /**
         * GroupParticipant rank.
         * @member {HistorySync.GroupParticipant.Rank} rank
         * @memberof HistorySync.GroupParticipant
         * @instance
         */
        GroupParticipant.prototype.rank = 0;

        /**
         * GroupParticipant memberLabel.
         * @member {E2E.IMemberLabel|null|undefined} memberLabel
         * @memberof HistorySync.GroupParticipant
         * @instance
         */
        GroupParticipant.prototype.memberLabel = null;

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

        /**
         * Encodes the specified GroupParticipant message. Does not implicitly {@link HistorySync.GroupParticipant.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.GroupParticipant
         * @static
         * @param {HistorySync.IGroupParticipant} message GroupParticipant message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GroupParticipant.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid);
            if (message.rank != null && Object.hasOwnProperty.call(message, "rank"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rank);
            if (message.memberLabel != null && Object.hasOwnProperty.call(message, "memberLabel"))
                $root.E2E.MemberLabel.encode(message.memberLabel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a GroupParticipant message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.GroupParticipant
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.GroupParticipant} GroupParticipant
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GroupParticipant.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.GroupParticipant();
            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.rank = reader.int32();
                        break;
                    }
                case 3: {
                        message.memberLabel = $root.E2E.MemberLabel.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("userJid"))
                throw $util.ProtocolError("missing required 'userJid'", { instance: message });
            return message;
        };

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

        /**
         * Verifies a GroupParticipant message.
         * @function verify
         * @memberof HistorySync.GroupParticipant
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        GroupParticipant.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isString(message.userJid))
                return "userJid: string expected";
            if (message.rank != null && message.hasOwnProperty("rank"))
                switch (message.rank) {
                default:
                    return "rank: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.memberLabel != null && message.hasOwnProperty("memberLabel")) {
                var error = $root.E2E.MemberLabel.verify(message.memberLabel);
                if (error)
                    return "memberLabel." + error;
            }
            return null;
        };

        /**
         * Creates a GroupParticipant message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.GroupParticipant
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.GroupParticipant} GroupParticipant
         */
        GroupParticipant.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.GroupParticipant)
                return object;
            var message = new $root.HistorySync.GroupParticipant();
            if (object.userJid != null)
                message.userJid = String(object.userJid);
            switch (object.rank) {
            default:
                if (typeof object.rank === "number") {
                    message.rank = object.rank;
                    break;
                }
                break;
            case "REGULAR":
            case 0:
                message.rank = 0;
                break;
            case "ADMIN":
            case 1:
                message.rank = 1;
                break;
            case "SUPERADMIN":
            case 2:
                message.rank = 2;
                break;
            }
            if (object.memberLabel != null) {
                if (typeof object.memberLabel !== "object")
                    throw TypeError(".HistorySync.GroupParticipant.memberLabel: object expected");
                message.memberLabel = $root.E2E.MemberLabel.fromObject(object.memberLabel);
            }
            return message;
        };

        /**
         * Creates a plain object from a GroupParticipant message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.GroupParticipant
         * @static
         * @param {HistorySync.GroupParticipant} message GroupParticipant
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        GroupParticipant.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.userJid = "";
                object.rank = options.enums === String ? "REGULAR" : 0;
                object.memberLabel = null;
            }
            if (message.userJid != null && message.hasOwnProperty("userJid"))
                object.userJid = message.userJid;
            if (message.rank != null && message.hasOwnProperty("rank"))
                object.rank = options.enums === String ? $root.HistorySync.GroupParticipant.Rank[message.rank] === undefined ? message.rank : $root.HistorySync.GroupParticipant.Rank[message.rank] : message.rank;
            if (message.memberLabel != null && message.hasOwnProperty("memberLabel"))
                object.memberLabel = $root.E2E.MemberLabel.toObject(message.memberLabel, options);
            return object;
        };

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

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

        /**
         * Rank enum.
         * @name HistorySync.GroupParticipant.Rank
         * @enum {number}
         * @property {number} REGULAR=0 REGULAR value
         * @property {number} ADMIN=1 ADMIN value
         * @property {number} SUPERADMIN=2 SUPERADMIN value
         */
        GroupParticipant.Rank = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "REGULAR"] = 0;
            values[valuesById[1] = "ADMIN"] = 1;
            values[valuesById[2] = "SUPERADMIN"] = 2;
            return values;
        })();

        return GroupParticipant;
    })();

    HistorySync.Pushname = (function() {

        /**
         * Properties of a Pushname.
         * @memberof HistorySync
         * @interface IPushname
         * @property {string|null} [id] Pushname id
         * @property {string|null} [pushname] Pushname pushname
         */

        /**
         * Constructs a new Pushname.
         * @memberof HistorySync
         * @classdesc Represents a Pushname.
         * @implements IPushname
         * @constructor
         * @param {HistorySync.IPushname=} [properties] Properties to set
         */
        function Pushname(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Pushname id.
         * @member {string} id
         * @memberof HistorySync.Pushname
         * @instance
         */
        Pushname.prototype.id = "";

        /**
         * Pushname pushname.
         * @member {string} pushname
         * @memberof HistorySync.Pushname
         * @instance
         */
        Pushname.prototype.pushname = "";

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

        /**
         * Encodes the specified Pushname message. Does not implicitly {@link HistorySync.Pushname.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.Pushname
         * @static
         * @param {HistorySync.IPushname} message Pushname message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Pushname.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.pushname != null && Object.hasOwnProperty.call(message, "pushname"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.pushname);
            return writer;
        };

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

        /**
         * Decodes a Pushname message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.Pushname
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.Pushname} Pushname
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Pushname.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.Pushname();
            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.pushname = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

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

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

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

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

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

        return Pushname;
    })();

    HistorySync.HistorySyncMsg = (function() {

        /**
         * Properties of a HistorySyncMsg.
         * @memberof HistorySync
         * @interface IHistorySyncMsg
         * @property {Web.IWebMessageInfo|null} [message] HistorySyncMsg message
         * @property {number|Long|null} [msgOrderId] HistorySyncMsg msgOrderId
         */

        /**
         * Constructs a new HistorySyncMsg.
         * @memberof HistorySync
         * @classdesc Represents a HistorySyncMsg.
         * @implements IHistorySyncMsg
         * @constructor
         * @param {HistorySync.IHistorySyncMsg=} [properties] Properties to set
         */
        function HistorySyncMsg(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * HistorySyncMsg message.
         * @member {Web.IWebMessageInfo|null|undefined} message
         * @memberof HistorySync.HistorySyncMsg
         * @instance
         */
        HistorySyncMsg.prototype.message = null;

        /**
         * HistorySyncMsg msgOrderId.
         * @member {number|Long} msgOrderId
         * @memberof HistorySync.HistorySyncMsg
         * @instance
         */
        HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

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

        /**
         * Decodes a HistorySyncMsg message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.HistorySyncMsg
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.HistorySyncMsg} HistorySyncMsg
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HistorySyncMsg.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.HistorySyncMsg();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.message = $root.Web.WebMessageInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.msgOrderId = reader.uint64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

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

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

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

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

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

        return HistorySyncMsg;
    })();

    HistorySync.Account = (function() {

        /**
         * Properties of an Account.
         * @memberof HistorySync
         * @interface IAccount
         * @property {string|null} [lid] Account lid
         * @property {string|null} [username] Account username
         * @property {string|null} [countryCode] Account countryCode
         * @property {boolean|null} [isUsernameDeleted] Account isUsernameDeleted
         */

        /**
         * Constructs a new Account.
         * @memberof HistorySync
         * @classdesc Represents an Account.
         * @implements IAccount
         * @constructor
         * @param {HistorySync.IAccount=} [properties] Properties to set
         */
        function Account(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Account lid.
         * @member {string} lid
         * @memberof HistorySync.Account
         * @instance
         */
        Account.prototype.lid = "";

        /**
         * Account username.
         * @member {string} username
         * @memberof HistorySync.Account
         * @instance
         */
        Account.prototype.username = "";

        /**
         * Account countryCode.
         * @member {string} countryCode
         * @memberof HistorySync.Account
         * @instance
         */
        Account.prototype.countryCode = "";

        /**
         * Account isUsernameDeleted.
         * @member {boolean} isUsernameDeleted
         * @memberof HistorySync.Account
         * @instance
         */
        Account.prototype.isUsernameDeleted = false;

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

        /**
         * Encodes the specified Account message. Does not implicitly {@link HistorySync.Account.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.Account
         * @static
         * @param {HistorySync.IAccount} message Account message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Account.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.lid != null && Object.hasOwnProperty.call(message, "lid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.lid);
            if (message.username != null && Object.hasOwnProperty.call(message, "username"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.username);
            if (message.countryCode != null && Object.hasOwnProperty.call(message, "countryCode"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.countryCode);
            if (message.isUsernameDeleted != null && Object.hasOwnProperty.call(message, "isUsernameDeleted"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isUsernameDeleted);
            return writer;
        };

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

        /**
         * Decodes an Account message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.Account
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.Account} Account
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Account.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.Account();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.lid = reader.string();
                        break;
                    }
                case 2: {
                        message.username = reader.string();
                        break;
                    }
                case 3: {
                        message.countryCode = reader.string();
                        break;
                    }
                case 4: {
                        message.isUsernameDeleted = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies an Account message.
         * @function verify
         * @memberof HistorySync.Account
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Account.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.lid != null && message.hasOwnProperty("lid"))
                if (!$util.isString(message.lid))
                    return "lid: string expected";
            if (message.username != null && message.hasOwnProperty("username"))
                if (!$util.isString(message.username))
                    return "username: string expected";
            if (message.countryCode != null && message.hasOwnProperty("countryCode"))
                if (!$util.isString(message.countryCode))
                    return "countryCode: string expected";
            if (message.isUsernameDeleted != null && message.hasOwnProperty("isUsernameDeleted"))
                if (typeof message.isUsernameDeleted !== "boolean")
                    return "isUsernameDeleted: boolean expected";
            return null;
        };

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

        /**
         * Creates a plain object from an Account message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.Account
         * @static
         * @param {HistorySync.Account} message Account
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Account.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.lid = "";
                object.username = "";
                object.countryCode = "";
                object.isUsernameDeleted = false;
            }
            if (message.lid != null && message.hasOwnProperty("lid"))
                object.lid = message.lid;
            if (message.username != null && message.hasOwnProperty("username"))
                object.username = message.username;
            if (message.countryCode != null && message.hasOwnProperty("countryCode"))
                object.countryCode = message.countryCode;
            if (message.isUsernameDeleted != null && message.hasOwnProperty("isUsernameDeleted"))
                object.isUsernameDeleted = message.isUsernameDeleted;
            return object;
        };

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

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

        return Account;
    })();

    HistorySync.PhoneNumberToLIDMapping = (function() {

        /**
         * Properties of a PhoneNumberToLIDMapping.
         * @memberof HistorySync
         * @interface IPhoneNumberToLIDMapping
         * @property {string|null} [pnJid] PhoneNumberToLIDMapping pnJid
         * @property {string|null} [lidJid] PhoneNumberToLIDMapping lidJid
         */

        /**
         * Constructs a new PhoneNumberToLIDMapping.
         * @memberof HistorySync
         * @classdesc Represents a PhoneNumberToLIDMapping.
         * @implements IPhoneNumberToLIDMapping
         * @constructor
         * @param {HistorySync.IPhoneNumberToLIDMapping=} [properties] Properties to set
         */
        function PhoneNumberToLIDMapping(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * PhoneNumberToLIDMapping pnJid.
         * @member {string} pnJid
         * @memberof HistorySync.PhoneNumberToLIDMapping
         * @instance
         */
        PhoneNumberToLIDMapping.prototype.pnJid = "";

        /**
         * PhoneNumberToLIDMapping lidJid.
         * @member {string} lidJid
         * @memberof HistorySync.PhoneNumberToLIDMapping
         * @instance
         */
        PhoneNumberToLIDMapping.prototype.lidJid = "";

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

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

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

        /**
         * Decodes a PhoneNumberToLIDMapping message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.PhoneNumberToLIDMapping
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.PhoneNumberToLIDMapping} PhoneNumberToLIDMapping
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PhoneNumberToLIDMapping.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.PhoneNumberToLIDMapping();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.pnJid = reader.string();
                        break;
                    }
                case 2: {
                        message.lidJid = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

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

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

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

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

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

        return PhoneNumberToLIDMapping;
    })();

    HistorySync.Conversation = (function() {

        /**
         * Properties of a Conversation.
         * @memberof HistorySync
         * @interface IConversation
         * @property {string} id Conversation id
         * @property {Array.<HistorySync.IHistorySyncMsg>|null} [messages] Conversation messages
         * @property {string|null} [newJid] Conversation newJid
         * @property {string|null} [oldJid] Conversation oldJid
         * @property {number|Long|null} [lastMsgTimestamp] Conversation lastMsgTimestamp
         * @property {number|null} [unreadCount] Conversation unreadCount
         * @property {boolean|null} [readOnly] Conversation readOnly
         * @property {boolean|null} [endOfHistoryTransfer] Conversation endOfHistoryTransfer
         * @property {number|null} [ephemeralExpiration] Conversation ephemeralExpiration
         * @property {number|Long|null} [ephemeralSettingTimestamp] Conversation ephemeralSettingTimestamp
         * @property {HistorySync.Conversation.EndOfHistoryTransferType|null} [endOfHistoryTransferType] Conversation endOfHistoryTransferType
         * @property {number|Long|null} [conversationTimestamp] Conversation conversationTimestamp
         * @property {string|null} [name] Conversation name
         * @property {string|null} [pHash] Conversation pHash
         * @property {boolean|null} [notSpam] Conversation notSpam
         * @property {boolean|null} [archived] Conversation archived
         * @property {E2E.IDisappearingMode|null} [disappearingMode] Conversation disappearingMode
         * @property {number|null} [unreadMentionCount] Conversation unreadMentionCount
         * @property {boolean|null} [markedAsUnread] Conversation markedAsUnread
         * @property {Array.<HistorySync.IGroupParticipant>|null} [participant] Conversation participant
         * @property {Uint8Array|null} [tcToken] Conversation tcToken
         * @property {number|Long|null} [tcTokenTimestamp] Conversation tcTokenTimestamp
         * @property {Uint8Array|null} [contactPrimaryIdentityKey] Conversation contactPrimaryIdentityKey
         * @property {number|null} [pinned] Conversation pinned
         * @property {number|Long|null} [muteEndTime] Conversation muteEndTime
         * @property {HistorySync.IWallpaperSettings|null} [wallpaper] Conversation wallpaper
         * @property {HistorySync.MediaVisibility|null} [mediaVisibility] Conversation mediaVisibility
         * @property {number|Long|null} [tcTokenSenderTimestamp] Conversation tcTokenSenderTimestamp
         * @property {boolean|null} [suspended] Conversation suspended
         * @property {boolean|null} [terminated] Conversation terminated
         * @property {number|Long|null} [createdAt] Conversation createdAt
         * @property {string|null} [createdBy] Conversation createdBy
         * @property {string|null} [description] Conversation description
         * @property {boolean|null} [support] Conversation support
         * @property {boolean|null} [isParentGroup] Conversation isParentGroup
         * @property {string|null} [parentGroupId] Conversation parentGroupId
         * @property {boolean|null} [isDefaultSubgroup] Conversation isDefaultSubgroup
         * @property {string|null} [displayName] Conversation displayName
         * @property {string|null} [pnJid] Conversation pnJid
         * @property {boolean|null} [shareOwnPn] Conversation shareOwnPn
         * @property {boolean|null} [pnhDuplicateLidThread] Conversation pnhDuplicateLidThread
         * @property {string|null} [lidJid] Conversation lidJid
         * @property {string|null} [username] Conversation username
         * @property {string|null} [lidOriginType] Conversation lidOriginType
         * @property {number|null} [commentsCount] Conversation commentsCount
         * @property {boolean|null} [locked] Conversation locked
         * @property {HistorySync.PrivacySystemMessage|null} [systemMessageToInsert] Conversation systemMessageToInsert
         * @property {boolean|null} [capiCreatedGroup] Conversation capiCreatedGroup
         * @property {string|null} [accountLid] Conversation accountLid
         * @property {boolean|null} [limitSharing] Conversation limitSharing
         * @property {number|Long|null} [limitSharingSettingTimestamp] Conversation limitSharingSettingTimestamp
         * @property {Protocol.LimitSharing.TriggerType|null} [limitSharingTrigger] Conversation limitSharingTrigger
         * @property {boolean|null} [limitSharingInitiatedByMe] Conversation limitSharingInitiatedByMe
         * @property {boolean|null} [maibaAiThreadEnabled] Conversation maibaAiThreadEnabled
         */

        /**
         * Constructs a new Conversation.
         * @memberof HistorySync
         * @classdesc Represents a Conversation.
         * @implements IConversation
         * @constructor
         * @param {HistorySync.IConversation=} [properties] Properties to set
         */
        function Conversation(properties) {
            this.messages = [];
            this.participant = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Conversation id.
         * @member {string} id
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.id = "";

        /**
         * Conversation messages.
         * @member {Array.<HistorySync.IHistorySyncMsg>} messages
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.messages = $util.emptyArray;

        /**
         * Conversation newJid.
         * @member {string} newJid
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.newJid = "";

        /**
         * Conversation oldJid.
         * @member {string} oldJid
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.oldJid = "";

        /**
         * Conversation lastMsgTimestamp.
         * @member {number|Long} lastMsgTimestamp
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.lastMsgTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Conversation unreadCount.
         * @member {number} unreadCount
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.unreadCount = 0;

        /**
         * Conversation readOnly.
         * @member {boolean} readOnly
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.readOnly = false;

        /**
         * Conversation endOfHistoryTransfer.
         * @member {boolean} endOfHistoryTransfer
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.endOfHistoryTransfer = false;

        /**
         * Conversation ephemeralExpiration.
         * @member {number} ephemeralExpiration
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.ephemeralExpiration = 0;

        /**
         * Conversation ephemeralSettingTimestamp.
         * @member {number|Long} ephemeralSettingTimestamp
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Conversation endOfHistoryTransferType.
         * @member {HistorySync.Conversation.EndOfHistoryTransferType} endOfHistoryTransferType
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.endOfHistoryTransferType = 0;

        /**
         * Conversation conversationTimestamp.
         * @member {number|Long} conversationTimestamp
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.conversationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Conversation name.
         * @member {string} name
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.name = "";

        /**
         * Conversation pHash.
         * @member {string} pHash
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.pHash = "";

        /**
         * Conversation notSpam.
         * @member {boolean} notSpam
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.notSpam = false;

        /**
         * Conversation archived.
         * @member {boolean} archived
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.archived = false;

        /**
         * Conversation disappearingMode.
         * @member {E2E.IDisappearingMode|null|undefined} disappearingMode
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.disappearingMode = null;

        /**
         * Conversation unreadMentionCount.
         * @member {number} unreadMentionCount
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.unreadMentionCount = 0;

        /**
         * Conversation markedAsUnread.
         * @member {boolean} markedAsUnread
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.markedAsUnread = false;

        /**
         * Conversation participant.
         * @member {Array.<HistorySync.IGroupParticipant>} participant
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.participant = $util.emptyArray;

        /**
         * Conversation tcToken.
         * @member {Uint8Array} tcToken
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.tcToken = $util.newBuffer([]);

        /**
         * Conversation tcTokenTimestamp.
         * @member {number|Long} tcTokenTimestamp
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.tcTokenTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Conversation contactPrimaryIdentityKey.
         * @member {Uint8Array} contactPrimaryIdentityKey
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.contactPrimaryIdentityKey = $util.newBuffer([]);

        /**
         * Conversation pinned.
         * @member {number} pinned
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.pinned = 0;

        /**
         * Conversation muteEndTime.
         * @member {number|Long} muteEndTime
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.muteEndTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Conversation wallpaper.
         * @member {HistorySync.IWallpaperSettings|null|undefined} wallpaper
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.wallpaper = null;

        /**
         * Conversation mediaVisibility.
         * @member {HistorySync.MediaVisibility} mediaVisibility
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.mediaVisibility = 0;

        /**
         * Conversation tcTokenSenderTimestamp.
         * @member {number|Long} tcTokenSenderTimestamp
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.tcTokenSenderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Conversation suspended.
         * @member {boolean} suspended
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.suspended = false;

        /**
         * Conversation terminated.
         * @member {boolean} terminated
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.terminated = false;

        /**
         * Conversation createdAt.
         * @member {number|Long} createdAt
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Conversation createdBy.
         * @member {string} createdBy
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.createdBy = "";

        /**
         * Conversation description.
         * @member {string} description
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.description = "";

        /**
         * Conversation support.
         * @member {boolean} support
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.support = false;

        /**
         * Conversation isParentGroup.
         * @member {boolean} isParentGroup
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.isParentGroup = false;

        /**
         * Conversation parentGroupId.
         * @member {string} parentGroupId
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.parentGroupId = "";

        /**
         * Conversation isDefaultSubgroup.
         * @member {boolean} isDefaultSubgroup
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.isDefaultSubgroup = false;

        /**
         * Conversation displayName.
         * @member {string} displayName
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.displayName = "";

        /**
         * Conversation pnJid.
         * @member {string} pnJid
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.pnJid = "";

        /**
         * Conversation shareOwnPn.
         * @member {boolean} shareOwnPn
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.shareOwnPn = false;

        /**
         * Conversation pnhDuplicateLidThread.
         * @member {boolean} pnhDuplicateLidThread
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.pnhDuplicateLidThread = false;

        /**
         * Conversation lidJid.
         * @member {string} lidJid
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.lidJid = "";

        /**
         * Conversation username.
         * @member {string} username
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.username = "";

        /**
         * Conversation lidOriginType.
         * @member {string} lidOriginType
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.lidOriginType = "";

        /**
         * Conversation commentsCount.
         * @member {number} commentsCount
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.commentsCount = 0;

        /**
         * Conversation locked.
         * @member {boolean} locked
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.locked = false;

        /**
         * Conversation systemMessageToInsert.
         * @member {HistorySync.PrivacySystemMessage} systemMessageToInsert
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.systemMessageToInsert = 1;

        /**
         * Conversation capiCreatedGroup.
         * @member {boolean} capiCreatedGroup
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.capiCreatedGroup = false;

        /**
         * Conversation accountLid.
         * @member {string} accountLid
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.accountLid = "";

        /**
         * Conversation limitSharing.
         * @member {boolean} limitSharing
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.limitSharing = false;

        /**
         * Conversation limitSharingSettingTimestamp.
         * @member {number|Long} limitSharingSettingTimestamp
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.limitSharingSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Conversation limitSharingTrigger.
         * @member {Protocol.LimitSharing.TriggerType} limitSharingTrigger
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.limitSharingTrigger = 0;

        /**
         * Conversation limitSharingInitiatedByMe.
         * @member {boolean} limitSharingInitiatedByMe
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.limitSharingInitiatedByMe = false;

        /**
         * Conversation maibaAiThreadEnabled.
         * @member {boolean} maibaAiThreadEnabled
         * @memberof HistorySync.Conversation
         * @instance
         */
        Conversation.prototype.maibaAiThreadEnabled = false;

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

        /**
         * Encodes the specified Conversation message. Does not implicitly {@link HistorySync.Conversation.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.Conversation
         * @static
         * @param {HistorySync.IConversation} message Conversation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Conversation.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
            if (message.messages != null && message.messages.length)
                for (var i = 0; i < message.messages.length; ++i)
                    $root.HistorySync.HistorySyncMsg.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.newJid != null && Object.hasOwnProperty.call(message, "newJid"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.newJid);
            if (message.oldJid != null && Object.hasOwnProperty.call(message, "oldJid"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldJid);
            if (message.lastMsgTimestamp != null && Object.hasOwnProperty.call(message, "lastMsgTimestamp"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.lastMsgTimestamp);
            if (message.unreadCount != null && Object.hasOwnProperty.call(message, "unreadCount"))
                writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.unreadCount);
            if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly"))
                writer.uint32(/* id 7, wireType 0 =*/56).bool(message.readOnly);
            if (message.endOfHistoryTransfer != null && Object.hasOwnProperty.call(message, "endOfHistoryTransfer"))
                writer.uint32(/* id 8, wireType 0 =*/64).bool(message.endOfHistoryTransfer);
            if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration"))
                writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.ephemeralExpiration);
            if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp"))
                writer.uint32(/* id 10, wireType 0 =*/80).int64(message.ephemeralSettingTimestamp);
            if (message.endOfHistoryTransferType != null && Object.hasOwnProperty.call(message, "endOfHistoryTransferType"))
                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.endOfHistoryTransferType);
            if (message.conversationTimestamp != null && Object.hasOwnProperty.call(message, "conversationTimestamp"))
                writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.conversationTimestamp);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 13, wireType 2 =*/106).string(message.name);
            if (message.pHash != null && Object.hasOwnProperty.call(message, "pHash"))
                writer.uint32(/* id 14, wireType 2 =*/114).string(message.pHash);
            if (message.notSpam != null && Object.hasOwnProperty.call(message, "notSpam"))
                writer.uint32(/* id 15, wireType 0 =*/120).bool(message.notSpam);
            if (message.archived != null && Object.hasOwnProperty.call(message, "archived"))
                writer.uint32(/* id 16, wireType 0 =*/128).bool(message.archived);
            if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode"))
                $root.E2E.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
            if (message.unreadMentionCount != null && Object.hasOwnProperty.call(message, "unreadMentionCount"))
                writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.unreadMentionCount);
            if (message.markedAsUnread != null && Object.hasOwnProperty.call(message, "markedAsUnread"))
                writer.uint32(/* id 19, wireType 0 =*/152).bool(message.markedAsUnread);
            if (message.participant != null && message.participant.length)
                for (var i = 0; i < message.participant.length; ++i)
                    $root.HistorySync.GroupParticipant.encode(message.participant[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
            if (message.tcToken != null && Object.hasOwnProperty.call(message, "tcToken"))
                writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.tcToken);
            if (message.tcTokenTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenTimestamp"))
                writer.uint32(/* id 22, wireType 0 =*/176).uint64(message.tcTokenTimestamp);
            if (message.contactPrimaryIdentityKey != null && Object.hasOwnProperty.call(message, "contactPrimaryIdentityKey"))
                writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.contactPrimaryIdentityKey);
            if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned"))
                writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.pinned);
            if (message.muteEndTime != null && Object.hasOwnProperty.call(message, "muteEndTime"))
                writer.uint32(/* id 25, wireType 0 =*/200).uint64(message.muteEndTime);
            if (message.wallpaper != null && Object.hasOwnProperty.call(message, "wallpaper"))
                $root.HistorySync.WallpaperSettings.encode(message.wallpaper, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
            if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility"))
                writer.uint32(/* id 27, wireType 0 =*/216).int32(message.mediaVisibility);
            if (message.tcTokenSenderTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenSenderTimestamp"))
                writer.uint32(/* id 28, wireType 0 =*/224).uint64(message.tcTokenSenderTimestamp);
            if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended"))
                writer.uint32(/* id 29, wireType 0 =*/232).bool(message.suspended);
            if (message.terminated != null && Object.hasOwnProperty.call(message, "terminated"))
                writer.uint32(/* id 30, wireType 0 =*/240).bool(message.terminated);
            if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt"))
                writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.createdAt);
            if (message.createdBy != null && Object.hasOwnProperty.call(message, "createdBy"))
                writer.uint32(/* id 32, wireType 2 =*/258).string(message.createdBy);
            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                writer.uint32(/* id 33, wireType 2 =*/266).string(message.description);
            if (message.support != null && Object.hasOwnProperty.call(message, "support"))
                writer.uint32(/* id 34, wireType 0 =*/272).bool(message.support);
            if (message.isParentGroup != null && Object.hasOwnProperty.call(message, "isParentGroup"))
                writer.uint32(/* id 35, wireType 0 =*/280).bool(message.isParentGroup);
            if (message.isDefaultSubgroup != null && Object.hasOwnProperty.call(message, "isDefaultSubgroup"))
                writer.uint32(/* id 36, wireType 0 =*/288).bool(message.isDefaultSubgroup);
            if (message.parentGroupId != null && Object.hasOwnProperty.call(message, "parentGroupId"))
                writer.uint32(/* id 37, wireType 2 =*/298).string(message.parentGroupId);
            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                writer.uint32(/* id 38, wireType 2 =*/306).string(message.displayName);
            if (message.pnJid != null && Object.hasOwnProperty.call(message, "pnJid"))
                writer.uint32(/* id 39, wireType 2 =*/314).string(message.pnJid);
            if (message.shareOwnPn != null && Object.hasOwnProperty.call(message, "shareOwnPn"))
                writer.uint32(/* id 40, wireType 0 =*/320).bool(message.shareOwnPn);
            if (message.pnhDuplicateLidThread != null && Object.hasOwnProperty.call(message, "pnhDuplicateLidThread"))
                writer.uint32(/* id 41, wireType 0 =*/328).bool(message.pnhDuplicateLidThread);
            if (message.lidJid != null && Object.hasOwnProperty.call(message, "lidJid"))
                writer.uint32(/* id 42, wireType 2 =*/338).string(message.lidJid);
            if (message.username != null && Object.hasOwnProperty.call(message, "username"))
                writer.uint32(/* id 43, wireType 2 =*/346).string(message.username);
            if (message.lidOriginType != null && Object.hasOwnProperty.call(message, "lidOriginType"))
                writer.uint32(/* id 44, wireType 2 =*/354).string(message.lidOriginType);
            if (message.commentsCount != null && Object.hasOwnProperty.call(message, "commentsCount"))
                writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.commentsCount);
            if (message.locked != null && Object.hasOwnProperty.call(message, "locked"))
                writer.uint32(/* id 46, wireType 0 =*/368).bool(message.locked);
            if (message.systemMessageToInsert != null && Object.hasOwnProperty.call(message, "systemMessageToInsert"))
                writer.uint32(/* id 47, wireType 0 =*/376).int32(message.systemMessageToInsert);
            if (message.capiCreatedGroup != null && Object.hasOwnProperty.call(message, "capiCreatedGroup"))
                writer.uint32(/* id 48, wireType 0 =*/384).bool(message.capiCreatedGroup);
            if (message.accountLid != null && Object.hasOwnProperty.call(message, "accountLid"))
                writer.uint32(/* id 49, wireType 2 =*/394).string(message.accountLid);
            if (message.limitSharing != null && Object.hasOwnProperty.call(message, "limitSharing"))
                writer.uint32(/* id 50, wireType 0 =*/400).bool(message.limitSharing);
            if (message.limitSharingSettingTimestamp != null && Object.hasOwnProperty.call(message, "limitSharingSettingTimestamp"))
                writer.uint32(/* id 51, wireType 0 =*/408).int64(message.limitSharingSettingTimestamp);
            if (message.limitSharingTrigger != null && Object.hasOwnProperty.call(message, "limitSharingTrigger"))
                writer.uint32(/* id 52, wireType 0 =*/416).int32(message.limitSharingTrigger);
            if (message.limitSharingInitiatedByMe != null && Object.hasOwnProperty.call(message, "limitSharingInitiatedByMe"))
                writer.uint32(/* id 53, wireType 0 =*/424).bool(message.limitSharingInitiatedByMe);
            if (message.maibaAiThreadEnabled != null && Object.hasOwnProperty.call(message, "maibaAiThreadEnabled"))
                writer.uint32(/* id 54, wireType 0 =*/432).bool(message.maibaAiThreadEnabled);
            return writer;
        };

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

        /**
         * Decodes a Conversation message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.Conversation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.Conversation} Conversation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Conversation.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.Conversation();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.id = reader.string();
                        break;
                    }
                case 2: {
                        if (!(message.messages && message.messages.length))
                            message.messages = [];
                        message.messages.push($root.HistorySync.HistorySyncMsg.decode(reader, reader.uint32()));
                        break;
                    }
                case 3: {
                        message.newJid = reader.string();
                        break;
                    }
                case 4: {
                        message.oldJid = reader.string();
                        break;
                    }
                case 5: {
                        message.lastMsgTimestamp = reader.uint64();
                        break;
                    }
                case 6: {
                        message.unreadCount = reader.uint32();
                        break;
                    }
                case 7: {
                        message.readOnly = reader.bool();
                        break;
                    }
                case 8: {
                        message.endOfHistoryTransfer = reader.bool();
                        break;
                    }
                case 9: {
                        message.ephemeralExpiration = reader.uint32();
                        break;
                    }
                case 10: {
                        message.ephemeralSettingTimestamp = reader.int64();
                        break;
                    }
                case 11: {
                        message.endOfHistoryTransferType = reader.int32();
                        break;
                    }
                case 12: {
                        message.conversationTimestamp = reader.uint64();
                        break;
                    }
                case 13: {
                        message.name = reader.string();
                        break;
                    }
                case 14: {
                        message.pHash = reader.string();
                        break;
                    }
                case 15: {
                        message.notSpam = reader.bool();
                        break;
                    }
                case 16: {
                        message.archived = reader.bool();
                        break;
                    }
                case 17: {
                        message.disappearingMode = $root.E2E.DisappearingMode.decode(reader, reader.uint32());
                        break;
                    }
                case 18: {
                        message.unreadMentionCount = reader.uint32();
                        break;
                    }
                case 19: {
                        message.markedAsUnread = reader.bool();
                        break;
                    }
                case 20: {
                        if (!(message.participant && message.participant.length))
                            message.participant = [];
                        message.participant.push($root.HistorySync.GroupParticipant.decode(reader, reader.uint32()));
                        break;
                    }
                case 21: {
                        message.tcToken = reader.bytes();
                        break;
                    }
                case 22: {
                        message.tcTokenTimestamp = reader.uint64();
                        break;
                    }
                case 23: {
                        message.contactPrimaryIdentityKey = reader.bytes();
                        break;
                    }
                case 24: {
                        message.pinned = reader.uint32();
                        break;
                    }
                case 25: {
                        message.muteEndTime = reader.uint64();
                        break;
                    }
                case 26: {
                        message.wallpaper = $root.HistorySync.WallpaperSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 27: {
                        message.mediaVisibility = reader.int32();
                        break;
                    }
                case 28: {
                        message.tcTokenSenderTimestamp = reader.uint64();
                        break;
                    }
                case 29: {
                        message.suspended = reader.bool();
                        break;
                    }
                case 30: {
                        message.terminated = reader.bool();
                        break;
                    }
                case 31: {
                        message.createdAt = reader.uint64();
                        break;
                    }
                case 32: {
                        message.createdBy = reader.string();
                        break;
                    }
                case 33: {
                        message.description = reader.string();
                        break;
                    }
                case 34: {
                        message.support = reader.bool();
                        break;
                    }
                case 35: {
                        message.isParentGroup = reader.bool();
                        break;
                    }
                case 37: {
                        message.parentGroupId = reader.string();
                        break;
                    }
                case 36: {
                        message.isDefaultSubgroup = reader.bool();
                        break;
                    }
                case 38: {
                        message.displayName = reader.string();
                        break;
                    }
                case 39: {
                        message.pnJid = reader.string();
                        break;
                    }
                case 40: {
                        message.shareOwnPn = reader.bool();
                        break;
                    }
                case 41: {
                        message.pnhDuplicateLidThread = reader.bool();
                        break;
                    }
                case 42: {
                        message.lidJid = reader.string();
                        break;
                    }
                case 43: {
                        message.username = reader.string();
                        break;
                    }
                case 44: {
                        message.lidOriginType = reader.string();
                        break;
                    }
                case 45: {
                        message.commentsCount = reader.uint32();
                        break;
                    }
                case 46: {
                        message.locked = reader.bool();
                        break;
                    }
                case 47: {
                        message.systemMessageToInsert = reader.int32();
                        break;
                    }
                case 48: {
                        message.capiCreatedGroup = reader.bool();
                        break;
                    }
                case 49: {
                        message.accountLid = reader.string();
                        break;
                    }
                case 50: {
                        message.limitSharing = reader.bool();
                        break;
                    }
                case 51: {
                        message.limitSharingSettingTimestamp = reader.int64();
                        break;
                    }
                case 52: {
                        message.limitSharingTrigger = reader.int32();
                        break;
                    }
                case 53: {
                        message.limitSharingInitiatedByMe = reader.bool();
                        break;
                    }
                case 54: {
                        message.maibaAiThreadEnabled = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("id"))
                throw $util.ProtocolError("missing required 'id'", { instance: message });
            return message;
        };

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

        /**
         * Verifies a Conversation message.
         * @function verify
         * @memberof HistorySync.Conversation
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Conversation.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (!$util.isString(message.id))
                return "id: string expected";
            if (message.messages != null && message.hasOwnProperty("messages")) {
                if (!Array.isArray(message.messages))
                    return "messages: array expected";
                for (var i = 0; i < message.messages.length; ++i) {
                    var error = $root.HistorySync.HistorySyncMsg.verify(message.messages[i]);
                    if (error)
                        return "messages." + error;
                }
            }
            if (message.newJid != null && message.hasOwnProperty("newJid"))
                if (!$util.isString(message.newJid))
                    return "newJid: string expected";
            if (message.oldJid != null && message.hasOwnProperty("oldJid"))
                if (!$util.isString(message.oldJid))
                    return "oldJid: string expected";
            if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp"))
                if (!$util.isInteger(message.lastMsgTimestamp) && !(message.lastMsgTimestamp && $util.isInteger(message.lastMsgTimestamp.low) && $util.isInteger(message.lastMsgTimestamp.high)))
                    return "lastMsgTimestamp: integer|Long expected";
            if (message.unreadCount != null && message.hasOwnProperty("unreadCount"))
                if (!$util.isInteger(message.unreadCount))
                    return "unreadCount: integer expected";
            if (message.readOnly != null && message.hasOwnProperty("readOnly"))
                if (typeof message.readOnly !== "boolean")
                    return "readOnly: boolean expected";
            if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer"))
                if (typeof message.endOfHistoryTransfer !== "boolean")
                    return "endOfHistoryTransfer: boolean expected";
            if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration"))
                if (!$util.isInteger(message.ephemeralExpiration))
                    return "ephemeralExpiration: integer expected";
            if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp"))
                if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high)))
                    return "ephemeralSettingTimestamp: integer|Long expected";
            if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType"))
                switch (message.endOfHistoryTransferType) {
                default:
                    return "endOfHistoryTransferType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp"))
                if (!$util.isInteger(message.conversationTimestamp) && !(message.conversationTimestamp && $util.isInteger(message.conversationTimestamp.low) && $util.isInteger(message.conversationTimestamp.high)))
                    return "conversationTimestamp: integer|Long expected";
            if (message.name != null && message.hasOwnProperty("name"))
                if (!$util.isString(message.name))
                    return "name: string expected";
            if (message.pHash != null && message.hasOwnProperty("pHash"))
                if (!$util.isString(message.pHash))
                    return "pHash: string expected";
            if (message.notSpam != null && message.hasOwnProperty("notSpam"))
                if (typeof message.notSpam !== "boolean")
                    return "notSpam: boolean expected";
            if (message.archived != null && message.hasOwnProperty("archived"))
                if (typeof message.archived !== "boolean")
                    return "archived: boolean expected";
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                var error = $root.E2E.DisappearingMode.verify(message.disappearingMode);
                if (error)
                    return "disappearingMode." + error;
            }
            if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount"))
                if (!$util.isInteger(message.unreadMentionCount))
                    return "unreadMentionCount: integer expected";
            if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread"))
                if (typeof message.markedAsUnread !== "boolean")
                    return "markedAsUnread: boolean expected";
            if (message.participant != null && message.hasOwnProperty("participant")) {
                if (!Array.isArray(message.participant))
                    return "participant: array expected";
                for (var i = 0; i < message.participant.length; ++i) {
                    var error = $root.HistorySync.GroupParticipant.verify(message.participant[i]);
                    if (error)
                        return "participant." + error;
                }
            }
            if (message.tcToken != null && message.hasOwnProperty("tcToken"))
                if (!(message.tcToken && typeof message.tcToken.length === "number" || $util.isString(message.tcToken)))
                    return "tcToken: buffer expected";
            if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp"))
                if (!$util.isInteger(message.tcTokenTimestamp) && !(message.tcTokenTimestamp && $util.isInteger(message.tcTokenTimestamp.low) && $util.isInteger(message.tcTokenTimestamp.high)))
                    return "tcTokenTimestamp: integer|Long expected";
            if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey"))
                if (!(message.contactPrimaryIdentityKey && typeof message.contactPrimaryIdentityKey.length === "number" || $util.isString(message.contactPrimaryIdentityKey)))
                    return "contactPrimaryIdentityKey: buffer expected";
            if (message.pinned != null && message.hasOwnProperty("pinned"))
                if (!$util.isInteger(message.pinned))
                    return "pinned: integer expected";
            if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime"))
                if (!$util.isInteger(message.muteEndTime) && !(message.muteEndTime && $util.isInteger(message.muteEndTime.low) && $util.isInteger(message.muteEndTime.high)))
                    return "muteEndTime: integer|Long expected";
            if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) {
                var error = $root.HistorySync.WallpaperSettings.verify(message.wallpaper);
                if (error)
                    return "wallpaper." + error;
            }
            if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility"))
                switch (message.mediaVisibility) {
                default:
                    return "mediaVisibility: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp"))
                if (!$util.isInteger(message.tcTokenSenderTimestamp) && !(message.tcTokenSenderTimestamp && $util.isInteger(message.tcTokenSenderTimestamp.low) && $util.isInteger(message.tcTokenSenderTimestamp.high)))
                    return "tcTokenSenderTimestamp: integer|Long expected";
            if (message.suspended != null && message.hasOwnProperty("suspended"))
                if (typeof message.suspended !== "boolean")
                    return "suspended: boolean expected";
            if (message.terminated != null && message.hasOwnProperty("terminated"))
                if (typeof message.terminated !== "boolean")
                    return "terminated: boolean expected";
            if (message.createdAt != null && message.hasOwnProperty("createdAt"))
                if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
                    return "createdAt: integer|Long expected";
            if (message.createdBy != null && message.hasOwnProperty("createdBy"))
                if (!$util.isString(message.createdBy))
                    return "createdBy: string expected";
            if (message.description != null && message.hasOwnProperty("description"))
                if (!$util.isString(message.description))
                    return "description: string expected";
            if (message.support != null && message.hasOwnProperty("support"))
                if (typeof message.support !== "boolean")
                    return "support: boolean expected";
            if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup"))
                if (typeof message.isParentGroup !== "boolean")
                    return "isParentGroup: boolean expected";
            if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId"))
                if (!$util.isString(message.parentGroupId))
                    return "parentGroupId: string expected";
            if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup"))
                if (typeof message.isDefaultSubgroup !== "boolean")
                    return "isDefaultSubgroup: boolean expected";
            if (message.displayName != null && message.hasOwnProperty("displayName"))
                if (!$util.isString(message.displayName))
                    return "displayName: string expected";
            if (message.pnJid != null && message.hasOwnProperty("pnJid"))
                if (!$util.isString(message.pnJid))
                    return "pnJid: string expected";
            if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn"))
                if (typeof message.shareOwnPn !== "boolean")
                    return "shareOwnPn: boolean expected";
            if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread"))
                if (typeof message.pnhDuplicateLidThread !== "boolean")
                    return "pnhDuplicateLidThread: boolean expected";
            if (message.lidJid != null && message.hasOwnProperty("lidJid"))
                if (!$util.isString(message.lidJid))
                    return "lidJid: string expected";
            if (message.username != null && message.hasOwnProperty("username"))
                if (!$util.isString(message.username))
                    return "username: string expected";
            if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType"))
                if (!$util.isString(message.lidOriginType))
                    return "lidOriginType: string expected";
            if (message.commentsCount != null && message.hasOwnProperty("commentsCount"))
                if (!$util.isInteger(message.commentsCount))
                    return "commentsCount: integer expected";
            if (message.locked != null && message.hasOwnProperty("locked"))
                if (typeof message.locked !== "boolean")
                    return "locked: boolean expected";
            if (message.systemMessageToInsert != null && message.hasOwnProperty("systemMessageToInsert"))
                switch (message.systemMessageToInsert) {
                default:
                    return "systemMessageToInsert: enum value expected";
                case 1:
                case 2:
                case 3:
                    break;
                }
            if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup"))
                if (typeof message.capiCreatedGroup !== "boolean")
                    return "capiCreatedGroup: boolean expected";
            if (message.accountLid != null && message.hasOwnProperty("accountLid"))
                if (!$util.isString(message.accountLid))
                    return "accountLid: string expected";
            if (message.limitSharing != null && message.hasOwnProperty("limitSharing"))
                if (typeof message.limitSharing !== "boolean")
                    return "limitSharing: boolean expected";
            if (message.limitSharingSettingTimestamp != null && message.hasOwnProperty("limitSharingSettingTimestamp"))
                if (!$util.isInteger(message.limitSharingSettingTimestamp) && !(message.limitSharingSettingTimestamp && $util.isInteger(message.limitSharingSettingTimestamp.low) && $util.isInteger(message.limitSharingSettingTimestamp.high)))
                    return "limitSharingSettingTimestamp: integer|Long expected";
            if (message.limitSharingTrigger != null && message.hasOwnProperty("limitSharingTrigger"))
                switch (message.limitSharingTrigger) {
                default:
                    return "limitSharingTrigger: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            if (message.limitSharingInitiatedByMe != null && message.hasOwnProperty("limitSharingInitiatedByMe"))
                if (typeof message.limitSharingInitiatedByMe !== "boolean")
                    return "limitSharingInitiatedByMe: boolean expected";
            if (message.maibaAiThreadEnabled != null && message.hasOwnProperty("maibaAiThreadEnabled"))
                if (typeof message.maibaAiThreadEnabled !== "boolean")
                    return "maibaAiThreadEnabled: boolean expected";
            return null;
        };

        /**
         * Creates a Conversation message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.Conversation
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.Conversation} Conversation
         */
        Conversation.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.Conversation)
                return object;
            var message = new $root.HistorySync.Conversation();
            if (object.id != null)
                message.id = String(object.id);
            if (object.messages) {
                if (!Array.isArray(object.messages))
                    throw TypeError(".HistorySync.Conversation.messages: array expected");
                message.messages = [];
                for (var i = 0; i < object.messages.length; ++i) {
                    if (typeof object.messages[i] !== "object")
                        throw TypeError(".HistorySync.Conversation.messages: object expected");
                    message.messages[i] = $root.HistorySync.HistorySyncMsg.fromObject(object.messages[i]);
                }
            }
            if (object.newJid != null)
                message.newJid = String(object.newJid);
            if (object.oldJid != null)
                message.oldJid = String(object.oldJid);
            if (object.lastMsgTimestamp != null)
                if ($util.Long)
                    (message.lastMsgTimestamp = $util.Long.fromValue(object.lastMsgTimestamp)).unsigned = true;
                else if (typeof object.lastMsgTimestamp === "string")
                    message.lastMsgTimestamp = parseInt(object.lastMsgTimestamp, 10);
                else if (typeof object.lastMsgTimestamp === "number")
                    message.lastMsgTimestamp = object.lastMsgTimestamp;
                else if (typeof object.lastMsgTimestamp === "object")
                    message.lastMsgTimestamp = new $util.LongBits(object.lastMsgTimestamp.low >>> 0, object.lastMsgTimestamp.high >>> 0).toNumber(true);
            if (object.unreadCount != null)
                message.unreadCount = object.unreadCount >>> 0;
            if (object.readOnly != null)
                message.readOnly = Boolean(object.readOnly);
            if (object.endOfHistoryTransfer != null)
                message.endOfHistoryTransfer = Boolean(object.endOfHistoryTransfer);
            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();
            switch (object.endOfHistoryTransferType) {
            default:
                if (typeof object.endOfHistoryTransferType === "number") {
                    message.endOfHistoryTransferType = object.endOfHistoryTransferType;
                    break;
                }
                break;
            case "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY":
            case 0:
                message.endOfHistoryTransferType = 0;
                break;
            case "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY":
            case 1:
                message.endOfHistoryTransferType = 1;
                break;
            case "COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY":
            case 2:
                message.endOfHistoryTransferType = 2;
                break;
            }
            if (object.conversationTimestamp != null)
                if ($util.Long)
                    (message.conversationTimestamp = $util.Long.fromValue(object.conversationTimestamp)).unsigned = true;
                else if (typeof object.conversationTimestamp === "string")
                    message.conversationTimestamp = parseInt(object.conversationTimestamp, 10);
                else if (typeof object.conversationTimestamp === "number")
                    message.conversationTimestamp = object.conversationTimestamp;
                else if (typeof object.conversationTimestamp === "object")
                    message.conversationTimestamp = new $util.LongBits(object.conversationTimestamp.low >>> 0, object.conversationTimestamp.high >>> 0).toNumber(true);
            if (object.name != null)
                message.name = String(object.name);
            if (object.pHash != null)
                message.pHash = String(object.pHash);
            if (object.notSpam != null)
                message.notSpam = Boolean(object.notSpam);
            if (object.archived != null)
                message.archived = Boolean(object.archived);
            if (object.disappearingMode != null) {
                if (typeof object.disappearingMode !== "object")
                    throw TypeError(".HistorySync.Conversation.disappearingMode: object expected");
                message.disappearingMode = $root.E2E.DisappearingMode.fromObject(object.disappearingMode);
            }
            if (object.unreadMentionCount != null)
                message.unreadMentionCount = object.unreadMentionCount >>> 0;
            if (object.markedAsUnread != null)
                message.markedAsUnread = Boolean(object.markedAsUnread);
            if (object.participant) {
                if (!Array.isArray(object.participant))
                    throw TypeError(".HistorySync.Conversation.participant: array expected");
                message.participant = [];
                for (var i = 0; i < object.participant.length; ++i) {
                    if (typeof object.participant[i] !== "object")
                        throw TypeError(".HistorySync.Conversation.participant: object expected");
                    message.participant[i] = $root.HistorySync.GroupParticipant.fromObject(object.participant[i]);
                }
            }
            if (object.tcToken != null)
                if (typeof object.tcToken === "string")
                    $util.base64.decode(object.tcToken, message.tcToken = $util.newBuffer($util.base64.length(object.tcToken)), 0);
                else if (object.tcToken.length >= 0)
                    message.tcToken = object.tcToken;
            if (object.tcTokenTimestamp != null)
                if ($util.Long)
                    (message.tcTokenTimestamp = $util.Long.fromValue(object.tcTokenTimestamp)).unsigned = true;
                else if (typeof object.tcTokenTimestamp === "string")
                    message.tcTokenTimestamp = parseInt(object.tcTokenTimestamp, 10);
                else if (typeof object.tcTokenTimestamp === "number")
                    message.tcTokenTimestamp = object.tcTokenTimestamp;
                else if (typeof object.tcTokenTimestamp === "object")
                    message.tcTokenTimestamp = new $util.LongBits(object.tcTokenTimestamp.low >>> 0, object.tcTokenTimestamp.high >>> 0).toNumber(true);
            if (object.contactPrimaryIdentityKey != null)
                if (typeof object.contactPrimaryIdentityKey === "string")
                    $util.base64.decode(object.contactPrimaryIdentityKey, message.contactPrimaryIdentityKey = $util.newBuffer($util.base64.length(object.contactPrimaryIdentityKey)), 0);
                else if (object.contactPrimaryIdentityKey.length >= 0)
                    message.contactPrimaryIdentityKey = object.contactPrimaryIdentityKey;
            if (object.pinned != null)
                message.pinned = object.pinned >>> 0;
            if (object.muteEndTime != null)
                if ($util.Long)
                    (message.muteEndTime = $util.Long.fromValue(object.muteEndTime)).unsigned = true;
                else if (typeof object.muteEndTime === "string")
                    message.muteEndTime = parseInt(object.muteEndTime, 10);
                else if (typeof object.muteEndTime === "number")
                    message.muteEndTime = object.muteEndTime;
                else if (typeof object.muteEndTime === "object")
                    message.muteEndTime = new $util.LongBits(object.muteEndTime.low >>> 0, object.muteEndTime.high >>> 0).toNumber(true);
            if (object.wallpaper != null) {
                if (typeof object.wallpaper !== "object")
                    throw TypeError(".HistorySync.Conversation.wallpaper: object expected");
                message.wallpaper = $root.HistorySync.WallpaperSettings.fromObject(object.wallpaper);
            }
            switch (object.mediaVisibility) {
            default:
                if (typeof object.mediaVisibility === "number") {
                    message.mediaVisibility = object.mediaVisibility;
                    break;
                }
                break;
            case "DEFAULT":
            case 0:
                message.mediaVisibility = 0;
                break;
            case "OFF":
            case 1:
                message.mediaVisibility = 1;
                break;
            case "ON":
            case 2:
                message.mediaVisibility = 2;
                break;
            }
            if (object.tcTokenSenderTimestamp != null)
                if ($util.Long)
                    (message.tcTokenSenderTimestamp = $util.Long.fromValue(object.tcTokenSenderTimestamp)).unsigned = true;
                else if (typeof object.tcTokenSenderTimestamp === "string")
                    message.tcTokenSenderTimestamp = parseInt(object.tcTokenSenderTimestamp, 10);
                else if (typeof object.tcTokenSenderTimestamp === "number")
                    message.tcTokenSenderTimestamp = object.tcTokenSenderTimestamp;
                else if (typeof object.tcTokenSenderTimestamp === "object")
                    message.tcTokenSenderTimestamp = new $util.LongBits(object.tcTokenSenderTimestamp.low >>> 0, object.tcTokenSenderTimestamp.high >>> 0).toNumber(true);
            if (object.suspended != null)
                message.suspended = Boolean(object.suspended);
            if (object.terminated != null)
                message.terminated = Boolean(object.terminated);
            if (object.createdAt != null)
                if ($util.Long)
                    (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
                else if (typeof object.createdAt === "string")
                    message.createdAt = parseInt(object.createdAt, 10);
                else if (typeof object.createdAt === "number")
                    message.createdAt = object.createdAt;
                else if (typeof object.createdAt === "object")
                    message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
            if (object.createdBy != null)
                message.createdBy = String(object.createdBy);
            if (object.description != null)
                message.description = String(object.description);
            if (object.support != null)
                message.support = Boolean(object.support);
            if (object.isParentGroup != null)
                message.isParentGroup = Boolean(object.isParentGroup);
            if (object.parentGroupId != null)
                message.parentGroupId = String(object.parentGroupId);
            if (object.isDefaultSubgroup != null)
                message.isDefaultSubgroup = Boolean(object.isDefaultSubgroup);
            if (object.displayName != null)
                message.displayName = String(object.displayName);
            if (object.pnJid != null)
                message.pnJid = String(object.pnJid);
            if (object.shareOwnPn != null)
                message.shareOwnPn = Boolean(object.shareOwnPn);
            if (object.pnhDuplicateLidThread != null)
                message.pnhDuplicateLidThread = Boolean(object.pnhDuplicateLidThread);
            if (object.lidJid != null)
                message.lidJid = String(object.lidJid);
            if (object.username != null)
                message.username = String(object.username);
            if (object.lidOriginType != null)
                message.lidOriginType = String(object.lidOriginType);
            if (object.commentsCount != null)
                message.commentsCount = object.commentsCount >>> 0;
            if (object.locked != null)
                message.locked = Boolean(object.locked);
            switch (object.systemMessageToInsert) {
            default:
                if (typeof object.systemMessageToInsert === "number") {
                    message.systemMessageToInsert = object.systemMessageToInsert;
                    break;
                }
                break;
            case "E2EE_MSG":
            case 1:
                message.systemMessageToInsert = 1;
                break;
            case "NE2EE_SELF":
            case 2:
                message.systemMessageToInsert = 2;
                break;
            case "NE2EE_OTHER":
            case 3:
                message.systemMessageToInsert = 3;
                break;
            }
            if (object.capiCreatedGroup != null)
                message.capiCreatedGroup = Boolean(object.capiCreatedGroup);
            if (object.accountLid != null)
                message.accountLid = String(object.accountLid);
            if (object.limitSharing != null)
                message.limitSharing = Boolean(object.limitSharing);
            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();
            switch (object.limitSharingTrigger) {
            default:
                if (typeof object.limitSharingTrigger === "number") {
                    message.limitSharingTrigger = object.limitSharingTrigger;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.limitSharingTrigger = 0;
                break;
            case "CHAT_SETTING":
            case 1:
                message.limitSharingTrigger = 1;
                break;
            case "BIZ_SUPPORTS_FB_HOSTING":
            case 2:
                message.limitSharingTrigger = 2;
                break;
            case "UNKNOWN_GROUP":
            case 3:
                message.limitSharingTrigger = 3;
                break;
            }
            if (object.limitSharingInitiatedByMe != null)
                message.limitSharingInitiatedByMe = Boolean(object.limitSharingInitiatedByMe);
            if (object.maibaAiThreadEnabled != null)
                message.maibaAiThreadEnabled = Boolean(object.maibaAiThreadEnabled);
            return message;
        };

        /**
         * Creates a plain object from a Conversation message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.Conversation
         * @static
         * @param {HistorySync.Conversation} message Conversation
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Conversation.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.messages = [];
                object.participant = [];
            }
            if (options.defaults) {
                object.id = "";
                object.newJid = "";
                object.oldJid = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.lastMsgTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.lastMsgTimestamp = options.longs === String ? "0" : 0;
                object.unreadCount = 0;
                object.readOnly = false;
                object.endOfHistoryTransfer = false;
                object.ephemeralExpiration = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0;
                object.endOfHistoryTransferType = options.enums === String ? "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.conversationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.conversationTimestamp = options.longs === String ? "0" : 0;
                object.name = "";
                object.pHash = "";
                object.notSpam = false;
                object.archived = false;
                object.disappearingMode = null;
                object.unreadMentionCount = 0;
                object.markedAsUnread = false;
                if (options.bytes === String)
                    object.tcToken = "";
                else {
                    object.tcToken = [];
                    if (options.bytes !== Array)
                        object.tcToken = $util.newBuffer(object.tcToken);
                }
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.tcTokenTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.tcTokenTimestamp = options.longs === String ? "0" : 0;
                if (options.bytes === String)
                    object.contactPrimaryIdentityKey = "";
                else {
                    object.contactPrimaryIdentityKey = [];
                    if (options.bytes !== Array)
                        object.contactPrimaryIdentityKey = $util.newBuffer(object.contactPrimaryIdentityKey);
                }
                object.pinned = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.muteEndTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.muteEndTime = options.longs === String ? "0" : 0;
                object.wallpaper = null;
                object.mediaVisibility = options.enums === String ? "DEFAULT" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.tcTokenSenderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.tcTokenSenderTimestamp = options.longs === String ? "0" : 0;
                object.suspended = false;
                object.terminated = false;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.createdAt = options.longs === String ? "0" : 0;
                object.createdBy = "";
                object.description = "";
                object.support = false;
                object.isParentGroup = false;
                object.isDefaultSubgroup = false;
                object.parentGroupId = "";
                object.displayName = "";
                object.pnJid = "";
                object.shareOwnPn = false;
                object.pnhDuplicateLidThread = false;
                object.lidJid = "";
                object.username = "";
                object.lidOriginType = "";
                object.commentsCount = 0;
                object.locked = false;
                object.systemMessageToInsert = options.enums === String ? "E2EE_MSG" : 1;
                object.capiCreatedGroup = false;
                object.accountLid = "";
                object.limitSharing = false;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.limitSharingSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.limitSharingSettingTimestamp = options.longs === String ? "0" : 0;
                object.limitSharingTrigger = options.enums === String ? "UNKNOWN" : 0;
                object.limitSharingInitiatedByMe = false;
                object.maibaAiThreadEnabled = false;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.messages && message.messages.length) {
                object.messages = [];
                for (var j = 0; j < message.messages.length; ++j)
                    object.messages[j] = $root.HistorySync.HistorySyncMsg.toObject(message.messages[j], options);
            }
            if (message.newJid != null && message.hasOwnProperty("newJid"))
                object.newJid = message.newJid;
            if (message.oldJid != null && message.hasOwnProperty("oldJid"))
                object.oldJid = message.oldJid;
            if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp"))
                if (typeof message.lastMsgTimestamp === "number")
                    object.lastMsgTimestamp = options.longs === String ? String(message.lastMsgTimestamp) : message.lastMsgTimestamp;
                else
                    object.lastMsgTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMsgTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMsgTimestamp.low >>> 0, message.lastMsgTimestamp.high >>> 0).toNumber(true) : message.lastMsgTimestamp;
            if (message.unreadCount != null && message.hasOwnProperty("unreadCount"))
                object.unreadCount = message.unreadCount;
            if (message.readOnly != null && message.hasOwnProperty("readOnly"))
                object.readOnly = message.readOnly;
            if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer"))
                object.endOfHistoryTransfer = message.endOfHistoryTransfer;
            if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration"))
                object.ephemeralExpiration = message.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 (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType"))
                object.endOfHistoryTransferType = options.enums === String ? $root.HistorySync.Conversation.EndOfHistoryTransferType[message.endOfHistoryTransferType] === undefined ? message.endOfHistoryTransferType : $root.HistorySync.Conversation.EndOfHistoryTransferType[message.endOfHistoryTransferType] : message.endOfHistoryTransferType;
            if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp"))
                if (typeof message.conversationTimestamp === "number")
                    object.conversationTimestamp = options.longs === String ? String(message.conversationTimestamp) : message.conversationTimestamp;
                else
                    object.conversationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.conversationTimestamp) : options.longs === Number ? new $util.LongBits(message.conversationTimestamp.low >>> 0, message.conversationTimestamp.high >>> 0).toNumber(true) : message.conversationTimestamp;
            if (message.name != null && message.hasOwnProperty("name"))
                object.name = message.name;
            if (message.pHash != null && message.hasOwnProperty("pHash"))
                object.pHash = message.pHash;
            if (message.notSpam != null && message.hasOwnProperty("notSpam"))
                object.notSpam = message.notSpam;
            if (message.archived != null && message.hasOwnProperty("archived"))
                object.archived = message.archived;
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode"))
                object.disappearingMode = $root.E2E.DisappearingMode.toObject(message.disappearingMode, options);
            if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount"))
                object.unreadMentionCount = message.unreadMentionCount;
            if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread"))
                object.markedAsUnread = message.markedAsUnread;
            if (message.participant && message.participant.length) {
                object.participant = [];
                for (var j = 0; j < message.participant.length; ++j)
                    object.participant[j] = $root.HistorySync.GroupParticipant.toObject(message.participant[j], options);
            }
            if (message.tcToken != null && message.hasOwnProperty("tcToken"))
                object.tcToken = options.bytes === String ? $util.base64.encode(message.tcToken, 0, message.tcToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcToken) : message.tcToken;
            if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp"))
                if (typeof message.tcTokenTimestamp === "number")
                    object.tcTokenTimestamp = options.longs === String ? String(message.tcTokenTimestamp) : message.tcTokenTimestamp;
                else
                    object.tcTokenTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenTimestamp.low >>> 0, message.tcTokenTimestamp.high >>> 0).toNumber(true) : message.tcTokenTimestamp;
            if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey"))
                object.contactPrimaryIdentityKey = options.bytes === String ? $util.base64.encode(message.contactPrimaryIdentityKey, 0, message.contactPrimaryIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.contactPrimaryIdentityKey) : message.contactPrimaryIdentityKey;
            if (message.pinned != null && message.hasOwnProperty("pinned"))
                object.pinned = message.pinned;
            if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime"))
                if (typeof message.muteEndTime === "number")
                    object.muteEndTime = options.longs === String ? String(message.muteEndTime) : message.muteEndTime;
                else
                    object.muteEndTime = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTime) : options.longs === Number ? new $util.LongBits(message.muteEndTime.low >>> 0, message.muteEndTime.high >>> 0).toNumber(true) : message.muteEndTime;
            if (message.wallpaper != null && message.hasOwnProperty("wallpaper"))
                object.wallpaper = $root.HistorySync.WallpaperSettings.toObject(message.wallpaper, options);
            if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility"))
                object.mediaVisibility = options.enums === String ? $root.HistorySync.MediaVisibility[message.mediaVisibility] === undefined ? message.mediaVisibility : $root.HistorySync.MediaVisibility[message.mediaVisibility] : message.mediaVisibility;
            if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp"))
                if (typeof message.tcTokenSenderTimestamp === "number")
                    object.tcTokenSenderTimestamp = options.longs === String ? String(message.tcTokenSenderTimestamp) : message.tcTokenSenderTimestamp;
                else
                    object.tcTokenSenderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenSenderTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenSenderTimestamp.low >>> 0, message.tcTokenSenderTimestamp.high >>> 0).toNumber(true) : message.tcTokenSenderTimestamp;
            if (message.suspended != null && message.hasOwnProperty("suspended"))
                object.suspended = message.suspended;
            if (message.terminated != null && message.hasOwnProperty("terminated"))
                object.terminated = message.terminated;
            if (message.createdAt != null && message.hasOwnProperty("createdAt"))
                if (typeof message.createdAt === "number")
                    object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
                else
                    object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
            if (message.createdBy != null && message.hasOwnProperty("createdBy"))
                object.createdBy = message.createdBy;
            if (message.description != null && message.hasOwnProperty("description"))
                object.description = message.description;
            if (message.support != null && message.hasOwnProperty("support"))
                object.support = message.support;
            if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup"))
                object.isParentGroup = message.isParentGroup;
            if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup"))
                object.isDefaultSubgroup = message.isDefaultSubgroup;
            if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId"))
                object.parentGroupId = message.parentGroupId;
            if (message.displayName != null && message.hasOwnProperty("displayName"))
                object.displayName = message.displayName;
            if (message.pnJid != null && message.hasOwnProperty("pnJid"))
                object.pnJid = message.pnJid;
            if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn"))
                object.shareOwnPn = message.shareOwnPn;
            if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread"))
                object.pnhDuplicateLidThread = message.pnhDuplicateLidThread;
            if (message.lidJid != null && message.hasOwnProperty("lidJid"))
                object.lidJid = message.lidJid;
            if (message.username != null && message.hasOwnProperty("username"))
                object.username = message.username;
            if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType"))
                object.lidOriginType = message.lidOriginType;
            if (message.commentsCount != null && message.hasOwnProperty("commentsCount"))
                object.commentsCount = message.commentsCount;
            if (message.locked != null && message.hasOwnProperty("locked"))
                object.locked = message.locked;
            if (message.systemMessageToInsert != null && message.hasOwnProperty("systemMessageToInsert"))
                object.systemMessageToInsert = options.enums === String ? $root.HistorySync.PrivacySystemMessage[message.systemMessageToInsert] === undefined ? message.systemMessageToInsert : $root.HistorySync.PrivacySystemMessage[message.systemMessageToInsert] : message.systemMessageToInsert;
            if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup"))
                object.capiCreatedGroup = message.capiCreatedGroup;
            if (message.accountLid != null && message.hasOwnProperty("accountLid"))
                object.accountLid = message.accountLid;
            if (message.limitSharing != null && message.hasOwnProperty("limitSharing"))
                object.limitSharing = message.limitSharing;
            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 (message.limitSharingTrigger != null && message.hasOwnProperty("limitSharingTrigger"))
                object.limitSharingTrigger = options.enums === String ? $root.Protocol.LimitSharing.TriggerType[message.limitSharingTrigger] === undefined ? message.limitSharingTrigger : $root.Protocol.LimitSharing.TriggerType[message.limitSharingTrigger] : message.limitSharingTrigger;
            if (message.limitSharingInitiatedByMe != null && message.hasOwnProperty("limitSharingInitiatedByMe"))
                object.limitSharingInitiatedByMe = message.limitSharingInitiatedByMe;
            if (message.maibaAiThreadEnabled != null && message.hasOwnProperty("maibaAiThreadEnabled"))
                object.maibaAiThreadEnabled = message.maibaAiThreadEnabled;
            return object;
        };

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

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

        /**
         * EndOfHistoryTransferType enum.
         * @name HistorySync.Conversation.EndOfHistoryTransferType
         * @enum {number}
         * @property {number} COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY=0 COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY value
         * @property {number} COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY=1 COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY value
         * @property {number} COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY=2 COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY value
         */
        Conversation.EndOfHistoryTransferType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY"] = 0;
            values[valuesById[1] = "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY"] = 1;
            values[valuesById[2] = "COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY"] = 2;
            return values;
        })();

        return Conversation;
    })();

    HistorySync.HistorySync = (function() {

        /**
         * Properties of a HistorySync.
         * @memberof HistorySync
         * @interface IHistorySync
         * @property {HistorySync.HistorySync.HistorySyncType} syncType HistorySync syncType
         * @property {Array.<HistorySync.IConversation>|null} [conversations] HistorySync conversations
         * @property {Array.<Web.IWebMessageInfo>|null} [statusV3Messages] HistorySync statusV3Messages
         * @property {number|null} [chunkOrder] HistorySync chunkOrder
         * @property {number|null} [progress] HistorySync progress
         * @property {Array.<HistorySync.IPushname>|null} [pushnames] HistorySync pushnames
         * @property {HistorySync.IGlobalSettings|null} [globalSettings] HistorySync globalSettings
         * @property {Uint8Array|null} [threadIdUserSecret] HistorySync threadIdUserSecret
         * @property {number|null} [threadDsTimeframeOffset] HistorySync threadDsTimeframeOffset
         * @property {Array.<HistorySync.IStickerMetadata>|null} [recentStickers] HistorySync recentStickers
         * @property {Array.<HistorySync.IPastParticipants>|null} [pastParticipants] HistorySync pastParticipants
         * @property {Array.<SyncAction.ICallLogRecord>|null} [callLogRecords] HistorySync callLogRecords
         * @property {HistorySync.HistorySync.BotAIWaitListState|null} [aiWaitListState] HistorySync aiWaitListState
         * @property {Array.<HistorySync.IPhoneNumberToLIDMapping>|null} [phoneNumberToLidMappings] HistorySync phoneNumberToLidMappings
         * @property {string|null} [companionMetaNonce] HistorySync companionMetaNonce
         * @property {Uint8Array|null} [shareableChatIdentifierEncryptionKey] HistorySync shareableChatIdentifierEncryptionKey
         * @property {Array.<HistorySync.IAccount>|null} [accounts] HistorySync accounts
         */

        /**
         * Constructs a new HistorySync.
         * @memberof HistorySync
         * @classdesc Represents a HistorySync.
         * @implements IHistorySync
         * @constructor
         * @param {HistorySync.IHistorySync=} [properties] Properties to set
         */
        function HistorySync(properties) {
            this.conversations = [];
            this.statusV3Messages = [];
            this.pushnames = [];
            this.recentStickers = [];
            this.pastParticipants = [];
            this.callLogRecords = [];
            this.phoneNumberToLidMappings = [];
            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]];
        }

        /**
         * HistorySync syncType.
         * @member {HistorySync.HistorySync.HistorySyncType} syncType
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.syncType = 0;

        /**
         * HistorySync conversations.
         * @member {Array.<HistorySync.IConversation>} conversations
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.conversations = $util.emptyArray;

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

        /**
         * HistorySync chunkOrder.
         * @member {number} chunkOrder
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.chunkOrder = 0;

        /**
         * HistorySync progress.
         * @member {number} progress
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.progress = 0;

        /**
         * HistorySync pushnames.
         * @member {Array.<HistorySync.IPushname>} pushnames
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.pushnames = $util.emptyArray;

        /**
         * HistorySync globalSettings.
         * @member {HistorySync.IGlobalSettings|null|undefined} globalSettings
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.globalSettings = null;

        /**
         * HistorySync threadIdUserSecret.
         * @member {Uint8Array} threadIdUserSecret
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.threadIdUserSecret = $util.newBuffer([]);

        /**
         * HistorySync threadDsTimeframeOffset.
         * @member {number} threadDsTimeframeOffset
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.threadDsTimeframeOffset = 0;

        /**
         * HistorySync recentStickers.
         * @member {Array.<HistorySync.IStickerMetadata>} recentStickers
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.recentStickers = $util.emptyArray;

        /**
         * HistorySync pastParticipants.
         * @member {Array.<HistorySync.IPastParticipants>} pastParticipants
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.pastParticipants = $util.emptyArray;

        /**
         * HistorySync callLogRecords.
         * @member {Array.<SyncAction.ICallLogRecord>} callLogRecords
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.callLogRecords = $util.emptyArray;

        /**
         * HistorySync aiWaitListState.
         * @member {HistorySync.HistorySync.BotAIWaitListState} aiWaitListState
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.aiWaitListState = 0;

        /**
         * HistorySync phoneNumberToLidMappings.
         * @member {Array.<HistorySync.IPhoneNumberToLIDMapping>} phoneNumberToLidMappings
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.phoneNumberToLidMappings = $util.emptyArray;

        /**
         * HistorySync companionMetaNonce.
         * @member {string} companionMetaNonce
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.companionMetaNonce = "";

        /**
         * HistorySync shareableChatIdentifierEncryptionKey.
         * @member {Uint8Array} shareableChatIdentifierEncryptionKey
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.shareableChatIdentifierEncryptionKey = $util.newBuffer([]);

        /**
         * HistorySync accounts.
         * @member {Array.<HistorySync.IAccount>} accounts
         * @memberof HistorySync.HistorySync
         * @instance
         */
        HistorySync.prototype.accounts = $util.emptyArray;

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

        /**
         * Encodes the specified HistorySync message. Does not implicitly {@link HistorySync.HistorySync.verify|verify} messages.
         * @function encode
         * @memberof HistorySync.HistorySync
         * @static
         * @param {HistorySync.IHistorySync} message HistorySync message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        HistorySync.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncType);
            if (message.conversations != null && message.conversations.length)
                for (var i = 0; i < message.conversations.length; ++i)
                    $root.HistorySync.Conversation.encode(message.conversations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.statusV3Messages != null && message.statusV3Messages.length)
                for (var i = 0; i < message.statusV3Messages.length; ++i)
                    $root.Web.WebMessageInfo.encode(message.statusV3Messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.chunkOrder);
            if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
                writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.progress);
            if (message.pushnames != null && message.pushnames.length)
                for (var i = 0; i < message.pushnames.length; ++i)
                    $root.HistorySync.Pushname.encode(message.pushnames[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.globalSettings != null && Object.hasOwnProperty.call(message, "globalSettings"))
                $root.HistorySync.GlobalSettings.encode(message.globalSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            if (message.threadIdUserSecret != null && Object.hasOwnProperty.call(message, "threadIdUserSecret"))
                writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.threadIdUserSecret);
            if (message.threadDsTimeframeOffset != null && Object.hasOwnProperty.call(message, "threadDsTimeframeOffset"))
                writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.threadDsTimeframeOffset);
            if (message.recentStickers != null && message.recentStickers.length)
                for (var i = 0; i < message.recentStickers.length; ++i)
                    $root.HistorySync.StickerMetadata.encode(message.recentStickers[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
            if (message.pastParticipants != null && message.pastParticipants.length)
                for (var i = 0; i < message.pastParticipants.length; ++i)
                    $root.HistorySync.PastParticipants.encode(message.pastParticipants[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.callLogRecords != null && message.callLogRecords.length)
                for (var i = 0; i < message.callLogRecords.length; ++i)
                    $root.SyncAction.CallLogRecord.encode(message.callLogRecords[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            if (message.aiWaitListState != null && Object.hasOwnProperty.call(message, "aiWaitListState"))
                writer.uint32(/* id 14, wireType 0 =*/112).int32(message.aiWaitListState);
            if (message.phoneNumberToLidMappings != null && message.phoneNumberToLidMappings.length)
                for (var i = 0; i < message.phoneNumberToLidMappings.length; ++i)
                    $root.HistorySync.PhoneNumberToLIDMapping.encode(message.phoneNumberToLidMappings[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.companionMetaNonce != null && Object.hasOwnProperty.call(message, "companionMetaNonce"))
                writer.uint32(/* id 16, wireType 2 =*/130).string(message.companionMetaNonce);
            if (message.shareableChatIdentifierEncryptionKey != null && Object.hasOwnProperty.call(message, "shareableChatIdentifierEncryptionKey"))
                writer.uint32(/* id 17, wireType 2 =*/138).bytes(message.shareableChatIdentifierEncryptionKey);
            if (message.accounts != null && message.accounts.length)
                for (var i = 0; i < message.accounts.length; ++i)
                    $root.HistorySync.Account.encode(message.accounts[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a HistorySync message from the specified reader or buffer.
         * @function decode
         * @memberof HistorySync.HistorySync
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {HistorySync.HistorySync} HistorySync
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HistorySync.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.HistorySync.HistorySync();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.syncType = reader.int32();
                        break;
                    }
                case 2: {
                        if (!(message.conversations && message.conversations.length))
                            message.conversations = [];
                        message.conversations.push($root.HistorySync.Conversation.decode(reader, reader.uint32()));
                        break;
                    }
                case 3: {
                        if (!(message.statusV3Messages && message.statusV3Messages.length))
                            message.statusV3Messages = [];
                        message.statusV3Messages.push($root.Web.WebMessageInfo.decode(reader, reader.uint32()));
                        break;
                    }
                case 5: {
                        message.chunkOrder = reader.uint32();
                        break;
                    }
                case 6: {
                        message.progress = reader.uint32();
                        break;
                    }
                case 7: {
                        if (!(message.pushnames && message.pushnames.length))
                            message.pushnames = [];
                        message.pushnames.push($root.HistorySync.Pushname.decode(reader, reader.uint32()));
                        break;
                    }
                case 8: {
                        message.globalSettings = $root.HistorySync.GlobalSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 9: {
                        message.threadIdUserSecret = reader.bytes();
                        break;
                    }
                case 10: {
                        message.threadDsTimeframeOffset = reader.uint32();
                        break;
                    }
                case 11: {
                        if (!(message.recentStickers && message.recentStickers.length))
                            message.recentStickers = [];
                        message.recentStickers.push($root.HistorySync.StickerMetadata.decode(reader, reader.uint32()));
                        break;
                    }
                case 12: {
                        if (!(message.pastParticipants && message.pastParticipants.length))
                            message.pastParticipants = [];
                        message.pastParticipants.push($root.HistorySync.PastParticipants.decode(reader, reader.uint32()));
                        break;
                    }
                case 13: {
                        if (!(message.callLogRecords && message.callLogRecords.length))
                            message.callLogRecords = [];
                        message.callLogRecords.push($root.SyncAction.CallLogRecord.decode(reader, reader.uint32()));
                        break;
                    }
                case 14: {
                        message.aiWaitListState = reader.int32();
                        break;
                    }
                case 15: {
                        if (!(message.phoneNumberToLidMappings && message.phoneNumberToLidMappings.length))
                            message.phoneNumberToLidMappings = [];
                        message.phoneNumberToLidMappings.push($root.HistorySync.PhoneNumberToLIDMapping.decode(reader, reader.uint32()));
                        break;
                    }
                case 16: {
                        message.companionMetaNonce = reader.string();
                        break;
                    }
                case 17: {
                        message.shareableChatIdentifierEncryptionKey = reader.bytes();
                        break;
                    }
                case 18: {
                        if (!(message.accounts && message.accounts.length))
                            message.accounts = [];
                        message.accounts.push($root.HistorySync.Account.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("syncType"))
                throw $util.ProtocolError("missing required 'syncType'", { instance: message });
            return message;
        };

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

        /**
         * Verifies a HistorySync message.
         * @function verify
         * @memberof HistorySync.HistorySync
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        HistorySync.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            switch (message.syncType) {
            default:
                return "syncType: enum value expected";
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
                break;
            }
            if (message.conversations != null && message.hasOwnProperty("conversations")) {
                if (!Array.isArray(message.conversations))
                    return "conversations: array expected";
                for (var i = 0; i < message.conversations.length; ++i) {
                    var error = $root.HistorySync.Conversation.verify(message.conversations[i]);
                    if (error)
                        return "conversations." + error;
                }
            }
            if (message.statusV3Messages != null && message.hasOwnProperty("statusV3Messages")) {
                if (!Array.isArray(message.statusV3Messages))
                    return "statusV3Messages: array expected";
                for (var i = 0; i < message.statusV3Messages.length; ++i) {
                    var error = $root.Web.WebMessageInfo.verify(message.statusV3Messages[i]);
                    if (error)
                        return "statusV3Messages." + error;
                }
            }
            if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                if (!$util.isInteger(message.chunkOrder))
                    return "chunkOrder: integer expected";
            if (message.progress != null && message.hasOwnProperty("progress"))
                if (!$util.isInteger(message.progress))
                    return "progress: integer expected";
            if (message.pushnames != null && message.hasOwnProperty("pushnames")) {
                if (!Array.isArray(message.pushnames))
                    return "pushnames: array expected";
                for (var i = 0; i < message.pushnames.length; ++i) {
                    var error = $root.HistorySync.Pushname.verify(message.pushnames[i]);
                    if (error)
                        return "pushnames." + error;
                }
            }
            if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) {
                var error = $root.HistorySync.GlobalSettings.verify(message.globalSettings);
                if (error)
                    return "globalSettings." + error;
            }
            if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret"))
                if (!(message.threadIdUserSecret && typeof message.threadIdUserSecret.length === "number" || $util.isString(message.threadIdUserSecret)))
                    return "threadIdUserSecret: buffer expected";
            if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset"))
                if (!$util.isInteger(message.threadDsTimeframeOffset))
                    return "threadDsTimeframeOffset: integer expected";
            if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) {
                if (!Array.isArray(message.recentStickers))
                    return "recentStickers: array expected";
                for (var i = 0; i < message.recentStickers.length; ++i) {
                    var error = $root.HistorySync.StickerMetadata.verify(message.recentStickers[i]);
                    if (error)
                        return "recentStickers." + error;
                }
            }
            if (message.pastParticipants != null && message.hasOwnProperty("pastParticipants")) {
                if (!Array.isArray(message.pastParticipants))
                    return "pastParticipants: array expected";
                for (var i = 0; i < message.pastParticipants.length; ++i) {
                    var error = $root.HistorySync.PastParticipants.verify(message.pastParticipants[i]);
                    if (error)
                        return "pastParticipants." + error;
                }
            }
            if (message.callLogRecords != null && message.hasOwnProperty("callLogRecords")) {
                if (!Array.isArray(message.callLogRecords))
                    return "callLogRecords: array expected";
                for (var i = 0; i < message.callLogRecords.length; ++i) {
                    var error = $root.SyncAction.CallLogRecord.verify(message.callLogRecords[i]);
                    if (error)
                        return "callLogRecords." + error;
                }
            }
            if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState"))
                switch (message.aiWaitListState) {
                default:
                    return "aiWaitListState: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.phoneNumberToLidMappings != null && message.hasOwnProperty("phoneNumberToLidMappings")) {
                if (!Array.isArray(message.phoneNumberToLidMappings))
                    return "phoneNumberToLidMappings: array expected";
                for (var i = 0; i < message.phoneNumberToLidMappings.length; ++i) {
                    var error = $root.HistorySync.PhoneNumberToLIDMapping.verify(message.phoneNumberToLidMappings[i]);
                    if (error)
                        return "phoneNumberToLidMappings." + error;
                }
            }
            if (message.companionMetaNonce != null && message.hasOwnProperty("companionMetaNonce"))
                if (!$util.isString(message.companionMetaNonce))
                    return "companionMetaNonce: string expected";
            if (message.shareableChatIdentifierEncryptionKey != null && message.hasOwnProperty("shareableChatIdentifierEncryptionKey"))
                if (!(message.shareableChatIdentifierEncryptionKey && typeof message.shareableChatIdentifierEncryptionKey.length === "number" || $util.isString(message.shareableChatIdentifierEncryptionKey)))
                    return "shareableChatIdentifierEncryptionKey: buffer expected";
            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.HistorySync.Account.verify(message.accounts[i]);
                    if (error)
                        return "accounts." + error;
                }
            }
            return null;
        };

        /**
         * Creates a HistorySync message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof HistorySync.HistorySync
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {HistorySync.HistorySync} HistorySync
         */
        HistorySync.fromObject = function fromObject(object) {
            if (object instanceof $root.HistorySync.HistorySync)
                return object;
            var message = new $root.HistorySync.HistorySync();
            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;
            }
            if (object.conversations) {
                if (!Array.isArray(object.conversations))
                    throw TypeError(".HistorySync.HistorySync.conversations: array expected");
                message.conversations = [];
                for (var i = 0; i < object.conversations.length; ++i) {
                    if (typeof object.conversations[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.conversations: object expected");
                    message.conversations[i] = $root.HistorySync.Conversation.fromObject(object.conversations[i]);
                }
            }
            if (object.statusV3Messages) {
                if (!Array.isArray(object.statusV3Messages))
                    throw TypeError(".HistorySync.HistorySync.statusV3Messages: array expected");
                message.statusV3Messages = [];
                for (var i = 0; i < object.statusV3Messages.length; ++i) {
                    if (typeof object.statusV3Messages[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.statusV3Messages: object expected");
                    message.statusV3Messages[i] = $root.Web.WebMessageInfo.fromObject(object.statusV3Messages[i]);
                }
            }
            if (object.chunkOrder != null)
                message.chunkOrder = object.chunkOrder >>> 0;
            if (object.progress != null)
                message.progress = object.progress >>> 0;
            if (object.pushnames) {
                if (!Array.isArray(object.pushnames))
                    throw TypeError(".HistorySync.HistorySync.pushnames: array expected");
                message.pushnames = [];
                for (var i = 0; i < object.pushnames.length; ++i) {
                    if (typeof object.pushnames[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.pushnames: object expected");
                    message.pushnames[i] = $root.HistorySync.Pushname.fromObject(object.pushnames[i]);
                }
            }
            if (object.globalSettings != null) {
                if (typeof object.globalSettings !== "object")
                    throw TypeError(".HistorySync.HistorySync.globalSettings: object expected");
                message.globalSettings = $root.HistorySync.GlobalSettings.fromObject(object.globalSettings);
            }
            if (object.threadIdUserSecret != null)
                if (typeof object.threadIdUserSecret === "string")
                    $util.base64.decode(object.threadIdUserSecret, message.threadIdUserSecret = $util.newBuffer($util.base64.length(object.threadIdUserSecret)), 0);
                else if (object.threadIdUserSecret.length >= 0)
                    message.threadIdUserSecret = object.threadIdUserSecret;
            if (object.threadDsTimeframeOffset != null)
                message.threadDsTimeframeOffset = object.threadDsTimeframeOffset >>> 0;
            if (object.recentStickers) {
                if (!Array.isArray(object.recentStickers))
                    throw TypeError(".HistorySync.HistorySync.recentStickers: array expected");
                message.recentStickers = [];
                for (var i = 0; i < object.recentStickers.length; ++i) {
                    if (typeof object.recentStickers[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.recentStickers: object expected");
                    message.recentStickers[i] = $root.HistorySync.StickerMetadata.fromObject(object.recentStickers[i]);
                }
            }
            if (object.pastParticipants) {
                if (!Array.isArray(object.pastParticipants))
                    throw TypeError(".HistorySync.HistorySync.pastParticipants: array expected");
                message.pastParticipants = [];
                for (var i = 0; i < object.pastParticipants.length; ++i) {
                    if (typeof object.pastParticipants[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.pastParticipants: object expected");
                    message.pastParticipants[i] = $root.HistorySync.PastParticipants.fromObject(object.pastParticipants[i]);
                }
            }
            if (object.callLogRecords) {
                if (!Array.isArray(object.callLogRecords))
                    throw TypeError(".HistorySync.HistorySync.callLogRecords: array expected");
                message.callLogRecords = [];
                for (var i = 0; i < object.callLogRecords.length; ++i) {
                    if (typeof object.callLogRecords[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.callLogRecords: object expected");
                    message.callLogRecords[i] = $root.SyncAction.CallLogRecord.fromObject(object.callLogRecords[i]);
                }
            }
            switch (object.aiWaitListState) {
            default:
                if (typeof object.aiWaitListState === "number") {
                    message.aiWaitListState = object.aiWaitListState;
                    break;
                }
                break;
            case "IN_WAITLIST":
            case 0:
                message.aiWaitListState = 0;
                break;
            case "AI_AVAILABLE":
            case 1:
                message.aiWaitListState = 1;
                break;
            }
            if (object.phoneNumberToLidMappings) {
                if (!Array.isArray(object.phoneNumberToLidMappings))
                    throw TypeError(".HistorySync.HistorySync.phoneNumberToLidMappings: array expected");
                message.phoneNumberToLidMappings = [];
                for (var i = 0; i < object.phoneNumberToLidMappings.length; ++i) {
                    if (typeof object.phoneNumberToLidMappings[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.phoneNumberToLidMappings: object expected");
                    message.phoneNumberToLidMappings[i] = $root.HistorySync.PhoneNumberToLIDMapping.fromObject(object.phoneNumberToLidMappings[i]);
                }
            }
            if (object.companionMetaNonce != null)
                message.companionMetaNonce = String(object.companionMetaNonce);
            if (object.shareableChatIdentifierEncryptionKey != null)
                if (typeof object.shareableChatIdentifierEncryptionKey === "string")
                    $util.base64.decode(object.shareableChatIdentifierEncryptionKey, message.shareableChatIdentifierEncryptionKey = $util.newBuffer($util.base64.length(object.shareableChatIdentifierEncryptionKey)), 0);
                else if (object.shareableChatIdentifierEncryptionKey.length >= 0)
                    message.shareableChatIdentifierEncryptionKey = object.shareableChatIdentifierEncryptionKey;
            if (object.accounts) {
                if (!Array.isArray(object.accounts))
                    throw TypeError(".HistorySync.HistorySync.accounts: array expected");
                message.accounts = [];
                for (var i = 0; i < object.accounts.length; ++i) {
                    if (typeof object.accounts[i] !== "object")
                        throw TypeError(".HistorySync.HistorySync.accounts: object expected");
                    message.accounts[i] = $root.HistorySync.Account.fromObject(object.accounts[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a HistorySync message. Also converts values to other types if specified.
         * @function toObject
         * @memberof HistorySync.HistorySync
         * @static
         * @param {HistorySync.HistorySync} message HistorySync
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        HistorySync.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.conversations = [];
                object.statusV3Messages = [];
                object.pushnames = [];
                object.recentStickers = [];
                object.pastParticipants = [];
                object.callLogRecords = [];
                object.phoneNumberToLidMappings = [];
                object.accounts = [];
            }
            if (options.defaults) {
                object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0;
                object.chunkOrder = 0;
                object.progress = 0;
                object.globalSettings = null;
                if (options.bytes === String)
                    object.threadIdUserSecret = "";
                else {
                    object.threadIdUserSecret = [];
                    if (options.bytes !== Array)
                        object.threadIdUserSecret = $util.newBuffer(object.threadIdUserSecret);
                }
                object.threadDsTimeframeOffset = 0;
                object.aiWaitListState = options.enums === String ? "IN_WAITLIST" : 0;
                object.companionMetaNonce = "";
                if (options.bytes === String)
                    object.shareableChatIdentifierEncryptionKey = "";
                else {
                    object.shareableChatIdentifierEncryptionKey = [];
                    if (options.bytes !== Array)
                        object.shareableChatIdentifierEncryptionKey = $util.newBuffer(object.shareableChatIdentifierEncryptionKey);
                }
            }
            if (message.syncType != null && message.hasOwnProperty("syncType"))
                object.syncType = options.enums === String ? $root.HistorySync.HistorySync.HistorySyncType[message.syncType] === undefined ? message.syncType : $root.HistorySync.HistorySync.HistorySyncType[message.syncType] : message.syncType;
            if (message.conversations && message.conversations.length) {
                object.conversations = [];
                for (var j = 0; j < message.conversations.length; ++j)
                    object.conversations[j] = $root.HistorySync.Conversation.toObject(message.conversations[j], options);
            }
            if (message.statusV3Messages && message.statusV3Messages.length) {
                object.statusV3Messages = [];
                for (var j = 0; j < message.statusV3Messages.length; ++j)
                    object.statusV3Messages[j] = $root.Web.WebMessageInfo.toObject(message.statusV3Messages[j], options);
            }
            if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                object.chunkOrder = message.chunkOrder;
            if (message.progress != null && message.hasOwnProperty("progress"))
                object.progress = message.progress;
            if (message.pushnames && message.pushnames.length) {
                object.pushnames = [];
                for (var j = 0; j < message.pushnames.length; ++j)
                    object.pushnames[j] = $root.HistorySync.Pushname.toObject(message.pushnames[j], options);
            }
            if (message.globalSettings != null && message.hasOwnProperty("globalSettings"))
                object.globalSettings = $root.HistorySync.GlobalSettings.toObject(message.globalSettings, options);
            if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret"))
                object.threadIdUserSecret = options.bytes === String ? $util.base64.encode(message.threadIdUserSecret, 0, message.threadIdUserSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.threadIdUserSecret) : message.threadIdUserSecret;
            if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset"))
                object.threadDsTimeframeOffset = message.threadDsTimeframeOffset;
            if (message.recentStickers && message.recentStickers.length) {
                object.recentStickers = [];
                for (var j = 0; j < message.recentStickers.length; ++j)
                    object.recentStickers[j] = $root.HistorySync.StickerMetadata.toObject(message.recentStickers[j], options);
            }
            if (message.pastParticipants && message.pastParticipants.length) {
                object.pastParticipants = [];
                for (var j = 0; j < message.pastParticipants.length; ++j)
                    object.pastParticipants[j] = $root.HistorySync.PastParticipants.toObject(message.pastParticipants[j], options);
            }
            if (message.callLogRecords && message.callLogRecords.length) {
                object.callLogRecords = [];
                for (var j = 0; j < message.callLogRecords.length; ++j)
                    object.callLogRecords[j] = $root.SyncAction.CallLogRecord.toObject(message.callLogRecords[j], options);
            }
            if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState"))
                object.aiWaitListState = options.enums === String ? $root.HistorySync.HistorySync.BotAIWaitListState[message.aiWaitListState] === undefined ? message.aiWaitListState : $root.HistorySync.HistorySync.BotAIWaitListState[message.aiWaitListState] : message.aiWaitListState;
            if (message.phoneNumberToLidMappings && message.phoneNumberToLidMappings.length) {
                object.phoneNumberToLidMappings = [];
                for (var j = 0; j < message.phoneNumberToLidMappings.length; ++j)
                    object.phoneNumberToLidMappings[j] = $root.HistorySync.PhoneNumberToLIDMapping.toObject(message.phoneNumberToLidMappings[j], options);
            }
            if (message.companionMetaNonce != null && message.hasOwnProperty("companionMetaNonce"))
                object.companionMetaNonce = message.companionMetaNonce;
            if (message.shareableChatIdentifierEncryptionKey != null && message.hasOwnProperty("shareableChatIdentifierEncryptionKey"))
                object.shareableChatIdentifierEncryptionKey = options.bytes === String ? $util.base64.encode(message.shareableChatIdentifierEncryptionKey, 0, message.shareableChatIdentifierEncryptionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.shareableChatIdentifierEncryptionKey) : message.shareableChatIdentifierEncryptionKey;
            if (message.accounts && message.accounts.length) {
                object.accounts = [];
                for (var j = 0; j < message.accounts.length; ++j)
                    object.accounts[j] = $root.HistorySync.Account.toObject(message.accounts[j], options);
            }
            return object;
        };

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

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

        /**
         * BotAIWaitListState enum.
         * @name HistorySync.HistorySync.BotAIWaitListState
         * @enum {number}
         * @property {number} IN_WAITLIST=0 IN_WAITLIST value
         * @property {number} AI_AVAILABLE=1 AI_AVAILABLE value
         */
        HistorySync.BotAIWaitListState = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "IN_WAITLIST"] = 0;
            values[valuesById[1] = "AI_AVAILABLE"] = 1;
            return values;
        })();

        /**
         * HistorySyncType enum.
         * @name HistorySync.HistorySync.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
         */
        HistorySync.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;
            return values;
        })();

        return HistorySync;
    })();

    /**
     * PrivacySystemMessage enum.
     * @name HistorySync.PrivacySystemMessage
     * @enum {number}
     * @property {number} E2EE_MSG=1 E2EE_MSG value
     * @property {number} NE2EE_SELF=2 NE2EE_SELF value
     * @property {number} NE2EE_OTHER=3 NE2EE_OTHER value
     */
    HistorySync.PrivacySystemMessage = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[1] = "E2EE_MSG"] = 1;
        values[valuesById[2] = "NE2EE_SELF"] = 2;
        values[valuesById[3] = "NE2EE_OTHER"] = 3;
        return values;
    })();

    /**
     * MediaVisibility enum.
     * @name HistorySync.MediaVisibility
     * @enum {number}
     * @property {number} DEFAULT=0 DEFAULT value
     * @property {number} OFF=1 OFF value
     * @property {number} ON=2 ON value
     */
    HistorySync.MediaVisibility = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "DEFAULT"] = 0;
        values[valuesById[1] = "OFF"] = 1;
        values[valuesById[2] = "ON"] = 2;
        return values;
    })();

    return HistorySync;
})();

$root.ChatLockSettings = (function() {

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

    ChatLockSettings.ChatLockSettings = (function() {

        /**
         * Properties of a ChatLockSettings.
         * @memberof ChatLockSettings
         * @interface IChatLockSettings
         * @property {boolean|null} [hideLockedChats] ChatLockSettings hideLockedChats
         * @property {UserPassword.IUserPassword|null} [secretCode] ChatLockSettings secretCode
         */

        /**
         * Constructs a new ChatLockSettings.
         * @memberof ChatLockSettings
         * @classdesc Represents a ChatLockSettings.
         * @implements IChatLockSettings
         * @constructor
         * @param {ChatLockSettings.IChatLockSettings=} [properties] Properties to set
         */
        function ChatLockSettings(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ChatLockSettings hideLockedChats.
         * @member {boolean} hideLockedChats
         * @memberof ChatLockSettings.ChatLockSettings
         * @instance
         */
        ChatLockSettings.prototype.hideLockedChats = false;

        /**
         * ChatLockSettings secretCode.
         * @member {UserPassword.IUserPassword|null|undefined} secretCode
         * @memberof ChatLockSettings.ChatLockSettings
         * @instance
         */
        ChatLockSettings.prototype.secretCode = null;

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

        /**
         * Encodes the specified ChatLockSettings message. Does not implicitly {@link ChatLockSettings.ChatLockSettings.verify|verify} messages.
         * @function encode
         * @memberof ChatLockSettings.ChatLockSettings
         * @static
         * @param {ChatLockSettings.IChatLockSettings} message ChatLockSettings message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ChatLockSettings.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hideLockedChats != null && Object.hasOwnProperty.call(message, "hideLockedChats"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.hideLockedChats);
            if (message.secretCode != null && Object.hasOwnProperty.call(message, "secretCode"))
                $root.UserPassword.UserPassword.encode(message.secretCode, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a ChatLockSettings message from the specified reader or buffer.
         * @function decode
         * @memberof ChatLockSettings.ChatLockSettings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {ChatLockSettings.ChatLockSettings} ChatLockSettings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ChatLockSettings.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ChatLockSettings.ChatLockSettings();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.hideLockedChats = reader.bool();
                        break;
                    }
                case 2: {
                        message.secretCode = $root.UserPassword.UserPassword.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a ChatLockSettings message.
         * @function verify
         * @memberof ChatLockSettings.ChatLockSettings
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ChatLockSettings.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.hideLockedChats != null && message.hasOwnProperty("hideLockedChats"))
                if (typeof message.hideLockedChats !== "boolean")
                    return "hideLockedChats: boolean expected";
            if (message.secretCode != null && message.hasOwnProperty("secretCode")) {
                var error = $root.UserPassword.UserPassword.verify(message.secretCode);
                if (error)
                    return "secretCode." + error;
            }
            return null;
        };

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

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

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

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

        return ChatLockSettings;
    })();

    return ChatLockSettings;
})();

$root.UserPassword = (function() {

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

    UserPassword.UserPassword = (function() {

        /**
         * Properties of a UserPassword.
         * @memberof UserPassword
         * @interface IUserPassword
         * @property {UserPassword.UserPassword.Encoding|null} [encoding] UserPassword encoding
         * @property {UserPassword.UserPassword.Transformer|null} [transformer] UserPassword transformer
         * @property {Array.<UserPassword.UserPassword.ITransformerArg>|null} [transformerArg] UserPassword transformerArg
         * @property {Uint8Array|null} [transformedData] UserPassword transformedData
         */

        /**
         * Constructs a new UserPassword.
         * @memberof UserPassword
         * @classdesc Represents a UserPassword.
         * @implements IUserPassword
         * @constructor
         * @param {UserPassword.IUserPassword=} [properties] Properties to set
         */
        function UserPassword(properties) {
            this.transformerArg = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserPassword encoding.
         * @member {UserPassword.UserPassword.Encoding} encoding
         * @memberof UserPassword.UserPassword
         * @instance
         */
        UserPassword.prototype.encoding = 0;

        /**
         * UserPassword transformer.
         * @member {UserPassword.UserPassword.Transformer} transformer
         * @memberof UserPassword.UserPassword
         * @instance
         */
        UserPassword.prototype.transformer = 0;

        /**
         * UserPassword transformerArg.
         * @member {Array.<UserPassword.UserPassword.ITransformerArg>} transformerArg
         * @memberof UserPassword.UserPassword
         * @instance
         */
        UserPassword.prototype.transformerArg = $util.emptyArray;

        /**
         * UserPassword transformedData.
         * @member {Uint8Array} transformedData
         * @memberof UserPassword.UserPassword
         * @instance
         */
        UserPassword.prototype.transformedData = $util.newBuffer([]);

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

        /**
         * Encodes the specified UserPassword message. Does not implicitly {@link UserPassword.UserPassword.verify|verify} messages.
         * @function encode
         * @memberof UserPassword.UserPassword
         * @static
         * @param {UserPassword.IUserPassword} message UserPassword message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserPassword.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding);
            if (message.transformer != null && Object.hasOwnProperty.call(message, "transformer"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.transformer);
            if (message.transformerArg != null && message.transformerArg.length)
                for (var i = 0; i < message.transformerArg.length; ++i)
                    $root.UserPassword.UserPassword.TransformerArg.encode(message.transformerArg[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.transformedData != null && Object.hasOwnProperty.call(message, "transformedData"))
                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.transformedData);
            return writer;
        };

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

        /**
         * Decodes a UserPassword message from the specified reader or buffer.
         * @function decode
         * @memberof UserPassword.UserPassword
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {UserPassword.UserPassword} UserPassword
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserPassword.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserPassword.UserPassword();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.encoding = reader.int32();
                        break;
                    }
                case 2: {
                        message.transformer = reader.int32();
                        break;
                    }
                case 3: {
                        if (!(message.transformerArg && message.transformerArg.length))
                            message.transformerArg = [];
                        message.transformerArg.push($root.UserPassword.UserPassword.TransformerArg.decode(reader, reader.uint32()));
                        break;
                    }
                case 4: {
                        message.transformedData = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a UserPassword message.
         * @function verify
         * @memberof UserPassword.UserPassword
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserPassword.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.encoding != null && message.hasOwnProperty("encoding"))
                switch (message.encoding) {
                default:
                    return "encoding: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.transformer != null && message.hasOwnProperty("transformer"))
                switch (message.transformer) {
                default:
                    return "transformer: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.transformerArg != null && message.hasOwnProperty("transformerArg")) {
                if (!Array.isArray(message.transformerArg))
                    return "transformerArg: array expected";
                for (var i = 0; i < message.transformerArg.length; ++i) {
                    var error = $root.UserPassword.UserPassword.TransformerArg.verify(message.transformerArg[i]);
                    if (error)
                        return "transformerArg." + error;
                }
            }
            if (message.transformedData != null && message.hasOwnProperty("transformedData"))
                if (!(message.transformedData && typeof message.transformedData.length === "number" || $util.isString(message.transformedData)))
                    return "transformedData: buffer expected";
            return null;
        };

        /**
         * Creates a UserPassword message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof UserPassword.UserPassword
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {UserPassword.UserPassword} UserPassword
         */
        UserPassword.fromObject = function fromObject(object) {
            if (object instanceof $root.UserPassword.UserPassword)
                return object;
            var message = new $root.UserPassword.UserPassword();
            switch (object.encoding) {
            default:
                if (typeof object.encoding === "number") {
                    message.encoding = object.encoding;
                    break;
                }
                break;
            case "UTF8":
            case 0:
                message.encoding = 0;
                break;
            case "UTF8_BROKEN":
            case 1:
                message.encoding = 1;
                break;
            }
            switch (object.transformer) {
            default:
                if (typeof object.transformer === "number") {
                    message.transformer = object.transformer;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.transformer = 0;
                break;
            case "PBKDF2_HMAC_SHA512":
            case 1:
                message.transformer = 1;
                break;
            case "PBKDF2_HMAC_SHA384":
            case 2:
                message.transformer = 2;
                break;
            }
            if (object.transformerArg) {
                if (!Array.isArray(object.transformerArg))
                    throw TypeError(".UserPassword.UserPassword.transformerArg: array expected");
                message.transformerArg = [];
                for (var i = 0; i < object.transformerArg.length; ++i) {
                    if (typeof object.transformerArg[i] !== "object")
                        throw TypeError(".UserPassword.UserPassword.transformerArg: object expected");
                    message.transformerArg[i] = $root.UserPassword.UserPassword.TransformerArg.fromObject(object.transformerArg[i]);
                }
            }
            if (object.transformedData != null)
                if (typeof object.transformedData === "string")
                    $util.base64.decode(object.transformedData, message.transformedData = $util.newBuffer($util.base64.length(object.transformedData)), 0);
                else if (object.transformedData.length >= 0)
                    message.transformedData = object.transformedData;
            return message;
        };

        /**
         * Creates a plain object from a UserPassword message. Also converts values to other types if specified.
         * @function toObject
         * @memberof UserPassword.UserPassword
         * @static
         * @param {UserPassword.UserPassword} message UserPassword
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        UserPassword.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.transformerArg = [];
            if (options.defaults) {
                object.encoding = options.enums === String ? "UTF8" : 0;
                object.transformer = options.enums === String ? "NONE" : 0;
                if (options.bytes === String)
                    object.transformedData = "";
                else {
                    object.transformedData = [];
                    if (options.bytes !== Array)
                        object.transformedData = $util.newBuffer(object.transformedData);
                }
            }
            if (message.encoding != null && message.hasOwnProperty("encoding"))
                object.encoding = options.enums === String ? $root.UserPassword.UserPassword.Encoding[message.encoding] === undefined ? message.encoding : $root.UserPassword.UserPassword.Encoding[message.encoding] : message.encoding;
            if (message.transformer != null && message.hasOwnProperty("transformer"))
                object.transformer = options.enums === String ? $root.UserPassword.UserPassword.Transformer[message.transformer] === undefined ? message.transformer : $root.UserPassword.UserPassword.Transformer[message.transformer] : message.transformer;
            if (message.transformerArg && message.transformerArg.length) {
                object.transformerArg = [];
                for (var j = 0; j < message.transformerArg.length; ++j)
                    object.transformerArg[j] = $root.UserPassword.UserPassword.TransformerArg.toObject(message.transformerArg[j], options);
            }
            if (message.transformedData != null && message.hasOwnProperty("transformedData"))
                object.transformedData = options.bytes === String ? $util.base64.encode(message.transformedData, 0, message.transformedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.transformedData) : message.transformedData;
            return object;
        };

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

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

        /**
         * Encoding enum.
         * @name UserPassword.UserPassword.Encoding
         * @enum {number}
         * @property {number} UTF8=0 UTF8 value
         * @property {number} UTF8_BROKEN=1 UTF8_BROKEN value
         */
        UserPassword.Encoding = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UTF8"] = 0;
            values[valuesById[1] = "UTF8_BROKEN"] = 1;
            return values;
        })();

        /**
         * Transformer enum.
         * @name UserPassword.UserPassword.Transformer
         * @enum {number}
         * @property {number} NONE=0 NONE value
         * @property {number} PBKDF2_HMAC_SHA512=1 PBKDF2_HMAC_SHA512 value
         * @property {number} PBKDF2_HMAC_SHA384=2 PBKDF2_HMAC_SHA384 value
         */
        UserPassword.Transformer = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NONE"] = 0;
            values[valuesById[1] = "PBKDF2_HMAC_SHA512"] = 1;
            values[valuesById[2] = "PBKDF2_HMAC_SHA384"] = 2;
            return values;
        })();

        UserPassword.TransformerArg = (function() {

            /**
             * Properties of a TransformerArg.
             * @memberof UserPassword.UserPassword
             * @interface ITransformerArg
             * @property {string|null} [key] TransformerArg key
             * @property {UserPassword.UserPassword.TransformerArg.IValue|null} [value] TransformerArg value
             */

            /**
             * Constructs a new TransformerArg.
             * @memberof UserPassword.UserPassword
             * @classdesc Represents a TransformerArg.
             * @implements ITransformerArg
             * @constructor
             * @param {UserPassword.UserPassword.ITransformerArg=} [properties] Properties to set
             */
            function TransformerArg(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * TransformerArg key.
             * @member {string} key
             * @memberof UserPassword.UserPassword.TransformerArg
             * @instance
             */
            TransformerArg.prototype.key = "";

            /**
             * TransformerArg value.
             * @member {UserPassword.UserPassword.TransformerArg.IValue|null|undefined} value
             * @memberof UserPassword.UserPassword.TransformerArg
             * @instance
             */
            TransformerArg.prototype.value = null;

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

            /**
             * Encodes the specified TransformerArg message. Does not implicitly {@link UserPassword.UserPassword.TransformerArg.verify|verify} messages.
             * @function encode
             * @memberof UserPassword.UserPassword.TransformerArg
             * @static
             * @param {UserPassword.UserPassword.ITransformerArg} message TransformerArg message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TransformerArg.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.value != null && Object.hasOwnProperty.call(message, "value"))
                    $root.UserPassword.UserPassword.TransformerArg.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes a TransformerArg message from the specified reader or buffer.
             * @function decode
             * @memberof UserPassword.UserPassword.TransformerArg
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {UserPassword.UserPassword.TransformerArg} TransformerArg
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TransformerArg.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserPassword.UserPassword.TransformerArg();
                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.value = $root.UserPassword.UserPassword.TransformerArg.Value.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a TransformerArg message.
             * @function verify
             * @memberof UserPassword.UserPassword.TransformerArg
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TransformerArg.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.key != null && message.hasOwnProperty("key"))
                    if (!$util.isString(message.key))
                        return "key: string expected";
                if (message.value != null && message.hasOwnProperty("value")) {
                    var error = $root.UserPassword.UserPassword.TransformerArg.Value.verify(message.value);
                    if (error)
                        return "value." + error;
                }
                return null;
            };

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

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

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

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

            TransformerArg.Value = (function() {

                /**
                 * Properties of a Value.
                 * @memberof UserPassword.UserPassword.TransformerArg
                 * @interface IValue
                 * @property {Uint8Array|null} [asBlob] Value asBlob
                 * @property {number|null} [asUnsignedInteger] Value asUnsignedInteger
                 */

                /**
                 * Constructs a new Value.
                 * @memberof UserPassword.UserPassword.TransformerArg
                 * @classdesc Represents a Value.
                 * @implements IValue
                 * @constructor
                 * @param {UserPassword.UserPassword.TransformerArg.IValue=} [properties] Properties to set
                 */
                function Value(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }

                /**
                 * Value asBlob.
                 * @member {Uint8Array|null|undefined} asBlob
                 * @memberof UserPassword.UserPassword.TransformerArg.Value
                 * @instance
                 */
                Value.prototype.asBlob = null;

                /**
                 * Value asUnsignedInteger.
                 * @member {number|null|undefined} asUnsignedInteger
                 * @memberof UserPassword.UserPassword.TransformerArg.Value
                 * @instance
                 */
                Value.prototype.asUnsignedInteger = null;

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

                /**
                 * Value value.
                 * @member {"asBlob"|"asUnsignedInteger"|undefined} value
                 * @memberof UserPassword.UserPassword.TransformerArg.Value
                 * @instance
                 */
                Object.defineProperty(Value.prototype, "value", {
                    get: $util.oneOfGetter($oneOfFields = ["asBlob", "asUnsignedInteger"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

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

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

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

                /**
                 * Decodes a Value message from the specified reader or buffer.
                 * @function decode
                 * @memberof UserPassword.UserPassword.TransformerArg.Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {UserPassword.UserPassword.TransformerArg.Value} Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Value.decode = function decode(reader, length, error) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserPassword.UserPassword.TransformerArg.Value();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.asBlob = reader.bytes();
                                break;
                            }
                        case 2: {
                                message.asUnsignedInteger = reader.uint32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

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

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

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

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

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

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

                return Value;
            })();

            return TransformerArg;
        })();

        return UserPassword;
    })();

    return UserPassword;
})();

$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} timestamp
         * @memberof E2E.AIQueryFanout
         * @instance
         */
        AIQueryFanout.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * 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";
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                var error = $root.Protocol.MessageKey.verify(message.messageKey);
                if (error)
                    return "messageKey." + error;
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                var error = $root.E2E.Message.verify(message.message);
                if (error)
                    return "message." + error;
            }
            if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                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 (options.defaults) {
                object.messageKey = null;
                object.message = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timestamp = options.longs === String ? "0" : 0;
            }
            if (message.messageKey != null && message.hasOwnProperty("messageKey"))
                object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
            if (message.message != null && message.hasOwnProperty("message"))
                object.message = $root.E2E.Message.toObject(message.message, options);
            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;
            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} messageType
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        AIRichResponseMessage.prototype.messageType = 0;

        /**
         * 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;

        /**
         * 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";
            if (message.messageType != null && message.hasOwnProperty("messageType"))
                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")) {
                var error = $root.AICommon.AIRichResponseUnifiedResponse.verify(message.unifiedResponse);
                if (error)
                    return "unifiedResponse." + error;
            }
            if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                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 (options.defaults) {
                object.messageType = options.enums === String ? "AI_RICH_RESPONSE_TYPE_UNKNOWN" : 0;
                object.unifiedResponse = null;
                object.contextInfo = null;
            }
            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 (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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
            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} label
         * @memberof E2E.MemberLabel
         * @instance
         */
        MemberLabel.prototype.label = "";

        /**
         * MemberLabel labelTimestamp.
         * @member {number|Long} labelTimestamp
         * @memberof E2E.MemberLabel
         * @instance
         */
        MemberLabel.prototype.labelTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * 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";
            if (message.label != null && message.hasOwnProperty("label"))
                if (!$util.isString(message.label))
                    return "label: string expected";
            if (message.labelTimestamp != null && message.hasOwnProperty("labelTimestamp"))
                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 (options.defaults) {
                object.label = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.labelTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.labelTimestamp = options.longs === String ? "0" : 0;
            }
            if (message.label != null && message.hasOwnProperty("label"))
                object.label = message.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;
            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} originalUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.originalUrl = "";

            /**
             * UrlTrackingMapElement unconsentedUsersUrl.
             * @member {string} unconsentedUsersUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.unconsentedUsersUrl = "";

            /**
             * UrlTrackingMapElement consentedUsersUrl.
             * @member {string} consentedUsersUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.consentedUsersUrl = "";

            /**
             * UrlTrackingMapElement cardIndex.
             * @member {number} cardIndex
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.cardIndex = 0;

            /**
             * 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";
                if (message.originalUrl != null && message.hasOwnProperty("originalUrl"))
                    if (!$util.isString(message.originalUrl))
                        return "originalUrl: string expected";
                if (message.unconsentedUsersUrl != null && message.hasOwnProperty("unconsentedUsersUrl"))
                    if (!$util.isString(message.unconsentedUsersUrl))
                        return "unconsentedUsersUrl: string expected";
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl"))
                    if (!$util.isString(message.consentedUsersUrl))
                        return "consentedUsersUrl: string expected";
                if (message.cardIndex != null && message.hasOwnProperty("cardIndex"))
                    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 (options.defaults) {
                    object.originalUrl = "";
                    object.unconsentedUsersUrl = "";
                    object.consentedUsersUrl = "";
                    object.cardIndex = 0;
                }
                if (message.originalUrl != null && message.hasOwnProperty("originalUrl"))
                    object.originalUrl = message.originalUrl;
                if (message.unconsentedUsersUrl != null && message.hasOwnProperty("unconsentedUsersUrl"))
                    object.unconsentedUsersUrl = message.unconsentedUsersUrl;
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl"))
                    object.consentedUsersUrl = message.consentedUsersUrl;
                if (message.cardIndex != null && message.hasOwnProperty("cardIndex"))
                    object.cardIndex = message.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} directPath
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.directPath = "";

        /**
         * ProcessedVideo fileSha256.
         * @member {Uint8Array} fileSha256
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.fileSha256 = $util.newBuffer([]);

        /**
         * ProcessedVideo height.
         * @member {number} height
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.height = 0;

        /**
         * ProcessedVideo width.
         * @member {number} width
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.width = 0;

        /**
         * ProcessedVideo fileLength.
         * @member {number|Long} fileLength
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * ProcessedVideo bitrate.
         * @member {number} bitrate
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.bitrate = 0;

        /**
         * ProcessedVideo quality.
         * @member {E2E.ProcessedVideo.VideoQuality} quality
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.quality = 0;

        /**
         * ProcessedVideo capabilities.
         * @member {Array.<string>} capabilities
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.capabilities = $util.emptyArray;

        /**
         * 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";
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                    return "fileSha256: buffer expected";
            if (message.height != null && message.hasOwnProperty("height"))
                if (!$util.isInteger(message.height))
                    return "height: integer expected";
            if (message.width != null && message.hasOwnProperty("width"))
                if (!$util.isInteger(message.width))
                    return "width: integer expected";
            if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                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"))
                if (!$util.isInteger(message.bitrate))
                    return "bitrate: integer expected";
            if (message.quality != null && message.hasOwnProperty("quality"))
                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 (options.defaults) {
                object.directPath = "";
                if (options.bytes === String)
                    object.fileSha256 = "";
                else {
                    object.fileSha256 = [];
                    if (options.bytes !== Array)
                        object.fileSha256 = $util.newBuffer(object.fileSha256);
                }
                object.height = 0;
                object.width = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.fileLength = options.longs === String ? "0" : 0;
                object.bitrate = 0;
                object.quality = options.enums === String ? "UNDEFINED" : 0;
            }
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                object.directPath = message.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 (message.height != null && message.hasOwnProperty("height"))
                object.height = message.height;
            if (message.width != null && message.hasOwnProperty("width"))
                object.width = message.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 (message.bitrate != null && message.hasOwnProperty("bitrate"))
                object.bitrate = message.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 (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} encodedMappingPayload
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @instance
         */
        LIDMigrationMappingSyncMessage.prototype.encodedMappingPayload = $util.newBuffer([]);

        /**
         * 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";
            if (message.encodedMappingPayload != null && message.hasOwnProperty("encodedMappingPayload"))
                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 (options.defaults)
                if (options.bytes === String)
                    object.encodedMappingPayload = "";
                else {
                    object.encodedMappingPayload = [];
                    if (options.bytes !== Array)
                        object.encodedMappingPayload = $util.newBuffer(object.encodedMappingPayload);
                }
            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;
            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} expressPathUrl
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        MediaNotifyMessage.prototype.expressPathUrl = "";

        /**
         * MediaNotifyMessage fileEncSha256.
         * @member {Uint8Array} fileEncSha256
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        MediaNotifyMessage.prototype.fileEncSha256 = $util.newBuffer([]);

        /**
         * MediaNotifyMessage fileLength.
         * @member {number|Long} fileLength
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        MediaNotifyMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * 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";
            if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl"))
                if (!$util.isString(message.expressPathUrl))
                    return "expressPathUrl: string expected";
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                    return "fileEncSha256: buffer expected";
            if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                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 (options.defaults) {
                object.expressPathUrl = "";
                if (options.bytes === String)
                    object.fileEncSha256 = "";
                else {
                    object.fileEncSha256 = [];
                    if (options.bytes !== Array)
                        object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                }
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.fileLength = options.longs === String ? "0" : 0;
            }
            if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl"))
                object.expressPathUrl = message.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 (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;
            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} version
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        MessageSecretMessage.prototype.version = 0;

        /**
         * MessageSecretMessage encIv.
         * @member {Uint8Array} encIv
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        MessageSecretMessage.prototype.encIv = $util.newBuffer([]);

        /**
         * MessageSecretMessage encPayload.
         * @member {Uint8Array} encPayload
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        MessageSecretMessage.prototype.encPayload = $util.newBuffer([]);

        /**
         * 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";
            if (message.version != null && message.hasOwnProperty("version"))
                if (!$util.isInteger(message.version))
                    return "version: integer expected";
            if (message.encIv != null && message.hasOwnProperty("encIv"))
                if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv)))
                    return "encIv: buffer expected";
            if (message.encPayload != null && message.hasOwnProperty("encPayload"))
                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 (options.defaults) {
                object.version = 0;
                if (options.bytes === String)
                    object.encIv = "";
                else {
                    object.encIv = [];
                    if (options.bytes !== Array)
                        object.encIv = $util.newBuffer(object.encIv);
                }
                if (options.bytes === String)
                    object.encPayload = "";
                else {
                    object.encPayload = [];
                    if (options.bytes !== Array)
                        object.encPayload = $util.newBuffer(object.encPayload);
                }
            }
            if (message.version != null && message.hasOwnProperty("version"))
                object.version = message.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 (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;
            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} groupJid
         * @memberof E2E.GroupMention
         * @instance
         */
        GroupMention.prototype.groupJid = "";

        /**
         * GroupMention groupSubject.
         * @member {string} groupSubject
         * @memberof E2E.GroupMention
         * @instance
         */
        GroupMention.prototype.groupSubject = "";

        /**
         * 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";
            if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                if (!$util.isString(message.groupJid))
                    return "groupJid: string expected";
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject"))
                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 (options.defaults) {
                object.groupJid = "";
                object.groupSubject = "";
            }
            if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                object.groupJid = message.groupJid;
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject"))
                object.groupSubject = message.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} url
         * @memberof E2E.ActionLink
         * @instance
         */
        ActionLink.prototype.url = "";

        /**
         * ActionLink buttonTitle.
         * @member {string} buttonTitle
         * @memberof E2E.ActionLink
         * @instance
         */
        ActionLink.prototype.buttonTitle = "";

        /**
         * 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";
            if (message.url != null && message.hasOwnProperty("url"))
                if (!$util.isString(message.url))
                    return "url: string expected";
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle"))
                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 (options.defaults) {
                object.url = "";
                object.buttonTitle = "";
            }
            if (message.url != null && message.hasOwnProperty("url"))
                object.url = message.url;
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle"))
                object.buttonTitle = message.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} initiator
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.initiator = 0;

        /**
         * DisappearingMode trigger.
         * @member {E2E.DisappearingMode.Trigger} trigger
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.trigger = 0;

        /**
         * DisappearingMode initiatorDeviceJid.
         * @member {string} initiatorDeviceJid
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.initiatorDeviceJid = "";

        /**
         * DisappearingMode initiatedByMe.
         * @member {boolean} initiatedByMe
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.initiatedByMe = false;

        /**
         * 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";
            if (message.initiator != null && message.hasOwnProperty("initiator"))
                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"))
                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"))
                if (!$util.isString(message.initiatorDeviceJid))
                    return "initiatorDeviceJid: string expected";
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe"))
                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 (options.defaults) {
                object.initiator = options.enums === String ? "CHANGED_IN_CHAT" : 0;
                object.trigger = options.enums === String ? "UNKNOWN" : 0;
                object.initiatorDeviceJid = "";
                object.initiatedByMe = false;
            }
            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 (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 (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid"))
                object.initiatorDeviceJid = message.initiatorDeviceJid;
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe"))
                object.initiatedByMe = message.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} id
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.id = "";

        /**
         * PaymentBackground fileLength.
         * @member {number|Long} fileLength
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * PaymentBackground width.
         * @member {number} width
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.width = 0;

        /**
         * PaymentBackground height.
         * @member {number} height
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.height = 0;

        /**
         * PaymentBackground mimetype.
         * @member {string} mimetype
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.mimetype = "";

        /**
         * PaymentBackground placeholderArgb.
         * @member {number} placeholderArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.placeholderArgb = 0;

        /**
         * PaymentBackground textArgb.
         * @member {number} textArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.textArgb = 0;

        /**
         * PaymentBackground subtextArgb.
         * @member {number} subtextArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.subtextArgb = 0;

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

        /**
         * PaymentBackground type.
         * @member {E2E.PaymentBackground.Type} type
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.type = 0;

        /**
         * 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";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                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"))
                if (!$util.isInteger(message.width))
                    return "width: integer expected";
            if (message.height != null && message.hasOwnProperty("height"))
                if (!$util.isInteger(message.height))
                    return "height: integer expected";
            if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                if (!$util.isString(message.mimetype))
                    return "mimetype: string expected";
            if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb"))
                if (!$util.isInteger(message.placeholderArgb))
                    return "placeholderArgb: integer expected";
            if (message.textArgb != null && message.hasOwnProperty("textArgb"))
                if (!$util.isInteger(message.textArgb))
                    return "textArgb: integer expected";
            if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb"))
                if (!$util.isInteger(message.subtextArgb))
                    return "subtextArgb: integer expected";
            if (message.mediaData != null && message.hasOwnProperty("mediaData")) {
                var error = $root.E2E.PaymentBackground.MediaData.verify(message.mediaData);
                if (error)
                    return "mediaData." + error;
            }
            if (message.type != null && message.hasOwnProperty("type"))
                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 (options.defaults) {
                object.id = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.fileLength = options.longs === String ? "0" : 0;
                object.width = 0;
                object.height = 0;
                object.mimetype = "";
                object.placeholderArgb = 0;
                object.textArgb = 0;
                object.subtextArgb = 0;
                object.mediaData = null;
                object.type = options.enums === String ? "UNKNOWN" : 0;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.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 (message.width != null && message.hasOwnProperty("width"))
                object.width = message.width;
            if (message.height != null && message.hasOwnProperty("height"))
                object.height = message.height;
            if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                object.mimetype = message.mimetype;
            if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb"))
                object.placeholderArgb = message.placeholderArgb;
            if (message.textArgb != null && message.hasOwnProperty("textArgb"))
                object.textArgb = message.textArgb;
            if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb"))
                object.subtextArgb = message.subtextArgb;
            if (message.mediaData != null && message.hasOwnProperty("mediaData"))
                object.mediaData = $root.E2E.PaymentBackground.MediaData.toObject(message.mediaData, options);
            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;
            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} mediaKey
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.mediaKey = $util.newBuffer([]);

            /**
             * MediaData mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MediaData fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * MediaData fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * MediaData directPath.
             * @member {string} directPath
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.directPath = "";

            /**
             * 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";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    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 (options.defaults) {
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    object.directPath = "";
                }
                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 (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 (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 (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 (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.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} value
         * @memberof E2E.Money
         * @instance
         */
        Money.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Money offset.
         * @member {number} offset
         * @memberof E2E.Money
         * @instance
         */
        Money.prototype.offset = 0;

        /**
         * Money currencyCode.
         * @member {string} currencyCode
         * @memberof E2E.Money
         * @instance
         */
        Money.prototype.currencyCode = "";

        /**
         * 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";
            if (message.value != null && message.hasOwnProperty("value"))
                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"))
                if (!$util.isInteger(message.offset))
                    return "offset: integer expected";
            if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
                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 (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.value = options.longs === String ? "0" : 0;
                object.offset = 0;
                object.currencyCode = "";
            }
            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 (message.offset != null && message.hasOwnProperty("offset"))
                object.offset = message.offset;
            if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
                object.currencyCode = message.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} index
         * @memberof E2E.HydratedTemplateButton
         * @instance
         */
        HydratedTemplateButton.prototype.index = 0;

        /**
         * 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 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"))
                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 (options.defaults)
                object.index = 0;
            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;
            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} displayText
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @instance
             */
            HydratedCallButton.prototype.displayText = "";

            /**
             * HydratedCallButton phoneNumber.
             * @member {string} phoneNumber
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @instance
             */
            HydratedCallButton.prototype.phoneNumber = "";

            /**
             * 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";
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    if (!$util.isString(message.displayText))
                        return "displayText: string expected";
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber"))
                    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 (options.defaults) {
                    object.displayText = "";
                    object.phoneNumber = "";
                }
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    object.displayText = message.displayText;
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber"))
                    object.phoneNumber = message.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} displayText
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @instance
             */
            HydratedQuickReplyButton.prototype.displayText = "";

            /**
             * HydratedQuickReplyButton id.
             * @member {string} id
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @instance
             */
            HydratedQuickReplyButton.prototype.id = "";

            /**
             * 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";
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    if (!$util.isString(message.displayText))
                        return "displayText: string expected";
                if (message.id != null && message.hasOwnProperty("id"))
                    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 (options.defaults) {
                    object.displayText = "";
                    object.id = "";
                }
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    object.displayText = message.displayText;
                if (message.id != null && message.hasOwnProperty("id"))
                    object.id = message.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} displayText
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.displayText = "";

            /**
             * HydratedURLButton url.
             * @member {string} url
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.url = "";

            /**
             * HydratedURLButton consentedUsersUrl.
             * @member {string} consentedUsersUrl
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.consentedUsersUrl = "";

            /**
             * HydratedURLButton webviewPresentation.
             * @member {E2E.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType} webviewPresentation
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.webviewPresentation = 1;

            /**
             * 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";
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    if (!$util.isString(message.displayText))
                        return "displayText: string expected";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl"))
                    if (!$util.isString(message.consentedUsersUrl))
                        return "consentedUsersUrl: string expected";
                if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation"))
                    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 (options.defaults) {
                    object.displayText = "";
                    object.url = "";
                    object.consentedUsersUrl = "";
                    object.webviewPresentation = options.enums === String ? "FULL" : 1;
                }
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    object.displayText = message.displayText;
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl"))
                    object.consentedUsersUrl = message.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;
                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} index
         * @memberof E2E.TemplateButton
         * @instance
         */
        TemplateButton.prototype.index = 0;

        /**
         * 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 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"))
                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 (options.defaults)
                object.index = 0;
            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;
            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;

            /**
             * 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";
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.displayText);
                    if (error)
                        return "displayText." + error;
                }
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) {
                    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 (options.defaults) {
                    object.displayText = null;
                    object.phoneNumber = null;
                }
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    object.displayText = $root.E2E.Message.HighlyStructuredMessage.toObject(message.displayText, options);
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber"))
                    object.phoneNumber = $root.E2E.Message.HighlyStructuredMessage.toObject(message.phoneNumber, options);
                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} id
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @instance
             */
            QuickReplyButton.prototype.id = "";

            /**
             * 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";
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.displayText);
                    if (error)
                        return "displayText." + error;
                }
                if (message.id != null && message.hasOwnProperty("id"))
                    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 (options.defaults) {
                    object.displayText = null;
                    object.id = "";
                }
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    object.displayText = $root.E2E.Message.HighlyStructuredMessage.toObject(message.displayText, options);
                if (message.id != null && message.hasOwnProperty("id"))
                    object.id = message.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;

            /**
             * 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";
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.displayText);
                    if (error)
                        return "displayText." + error;
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    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 (options.defaults) {
                    object.displayText = null;
                    object.url = null;
                }
                if (message.displayText != null && message.hasOwnProperty("displayText"))
                    object.displayText = $root.E2E.Message.HighlyStructuredMessage.toObject(message.displayText, options);
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = $root.E2E.Message.HighlyStructuredMessage.toObject(message.url, options);
                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} degreesLatitude
         * @memberof E2E.Location
         * @instance
         */
        Location.prototype.degreesLatitude = 0;

        /**
         * Location degreesLongitude.
         * @member {number} degreesLongitude
         * @memberof E2E.Location
         * @instance
         */
        Location.prototype.degreesLongitude = 0;

        /**
         * Location name.
         * @member {string} name
         * @memberof E2E.Location
         * @instance
         */
        Location.prototype.name = "";

        /**
         * 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";
            if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude"))
                if (typeof message.degreesLatitude !== "number")
                    return "degreesLatitude: number expected";
            if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude"))
                if (typeof message.degreesLongitude !== "number")
                    return "degreesLongitude: number expected";
            if (message.name != null && message.hasOwnProperty("name"))
                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 (options.defaults) {
                object.degreesLatitude = 0;
                object.degreesLongitude = 0;
                object.name = "";
            }
            if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude"))
                object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude;
            if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude"))
                object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude;
            if (message.name != null && message.hasOwnProperty("name"))
                object.name = message.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} xDeprecated
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.xDeprecated = 0;

        /**
         * Point yDeprecated.
         * @member {number} yDeprecated
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.yDeprecated = 0;

        /**
         * Point x.
         * @member {number} x
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.x = 0;

        /**
         * Point y.
         * @member {number} y
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.y = 0;

        /**
         * 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";
            if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated"))
                if (!$util.isInteger(message.xDeprecated))
                    return "xDeprecated: integer expected";
            if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated"))
                if (!$util.isInteger(message.yDeprecated))
                    return "yDeprecated: integer expected";
            if (message.x != null && message.hasOwnProperty("x"))
                if (typeof message.x !== "number")
                    return "x: number expected";
            if (message.y != null && message.hasOwnProperty("y"))
                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 (options.defaults) {
                object.xDeprecated = 0;
                object.yDeprecated = 0;
                object.x = 0;
                object.y = 0;
            }
            if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated"))
                object.xDeprecated = message.xDeprecated;
            if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated"))
                object.yDeprecated = message.yDeprecated;
            if (message.x != null && message.hasOwnProperty("x"))
                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
            if (message.y != null && message.hasOwnProperty("y"))
                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.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} shouldSkipConfirmation
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.shouldSkipConfirmation = false;

        /**
         * InteractiveAnnotation embeddedContent.
         * @member {E2E.IEmbeddedContent|null|undefined} embeddedContent
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.embeddedContent = null;

        /**
         * InteractiveAnnotation statusLinkType.
         * @member {E2E.InteractiveAnnotation.StatusLinkType} statusLinkType
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.statusLinkType = 1;

        /**
         * 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 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"))
                if (typeof message.shouldSkipConfirmation !== "boolean")
                    return "shouldSkipConfirmation: boolean expected";
            if (message.embeddedContent != null && message.hasOwnProperty("embeddedContent")) {
                var error = $root.E2E.EmbeddedContent.verify(message.embeddedContent);
                if (error)
                    return "embeddedContent." + error;
            }
            if (message.statusLinkType != null && message.hasOwnProperty("statusLinkType"))
                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 (options.defaults) {
                object.shouldSkipConfirmation = false;
                object.embeddedContent = null;
                object.statusLinkType = options.enums === String ? "RASTERIZED_LINK_PREVIEW" : 1;
            }
            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 (message.embeddedContent != null && message.hasOwnProperty("embeddedContent"))
                object.embeddedContent = $root.E2E.EmbeddedContent.toObject(message.embeddedContent, options);
            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;
            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} title
         * @memberof E2E.TapLinkAction
         * @instance
         */
        TapLinkAction.prototype.title = "";

        /**
         * TapLinkAction tapUrl.
         * @member {string} tapUrl
         * @memberof E2E.TapLinkAction
         * @instance
         */
        TapLinkAction.prototype.tapUrl = "";

        /**
         * 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";
            if (message.title != null && message.hasOwnProperty("title"))
                if (!$util.isString(message.title))
                    return "title: string expected";
            if (message.tapUrl != null && message.hasOwnProperty("tapUrl"))
                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 (options.defaults) {
                object.title = "";
                object.tapUrl = "";
            }
            if (message.title != null && message.hasOwnProperty("title"))
                object.title = message.title;
            if (message.tapUrl != null && message.hasOwnProperty("tapUrl"))
                object.tapUrl = message.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} musicContentMediaId
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.musicContentMediaId = "";

        /**
         * EmbeddedMusic songId.
         * @member {string} songId
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.songId = "";

        /**
         * EmbeddedMusic author.
         * @member {string} author
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.author = "";

        /**
         * EmbeddedMusic title.
         * @member {string} title
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.title = "";

        /**
         * EmbeddedMusic artworkDirectPath.
         * @member {string} artworkDirectPath
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkDirectPath = "";

        /**
         * EmbeddedMusic artworkSha256.
         * @member {Uint8Array} artworkSha256
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkSha256 = $util.newBuffer([]);

        /**
         * EmbeddedMusic artworkEncSha256.
         * @member {Uint8Array} artworkEncSha256
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkEncSha256 = $util.newBuffer([]);

        /**
         * EmbeddedMusic artistAttribution.
         * @member {string} artistAttribution
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artistAttribution = "";

        /**
         * EmbeddedMusic countryBlocklist.
         * @member {Uint8Array} countryBlocklist
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.countryBlocklist = $util.newBuffer([]);

        /**
         * EmbeddedMusic isExplicit.
         * @member {boolean} isExplicit
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.isExplicit = false;

        /**
         * EmbeddedMusic artworkMediaKey.
         * @member {Uint8Array} artworkMediaKey
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkMediaKey = $util.newBuffer([]);

        /**
         * EmbeddedMusic musicSongStartTimeInMs.
         * @member {number|Long} musicSongStartTimeInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.musicSongStartTimeInMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * EmbeddedMusic derivedContentStartTimeInMs.
         * @member {number|Long} derivedContentStartTimeInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.derivedContentStartTimeInMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * EmbeddedMusic overlapDurationInMs.
         * @member {number|Long} overlapDurationInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.overlapDurationInMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * 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";
            if (message.musicContentMediaId != null && message.hasOwnProperty("musicContentMediaId"))
                if (!$util.isString(message.musicContentMediaId))
                    return "musicContentMediaId: string expected";
            if (message.songId != null && message.hasOwnProperty("songId"))
                if (!$util.isString(message.songId))
                    return "songId: string expected";
            if (message.author != null && message.hasOwnProperty("author"))
                if (!$util.isString(message.author))
                    return "author: string expected";
            if (message.title != null && message.hasOwnProperty("title"))
                if (!$util.isString(message.title))
                    return "title: string expected";
            if (message.artworkDirectPath != null && message.hasOwnProperty("artworkDirectPath"))
                if (!$util.isString(message.artworkDirectPath))
                    return "artworkDirectPath: string expected";
            if (message.artworkSha256 != null && message.hasOwnProperty("artworkSha256"))
                if (!(message.artworkSha256 && typeof message.artworkSha256.length === "number" || $util.isString(message.artworkSha256)))
                    return "artworkSha256: buffer expected";
            if (message.artworkEncSha256 != null && message.hasOwnProperty("artworkEncSha256"))
                if (!(message.artworkEncSha256 && typeof message.artworkEncSha256.length === "number" || $util.isString(message.artworkEncSha256)))
                    return "artworkEncSha256: buffer expected";
            if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution"))
                if (!$util.isString(message.artistAttribution))
                    return "artistAttribution: string expected";
            if (message.countryBlocklist != null && message.hasOwnProperty("countryBlocklist"))
                if (!(message.countryBlocklist && typeof message.countryBlocklist.length === "number" || $util.isString(message.countryBlocklist)))
                    return "countryBlocklist: buffer expected";
            if (message.isExplicit != null && message.hasOwnProperty("isExplicit"))
                if (typeof message.isExplicit !== "boolean")
                    return "isExplicit: boolean expected";
            if (message.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey"))
                if (!(message.artworkMediaKey && typeof message.artworkMediaKey.length === "number" || $util.isString(message.artworkMediaKey)))
                    return "artworkMediaKey: buffer expected";
            if (message.musicSongStartTimeInMs != null && message.hasOwnProperty("musicSongStartTimeInMs"))
                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"))
                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"))
                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 (options.defaults) {
                object.musicContentMediaId = "";
                object.songId = "";
                object.author = "";
                object.title = "";
                object.artworkDirectPath = "";
                if (options.bytes === String)
                    object.artworkSha256 = "";
                else {
                    object.artworkSha256 = [];
                    if (options.bytes !== Array)
                        object.artworkSha256 = $util.newBuffer(object.artworkSha256);
                }
                if (options.bytes === String)
                    object.artworkEncSha256 = "";
                else {
                    object.artworkEncSha256 = [];
                    if (options.bytes !== Array)
                        object.artworkEncSha256 = $util.newBuffer(object.artworkEncSha256);
                }
                object.artistAttribution = "";
                if (options.bytes === String)
                    object.countryBlocklist = "";
                else {
                    object.countryBlocklist = [];
                    if (options.bytes !== Array)
                        object.countryBlocklist = $util.newBuffer(object.countryBlocklist);
                }
                object.isExplicit = false;
                if (options.bytes === String)
                    object.artworkMediaKey = "";
                else {
                    object.artworkMediaKey = [];
                    if (options.bytes !== Array)
                        object.artworkMediaKey = $util.newBuffer(object.artworkMediaKey);
                }
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.musicSongStartTimeInMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.musicSongStartTimeInMs = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.derivedContentStartTimeInMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.derivedContentStartTimeInMs = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.overlapDurationInMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.overlapDurationInMs = options.longs === String ? "0" : 0;
            }
            if (message.musicContentMediaId != null && message.hasOwnProperty("musicContentMediaId"))
                object.musicContentMediaId = message.musicContentMediaId;
            if (message.songId != null && message.hasOwnProperty("songId"))
                object.songId = message.songId;
            if (message.author != null && message.hasOwnProperty("author"))
                object.author = message.author;
            if (message.title != null && message.hasOwnProperty("title"))
                object.title = message.title;
            if (message.artworkDirectPath != null && message.hasOwnProperty("artworkDirectPath"))
                object.artworkDirectPath = message.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 (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 (message.artistAttribution != null && message.hasOwnProperty("artistAttribution"))
                object.artistAttribution = message.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 (message.isExplicit != null && message.hasOwnProperty("isExplicit"))
                object.isExplicit = message.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 (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 (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 (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;
            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} stanzaId
         * @memberof E2E.EmbeddedMessage
         * @instance
         */
        EmbeddedMessage.prototype.stanzaId = "";

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

        /**
         * 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";
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                if (!$util.isString(message.stanzaId))
                    return "stanzaId: string expected";
            if (message.message != null && message.hasOwnProperty("message")) {
                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 (options.defaults) {
                object.stanzaId = "";
                object.message = null;
            }
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                object.stanzaId = message.stanzaId;
            if (message.message != null && message.hasOwnProperty("message"))
                object.message = $root.E2E.Message.toObject(message.message, options);
            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} senderKeyHash
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderKeyHash = $util.newBuffer([]);

        /**
         * DeviceListMetadata senderTimestamp.
         * @member {number|Long} senderTimestamp
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * DeviceListMetadata senderKeyIndexes.
         * @member {Array.<number>} senderKeyIndexes
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderKeyIndexes = $util.emptyArray;

        /**
         * DeviceListMetadata senderAccountType.
         * @member {Adv.ADVEncryptionType} senderAccountType
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderAccountType = 0;

        /**
         * DeviceListMetadata receiverAccountType.
         * @member {Adv.ADVEncryptionType} receiverAccountType
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.receiverAccountType = 0;

        /**
         * DeviceListMetadata recipientKeyHash.
         * @member {Uint8Array} recipientKeyHash
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.recipientKeyHash = $util.newBuffer([]);

        /**
         * DeviceListMetadata recipientTimestamp.
         * @member {number|Long} recipientTimestamp
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.recipientTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * DeviceListMetadata recipientKeyIndexes.
         * @member {Array.<number>} recipientKeyIndexes
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray;

        /**
         * 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";
            if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash"))
                if (!(message.senderKeyHash && typeof message.senderKeyHash.length === "number" || $util.isString(message.senderKeyHash)))
                    return "senderKeyHash: buffer expected";
            if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp"))
                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"))
                switch (message.senderAccountType) {
                default:
                    return "senderAccountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType"))
                switch (message.receiverAccountType) {
                default:
                    return "receiverAccountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash"))
                if (!(message.recipientKeyHash && typeof message.recipientKeyHash.length === "number" || $util.isString(message.recipientKeyHash)))
                    return "recipientKeyHash: buffer expected";
            if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.senderKeyHash = "";
                else {
                    object.senderKeyHash = [];
                    if (options.bytes !== Array)
                        object.senderKeyHash = $util.newBuffer(object.senderKeyHash);
                }
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.senderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.senderTimestamp = options.longs === String ? "0" : 0;
                object.senderAccountType = options.enums === String ? "E2EE" : 0;
                object.receiverAccountType = options.enums === String ? "E2EE" : 0;
                if (options.bytes === String)
                    object.recipientKeyHash = "";
                else {
                    object.recipientKeyHash = [];
                    if (options.bytes !== Array)
                        object.recipientKeyHash = $util.newBuffer(object.recipientKeyHash);
                }
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.recipientTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.recipientTimestamp = options.longs === String ? "0" : 0;
            }
            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 (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 (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 (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 (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 (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 (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
         */

        /**
         * 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} deviceListMetadataVersion
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.deviceListMetadataVersion = 0;

        /**
         * MessageContextInfo messageSecret.
         * @member {Uint8Array} messageSecret
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageSecret = $util.newBuffer([]);

        /**
         * MessageContextInfo paddingBytes.
         * @member {Uint8Array} paddingBytes
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.paddingBytes = $util.newBuffer([]);

        /**
         * MessageContextInfo messageAddOnDurationInSecs.
         * @member {number} messageAddOnDurationInSecs
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageAddOnDurationInSecs = 0;

        /**
         * MessageContextInfo botMessageSecret.
         * @member {Uint8Array} botMessageSecret
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.botMessageSecret = $util.newBuffer([]);

        /**
         * MessageContextInfo botMetadata.
         * @member {AICommon.IBotMetadata|null|undefined} botMetadata
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.botMetadata = null;

        /**
         * MessageContextInfo reportingTokenVersion.
         * @member {number} reportingTokenVersion
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.reportingTokenVersion = 0;

        /**
         * MessageContextInfo messageAddOnExpiryType.
         * @member {E2E.MessageContextInfo.MessageAddonExpiryType} messageAddOnExpiryType
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageAddOnExpiryType = 1;

        /**
         * MessageContextInfo messageAssociation.
         * @member {E2E.IMessageAssociation|null|undefined} messageAssociation
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageAssociation = null;

        /**
         * MessageContextInfo capiCreatedGroup.
         * @member {boolean} capiCreatedGroup
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.capiCreatedGroup = false;

        /**
         * MessageContextInfo supportPayload.
         * @member {string} supportPayload
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.supportPayload = "";

        /**
         * 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;

        /**
         * 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();
            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;
                    }
                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";
            if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) {
                var error = $root.E2E.DeviceListMetadata.verify(message.deviceListMetadata);
                if (error)
                    return "deviceListMetadata." + error;
            }
            if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion"))
                if (!$util.isInteger(message.deviceListMetadataVersion))
                    return "deviceListMetadataVersion: integer expected";
            if (message.messageSecret != null && message.hasOwnProperty("messageSecret"))
                if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret)))
                    return "messageSecret: buffer expected";
            if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes"))
                if (!(message.paddingBytes && typeof message.paddingBytes.length === "number" || $util.isString(message.paddingBytes)))
                    return "paddingBytes: buffer expected";
            if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs"))
                if (!$util.isInteger(message.messageAddOnDurationInSecs))
                    return "messageAddOnDurationInSecs: integer expected";
            if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret"))
                if (!(message.botMessageSecret && typeof message.botMessageSecret.length === "number" || $util.isString(message.botMessageSecret)))
                    return "botMessageSecret: buffer expected";
            if (message.botMetadata != null && message.hasOwnProperty("botMetadata")) {
                var error = $root.AICommon.BotMetadata.verify(message.botMetadata);
                if (error)
                    return "botMetadata." + error;
            }
            if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion"))
                if (!$util.isInteger(message.reportingTokenVersion))
                    return "reportingTokenVersion: integer expected";
            if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType"))
                switch (message.messageAddOnExpiryType) {
                default:
                    return "messageAddOnExpiryType: enum value expected";
                case 1:
                case 2:
                    break;
                }
            if (message.messageAssociation != null && message.hasOwnProperty("messageAssociation")) {
                var error = $root.E2E.MessageAssociation.verify(message.messageAssociation);
                if (error)
                    return "messageAssociation." + error;
            }
            if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup"))
                if (typeof message.capiCreatedGroup !== "boolean")
                    return "capiCreatedGroup: boolean expected";
            if (message.supportPayload != null && message.hasOwnProperty("supportPayload"))
                if (!$util.isString(message.supportPayload))
                    return "supportPayload: string expected";
            if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) {
                var error = $root.Protocol.LimitSharing.verify(message.limitSharing);
                if (error)
                    return "limitSharing." + error;
            }
            if (message.limitSharingV2 != null && message.hasOwnProperty("limitSharingV2")) {
                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;
                }
            }
            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]);
                }
            }
            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 (options.defaults) {
                object.deviceListMetadata = null;
                object.deviceListMetadataVersion = 0;
                if (options.bytes === String)
                    object.messageSecret = "";
                else {
                    object.messageSecret = [];
                    if (options.bytes !== Array)
                        object.messageSecret = $util.newBuffer(object.messageSecret);
                }
                if (options.bytes === String)
                    object.paddingBytes = "";
                else {
                    object.paddingBytes = [];
                    if (options.bytes !== Array)
                        object.paddingBytes = $util.newBuffer(object.paddingBytes);
                }
                object.messageAddOnDurationInSecs = 0;
                if (options.bytes === String)
                    object.botMessageSecret = "";
                else {
                    object.botMessageSecret = [];
                    if (options.bytes !== Array)
                        object.botMessageSecret = $util.newBuffer(object.botMessageSecret);
                }
                object.botMetadata = null;
                object.reportingTokenVersion = 0;
                object.messageAddOnExpiryType = options.enums === String ? "STATIC" : 1;
                object.messageAssociation = null;
                object.capiCreatedGroup = false;
                object.supportPayload = "";
                object.limitSharing = null;
                object.limitSharingV2 = null;
            }
            if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata"))
                object.deviceListMetadata = $root.E2E.DeviceListMetadata.toObject(message.deviceListMetadata, options);
            if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion"))
                object.deviceListMetadataVersion = message.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 (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 (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs"))
                object.messageAddOnDurationInSecs = message.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 (message.botMetadata != null && message.hasOwnProperty("botMetadata"))
                object.botMetadata = $root.AICommon.BotMetadata.toObject(message.botMetadata, options);
            if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion"))
                object.reportingTokenVersion = message.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 (message.messageAssociation != null && message.hasOwnProperty("messageAssociation"))
                object.messageAssociation = $root.E2E.MessageAssociation.toObject(message.messageAssociation, options);
            if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup"))
                object.capiCreatedGroup = message.capiCreatedGroup;
            if (message.supportPayload != null && message.hasOwnProperty("supportPayload"))
                object.supportPayload = message.supportPayload;
            if (message.limitSharing != null && message.hasOwnProperty("limitSharing"))
                object.limitSharing = $root.Protocol.LimitSharing.toObject(message.limitSharing, options);
            if (message.limitSharingV2 != null && message.hasOwnProperty("limitSharingV2"))
                object.limitSharingV2 = $root.Protocol.LimitSharing.toObject(message.limitSharingV2, options);
            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);
            }
            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} threadType
         * @memberof E2E.ThreadID
         * @instance
         */
        ThreadID.prototype.threadType = 0;

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

        /**
         * 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";
            if (message.threadType != null && message.hasOwnProperty("threadType"))
                switch (message.threadType) {
                default:
                    return "threadType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.threadKey != null && message.hasOwnProperty("threadKey")) {
                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 (options.defaults) {
                object.threadType = options.enums === String ? "UNKNOWN" : 0;
                object.threadKey = null;
            }
            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 (message.threadKey != null && message.hasOwnProperty("threadKey"))
                object.threadKey = $root.Protocol.MessageKey.toObject(message.threadKey, options);
            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} associationType
         * @memberof E2E.MessageAssociation
         * @instance
         */
        MessageAssociation.prototype.associationType = 0;

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

        /**
         * MessageAssociation messageIndex.
         * @member {number} messageIndex
         * @memberof E2E.MessageAssociation
         * @instance
         */
        MessageAssociation.prototype.messageIndex = 0;

        /**
         * 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";
            if (message.associationType != null && message.hasOwnProperty("associationType"))
                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")) {
                var error = $root.Protocol.MessageKey.verify(message.parentMessageKey);
                if (error)
                    return "parentMessageKey." + error;
            }
            if (message.messageIndex != null && message.hasOwnProperty("messageIndex"))
                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 (options.defaults) {
                object.associationType = options.enums === String ? "UNKNOWN" : 0;
                object.parentMessageKey = null;
                object.messageIndex = 0;
            }
            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 (message.parentMessageKey != null && message.hasOwnProperty("parentMessageKey"))
                object.parentMessageKey = $root.Protocol.MessageKey.toObject(message.parentMessageKey, options);
            if (message.messageIndex != null && message.hasOwnProperty("messageIndex"))
                object.messageIndex = message.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} stanzaId
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.stanzaId = "";

        /**
         * ContextInfo participant.
         * @member {string} participant
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.participant = "";

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

        /**
         * ContextInfo remoteJid.
         * @member {string} remoteJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.remoteJid = "";

        /**
         * ContextInfo mentionedJid.
         * @member {Array.<string>} mentionedJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.mentionedJid = $util.emptyArray;

        /**
         * ContextInfo conversionSource.
         * @member {string} conversionSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.conversionSource = "";

        /**
         * ContextInfo conversionData.
         * @member {Uint8Array} conversionData
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.conversionData = $util.newBuffer([]);

        /**
         * ContextInfo conversionDelaySeconds.
         * @member {number} conversionDelaySeconds
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.conversionDelaySeconds = 0;

        /**
         * ContextInfo forwardingScore.
         * @member {number} forwardingScore
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.forwardingScore = 0;

        /**
         * ContextInfo isForwarded.
         * @member {boolean} isForwarded
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isForwarded = false;

        /**
         * 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} expiration
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.expiration = 0;

        /**
         * ContextInfo ephemeralSettingTimestamp.
         * @member {number|Long} ephemeralSettingTimestamp
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * ContextInfo ephemeralSharedSecret.
         * @member {Uint8Array} ephemeralSharedSecret
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ephemeralSharedSecret = $util.newBuffer([]);

        /**
         * ContextInfo externalAdReply.
         * @member {E2E.ContextInfo.IExternalAdReplyInfo|null|undefined} externalAdReply
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.externalAdReply = null;

        /**
         * ContextInfo entryPointConversionSource.
         * @member {string} entryPointConversionSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionSource = "";

        /**
         * ContextInfo entryPointConversionApp.
         * @member {string} entryPointConversionApp
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionApp = "";

        /**
         * ContextInfo entryPointConversionDelaySeconds.
         * @member {number} entryPointConversionDelaySeconds
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionDelaySeconds = 0;

        /**
         * 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} groupSubject
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.groupSubject = "";

        /**
         * ContextInfo parentGroupJid.
         * @member {string} parentGroupJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.parentGroupJid = "";

        /**
         * ContextInfo trustBannerType.
         * @member {string} trustBannerType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.trustBannerType = "";

        /**
         * ContextInfo trustBannerAction.
         * @member {number} trustBannerAction
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.trustBannerAction = 0;

        /**
         * ContextInfo isSampled.
         * @member {boolean} isSampled
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isSampled = false;

        /**
         * 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} smbClientCampaignId
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.smbClientCampaignId = "";

        /**
         * ContextInfo smbServerCampaignId.
         * @member {string} smbServerCampaignId
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.smbServerCampaignId = "";

        /**
         * ContextInfo dataSharingContext.
         * @member {E2E.ContextInfo.IDataSharingContext|null|undefined} dataSharingContext
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.dataSharingContext = null;

        /**
         * ContextInfo alwaysShowAdAttribution.
         * @member {boolean} alwaysShowAdAttribution
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.alwaysShowAdAttribution = false;

        /**
         * ContextInfo featureEligibilities.
         * @member {E2E.ContextInfo.IFeatureEligibilities|null|undefined} featureEligibilities
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.featureEligibilities = null;

        /**
         * ContextInfo entryPointConversionExternalSource.
         * @member {string} entryPointConversionExternalSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionExternalSource = "";

        /**
         * ContextInfo entryPointConversionExternalMedium.
         * @member {string} entryPointConversionExternalMedium
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionExternalMedium = "";

        /**
         * ContextInfo ctwaSignals.
         * @member {string} ctwaSignals
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ctwaSignals = "";

        /**
         * ContextInfo ctwaPayload.
         * @member {Uint8Array} ctwaPayload
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ctwaPayload = $util.newBuffer([]);

        /**
         * ContextInfo forwardedAiBotMessageInfo.
         * @member {AICommon.IForwardedAIBotMessageInfo|null|undefined} forwardedAiBotMessageInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.forwardedAiBotMessageInfo = null;

        /**
         * ContextInfo statusAttributionType.
         * @member {E2E.ContextInfo.StatusAttributionType} statusAttributionType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.statusAttributionType = 0;

        /**
         * ContextInfo urlTrackingMap.
         * @member {E2E.IUrlTrackingMap|null|undefined} urlTrackingMap
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.urlTrackingMap = null;

        /**
         * ContextInfo pairedMediaType.
         * @member {E2E.ContextInfo.PairedMediaType} pairedMediaType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.pairedMediaType = 0;

        /**
         * ContextInfo rankingVersion.
         * @member {number} rankingVersion
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.rankingVersion = 0;

        /**
         * ContextInfo memberLabel.
         * @member {E2E.IMemberLabel|null|undefined} memberLabel
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.memberLabel = null;

        /**
         * ContextInfo isQuestion.
         * @member {boolean} isQuestion
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isQuestion = false;

        /**
         * ContextInfo statusSourceType.
         * @member {E2E.ContextInfo.StatusSourceType} statusSourceType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.statusSourceType = 0;

        /**
         * ContextInfo statusAttributions.
         * @member {Array.<StatusAttributions.IStatusAttribution>} statusAttributions
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.statusAttributions = $util.emptyArray;

        /**
         * ContextInfo isGroupStatus.
         * @member {boolean} isGroupStatus
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isGroupStatus = false;

        /**
         * ContextInfo forwardOrigin.
         * @member {E2E.ContextInfo.ForwardOrigin} forwardOrigin
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.forwardOrigin = 0;

        /**
         * 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} nonJidMentions
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.nonJidMentions = 0;

        /**
         * ContextInfo quotedType.
         * @member {E2E.ContextInfo.QuotedType} quotedType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.quotedType = 0;

        /**
         * ContextInfo botMessageSharingInfo.
         * @member {AICommon.IBotMessageSharingInfo|null|undefined} botMessageSharingInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.botMessageSharingInfo = null;

        /**
         * 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";
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                if (!$util.isString(message.stanzaId))
                    return "stanzaId: string expected";
            if (message.participant != null && message.hasOwnProperty("participant"))
                if (!$util.isString(message.participant))
                    return "participant: string expected";
            if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) {
                var error = $root.E2E.Message.verify(message.quotedMessage);
                if (error)
                    return "quotedMessage." + error;
            }
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid"))
                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"))
                if (!$util.isString(message.conversionSource))
                    return "conversionSource: string expected";
            if (message.conversionData != null && message.hasOwnProperty("conversionData"))
                if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData)))
                    return "conversionData: buffer expected";
            if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds"))
                if (!$util.isInteger(message.conversionDelaySeconds))
                    return "conversionDelaySeconds: integer expected";
            if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore"))
                if (!$util.isInteger(message.forwardingScore))
                    return "forwardingScore: integer expected";
            if (message.isForwarded != null && message.hasOwnProperty("isForwarded"))
                if (typeof message.isForwarded !== "boolean")
                    return "isForwarded: boolean expected";
            if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) {
                var error = $root.E2E.ContextInfo.AdReplyInfo.verify(message.quotedAd);
                if (error)
                    return "quotedAd." + error;
            }
            if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) {
                var error = $root.Protocol.MessageKey.verify(message.placeholderKey);
                if (error)
                    return "placeholderKey." + error;
            }
            if (message.expiration != null && message.hasOwnProperty("expiration"))
                if (!$util.isInteger(message.expiration))
                    return "expiration: integer expected";
            if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp"))
                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"))
                if (!(message.ephemeralSharedSecret && typeof message.ephemeralSharedSecret.length === "number" || $util.isString(message.ephemeralSharedSecret)))
                    return "ephemeralSharedSecret: buffer expected";
            if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) {
                var error = $root.E2E.ContextInfo.ExternalAdReplyInfo.verify(message.externalAdReply);
                if (error)
                    return "externalAdReply." + error;
            }
            if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource"))
                if (!$util.isString(message.entryPointConversionSource))
                    return "entryPointConversionSource: string expected";
            if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp"))
                if (!$util.isString(message.entryPointConversionApp))
                    return "entryPointConversionApp: string expected";
            if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds"))
                if (!$util.isInteger(message.entryPointConversionDelaySeconds))
                    return "entryPointConversionDelaySeconds: integer expected";
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                var error = $root.E2E.DisappearingMode.verify(message.disappearingMode);
                if (error)
                    return "disappearingMode." + error;
            }
            if (message.actionLink != null && message.hasOwnProperty("actionLink")) {
                var error = $root.E2E.ActionLink.verify(message.actionLink);
                if (error)
                    return "actionLink." + error;
            }
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject"))
                if (!$util.isString(message.groupSubject))
                    return "groupSubject: string expected";
            if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid"))
                if (!$util.isString(message.parentGroupJid))
                    return "parentGroupJid: string expected";
            if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType"))
                if (!$util.isString(message.trustBannerType))
                    return "trustBannerType: string expected";
            if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction"))
                if (!$util.isInteger(message.trustBannerAction))
                    return "trustBannerAction: integer expected";
            if (message.isSampled != null && message.hasOwnProperty("isSampled"))
                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")) {
                var error = $root.E2E.ContextInfo.UTMInfo.verify(message.utm);
                if (error)
                    return "utm." + error;
            }
            if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) {
                var error = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.forwardedNewsletterMessageInfo);
                if (error)
                    return "forwardedNewsletterMessageInfo." + error;
            }
            if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) {
                var error = $root.E2E.ContextInfo.BusinessMessageForwardInfo.verify(message.businessMessageForwardInfo);
                if (error)
                    return "businessMessageForwardInfo." + error;
            }
            if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId"))
                if (!$util.isString(message.smbClientCampaignId))
                    return "smbClientCampaignId: string expected";
            if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId"))
                if (!$util.isString(message.smbServerCampaignId))
                    return "smbServerCampaignId: string expected";
            if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) {
                var error = $root.E2E.ContextInfo.DataSharingContext.verify(message.dataSharingContext);
                if (error)
                    return "dataSharingContext." + error;
            }
            if (message.alwaysShowAdAttribution != null && message.hasOwnProperty("alwaysShowAdAttribution"))
                if (typeof message.alwaysShowAdAttribution !== "boolean")
                    return "alwaysShowAdAttribution: boolean expected";
            if (message.featureEligibilities != null && message.hasOwnProperty("featureEligibilities")) {
                var error = $root.E2E.ContextInfo.FeatureEligibilities.verify(message.featureEligibilities);
                if (error)
                    return "featureEligibilities." + error;
            }
            if (message.entryPointConversionExternalSource != null && message.hasOwnProperty("entryPointConversionExternalSource"))
                if (!$util.isString(message.entryPointConversionExternalSource))
                    return "entryPointConversionExternalSource: string expected";
            if (message.entryPointConversionExternalMedium != null && message.hasOwnProperty("entryPointConversionExternalMedium"))
                if (!$util.isString(message.entryPointConversionExternalMedium))
                    return "entryPointConversionExternalMedium: string expected";
            if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals"))
                if (!$util.isString(message.ctwaSignals))
                    return "ctwaSignals: string expected";
            if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload"))
                if (!(message.ctwaPayload && typeof message.ctwaPayload.length === "number" || $util.isString(message.ctwaPayload)))
                    return "ctwaPayload: buffer expected";
            if (message.forwardedAiBotMessageInfo != null && message.hasOwnProperty("forwardedAiBotMessageInfo")) {
                var error = $root.AICommon.ForwardedAIBotMessageInfo.verify(message.forwardedAiBotMessageInfo);
                if (error)
                    return "forwardedAiBotMessageInfo." + error;
            }
            if (message.statusAttributionType != null && message.hasOwnProperty("statusAttributionType"))
                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")) {
                var error = $root.E2E.UrlTrackingMap.verify(message.urlTrackingMap);
                if (error)
                    return "urlTrackingMap." + error;
            }
            if (message.pairedMediaType != null && message.hasOwnProperty("pairedMediaType"))
                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"))
                if (!$util.isInteger(message.rankingVersion))
                    return "rankingVersion: integer expected";
            if (message.memberLabel != null && message.hasOwnProperty("memberLabel")) {
                var error = $root.E2E.MemberLabel.verify(message.memberLabel);
                if (error)
                    return "memberLabel." + error;
            }
            if (message.isQuestion != null && message.hasOwnProperty("isQuestion"))
                if (typeof message.isQuestion !== "boolean")
                    return "isQuestion: boolean expected";
            if (message.statusSourceType != null && message.hasOwnProperty("statusSourceType"))
                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"))
                if (typeof message.isGroupStatus !== "boolean")
                    return "isGroupStatus: boolean expected";
            if (message.forwardOrigin != null && message.hasOwnProperty("forwardOrigin"))
                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")) {
                var error = $root.E2E.ContextInfo.QuestionReplyQuotedMessage.verify(message.questionReplyQuotedMessage);
                if (error)
                    return "questionReplyQuotedMessage." + error;
            }
            if (message.statusAudienceMetadata != null && message.hasOwnProperty("statusAudienceMetadata")) {
                var error = $root.E2E.ContextInfo.StatusAudienceMetadata.verify(message.statusAudienceMetadata);
                if (error)
                    return "statusAudienceMetadata." + error;
            }
            if (message.nonJidMentions != null && message.hasOwnProperty("nonJidMentions"))
                if (!$util.isInteger(message.nonJidMentions))
                    return "nonJidMentions: integer expected";
            if (message.quotedType != null && message.hasOwnProperty("quotedType"))
                switch (message.quotedType) {
                default:
                    return "quotedType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.botMessageSharingInfo != null && message.hasOwnProperty("botMessageSharingInfo")) {
                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 (options.defaults) {
                object.stanzaId = "";
                object.participant = "";
                object.quotedMessage = null;
                object.remoteJid = "";
                object.conversionSource = "";
                if (options.bytes === String)
                    object.conversionData = "";
                else {
                    object.conversionData = [];
                    if (options.bytes !== Array)
                        object.conversionData = $util.newBuffer(object.conversionData);
                }
                object.conversionDelaySeconds = 0;
                object.forwardingScore = 0;
                object.isForwarded = false;
                object.quotedAd = null;
                object.placeholderKey = null;
                object.expiration = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0;
                if (options.bytes === String)
                    object.ephemeralSharedSecret = "";
                else {
                    object.ephemeralSharedSecret = [];
                    if (options.bytes !== Array)
                        object.ephemeralSharedSecret = $util.newBuffer(object.ephemeralSharedSecret);
                }
                object.externalAdReply = null;
                object.entryPointConversionSource = "";
                object.entryPointConversionApp = "";
                object.entryPointConversionDelaySeconds = 0;
                object.disappearingMode = null;
                object.actionLink = null;
                object.groupSubject = "";
                object.parentGroupJid = "";
                object.trustBannerType = "";
                object.trustBannerAction = 0;
                object.isSampled = false;
                object.utm = null;
                object.forwardedNewsletterMessageInfo = null;
                object.businessMessageForwardInfo = null;
                object.smbClientCampaignId = "";
                object.smbServerCampaignId = "";
                object.dataSharingContext = null;
                object.alwaysShowAdAttribution = false;
                object.featureEligibilities = null;
                object.entryPointConversionExternalSource = "";
                object.entryPointConversionExternalMedium = "";
                object.ctwaSignals = "";
                if (options.bytes === String)
                    object.ctwaPayload = "";
                else {
                    object.ctwaPayload = [];
                    if (options.bytes !== Array)
                        object.ctwaPayload = $util.newBuffer(object.ctwaPayload);
                }
                object.forwardedAiBotMessageInfo = null;
                object.statusAttributionType = options.enums === String ? "NONE" : 0;
                object.urlTrackingMap = null;
                object.pairedMediaType = options.enums === String ? "NOT_PAIRED_MEDIA" : 0;
                object.rankingVersion = 0;
                object.memberLabel = null;
                object.isQuestion = false;
                object.statusSourceType = options.enums === String ? "IMAGE" : 0;
                object.isGroupStatus = false;
                object.forwardOrigin = options.enums === String ? "UNKNOWN" : 0;
                object.questionReplyQuotedMessage = null;
                object.statusAudienceMetadata = null;
                object.nonJidMentions = 0;
                object.quotedType = options.enums === String ? "EXPLICIT" : 0;
                object.botMessageSharingInfo = null;
            }
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                object.stanzaId = message.stanzaId;
            if (message.participant != null && message.hasOwnProperty("participant"))
                object.participant = message.participant;
            if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage"))
                object.quotedMessage = $root.E2E.Message.toObject(message.quotedMessage, options);
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid"))
                object.remoteJid = message.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 (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 (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds"))
                object.conversionDelaySeconds = message.conversionDelaySeconds;
            if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore"))
                object.forwardingScore = message.forwardingScore;
            if (message.isForwarded != null && message.hasOwnProperty("isForwarded"))
                object.isForwarded = message.isForwarded;
            if (message.quotedAd != null && message.hasOwnProperty("quotedAd"))
                object.quotedAd = $root.E2E.ContextInfo.AdReplyInfo.toObject(message.quotedAd, options);
            if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey"))
                object.placeholderKey = $root.Protocol.MessageKey.toObject(message.placeholderKey, options);
            if (message.expiration != null && message.hasOwnProperty("expiration"))
                object.expiration = message.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 (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 (message.externalAdReply != null && message.hasOwnProperty("externalAdReply"))
                object.externalAdReply = $root.E2E.ContextInfo.ExternalAdReplyInfo.toObject(message.externalAdReply, options);
            if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource"))
                object.entryPointConversionSource = message.entryPointConversionSource;
            if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp"))
                object.entryPointConversionApp = message.entryPointConversionApp;
            if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds"))
                object.entryPointConversionDelaySeconds = message.entryPointConversionDelaySeconds;
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode"))
                object.disappearingMode = $root.E2E.DisappearingMode.toObject(message.disappearingMode, options);
            if (message.actionLink != null && message.hasOwnProperty("actionLink"))
                object.actionLink = $root.E2E.ActionLink.toObject(message.actionLink, options);
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject"))
                object.groupSubject = message.groupSubject;
            if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid"))
                object.parentGroupJid = message.parentGroupJid;
            if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType"))
                object.trustBannerType = message.trustBannerType;
            if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction"))
                object.trustBannerAction = message.trustBannerAction;
            if (message.isSampled != null && message.hasOwnProperty("isSampled"))
                object.isSampled = message.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 (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo"))
                object.forwardedNewsletterMessageInfo = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.toObject(message.forwardedNewsletterMessageInfo, options);
            if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo"))
                object.businessMessageForwardInfo = $root.E2E.ContextInfo.BusinessMessageForwardInfo.toObject(message.businessMessageForwardInfo, options);
            if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId"))
                object.smbClientCampaignId = message.smbClientCampaignId;
            if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId"))
                object.smbServerCampaignId = message.smbServerCampaignId;
            if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext"))
                object.dataSharingContext = $root.E2E.ContextInfo.DataSharingContext.toObject(message.dataSharingContext, options);
            if (message.alwaysShowAdAttribution != null && message.hasOwnProperty("alwaysShowAdAttribution"))
                object.alwaysShowAdAttribution = message.alwaysShowAdAttribution;
            if (message.featureEligibilities != null && message.hasOwnProperty("featureEligibilities"))
                object.featureEligibilities = $root.E2E.ContextInfo.FeatureEligibilities.toObject(message.featureEligibilities, options);
            if (message.entryPointConversionExternalSource != null && message.hasOwnProperty("entryPointConversionExternalSource"))
                object.entryPointConversionExternalSource = message.entryPointConversionExternalSource;
            if (message.entryPointConversionExternalMedium != null && message.hasOwnProperty("entryPointConversionExternalMedium"))
                object.entryPointConversionExternalMedium = message.entryPointConversionExternalMedium;
            if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals"))
                object.ctwaSignals = message.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 (message.forwardedAiBotMessageInfo != null && message.hasOwnProperty("forwardedAiBotMessageInfo"))
                object.forwardedAiBotMessageInfo = $root.AICommon.ForwardedAIBotMessageInfo.toObject(message.forwardedAiBotMessageInfo, options);
            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 (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap"))
                object.urlTrackingMap = $root.E2E.UrlTrackingMap.toObject(message.urlTrackingMap, options);
            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 (message.rankingVersion != null && message.hasOwnProperty("rankingVersion"))
                object.rankingVersion = message.rankingVersion;
            if (message.memberLabel != null && message.hasOwnProperty("memberLabel"))
                object.memberLabel = $root.E2E.MemberLabel.toObject(message.memberLabel, options);
            if (message.isQuestion != null && message.hasOwnProperty("isQuestion"))
                object.isQuestion = message.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 (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 (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 (message.questionReplyQuotedMessage != null && message.hasOwnProperty("questionReplyQuotedMessage"))
                object.questionReplyQuotedMessage = $root.E2E.ContextInfo.QuestionReplyQuotedMessage.toObject(message.questionReplyQuotedMessage, options);
            if (message.statusAudienceMetadata != null && message.hasOwnProperty("statusAudienceMetadata"))
                object.statusAudienceMetadata = $root.E2E.ContextInfo.StatusAudienceMetadata.toObject(message.statusAudienceMetadata, options);
            if (message.nonJidMentions != null && message.hasOwnProperty("nonJidMentions"))
                object.nonJidMentions = message.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 (message.botMessageSharingInfo != null && message.hasOwnProperty("botMessageSharingInfo"))
                object.botMessageSharingInfo = $root.AICommon.BotMessageSharingInfo.toObject(message.botMessageSharingInfo, options);
            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} advertiserName
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.advertiserName = "";

            /**
             * AdReplyInfo mediaType.
             * @member {E2E.ContextInfo.AdReplyInfo.MediaType} mediaType
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.mediaType = 0;

            /**
             * AdReplyInfo jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.jpegThumbnail = $util.newBuffer([]);

            /**
             * AdReplyInfo caption.
             * @member {string} caption
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.caption = "";

            /**
             * 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";
                if (message.advertiserName != null && message.hasOwnProperty("advertiserName"))
                    if (!$util.isString(message.advertiserName))
                        return "advertiserName: string expected";
                if (message.mediaType != null && message.hasOwnProperty("mediaType"))
                    switch (message.mediaType) {
                    default:
                        return "mediaType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    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 (options.defaults) {
                    object.advertiserName = "";
                    object.mediaType = options.enums === String ? "NONE" : 0;
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.caption = "";
                }
                if (message.advertiserName != null && message.hasOwnProperty("advertiserName"))
                    object.advertiserName = message.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 (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 (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.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} businessOwnerJid
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @instance
             */
            BusinessMessageForwardInfo.prototype.businessOwnerJid = "";

            /**
             * 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";
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid"))
                    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 (options.defaults)
                    object.businessOwnerJid = "";
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid"))
                    object.businessOwnerJid = message.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} showMmDisclosure
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.showMmDisclosure = false;

            /**
             * DataSharingContext encryptedSignalTokenConsented.
             * @member {string} encryptedSignalTokenConsented
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.encryptedSignalTokenConsented = "";

            /**
             * DataSharingContext parameters.
             * @member {Array.<E2E.ContextInfo.DataSharingContext.IParameters>} parameters
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.parameters = $util.emptyArray;

            /**
             * DataSharingContext dataSharingFlags.
             * @member {number} dataSharingFlags
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.dataSharingFlags = 0;

            /**
             * 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";
                if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure"))
                    if (typeof message.showMmDisclosure !== "boolean")
                        return "showMmDisclosure: boolean expected";
                if (message.encryptedSignalTokenConsented != null && message.hasOwnProperty("encryptedSignalTokenConsented"))
                    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"))
                    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 (options.defaults) {
                    object.showMmDisclosure = false;
                    object.encryptedSignalTokenConsented = "";
                    object.dataSharingFlags = 0;
                }
                if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure"))
                    object.showMmDisclosure = message.showMmDisclosure;
                if (message.encryptedSignalTokenConsented != null && message.hasOwnProperty("encryptedSignalTokenConsented"))
                    object.encryptedSignalTokenConsented = message.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;
                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} key
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.key = "";

                /**
                 * Parameters stringData.
                 * @member {string} stringData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.stringData = "";

                /**
                 * Parameters intData.
                 * @member {number|Long} intData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.intData = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Parameters floatData.
                 * @member {number} floatData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.floatData = 0;

                /**
                 * Parameters contents.
                 * @member {E2E.ContextInfo.DataSharingContext.IParameters|null|undefined} contents
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.contents = null;

                /**
                 * 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";
                    if (message.key != null && message.hasOwnProperty("key"))
                        if (!$util.isString(message.key))
                            return "key: string expected";
                    if (message.stringData != null && message.hasOwnProperty("stringData"))
                        if (!$util.isString(message.stringData))
                            return "stringData: string expected";
                    if (message.intData != null && message.hasOwnProperty("intData"))
                        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"))
                        if (typeof message.floatData !== "number")
                            return "floatData: number expected";
                    if (message.contents != null && message.hasOwnProperty("contents")) {
                        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 (options.defaults) {
                        object.key = "";
                        object.stringData = "";
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.intData = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.intData = options.longs === String ? "0" : 0;
                        object.floatData = 0;
                        object.contents = null;
                    }
                    if (message.key != null && message.hasOwnProperty("key"))
                        object.key = message.key;
                    if (message.stringData != null && message.hasOwnProperty("stringData"))
                        object.stringData = message.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 (message.floatData != null && message.hasOwnProperty("floatData"))
                        object.floatData = options.json && !isFinite(message.floatData) ? String(message.floatData) : message.floatData;
                    if (message.contents != null && message.hasOwnProperty("contents"))
                        object.contents = $root.E2E.ContextInfo.DataSharingContext.Parameters.toObject(message.contents, options);
                    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} title
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.title = "";

            /**
             * ExternalAdReplyInfo body.
             * @member {string} body
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.body = "";

            /**
             * ExternalAdReplyInfo mediaType.
             * @member {E2E.ContextInfo.ExternalAdReplyInfo.MediaType} mediaType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.mediaType = 0;

            /**
             * ExternalAdReplyInfo thumbnailUrl.
             * @member {string} thumbnailUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.thumbnailUrl = "";

            /**
             * ExternalAdReplyInfo mediaUrl.
             * @member {string} mediaUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.mediaUrl = "";

            /**
             * ExternalAdReplyInfo thumbnail.
             * @member {Uint8Array} thumbnail
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.thumbnail = $util.newBuffer([]);

            /**
             * ExternalAdReplyInfo sourceType.
             * @member {string} sourceType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceType = "";

            /**
             * ExternalAdReplyInfo sourceId.
             * @member {string} sourceId
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceId = "";

            /**
             * ExternalAdReplyInfo sourceUrl.
             * @member {string} sourceUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceUrl = "";

            /**
             * ExternalAdReplyInfo containsAutoReply.
             * @member {boolean} containsAutoReply
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.containsAutoReply = false;

            /**
             * ExternalAdReplyInfo renderLargerThumbnail.
             * @member {boolean} renderLargerThumbnail
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.renderLargerThumbnail = false;

            /**
             * ExternalAdReplyInfo showAdAttribution.
             * @member {boolean} showAdAttribution
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.showAdAttribution = false;

            /**
             * ExternalAdReplyInfo ctwaClid.
             * @member {string} ctwaClid
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.ctwaClid = "";

            /**
             * ExternalAdReplyInfo ref.
             * @member {string} ref
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.ref = "";

            /**
             * ExternalAdReplyInfo clickToWhatsappCall.
             * @member {boolean} clickToWhatsappCall
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.clickToWhatsappCall = false;

            /**
             * ExternalAdReplyInfo adContextPreviewDismissed.
             * @member {boolean} adContextPreviewDismissed
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.adContextPreviewDismissed = false;

            /**
             * ExternalAdReplyInfo sourceApp.
             * @member {string} sourceApp
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceApp = "";

            /**
             * ExternalAdReplyInfo automatedGreetingMessageShown.
             * @member {boolean} automatedGreetingMessageShown
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.automatedGreetingMessageShown = false;

            /**
             * ExternalAdReplyInfo greetingMessageBody.
             * @member {string} greetingMessageBody
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.greetingMessageBody = "";

            /**
             * ExternalAdReplyInfo ctaPayload.
             * @member {string} ctaPayload
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.ctaPayload = "";

            /**
             * ExternalAdReplyInfo disableNudge.
             * @member {boolean} disableNudge
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.disableNudge = false;

            /**
             * ExternalAdReplyInfo originalImageUrl.
             * @member {string} originalImageUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.originalImageUrl = "";

            /**
             * ExternalAdReplyInfo automatedGreetingMessageCtaType.
             * @member {string} automatedGreetingMessageCtaType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.automatedGreetingMessageCtaType = "";

            /**
             * ExternalAdReplyInfo wtwaAdFormat.
             * @member {boolean} wtwaAdFormat
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.wtwaAdFormat = false;

            /**
             * ExternalAdReplyInfo adType.
             * @member {E2E.ContextInfo.ExternalAdReplyInfo.AdType} adType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.adType = 0;

            /**
             * ExternalAdReplyInfo wtwaWebsiteUrl.
             * @member {string} wtwaWebsiteUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.wtwaWebsiteUrl = "";

            /**
             * ExternalAdReplyInfo adPreviewUrl.
             * @member {string} adPreviewUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.adPreviewUrl = "";

            /**
             * 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";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.body != null && message.hasOwnProperty("body"))
                    if (!$util.isString(message.body))
                        return "body: string expected";
                if (message.mediaType != null && message.hasOwnProperty("mediaType"))
                    switch (message.mediaType) {
                    default:
                        return "mediaType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl"))
                    if (!$util.isString(message.thumbnailUrl))
                        return "thumbnailUrl: string expected";
                if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl"))
                    if (!$util.isString(message.mediaUrl))
                        return "mediaUrl: string expected";
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail"))
                    if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail)))
                        return "thumbnail: buffer expected";
                if (message.sourceType != null && message.hasOwnProperty("sourceType"))
                    if (!$util.isString(message.sourceType))
                        return "sourceType: string expected";
                if (message.sourceId != null && message.hasOwnProperty("sourceId"))
                    if (!$util.isString(message.sourceId))
                        return "sourceId: string expected";
                if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl"))
                    if (!$util.isString(message.sourceUrl))
                        return "sourceUrl: string expected";
                if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply"))
                    if (typeof message.containsAutoReply !== "boolean")
                        return "containsAutoReply: boolean expected";
                if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail"))
                    if (typeof message.renderLargerThumbnail !== "boolean")
                        return "renderLargerThumbnail: boolean expected";
                if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution"))
                    if (typeof message.showAdAttribution !== "boolean")
                        return "showAdAttribution: boolean expected";
                if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid"))
                    if (!$util.isString(message.ctwaClid))
                        return "ctwaClid: string expected";
                if (message.ref != null && message.hasOwnProperty("ref"))
                    if (!$util.isString(message.ref))
                        return "ref: string expected";
                if (message.clickToWhatsappCall != null && message.hasOwnProperty("clickToWhatsappCall"))
                    if (typeof message.clickToWhatsappCall !== "boolean")
                        return "clickToWhatsappCall: boolean expected";
                if (message.adContextPreviewDismissed != null && message.hasOwnProperty("adContextPreviewDismissed"))
                    if (typeof message.adContextPreviewDismissed !== "boolean")
                        return "adContextPreviewDismissed: boolean expected";
                if (message.sourceApp != null && message.hasOwnProperty("sourceApp"))
                    if (!$util.isString(message.sourceApp))
                        return "sourceApp: string expected";
                if (message.automatedGreetingMessageShown != null && message.hasOwnProperty("automatedGreetingMessageShown"))
                    if (typeof message.automatedGreetingMessageShown !== "boolean")
                        return "automatedGreetingMessageShown: boolean expected";
                if (message.greetingMessageBody != null && message.hasOwnProperty("greetingMessageBody"))
                    if (!$util.isString(message.greetingMessageBody))
                        return "greetingMessageBody: string expected";
                if (message.ctaPayload != null && message.hasOwnProperty("ctaPayload"))
                    if (!$util.isString(message.ctaPayload))
                        return "ctaPayload: string expected";
                if (message.disableNudge != null && message.hasOwnProperty("disableNudge"))
                    if (typeof message.disableNudge !== "boolean")
                        return "disableNudge: boolean expected";
                if (message.originalImageUrl != null && message.hasOwnProperty("originalImageUrl"))
                    if (!$util.isString(message.originalImageUrl))
                        return "originalImageUrl: string expected";
                if (message.automatedGreetingMessageCtaType != null && message.hasOwnProperty("automatedGreetingMessageCtaType"))
                    if (!$util.isString(message.automatedGreetingMessageCtaType))
                        return "automatedGreetingMessageCtaType: string expected";
                if (message.wtwaAdFormat != null && message.hasOwnProperty("wtwaAdFormat"))
                    if (typeof message.wtwaAdFormat !== "boolean")
                        return "wtwaAdFormat: boolean expected";
                if (message.adType != null && message.hasOwnProperty("adType"))
                    switch (message.adType) {
                    default:
                        return "adType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                if (message.wtwaWebsiteUrl != null && message.hasOwnProperty("wtwaWebsiteUrl"))
                    if (!$util.isString(message.wtwaWebsiteUrl))
                        return "wtwaWebsiteUrl: string expected";
                if (message.adPreviewUrl != null && message.hasOwnProperty("adPreviewUrl"))
                    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 (options.defaults) {
                    object.title = "";
                    object.body = "";
                    object.mediaType = options.enums === String ? "NONE" : 0;
                    object.thumbnailUrl = "";
                    object.mediaUrl = "";
                    if (options.bytes === String)
                        object.thumbnail = "";
                    else {
                        object.thumbnail = [];
                        if (options.bytes !== Array)
                            object.thumbnail = $util.newBuffer(object.thumbnail);
                    }
                    object.sourceType = "";
                    object.sourceId = "";
                    object.sourceUrl = "";
                    object.containsAutoReply = false;
                    object.renderLargerThumbnail = false;
                    object.showAdAttribution = false;
                    object.ctwaClid = "";
                    object.ref = "";
                    object.clickToWhatsappCall = false;
                    object.adContextPreviewDismissed = false;
                    object.sourceApp = "";
                    object.automatedGreetingMessageShown = false;
                    object.greetingMessageBody = "";
                    object.ctaPayload = "";
                    object.disableNudge = false;
                    object.originalImageUrl = "";
                    object.automatedGreetingMessageCtaType = "";
                    object.wtwaAdFormat = false;
                    object.adType = options.enums === String ? "CTWA" : 0;
                    object.wtwaWebsiteUrl = "";
                    object.adPreviewUrl = "";
                }
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.title;
                if (message.body != null && message.hasOwnProperty("body"))
                    object.body = message.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 (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl"))
                    object.thumbnailUrl = message.thumbnailUrl;
                if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl"))
                    object.mediaUrl = message.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 (message.sourceType != null && message.hasOwnProperty("sourceType"))
                    object.sourceType = message.sourceType;
                if (message.sourceId != null && message.hasOwnProperty("sourceId"))
                    object.sourceId = message.sourceId;
                if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl"))
                    object.sourceUrl = message.sourceUrl;
                if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply"))
                    object.containsAutoReply = message.containsAutoReply;
                if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail"))
                    object.renderLargerThumbnail = message.renderLargerThumbnail;
                if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution"))
                    object.showAdAttribution = message.showAdAttribution;
                if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid"))
                    object.ctwaClid = message.ctwaClid;
                if (message.ref != null && message.hasOwnProperty("ref"))
                    object.ref = message.ref;
                if (message.clickToWhatsappCall != null && message.hasOwnProperty("clickToWhatsappCall"))
                    object.clickToWhatsappCall = message.clickToWhatsappCall;
                if (message.adContextPreviewDismissed != null && message.hasOwnProperty("adContextPreviewDismissed"))
                    object.adContextPreviewDismissed = message.adContextPreviewDismissed;
                if (message.sourceApp != null && message.hasOwnProperty("sourceApp"))
                    object.sourceApp = message.sourceApp;
                if (message.automatedGreetingMessageShown != null && message.hasOwnProperty("automatedGreetingMessageShown"))
                    object.automatedGreetingMessageShown = message.automatedGreetingMessageShown;
                if (message.greetingMessageBody != null && message.hasOwnProperty("greetingMessageBody"))
                    object.greetingMessageBody = message.greetingMessageBody;
                if (message.ctaPayload != null && message.hasOwnProperty("ctaPayload"))
                    object.ctaPayload = message.ctaPayload;
                if (message.disableNudge != null && message.hasOwnProperty("disableNudge"))
                    object.disableNudge = message.disableNudge;
                if (message.originalImageUrl != null && message.hasOwnProperty("originalImageUrl"))
                    object.originalImageUrl = message.originalImageUrl;
                if (message.automatedGreetingMessageCtaType != null && message.hasOwnProperty("automatedGreetingMessageCtaType"))
                    object.automatedGreetingMessageCtaType = message.automatedGreetingMessageCtaType;
                if (message.wtwaAdFormat != null && message.hasOwnProperty("wtwaAdFormat"))
                    object.wtwaAdFormat = message.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 (message.wtwaWebsiteUrl != null && message.hasOwnProperty("wtwaWebsiteUrl"))
                    object.wtwaWebsiteUrl = message.wtwaWebsiteUrl;
                if (message.adPreviewUrl != null && message.hasOwnProperty("adPreviewUrl"))
                    object.adPreviewUrl = message.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} cannotBeReactedTo
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.cannotBeReactedTo = false;

            /**
             * FeatureEligibilities cannotBeRanked.
             * @member {boolean} cannotBeRanked
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.cannotBeRanked = false;

            /**
             * FeatureEligibilities canRequestFeedback.
             * @member {boolean} canRequestFeedback
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.canRequestFeedback = false;

            /**
             * FeatureEligibilities canBeReshared.
             * @member {boolean} canBeReshared
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.canBeReshared = false;

            /**
             * FeatureEligibilities canReceiveMultiReact.
             * @member {boolean} canReceiveMultiReact
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.canReceiveMultiReact = false;

            /**
             * 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";
                if (message.cannotBeReactedTo != null && message.hasOwnProperty("cannotBeReactedTo"))
                    if (typeof message.cannotBeReactedTo !== "boolean")
                        return "cannotBeReactedTo: boolean expected";
                if (message.cannotBeRanked != null && message.hasOwnProperty("cannotBeRanked"))
                    if (typeof message.cannotBeRanked !== "boolean")
                        return "cannotBeRanked: boolean expected";
                if (message.canRequestFeedback != null && message.hasOwnProperty("canRequestFeedback"))
                    if (typeof message.canRequestFeedback !== "boolean")
                        return "canRequestFeedback: boolean expected";
                if (message.canBeReshared != null && message.hasOwnProperty("canBeReshared"))
                    if (typeof message.canBeReshared !== "boolean")
                        return "canBeReshared: boolean expected";
                if (message.canReceiveMultiReact != null && message.hasOwnProperty("canReceiveMultiReact"))
                    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 (options.defaults) {
                    object.cannotBeReactedTo = false;
                    object.cannotBeRanked = false;
                    object.canRequestFeedback = false;
                    object.canBeReshared = false;
                    object.canReceiveMultiReact = false;
                }
                if (message.cannotBeReactedTo != null && message.hasOwnProperty("cannotBeReactedTo"))
                    object.cannotBeReactedTo = message.cannotBeReactedTo;
                if (message.cannotBeRanked != null && message.hasOwnProperty("cannotBeRanked"))
                    object.cannotBeRanked = message.cannotBeRanked;
                if (message.canRequestFeedback != null && message.hasOwnProperty("canRequestFeedback"))
                    object.canRequestFeedback = message.canRequestFeedback;
                if (message.canBeReshared != null && message.hasOwnProperty("canBeReshared"))
                    object.canBeReshared = message.canBeReshared;
                if (message.canReceiveMultiReact != null && message.hasOwnProperty("canReceiveMultiReact"))
                    object.canReceiveMultiReact = message.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} newsletterJid
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.newsletterJid = "";

            /**
             * ForwardedNewsletterMessageInfo serverMessageId.
             * @member {number} serverMessageId
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.serverMessageId = 0;

            /**
             * ForwardedNewsletterMessageInfo newsletterName.
             * @member {string} newsletterName
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.newsletterName = "";

            /**
             * ForwardedNewsletterMessageInfo contentType.
             * @member {E2E.ContextInfo.ForwardedNewsletterMessageInfo.ContentType} contentType
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.contentType = 1;

            /**
             * ForwardedNewsletterMessageInfo accessibilityText.
             * @member {string} accessibilityText
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.accessibilityText = "";

            /**
             * 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";
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid"))
                    if (!$util.isString(message.newsletterJid))
                        return "newsletterJid: string expected";
                if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId"))
                    if (!$util.isInteger(message.serverMessageId))
                        return "serverMessageId: integer expected";
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName"))
                    if (!$util.isString(message.newsletterName))
                        return "newsletterName: string expected";
                if (message.contentType != null && message.hasOwnProperty("contentType"))
                    switch (message.contentType) {
                    default:
                        return "contentType: enum value expected";
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText"))
                    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 (options.defaults) {
                    object.newsletterJid = "";
                    object.serverMessageId = 0;
                    object.newsletterName = "";
                    object.contentType = options.enums === String ? "UPDATE" : 1;
                    object.accessibilityText = "";
                }
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid"))
                    object.newsletterJid = message.newsletterJid;
                if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId"))
                    object.serverMessageId = message.serverMessageId;
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName"))
                    object.newsletterName = message.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 (message.accessibilityText != null && message.hasOwnProperty("accessibilityText"))
                    object.accessibilityText = message.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} serverQuestionId
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             */
            QuestionReplyQuotedMessage.prototype.serverQuestionId = 0;

            /**
             * 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;

            /**
             * 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";
                if (message.serverQuestionId != null && message.hasOwnProperty("serverQuestionId"))
                    if (!$util.isInteger(message.serverQuestionId))
                        return "serverQuestionId: integer expected";
                if (message.quotedQuestion != null && message.hasOwnProperty("quotedQuestion")) {
                    var error = $root.E2E.Message.verify(message.quotedQuestion);
                    if (error)
                        return "quotedQuestion." + error;
                }
                if (message.quotedResponse != null && message.hasOwnProperty("quotedResponse")) {
                    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 (options.defaults) {
                    object.serverQuestionId = 0;
                    object.quotedQuestion = null;
                    object.quotedResponse = null;
                }
                if (message.serverQuestionId != null && message.hasOwnProperty("serverQuestionId"))
                    object.serverQuestionId = message.serverQuestionId;
                if (message.quotedQuestion != null && message.hasOwnProperty("quotedQuestion"))
                    object.quotedQuestion = $root.E2E.Message.toObject(message.quotedQuestion, options);
                if (message.quotedResponse != null && message.hasOwnProperty("quotedResponse"))
                    object.quotedResponse = $root.E2E.Message.toObject(message.quotedResponse, options);
                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} audienceType
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @instance
             */
            StatusAudienceMetadata.prototype.audienceType = 0;

            /**
             * 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";
                if (message.audienceType != null && message.hasOwnProperty("audienceType"))
                    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 (options.defaults)
                    object.audienceType = options.enums === String ? "UNKNOWN" : 0;
                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;
                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} utmSource
             * @memberof E2E.ContextInfo.UTMInfo
             * @instance
             */
            UTMInfo.prototype.utmSource = "";

            /**
             * UTMInfo utmCampaign.
             * @member {string} utmCampaign
             * @memberof E2E.ContextInfo.UTMInfo
             * @instance
             */
            UTMInfo.prototype.utmCampaign = "";

            /**
             * 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";
                if (message.utmSource != null && message.hasOwnProperty("utmSource"))
                    if (!$util.isString(message.utmSource))
                        return "utmSource: string expected";
                if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign"))
                    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 (options.defaults) {
                    object.utmSource = "";
                    object.utmCampaign = "";
                }
                if (message.utmSource != null && message.hasOwnProperty("utmSource"))
                    object.utmSource = message.utmSource;
                if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign"))
                    object.utmCampaign = message.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.INewsletterFollowerInviteMessage|null} [newsletterFollowerInviteMessage] Message newsletterFollowerInviteMessage
         * @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.IPollResultSnapshotMessage|null} [pollResultSnapshotMessageV2] Message pollResultSnapshotMessageV2
         * @property {E2E.Message.INewsletterFollowerInviteMessage|null} [newsletterFollowerInviteMessageV2] Message newsletterFollowerInviteMessageV2
         * @property {E2E.Message.IRequestContactInfoMessage|null} [requestContactInfoMessage] Message requestContactInfoMessage
         */

        /**
         * 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} conversation
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.conversation = "";

        /**
         * 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 newsletterFollowerInviteMessage.
         * @member {E2E.Message.INewsletterFollowerInviteMessage|null|undefined} newsletterFollowerInviteMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.newsletterFollowerInviteMessage = 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 pollResultSnapshotMessageV2.
         * @member {E2E.Message.IPollResultSnapshotMessage|null|undefined} pollResultSnapshotMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollResultSnapshotMessageV2 = null;

        /**
         * Message newsletterFollowerInviteMessageV2.
         * @member {E2E.Message.INewsletterFollowerInviteMessage|null|undefined} newsletterFollowerInviteMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.newsletterFollowerInviteMessageV2 = null;

        /**
         * Message requestContactInfoMessage.
         * @member {E2E.Message.IRequestContactInfoMessage|null|undefined} requestContactInfoMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.requestContactInfoMessage = null;

        /**
         * 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.newsletterFollowerInviteMessage != null && Object.hasOwnProperty.call(message, "newsletterFollowerInviteMessage"))
                $root.E2E.Message.NewsletterFollowerInviteMessage.encode(message.newsletterFollowerInviteMessage, writer.uint32(/* id 108, wireType 2 =*/866).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.pollResultSnapshotMessageV2 != null && Object.hasOwnProperty.call(message, "pollResultSnapshotMessageV2"))
                $root.E2E.Message.PollResultSnapshotMessage.encode(message.pollResultSnapshotMessageV2, writer.uint32(/* id 112, wireType 2 =*/898).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.requestContactInfoMessage != null && Object.hasOwnProperty.call(message, "requestContactInfoMessage"))
                $root.E2E.Message.RequestContactInfoMessage.encode(message.requestContactInfoMessage, writer.uint32(/* id 114, wireType 2 =*/914).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 108: {
                        message.newsletterFollowerInviteMessage = $root.E2E.Message.NewsletterFollowerInviteMessage.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 112: {
                        message.pollResultSnapshotMessageV2 = $root.E2E.Message.PollResultSnapshotMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 113: {
                        message.newsletterFollowerInviteMessageV2 = $root.E2E.Message.NewsletterFollowerInviteMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 114: {
                        message.requestContactInfoMessage = $root.E2E.Message.RequestContactInfoMessage.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";
            if (message.conversation != null && message.hasOwnProperty("conversation"))
                if (!$util.isString(message.conversation))
                    return "conversation: string expected";
            if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) {
                var error = $root.E2E.Message.SenderKeyDistributionMessage.verify(message.senderKeyDistributionMessage);
                if (error)
                    return "senderKeyDistributionMessage." + error;
            }
            if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                var error = $root.E2E.Message.ImageMessage.verify(message.imageMessage);
                if (error)
                    return "imageMessage." + error;
            }
            if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) {
                var error = $root.E2E.Message.ContactMessage.verify(message.contactMessage);
                if (error)
                    return "contactMessage." + error;
            }
            if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                var error = $root.E2E.Message.LocationMessage.verify(message.locationMessage);
                if (error)
                    return "locationMessage." + error;
            }
            if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) {
                var error = $root.E2E.Message.ExtendedTextMessage.verify(message.extendedTextMessage);
                if (error)
                    return "extendedTextMessage." + error;
            }
            if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                var error = $root.E2E.Message.DocumentMessage.verify(message.documentMessage);
                if (error)
                    return "documentMessage." + error;
            }
            if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) {
                var error = $root.E2E.Message.AudioMessage.verify(message.audioMessage);
                if (error)
                    return "audioMessage." + error;
            }
            if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                var error = $root.E2E.Message.VideoMessage.verify(message.videoMessage);
                if (error)
                    return "videoMessage." + error;
            }
            if (message.call != null && message.hasOwnProperty("call")) {
                var error = $root.E2E.Message.Call.verify(message.call);
                if (error)
                    return "call." + error;
            }
            if (message.chat != null && message.hasOwnProperty("chat")) {
                var error = $root.E2E.Message.Chat.verify(message.chat);
                if (error)
                    return "chat." + error;
            }
            if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) {
                var error = $root.E2E.Message.ProtocolMessage.verify(message.protocolMessage);
                if (error)
                    return "protocolMessage." + error;
            }
            if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) {
                var error = $root.E2E.Message.ContactsArrayMessage.verify(message.contactsArrayMessage);
                if (error)
                    return "contactsArrayMessage." + error;
            }
            if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) {
                var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage);
                if (error)
                    return "highlyStructuredMessage." + error;
            }
            if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) {
                var error = $root.E2E.Message.SenderKeyDistributionMessage.verify(message.fastRatchetKeySenderKeyDistributionMessage);
                if (error)
                    return "fastRatchetKeySenderKeyDistributionMessage." + error;
            }
            if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) {
                var error = $root.E2E.Message.SendPaymentMessage.verify(message.sendPaymentMessage);
                if (error)
                    return "sendPaymentMessage." + error;
            }
            if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) {
                var error = $root.E2E.Message.LiveLocationMessage.verify(message.liveLocationMessage);
                if (error)
                    return "liveLocationMessage." + error;
            }
            if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) {
                var error = $root.E2E.Message.RequestPaymentMessage.verify(message.requestPaymentMessage);
                if (error)
                    return "requestPaymentMessage." + error;
            }
            if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) {
                var error = $root.E2E.Message.DeclinePaymentRequestMessage.verify(message.declinePaymentRequestMessage);
                if (error)
                    return "declinePaymentRequestMessage." + error;
            }
            if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) {
                var error = $root.E2E.Message.CancelPaymentRequestMessage.verify(message.cancelPaymentRequestMessage);
                if (error)
                    return "cancelPaymentRequestMessage." + error;
            }
            if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) {
                var error = $root.E2E.Message.TemplateMessage.verify(message.templateMessage);
                if (error)
                    return "templateMessage." + error;
            }
            if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) {
                var error = $root.E2E.Message.StickerMessage.verify(message.stickerMessage);
                if (error)
                    return "stickerMessage." + error;
            }
            if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) {
                var error = $root.E2E.Message.GroupInviteMessage.verify(message.groupInviteMessage);
                if (error)
                    return "groupInviteMessage." + error;
            }
            if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) {
                var error = $root.E2E.Message.TemplateButtonReplyMessage.verify(message.templateButtonReplyMessage);
                if (error)
                    return "templateButtonReplyMessage." + error;
            }
            if (message.productMessage != null && message.hasOwnProperty("productMessage")) {
                var error = $root.E2E.Message.ProductMessage.verify(message.productMessage);
                if (error)
                    return "productMessage." + error;
            }
            if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) {
                var error = $root.E2E.Message.DeviceSentMessage.verify(message.deviceSentMessage);
                if (error)
                    return "deviceSentMessage." + error;
            }
            if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) {
                var error = $root.E2E.MessageContextInfo.verify(message.messageContextInfo);
                if (error)
                    return "messageContextInfo." + error;
            }
            if (message.listMessage != null && message.hasOwnProperty("listMessage")) {
                var error = $root.E2E.Message.ListMessage.verify(message.listMessage);
                if (error)
                    return "listMessage." + error;
            }
            if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.viewOnceMessage);
                if (error)
                    return "viewOnceMessage." + error;
            }
            if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) {
                var error = $root.E2E.Message.OrderMessage.verify(message.orderMessage);
                if (error)
                    return "orderMessage." + error;
            }
            if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) {
                var error = $root.E2E.Message.ListResponseMessage.verify(message.listResponseMessage);
                if (error)
                    return "listResponseMessage." + error;
            }
            if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.ephemeralMessage);
                if (error)
                    return "ephemeralMessage." + error;
            }
            if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) {
                var error = $root.E2E.Message.InvoiceMessage.verify(message.invoiceMessage);
                if (error)
                    return "invoiceMessage." + error;
            }
            if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) {
                var error = $root.E2E.Message.ButtonsMessage.verify(message.buttonsMessage);
                if (error)
                    return "buttonsMessage." + error;
            }
            if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) {
                var error = $root.E2E.Message.ButtonsResponseMessage.verify(message.buttonsResponseMessage);
                if (error)
                    return "buttonsResponseMessage." + error;
            }
            if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) {
                var error = $root.E2E.Message.PaymentInviteMessage.verify(message.paymentInviteMessage);
                if (error)
                    return "paymentInviteMessage." + error;
            }
            if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) {
                var error = $root.E2E.Message.InteractiveMessage.verify(message.interactiveMessage);
                if (error)
                    return "interactiveMessage." + error;
            }
            if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) {
                var error = $root.E2E.Message.ReactionMessage.verify(message.reactionMessage);
                if (error)
                    return "reactionMessage." + error;
            }
            if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) {
                var error = $root.E2E.Message.StickerSyncRMRMessage.verify(message.stickerSyncRmrMessage);
                if (error)
                    return "stickerSyncRmrMessage." + error;
            }
            if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) {
                var error = $root.E2E.Message.InteractiveResponseMessage.verify(message.interactiveResponseMessage);
                if (error)
                    return "interactiveResponseMessage." + error;
            }
            if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) {
                var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessage);
                if (error)
                    return "pollCreationMessage." + error;
            }
            if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) {
                var error = $root.E2E.Message.PollUpdateMessage.verify(message.pollUpdateMessage);
                if (error)
                    return "pollUpdateMessage." + error;
            }
            if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) {
                var error = $root.E2E.Message.KeepInChatMessage.verify(message.keepInChatMessage);
                if (error)
                    return "keepInChatMessage." + error;
            }
            if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.documentWithCaptionMessage);
                if (error)
                    return "documentWithCaptionMessage." + error;
            }
            if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) {
                var error = $root.E2E.Message.RequestPhoneNumberMessage.verify(message.requestPhoneNumberMessage);
                if (error)
                    return "requestPhoneNumberMessage." + error;
            }
            if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.viewOnceMessageV2);
                if (error)
                    return "viewOnceMessageV2." + error;
            }
            if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) {
                var error = $root.E2E.Message.EncReactionMessage.verify(message.encReactionMessage);
                if (error)
                    return "encReactionMessage." + error;
            }
            if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.editedMessage);
                if (error)
                    return "editedMessage." + error;
            }
            if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.viewOnceMessageV2Extension);
                if (error)
                    return "viewOnceMessageV2Extension." + error;
            }
            if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) {
                var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessageV2);
                if (error)
                    return "pollCreationMessageV2." + error;
            }
            if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) {
                var error = $root.E2E.Message.ScheduledCallCreationMessage.verify(message.scheduledCallCreationMessage);
                if (error)
                    return "scheduledCallCreationMessage." + error;
            }
            if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.groupMentionedMessage);
                if (error)
                    return "groupMentionedMessage." + error;
            }
            if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) {
                var error = $root.E2E.Message.PinInChatMessage.verify(message.pinInChatMessage);
                if (error)
                    return "pinInChatMessage." + error;
            }
            if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) {
                var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessageV3);
                if (error)
                    return "pollCreationMessageV3." + error;
            }
            if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) {
                var error = $root.E2E.Message.ScheduledCallEditMessage.verify(message.scheduledCallEditMessage);
                if (error)
                    return "scheduledCallEditMessage." + error;
            }
            if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) {
                var error = $root.E2E.Message.VideoMessage.verify(message.ptvMessage);
                if (error)
                    return "ptvMessage." + error;
            }
            if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.botInvokeMessage);
                if (error)
                    return "botInvokeMessage." + error;
            }
            if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) {
                var error = $root.E2E.Message.CallLogMessage.verify(message.callLogMesssage);
                if (error)
                    return "callLogMesssage." + error;
            }
            if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) {
                var error = $root.E2E.Message.MessageHistoryBundle.verify(message.messageHistoryBundle);
                if (error)
                    return "messageHistoryBundle." + error;
            }
            if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) {
                var error = $root.E2E.Message.EncCommentMessage.verify(message.encCommentMessage);
                if (error)
                    return "encCommentMessage." + error;
            }
            if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) {
                var error = $root.E2E.Message.BCallMessage.verify(message.bcallMessage);
                if (error)
                    return "bcallMessage." + error;
            }
            if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.lottieStickerMessage);
                if (error)
                    return "lottieStickerMessage." + error;
            }
            if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) {
                var error = $root.E2E.Message.EventMessage.verify(message.eventMessage);
                if (error)
                    return "eventMessage." + error;
            }
            if (message.encEventResponseMessage != null && message.hasOwnProperty("encEventResponseMessage")) {
                var error = $root.E2E.Message.EncEventResponseMessage.verify(message.encEventResponseMessage);
                if (error)
                    return "encEventResponseMessage." + error;
            }
            if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) {
                var error = $root.E2E.Message.CommentMessage.verify(message.commentMessage);
                if (error)
                    return "commentMessage." + error;
            }
            if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) {
                var error = $root.E2E.Message.NewsletterAdminInviteMessage.verify(message.newsletterAdminInviteMessage);
                if (error)
                    return "newsletterAdminInviteMessage." + error;
            }
            if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) {
                var error = $root.E2E.Message.PlaceholderMessage.verify(message.placeholderMessage);
                if (error)
                    return "placeholderMessage." + error;
            }
            if (message.secretEncryptedMessage != null && message.hasOwnProperty("secretEncryptedMessage")) {
                var error = $root.E2E.Message.SecretEncryptedMessage.verify(message.secretEncryptedMessage);
                if (error)
                    return "secretEncryptedMessage." + error;
            }
            if (message.albumMessage != null && message.hasOwnProperty("albumMessage")) {
                var error = $root.E2E.Message.AlbumMessage.verify(message.albumMessage);
                if (error)
                    return "albumMessage." + error;
            }
            if (message.eventCoverImage != null && message.hasOwnProperty("eventCoverImage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.eventCoverImage);
                if (error)
                    return "eventCoverImage." + error;
            }
            if (message.stickerPackMessage != null && message.hasOwnProperty("stickerPackMessage")) {
                var error = $root.E2E.Message.StickerPackMessage.verify(message.stickerPackMessage);
                if (error)
                    return "stickerPackMessage." + error;
            }
            if (message.statusMentionMessage != null && message.hasOwnProperty("statusMentionMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.statusMentionMessage);
                if (error)
                    return "statusMentionMessage." + error;
            }
            if (message.pollResultSnapshotMessage != null && message.hasOwnProperty("pollResultSnapshotMessage")) {
                var error = $root.E2E.Message.PollResultSnapshotMessage.verify(message.pollResultSnapshotMessage);
                if (error)
                    return "pollResultSnapshotMessage." + error;
            }
            if (message.pollCreationOptionImageMessage != null && message.hasOwnProperty("pollCreationOptionImageMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.pollCreationOptionImageMessage);
                if (error)
                    return "pollCreationOptionImageMessage." + error;
            }
            if (message.associatedChildMessage != null && message.hasOwnProperty("associatedChildMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.associatedChildMessage);
                if (error)
                    return "associatedChildMessage." + error;
            }
            if (message.groupStatusMentionMessage != null && message.hasOwnProperty("groupStatusMentionMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.groupStatusMentionMessage);
                if (error)
                    return "groupStatusMentionMessage." + error;
            }
            if (message.pollCreationMessageV4 != null && message.hasOwnProperty("pollCreationMessageV4")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.pollCreationMessageV4);
                if (error)
                    return "pollCreationMessageV4." + error;
            }
            if (message.statusAddYours != null && message.hasOwnProperty("statusAddYours")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.statusAddYours);
                if (error)
                    return "statusAddYours." + error;
            }
            if (message.groupStatusMessage != null && message.hasOwnProperty("groupStatusMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.groupStatusMessage);
                if (error)
                    return "groupStatusMessage." + error;
            }
            if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage")) {
                var error = $root.E2E.AIRichResponseMessage.verify(message.richResponseMessage);
                if (error)
                    return "richResponseMessage." + error;
            }
            if (message.statusNotificationMessage != null && message.hasOwnProperty("statusNotificationMessage")) {
                var error = $root.E2E.Message.StatusNotificationMessage.verify(message.statusNotificationMessage);
                if (error)
                    return "statusNotificationMessage." + error;
            }
            if (message.limitSharingMessage != null && message.hasOwnProperty("limitSharingMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.limitSharingMessage);
                if (error)
                    return "limitSharingMessage." + error;
            }
            if (message.botTaskMessage != null && message.hasOwnProperty("botTaskMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.botTaskMessage);
                if (error)
                    return "botTaskMessage." + error;
            }
            if (message.questionMessage != null && message.hasOwnProperty("questionMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.questionMessage);
                if (error)
                    return "questionMessage." + error;
            }
            if (message.messageHistoryNotice != null && message.hasOwnProperty("messageHistoryNotice")) {
                var error = $root.E2E.Message.MessageHistoryNotice.verify(message.messageHistoryNotice);
                if (error)
                    return "messageHistoryNotice." + error;
            }
            if (message.groupStatusMessageV2 != null && message.hasOwnProperty("groupStatusMessageV2")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.groupStatusMessageV2);
                if (error)
                    return "groupStatusMessageV2." + error;
            }
            if (message.botForwardedMessage != null && message.hasOwnProperty("botForwardedMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.botForwardedMessage);
                if (error)
                    return "botForwardedMessage." + error;
            }
            if (message.statusQuestionAnswerMessage != null && message.hasOwnProperty("statusQuestionAnswerMessage")) {
                var error = $root.E2E.Message.StatusQuestionAnswerMessage.verify(message.statusQuestionAnswerMessage);
                if (error)
                    return "statusQuestionAnswerMessage." + error;
            }
            if (message.questionReplyMessage != null && message.hasOwnProperty("questionReplyMessage")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.questionReplyMessage);
                if (error)
                    return "questionReplyMessage." + error;
            }
            if (message.questionResponseMessage != null && message.hasOwnProperty("questionResponseMessage")) {
                var error = $root.E2E.Message.QuestionResponseMessage.verify(message.questionResponseMessage);
                if (error)
                    return "questionResponseMessage." + error;
            }
            if (message.newsletterFollowerInviteMessage != null && message.hasOwnProperty("newsletterFollowerInviteMessage")) {
                var error = $root.E2E.Message.NewsletterFollowerInviteMessage.verify(message.newsletterFollowerInviteMessage);
                if (error)
                    return "newsletterFollowerInviteMessage." + error;
            }
            if (message.statusQuotedMessage != null && message.hasOwnProperty("statusQuotedMessage")) {
                var error = $root.E2E.Message.StatusQuotedMessage.verify(message.statusQuotedMessage);
                if (error)
                    return "statusQuotedMessage." + error;
            }
            if (message.statusStickerInteractionMessage != null && message.hasOwnProperty("statusStickerInteractionMessage")) {
                var error = $root.E2E.Message.StatusStickerInteractionMessage.verify(message.statusStickerInteractionMessage);
                if (error)
                    return "statusStickerInteractionMessage." + error;
            }
            if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) {
                var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessageV5);
                if (error)
                    return "pollCreationMessageV5." + error;
            }
            if (message.pollResultSnapshotMessageV2 != null && message.hasOwnProperty("pollResultSnapshotMessageV2")) {
                var error = $root.E2E.Message.PollResultSnapshotMessage.verify(message.pollResultSnapshotMessageV2);
                if (error)
                    return "pollResultSnapshotMessageV2." + error;
            }
            if (message.newsletterFollowerInviteMessageV2 != null && message.hasOwnProperty("newsletterFollowerInviteMessageV2")) {
                var error = $root.E2E.Message.NewsletterFollowerInviteMessage.verify(message.newsletterFollowerInviteMessageV2);
                if (error)
                    return "newsletterFollowerInviteMessageV2." + error;
            }
            if (message.requestContactInfoMessage != null && message.hasOwnProperty("requestContactInfoMessage")) {
                var error = $root.E2E.Message.RequestContactInfoMessage.verify(message.requestContactInfoMessage);
                if (error)
                    return "requestContactInfoMessage." + 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.newsletterFollowerInviteMessage != null) {
                if (typeof object.newsletterFollowerInviteMessage !== "object")
                    throw TypeError(".E2E.Message.newsletterFollowerInviteMessage: object expected");
                message.newsletterFollowerInviteMessage = $root.E2E.Message.NewsletterFollowerInviteMessage.fromObject(object.newsletterFollowerInviteMessage);
            }
            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.pollResultSnapshotMessageV2 != null) {
                if (typeof object.pollResultSnapshotMessageV2 !== "object")
                    throw TypeError(".E2E.Message.pollResultSnapshotMessageV2: object expected");
                message.pollResultSnapshotMessageV2 = $root.E2E.Message.PollResultSnapshotMessage.fromObject(object.pollResultSnapshotMessageV2);
            }
            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.requestContactInfoMessage != null) {
                if (typeof object.requestContactInfoMessage !== "object")
                    throw TypeError(".E2E.Message.requestContactInfoMessage: object expected");
                message.requestContactInfoMessage = $root.E2E.Message.RequestContactInfoMessage.fromObject(object.requestContactInfoMessage);
            }
            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 (options.defaults) {
                object.conversation = "";
                object.senderKeyDistributionMessage = null;
                object.imageMessage = null;
                object.contactMessage = null;
                object.locationMessage = null;
                object.extendedTextMessage = null;
                object.documentMessage = null;
                object.audioMessage = null;
                object.videoMessage = null;
                object.call = null;
                object.chat = null;
                object.protocolMessage = null;
                object.contactsArrayMessage = null;
                object.highlyStructuredMessage = null;
                object.fastRatchetKeySenderKeyDistributionMessage = null;
                object.sendPaymentMessage = null;
                object.liveLocationMessage = null;
                object.requestPaymentMessage = null;
                object.declinePaymentRequestMessage = null;
                object.cancelPaymentRequestMessage = null;
                object.templateMessage = null;
                object.stickerMessage = null;
                object.groupInviteMessage = null;
                object.templateButtonReplyMessage = null;
                object.productMessage = null;
                object.deviceSentMessage = null;
                object.messageContextInfo = null;
                object.listMessage = null;
                object.viewOnceMessage = null;
                object.orderMessage = null;
                object.listResponseMessage = null;
                object.ephemeralMessage = null;
                object.invoiceMessage = null;
                object.buttonsMessage = null;
                object.buttonsResponseMessage = null;
                object.paymentInviteMessage = null;
                object.interactiveMessage = null;
                object.reactionMessage = null;
                object.stickerSyncRmrMessage = null;
                object.interactiveResponseMessage = null;
                object.pollCreationMessage = null;
                object.pollUpdateMessage = null;
                object.keepInChatMessage = null;
                object.documentWithCaptionMessage = null;
                object.requestPhoneNumberMessage = null;
                object.viewOnceMessageV2 = null;
                object.encReactionMessage = null;
                object.editedMessage = null;
                object.viewOnceMessageV2Extension = null;
                object.pollCreationMessageV2 = null;
                object.scheduledCallCreationMessage = null;
                object.groupMentionedMessage = null;
                object.pinInChatMessage = null;
                object.pollCreationMessageV3 = null;
                object.scheduledCallEditMessage = null;
                object.ptvMessage = null;
                object.botInvokeMessage = null;
                object.callLogMesssage = null;
                object.messageHistoryBundle = null;
                object.encCommentMessage = null;
                object.bcallMessage = null;
                object.lottieStickerMessage = null;
                object.eventMessage = null;
                object.encEventResponseMessage = null;
                object.commentMessage = null;
                object.newsletterAdminInviteMessage = null;
                object.placeholderMessage = null;
                object.secretEncryptedMessage = null;
                object.albumMessage = null;
                object.eventCoverImage = null;
                object.stickerPackMessage = null;
                object.statusMentionMessage = null;
                object.pollResultSnapshotMessage = null;
                object.pollCreationOptionImageMessage = null;
                object.associatedChildMessage = null;
                object.groupStatusMentionMessage = null;
                object.pollCreationMessageV4 = null;
                object.statusAddYours = null;
                object.groupStatusMessage = null;
                object.richResponseMessage = null;
                object.statusNotificationMessage = null;
                object.limitSharingMessage = null;
                object.botTaskMessage = null;
                object.questionMessage = null;
                object.messageHistoryNotice = null;
                object.groupStatusMessageV2 = null;
                object.botForwardedMessage = null;
                object.statusQuestionAnswerMessage = null;
                object.questionReplyMessage = null;
                object.questionResponseMessage = null;
                object.newsletterFollowerInviteMessage = null;
                object.statusQuotedMessage = null;
                object.statusStickerInteractionMessage = null;
                object.pollCreationMessageV5 = null;
                object.pollResultSnapshotMessageV2 = null;
                object.newsletterFollowerInviteMessageV2 = null;
                object.requestContactInfoMessage = null;
            }
            if (message.conversation != null && message.hasOwnProperty("conversation"))
                object.conversation = message.conversation;
            if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage"))
                object.senderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.toObject(message.senderKeyDistributionMessage, options);
            if (message.imageMessage != null && message.hasOwnProperty("imageMessage"))
                object.imageMessage = $root.E2E.Message.ImageMessage.toObject(message.imageMessage, options);
            if (message.contactMessage != null && message.hasOwnProperty("contactMessage"))
                object.contactMessage = $root.E2E.Message.ContactMessage.toObject(message.contactMessage, options);
            if (message.locationMessage != null && message.hasOwnProperty("locationMessage"))
                object.locationMessage = $root.E2E.Message.LocationMessage.toObject(message.locationMessage, options);
            if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage"))
                object.extendedTextMessage = $root.E2E.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options);
            if (message.documentMessage != null && message.hasOwnProperty("documentMessage"))
                object.documentMessage = $root.E2E.Message.DocumentMessage.toObject(message.documentMessage, options);
            if (message.audioMessage != null && message.hasOwnProperty("audioMessage"))
                object.audioMessage = $root.E2E.Message.AudioMessage.toObject(message.audioMessage, options);
            if (message.videoMessage != null && message.hasOwnProperty("videoMessage"))
                object.videoMessage = $root.E2E.Message.VideoMessage.toObject(message.videoMessage, options);
            if (message.call != null && message.hasOwnProperty("call"))
                object.call = $root.E2E.Message.Call.toObject(message.call, options);
            if (message.chat != null && message.hasOwnProperty("chat"))
                object.chat = $root.E2E.Message.Chat.toObject(message.chat, options);
            if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage"))
                object.protocolMessage = $root.E2E.Message.ProtocolMessage.toObject(message.protocolMessage, options);
            if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage"))
                object.contactsArrayMessage = $root.E2E.Message.ContactsArrayMessage.toObject(message.contactsArrayMessage, options);
            if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage"))
                object.highlyStructuredMessage = $root.E2E.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options);
            if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage"))
                object.fastRatchetKeySenderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.toObject(message.fastRatchetKeySenderKeyDistributionMessage, options);
            if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage"))
                object.sendPaymentMessage = $root.E2E.Message.SendPaymentMessage.toObject(message.sendPaymentMessage, options);
            if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage"))
                object.liveLocationMessage = $root.E2E.Message.LiveLocationMessage.toObject(message.liveLocationMessage, options);
            if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage"))
                object.requestPaymentMessage = $root.E2E.Message.RequestPaymentMessage.toObject(message.requestPaymentMessage, options);
            if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage"))
                object.declinePaymentRequestMessage = $root.E2E.Message.DeclinePaymentRequestMessage.toObject(message.declinePaymentRequestMessage, options);
            if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage"))
                object.cancelPaymentRequestMessage = $root.E2E.Message.CancelPaymentRequestMessage.toObject(message.cancelPaymentRequestMessage, options);
            if (message.templateMessage != null && message.hasOwnProperty("templateMessage"))
                object.templateMessage = $root.E2E.Message.TemplateMessage.toObject(message.templateMessage, options);
            if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage"))
                object.stickerMessage = $root.E2E.Message.StickerMessage.toObject(message.stickerMessage, options);
            if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage"))
                object.groupInviteMessage = $root.E2E.Message.GroupInviteMessage.toObject(message.groupInviteMessage, options);
            if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage"))
                object.templateButtonReplyMessage = $root.E2E.Message.TemplateButtonReplyMessage.toObject(message.templateButtonReplyMessage, options);
            if (message.productMessage != null && message.hasOwnProperty("productMessage"))
                object.productMessage = $root.E2E.Message.ProductMessage.toObject(message.productMessage, options);
            if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage"))
                object.deviceSentMessage = $root.E2E.Message.DeviceSentMessage.toObject(message.deviceSentMessage, options);
            if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo"))
                object.messageContextInfo = $root.E2E.MessageContextInfo.toObject(message.messageContextInfo, options);
            if (message.listMessage != null && message.hasOwnProperty("listMessage"))
                object.listMessage = $root.E2E.Message.ListMessage.toObject(message.listMessage, options);
            if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage"))
                object.viewOnceMessage = $root.E2E.Message.FutureProofMessage.toObject(message.viewOnceMessage, options);
            if (message.orderMessage != null && message.hasOwnProperty("orderMessage"))
                object.orderMessage = $root.E2E.Message.OrderMessage.toObject(message.orderMessage, options);
            if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage"))
                object.listResponseMessage = $root.E2E.Message.ListResponseMessage.toObject(message.listResponseMessage, options);
            if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage"))
                object.ephemeralMessage = $root.E2E.Message.FutureProofMessage.toObject(message.ephemeralMessage, options);
            if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage"))
                object.invoiceMessage = $root.E2E.Message.InvoiceMessage.toObject(message.invoiceMessage, options);
            if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage"))
                object.buttonsMessage = $root.E2E.Message.ButtonsMessage.toObject(message.buttonsMessage, options);
            if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage"))
                object.buttonsResponseMessage = $root.E2E.Message.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options);
            if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage"))
                object.paymentInviteMessage = $root.E2E.Message.PaymentInviteMessage.toObject(message.paymentInviteMessage, options);
            if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage"))
                object.interactiveMessage = $root.E2E.Message.InteractiveMessage.toObject(message.interactiveMessage, options);
            if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage"))
                object.reactionMessage = $root.E2E.Message.ReactionMessage.toObject(message.reactionMessage, options);
            if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage"))
                object.stickerSyncRmrMessage = $root.E2E.Message.StickerSyncRMRMessage.toObject(message.stickerSyncRmrMessage, options);
            if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage"))
                object.interactiveResponseMessage = $root.E2E.Message.InteractiveResponseMessage.toObject(message.interactiveResponseMessage, options);
            if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage"))
                object.pollCreationMessage = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessage, options);
            if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage"))
                object.pollUpdateMessage = $root.E2E.Message.PollUpdateMessage.toObject(message.pollUpdateMessage, options);
            if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage"))
                object.keepInChatMessage = $root.E2E.Message.KeepInChatMessage.toObject(message.keepInChatMessage, options);
            if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage"))
                object.documentWithCaptionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.documentWithCaptionMessage, options);
            if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage"))
                object.requestPhoneNumberMessage = $root.E2E.Message.RequestPhoneNumberMessage.toObject(message.requestPhoneNumberMessage, options);
            if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2"))
                object.viewOnceMessageV2 = $root.E2E.Message.FutureProofMessage.toObject(message.viewOnceMessageV2, options);
            if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage"))
                object.encReactionMessage = $root.E2E.Message.EncReactionMessage.toObject(message.encReactionMessage, options);
            if (message.editedMessage != null && message.hasOwnProperty("editedMessage"))
                object.editedMessage = $root.E2E.Message.FutureProofMessage.toObject(message.editedMessage, options);
            if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension"))
                object.viewOnceMessageV2Extension = $root.E2E.Message.FutureProofMessage.toObject(message.viewOnceMessageV2Extension, options);
            if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2"))
                object.pollCreationMessageV2 = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessageV2, options);
            if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage"))
                object.scheduledCallCreationMessage = $root.E2E.Message.ScheduledCallCreationMessage.toObject(message.scheduledCallCreationMessage, options);
            if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage"))
                object.groupMentionedMessage = $root.E2E.Message.FutureProofMessage.toObject(message.groupMentionedMessage, options);
            if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage"))
                object.pinInChatMessage = $root.E2E.Message.PinInChatMessage.toObject(message.pinInChatMessage, options);
            if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3"))
                object.pollCreationMessageV3 = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessageV3, options);
            if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage"))
                object.scheduledCallEditMessage = $root.E2E.Message.ScheduledCallEditMessage.toObject(message.scheduledCallEditMessage, options);
            if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage"))
                object.ptvMessage = $root.E2E.Message.VideoMessage.toObject(message.ptvMessage, options);
            if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage"))
                object.botInvokeMessage = $root.E2E.Message.FutureProofMessage.toObject(message.botInvokeMessage, options);
            if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage"))
                object.callLogMesssage = $root.E2E.Message.CallLogMessage.toObject(message.callLogMesssage, options);
            if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle"))
                object.messageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.toObject(message.messageHistoryBundle, options);
            if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage"))
                object.encCommentMessage = $root.E2E.Message.EncCommentMessage.toObject(message.encCommentMessage, options);
            if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage"))
                object.bcallMessage = $root.E2E.Message.BCallMessage.toObject(message.bcallMessage, options);
            if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage"))
                object.lottieStickerMessage = $root.E2E.Message.FutureProofMessage.toObject(message.lottieStickerMessage, options);
            if (message.eventMessage != null && message.hasOwnProperty("eventMessage"))
                object.eventMessage = $root.E2E.Message.EventMessage.toObject(message.eventMessage, options);
            if (message.encEventResponseMessage != null && message.hasOwnProperty("encEventResponseMessage"))
                object.encEventResponseMessage = $root.E2E.Message.EncEventResponseMessage.toObject(message.encEventResponseMessage, options);
            if (message.commentMessage != null && message.hasOwnProperty("commentMessage"))
                object.commentMessage = $root.E2E.Message.CommentMessage.toObject(message.commentMessage, options);
            if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage"))
                object.newsletterAdminInviteMessage = $root.E2E.Message.NewsletterAdminInviteMessage.toObject(message.newsletterAdminInviteMessage, options);
            if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage"))
                object.placeholderMessage = $root.E2E.Message.PlaceholderMessage.toObject(message.placeholderMessage, options);
            if (message.secretEncryptedMessage != null && message.hasOwnProperty("secretEncryptedMessage"))
                object.secretEncryptedMessage = $root.E2E.Message.SecretEncryptedMessage.toObject(message.secretEncryptedMessage, options);
            if (message.albumMessage != null && message.hasOwnProperty("albumMessage"))
                object.albumMessage = $root.E2E.Message.AlbumMessage.toObject(message.albumMessage, options);
            if (message.eventCoverImage != null && message.hasOwnProperty("eventCoverImage"))
                object.eventCoverImage = $root.E2E.Message.FutureProofMessage.toObject(message.eventCoverImage, options);
            if (message.stickerPackMessage != null && message.hasOwnProperty("stickerPackMessage"))
                object.stickerPackMessage = $root.E2E.Message.StickerPackMessage.toObject(message.stickerPackMessage, options);
            if (message.statusMentionMessage != null && message.hasOwnProperty("statusMentionMessage"))
                object.statusMentionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.statusMentionMessage, options);
            if (message.pollResultSnapshotMessage != null && message.hasOwnProperty("pollResultSnapshotMessage"))
                object.pollResultSnapshotMessage = $root.E2E.Message.PollResultSnapshotMessage.toObject(message.pollResultSnapshotMessage, options);
            if (message.pollCreationOptionImageMessage != null && message.hasOwnProperty("pollCreationOptionImageMessage"))
                object.pollCreationOptionImageMessage = $root.E2E.Message.FutureProofMessage.toObject(message.pollCreationOptionImageMessage, options);
            if (message.associatedChildMessage != null && message.hasOwnProperty("associatedChildMessage"))
                object.associatedChildMessage = $root.E2E.Message.FutureProofMessage.toObject(message.associatedChildMessage, options);
            if (message.groupStatusMentionMessage != null && message.hasOwnProperty("groupStatusMentionMessage"))
                object.groupStatusMentionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.groupStatusMentionMessage, options);
            if (message.pollCreationMessageV4 != null && message.hasOwnProperty("pollCreationMessageV4"))
                object.pollCreationMessageV4 = $root.E2E.Message.FutureProofMessage.toObject(message.pollCreationMessageV4, options);
            if (message.statusAddYours != null && message.hasOwnProperty("statusAddYours"))
                object.statusAddYours = $root.E2E.Message.FutureProofMessage.toObject(message.statusAddYours, options);
            if (message.groupStatusMessage != null && message.hasOwnProperty("groupStatusMessage"))
                object.groupStatusMessage = $root.E2E.Message.FutureProofMessage.toObject(message.groupStatusMessage, options);
            if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage"))
                object.richResponseMessage = $root.E2E.AIRichResponseMessage.toObject(message.richResponseMessage, options);
            if (message.statusNotificationMessage != null && message.hasOwnProperty("statusNotificationMessage"))
                object.statusNotificationMessage = $root.E2E.Message.StatusNotificationMessage.toObject(message.statusNotificationMessage, options);
            if (message.limitSharingMessage != null && message.hasOwnProperty("limitSharingMessage"))
                object.limitSharingMessage = $root.E2E.Message.FutureProofMessage.toObject(message.limitSharingMessage, options);
            if (message.botTaskMessage != null && message.hasOwnProperty("botTaskMessage"))
                object.botTaskMessage = $root.E2E.Message.FutureProofMessage.toObject(message.botTaskMessage, options);
            if (message.questionMessage != null && message.hasOwnProperty("questionMessage"))
                object.questionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.questionMessage, options);
            if (message.messageHistoryNotice != null && message.hasOwnProperty("messageHistoryNotice"))
                object.messageHistoryNotice = $root.E2E.Message.MessageHistoryNotice.toObject(message.messageHistoryNotice, options);
            if (message.groupStatusMessageV2 != null && message.hasOwnProperty("groupStatusMessageV2"))
                object.groupStatusMessageV2 = $root.E2E.Message.FutureProofMessage.toObject(message.groupStatusMessageV2, options);
            if (message.botForwardedMessage != null && message.hasOwnProperty("botForwardedMessage"))
                object.botForwardedMessage = $root.E2E.Message.FutureProofMessage.toObject(message.botForwardedMessage, options);
            if (message.statusQuestionAnswerMessage != null && message.hasOwnProperty("statusQuestionAnswerMessage"))
                object.statusQuestionAnswerMessage = $root.E2E.Message.StatusQuestionAnswerMessage.toObject(message.statusQuestionAnswerMessage, options);
            if (message.questionReplyMessage != null && message.hasOwnProperty("questionReplyMessage"))
                object.questionReplyMessage = $root.E2E.Message.FutureProofMessage.toObject(message.questionReplyMessage, options);
            if (message.questionResponseMessage != null && message.hasOwnProperty("questionResponseMessage"))
                object.questionResponseMessage = $root.E2E.Message.QuestionResponseMessage.toObject(message.questionResponseMessage, options);
            if (message.newsletterFollowerInviteMessage != null && message.hasOwnProperty("newsletterFollowerInviteMessage"))
                object.newsletterFollowerInviteMessage = $root.E2E.Message.NewsletterFollowerInviteMessage.toObject(message.newsletterFollowerInviteMessage, options);
            if (message.statusQuotedMessage != null && message.hasOwnProperty("statusQuotedMessage"))
                object.statusQuotedMessage = $root.E2E.Message.StatusQuotedMessage.toObject(message.statusQuotedMessage, options);
            if (message.statusStickerInteractionMessage != null && message.hasOwnProperty("statusStickerInteractionMessage"))
                object.statusStickerInteractionMessage = $root.E2E.Message.StatusStickerInteractionMessage.toObject(message.statusStickerInteractionMessage, options);
            if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5"))
                object.pollCreationMessageV5 = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessageV5, options);
            if (message.pollResultSnapshotMessageV2 != null && message.hasOwnProperty("pollResultSnapshotMessageV2"))
                object.pollResultSnapshotMessageV2 = $root.E2E.Message.PollResultSnapshotMessage.toObject(message.pollResultSnapshotMessageV2, options);
            if (message.newsletterFollowerInviteMessageV2 != null && message.hasOwnProperty("newsletterFollowerInviteMessageV2"))
                object.newsletterFollowerInviteMessageV2 = $root.E2E.Message.NewsletterFollowerInviteMessage.toObject(message.newsletterFollowerInviteMessageV2, options);
            if (message.requestContactInfoMessage != null && message.hasOwnProperty("requestContactInfoMessage"))
                object.requestContactInfoMessage = $root.E2E.Message.RequestContactInfoMessage.toObject(message.requestContactInfoMessage, options);
            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} expectedImageCount
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            AlbumMessage.prototype.expectedImageCount = 0;

            /**
             * AlbumMessage expectedVideoCount.
             * @member {number} expectedVideoCount
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            AlbumMessage.prototype.expectedVideoCount = 0;

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

            /**
             * 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";
                if (message.expectedImageCount != null && message.hasOwnProperty("expectedImageCount"))
                    if (!$util.isInteger(message.expectedImageCount))
                        return "expectedImageCount: integer expected";
                if (message.expectedVideoCount != null && message.hasOwnProperty("expectedVideoCount"))
                    if (!$util.isInteger(message.expectedVideoCount))
                        return "expectedVideoCount: integer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.expectedImageCount = 0;
                    object.expectedVideoCount = 0;
                    object.contextInfo = null;
                }
                if (message.expectedImageCount != null && message.hasOwnProperty("expectedImageCount"))
                    object.expectedImageCount = message.expectedImageCount;
                if (message.expectedVideoCount != null && message.hasOwnProperty("expectedVideoCount"))
                    object.expectedVideoCount = message.expectedVideoCount;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} timestamp
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @instance
             */
            AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                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"))
                    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 (options.defaults)
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.timestamp = options.longs === String ? "0" : 0;
                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;
                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;

            /**
             * 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";
                if (message.keyId != null && message.hasOwnProperty("keyId")) {
                    var error = $root.E2E.Message.AppStateSyncKeyId.verify(message.keyId);
                    if (error)
                        return "keyId." + error;
                }
                if (message.keyData != null && message.hasOwnProperty("keyData")) {
                    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 (options.defaults) {
                    object.keyId = null;
                    object.keyData = null;
                }
                if (message.keyId != null && message.hasOwnProperty("keyId"))
                    object.keyId = $root.E2E.Message.AppStateSyncKeyId.toObject(message.keyId, options);
                if (message.keyData != null && message.hasOwnProperty("keyData"))
                    object.keyData = $root.E2E.Message.AppStateSyncKeyData.toObject(message.keyData, options);
                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} keyData
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            AppStateSyncKeyData.prototype.keyData = $util.newBuffer([]);

            /**
             * AppStateSyncKeyData fingerprint.
             * @member {E2E.Message.IAppStateSyncKeyFingerprint|null|undefined} fingerprint
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            AppStateSyncKeyData.prototype.fingerprint = null;

            /**
             * AppStateSyncKeyData timestamp.
             * @member {number|Long} timestamp
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            AppStateSyncKeyData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                if (message.keyData != null && message.hasOwnProperty("keyData"))
                    if (!(message.keyData && typeof message.keyData.length === "number" || $util.isString(message.keyData)))
                        return "keyData: buffer expected";
                if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) {
                    var error = $root.E2E.Message.AppStateSyncKeyFingerprint.verify(message.fingerprint);
                    if (error)
                        return "fingerprint." + error;
                }
                if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                    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 (options.defaults) {
                    if (options.bytes === String)
                        object.keyData = "";
                    else {
                        object.keyData = [];
                        if (options.bytes !== Array)
                            object.keyData = $util.newBuffer(object.keyData);
                    }
                    object.fingerprint = null;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.timestamp = options.longs === String ? "0" : 0;
                }
                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 (message.fingerprint != null && message.hasOwnProperty("fingerprint"))
                    object.fingerprint = $root.E2E.Message.AppStateSyncKeyFingerprint.toObject(message.fingerprint, options);
                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;
                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} rawId
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            AppStateSyncKeyFingerprint.prototype.rawId = 0;

            /**
             * AppStateSyncKeyFingerprint currentIndex.
             * @member {number} currentIndex
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            AppStateSyncKeyFingerprint.prototype.currentIndex = 0;

            /**
             * AppStateSyncKeyFingerprint deviceIndexes.
             * @member {Array.<number>} deviceIndexes
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray;

            /**
             * 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";
                if (message.rawId != null && message.hasOwnProperty("rawId"))
                    if (!$util.isInteger(message.rawId))
                        return "rawId: integer expected";
                if (message.currentIndex != null && message.hasOwnProperty("currentIndex"))
                    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 (options.defaults) {
                    object.rawId = 0;
                    object.currentIndex = 0;
                }
                if (message.rawId != null && message.hasOwnProperty("rawId"))
                    object.rawId = message.rawId;
                if (message.currentIndex != null && message.hasOwnProperty("currentIndex"))
                    object.currentIndex = message.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} keyId
             * @memberof E2E.Message.AppStateSyncKeyId
             * @instance
             */
            AppStateSyncKeyId.prototype.keyId = $util.newBuffer([]);

            /**
             * 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";
                if (message.keyId != null && message.hasOwnProperty("keyId"))
                    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 (options.defaults)
                    if (options.bytes === String)
                        object.keyId = "";
                    else {
                        object.keyId = [];
                        if (options.bytes !== Array)
                            object.keyId = $util.newBuffer(object.keyId);
                    }
                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;
                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} url
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.url = "";

            /**
             * AudioMessage mimetype.
             * @member {string} mimetype
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mimetype = "";

            /**
             * AudioMessage fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * AudioMessage fileLength.
             * @member {number|Long} fileLength
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AudioMessage seconds.
             * @member {number} seconds
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.seconds = 0;

            /**
             * AudioMessage ptt.
             * @member {boolean} ptt
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.ptt = false;

            /**
             * AudioMessage mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mediaKey = $util.newBuffer([]);

            /**
             * AudioMessage fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * AudioMessage directPath.
             * @member {string} directPath
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.directPath = "";

            /**
             * AudioMessage mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

            /**
             * AudioMessage streamingSidecar.
             * @member {Uint8Array} streamingSidecar
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.streamingSidecar = $util.newBuffer([]);

            /**
             * AudioMessage waveform.
             * @member {Uint8Array} waveform
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.waveform = $util.newBuffer([]);

            /**
             * AudioMessage backgroundArgb.
             * @member {number} backgroundArgb
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.backgroundArgb = 0;

            /**
             * AudioMessage viewOnce.
             * @member {boolean} viewOnce
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.viewOnce = false;

            /**
             * AudioMessage accessibilityLabel.
             * @member {string} accessibilityLabel
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.accessibilityLabel = "";

            /**
             * AudioMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain} mediaKeyDomain
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mediaKeyDomain = 0;

            /**
             * 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";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                    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"))
                    if (!$util.isInteger(message.seconds))
                        return "seconds: integer expected";
                if (message.ptt != null && message.hasOwnProperty("ptt"))
                    if (typeof message.ptt !== "boolean")
                        return "ptt: boolean expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar"))
                    if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar)))
                        return "streamingSidecar: buffer expected";
                if (message.waveform != null && message.hasOwnProperty("waveform"))
                    if (!(message.waveform && typeof message.waveform.length === "number" || $util.isString(message.waveform)))
                        return "waveform: buffer expected";
                if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb"))
                    if (!$util.isInteger(message.backgroundArgb))
                        return "backgroundArgb: integer expected";
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce"))
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel"))
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain"))
                    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 (options.defaults) {
                    object.url = "";
                    object.mimetype = "";
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    object.seconds = 0;
                    object.ptt = false;
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    object.directPath = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    object.contextInfo = null;
                    if (options.bytes === String)
                        object.streamingSidecar = "";
                    else {
                        object.streamingSidecar = [];
                        if (options.bytes !== Array)
                            object.streamingSidecar = $util.newBuffer(object.streamingSidecar);
                    }
                    if (options.bytes === String)
                        object.waveform = "";
                    else {
                        object.waveform = [];
                        if (options.bytes !== Array)
                            object.waveform = $util.newBuffer(object.waveform);
                    }
                    object.backgroundArgb = 0;
                    object.viewOnce = false;
                    object.accessibilityLabel = "";
                    object.mediaKeyDomain = options.enums === String ? "UNSET" : 0;
                }
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    object.mimetype = message.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 (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 (message.seconds != null && message.hasOwnProperty("seconds"))
                    object.seconds = message.seconds;
                if (message.ptt != null && message.hasOwnProperty("ptt"))
                    object.ptt = message.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 (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 (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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 (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 (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb"))
                    object.backgroundArgb = message.backgroundArgb;
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce"))
                    object.viewOnce = message.viewOnce;
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel"))
                    object.accessibilityLabel = message.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;
                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} sessionId
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.sessionId = "";

            /**
             * BCallMessage mediaType.
             * @member {E2E.Message.BCallMessage.MediaType} mediaType
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.mediaType = 0;

            /**
             * BCallMessage masterKey.
             * @member {Uint8Array} masterKey
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.masterKey = $util.newBuffer([]);

            /**
             * BCallMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.caption = "";

            /**
             * 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";
                if (message.sessionId != null && message.hasOwnProperty("sessionId"))
                    if (!$util.isString(message.sessionId))
                        return "sessionId: string expected";
                if (message.mediaType != null && message.hasOwnProperty("mediaType"))
                    switch (message.mediaType) {
                    default:
                        return "mediaType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.masterKey != null && message.hasOwnProperty("masterKey"))
                    if (!(message.masterKey && typeof message.masterKey.length === "number" || $util.isString(message.masterKey)))
                        return "masterKey: buffer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    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 (options.defaults) {
                    object.sessionId = "";
                    object.mediaType = options.enums === String ? "UNKNOWN" : 0;
                    if (options.bytes === String)
                        object.masterKey = "";
                    else {
                        object.masterKey = [];
                        if (options.bytes !== Array)
                            object.masterKey = $util.newBuffer(object.masterKey);
                    }
                    object.caption = "";
                }
                if (message.sessionId != null && message.hasOwnProperty("sessionId"))
                    object.sessionId = message.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 (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 (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.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} contentText
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.contentText = "";

            /**
             * ButtonsMessage footerText.
             * @member {string} footerText
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.footerText = "";

            /**
             * 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} headerType
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.headerType = 0;

            /**
             * 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 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"))
                    if (!$util.isString(message.contentText))
                        return "contentText: string expected";
                if (message.footerText != null && message.hasOwnProperty("footerText"))
                    if (!$util.isString(message.footerText))
                        return "footerText: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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"))
                    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 (options.defaults) {
                    object.contentText = "";
                    object.footerText = "";
                    object.contextInfo = null;
                    object.headerType = options.enums === String ? "UNKNOWN" : 0;
                }
                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 (message.footerText != null && message.hasOwnProperty("footerText"))
                    object.footerText = message.footerText;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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;
                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} buttonId
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Button.prototype.buttonId = "";

                /**
                 * 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} type
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Button.prototype.type = 0;

                /**
                 * Button nativeFlowInfo.
                 * @member {E2E.Message.ButtonsMessage.Button.INativeFlowInfo|null|undefined} nativeFlowInfo
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Button.prototype.nativeFlowInfo = null;

                /**
                 * 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";
                    if (message.buttonId != null && message.hasOwnProperty("buttonId"))
                        if (!$util.isString(message.buttonId))
                            return "buttonId: string expected";
                    if (message.buttonText != null && message.hasOwnProperty("buttonText")) {
                        var error = $root.E2E.Message.ButtonsMessage.Button.ButtonText.verify(message.buttonText);
                        if (error)
                            return "buttonText." + error;
                    }
                    if (message.type != null && message.hasOwnProperty("type"))
                        switch (message.type) {
                        default:
                            return "type: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) {
                        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 (options.defaults) {
                        object.buttonId = "";
                        object.buttonText = null;
                        object.type = options.enums === String ? "UNKNOWN" : 0;
                        object.nativeFlowInfo = null;
                    }
                    if (message.buttonId != null && message.hasOwnProperty("buttonId"))
                        object.buttonId = message.buttonId;
                    if (message.buttonText != null && message.hasOwnProperty("buttonText"))
                        object.buttonText = $root.E2E.Message.ButtonsMessage.Button.ButtonText.toObject(message.buttonText, options);
                    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 (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo"))
                        object.nativeFlowInfo = $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo.toObject(message.nativeFlowInfo, options);
                    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} displayText
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @instance
                     */
                    ButtonText.prototype.displayText = "";

                    /**
                     * 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";
                        if (message.displayText != null && message.hasOwnProperty("displayText"))
                            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 (options.defaults)
                            object.displayText = "";
                        if (message.displayText != null && message.hasOwnProperty("displayText"))
                            object.displayText = message.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} name
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @instance
                     */
                    NativeFlowInfo.prototype.name = "";

                    /**
                     * NativeFlowInfo paramsJson.
                     * @member {string} paramsJson
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @instance
                     */
                    NativeFlowInfo.prototype.paramsJson = "";

                    /**
                     * 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";
                        if (message.name != null && message.hasOwnProperty("name"))
                            if (!$util.isString(message.name))
                                return "name: string expected";
                        if (message.paramsJson != null && message.hasOwnProperty("paramsJson"))
                            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 (options.defaults) {
                            object.name = "";
                            object.paramsJson = "";
                        }
                        if (message.name != null && message.hasOwnProperty("name"))
                            object.name = message.name;
                        if (message.paramsJson != null && message.hasOwnProperty("paramsJson"))
                            object.paramsJson = message.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} selectedButtonId
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            ButtonsResponseMessage.prototype.selectedButtonId = "";

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

            /**
             * ButtonsResponseMessage type.
             * @member {E2E.Message.ButtonsResponseMessage.Type} type
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            ButtonsResponseMessage.prototype.type = 0;

            /**
             * 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 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"))
                    if (!$util.isString(message.selectedButtonId))
                        return "selectedButtonId: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.type != null && message.hasOwnProperty("type"))
                    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 (options.defaults) {
                    object.selectedButtonId = "";
                    object.contextInfo = null;
                    object.type = options.enums === String ? "UNKNOWN" : 0;
                }
                if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId"))
                    object.selectedButtonId = message.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 (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;
                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
             */

            /**
             * 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} callKey
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.callKey = $util.newBuffer([]);

            /**
             * Call conversionSource.
             * @member {string} conversionSource
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.conversionSource = "";

            /**
             * Call conversionData.
             * @member {Uint8Array} conversionData
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.conversionData = $util.newBuffer([]);

            /**
             * Call conversionDelaySeconds.
             * @member {number} conversionDelaySeconds
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.conversionDelaySeconds = 0;

            /**
             * Call ctwaSignals.
             * @member {string} ctwaSignals
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.ctwaSignals = "";

            /**
             * Call ctwaPayload.
             * @member {Uint8Array} ctwaPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.ctwaPayload = $util.newBuffer([]);

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

            /**
             * Call nativeFlowCallButtonPayload.
             * @member {string} nativeFlowCallButtonPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.nativeFlowCallButtonPayload = "";

            /**
             * Call deeplinkPayload.
             * @member {string} deeplinkPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.deeplinkPayload = "";

            /**
             * 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);
                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;
                        }
                    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";
                if (message.callKey != null && message.hasOwnProperty("callKey"))
                    if (!(message.callKey && typeof message.callKey.length === "number" || $util.isString(message.callKey)))
                        return "callKey: buffer expected";
                if (message.conversionSource != null && message.hasOwnProperty("conversionSource"))
                    if (!$util.isString(message.conversionSource))
                        return "conversionSource: string expected";
                if (message.conversionData != null && message.hasOwnProperty("conversionData"))
                    if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData)))
                        return "conversionData: buffer expected";
                if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds"))
                    if (!$util.isInteger(message.conversionDelaySeconds))
                        return "conversionDelaySeconds: integer expected";
                if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals"))
                    if (!$util.isString(message.ctwaSignals))
                        return "ctwaSignals: string expected";
                if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload"))
                    if (!(message.ctwaPayload && typeof message.ctwaPayload.length === "number" || $util.isString(message.ctwaPayload)))
                        return "ctwaPayload: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.nativeFlowCallButtonPayload != null && message.hasOwnProperty("nativeFlowCallButtonPayload"))
                    if (!$util.isString(message.nativeFlowCallButtonPayload))
                        return "nativeFlowCallButtonPayload: string expected";
                if (message.deeplinkPayload != null && message.hasOwnProperty("deeplinkPayload"))
                    if (!$util.isString(message.deeplinkPayload))
                        return "deeplinkPayload: string expected";
                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);
                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 (options.defaults) {
                    if (options.bytes === String)
                        object.callKey = "";
                    else {
                        object.callKey = [];
                        if (options.bytes !== Array)
                            object.callKey = $util.newBuffer(object.callKey);
                    }
                    object.conversionSource = "";
                    if (options.bytes === String)
                        object.conversionData = "";
                    else {
                        object.conversionData = [];
                        if (options.bytes !== Array)
                            object.conversionData = $util.newBuffer(object.conversionData);
                    }
                    object.conversionDelaySeconds = 0;
                    object.ctwaSignals = "";
                    if (options.bytes === String)
                        object.ctwaPayload = "";
                    else {
                        object.ctwaPayload = [];
                        if (options.bytes !== Array)
                            object.ctwaPayload = $util.newBuffer(object.ctwaPayload);
                    }
                    object.contextInfo = null;
                    object.nativeFlowCallButtonPayload = "";
                    object.deeplinkPayload = "";
                }
                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 (message.conversionSource != null && message.hasOwnProperty("conversionSource"))
                    object.conversionSource = message.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 (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds"))
                    object.conversionDelaySeconds = message.conversionDelaySeconds;
                if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals"))
                    object.ctwaSignals = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.nativeFlowCallButtonPayload != null && message.hasOwnProperty("nativeFlowCallButtonPayload"))
                    object.nativeFlowCallButtonPayload = message.nativeFlowCallButtonPayload;
                if (message.deeplinkPayload != null && message.hasOwnProperty("deeplinkPayload"))
                    object.deeplinkPayload = message.deeplinkPayload;
                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} isVideo
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.isVideo = false;

            /**
             * CallLogMessage callOutcome.
             * @member {E2E.Message.CallLogMessage.CallOutcome} callOutcome
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.callOutcome = 0;

            /**
             * CallLogMessage durationSecs.
             * @member {number|Long} durationSecs
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.durationSecs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CallLogMessage callType.
             * @member {E2E.Message.CallLogMessage.CallType} callType
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.callType = 0;

            /**
             * CallLogMessage participants.
             * @member {Array.<E2E.Message.CallLogMessage.ICallParticipant>} participants
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.participants = $util.emptyArray;

            /**
             * 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";
                if (message.isVideo != null && message.hasOwnProperty("isVideo"))
                    if (typeof message.isVideo !== "boolean")
                        return "isVideo: boolean expected";
                if (message.callOutcome != null && message.hasOwnProperty("callOutcome"))
                    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"))
                    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"))
                    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 (options.defaults) {
                    object.isVideo = false;
                    object.callOutcome = options.enums === String ? "CONNECTED" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.durationSecs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.durationSecs = options.longs === String ? "0" : 0;
                    object.callType = options.enums === String ? "REGULAR" : 0;
                }
                if (message.isVideo != null && message.hasOwnProperty("isVideo"))
                    object.isVideo = message.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 (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 (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 (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} jid
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @instance
                 */
                CallParticipant.prototype.jid = "";

                /**
                 * CallParticipant callOutcome.
                 * @member {E2E.Message.CallLogMessage.CallOutcome} callOutcome
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @instance
                 */
                CallParticipant.prototype.callOutcome = 0;

                /**
                 * 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";
                    if (message.jid != null && message.hasOwnProperty("jid"))
                        if (!$util.isString(message.jid))
                            return "jid: string expected";
                    if (message.callOutcome != null && message.hasOwnProperty("callOutcome"))
                        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 (options.defaults) {
                        object.jid = "";
                        object.callOutcome = options.enums === String ? "CONNECTED" : 0;
                    }
                    if (message.jid != null && message.hasOwnProperty("jid"))
                        object.jid = message.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;
                    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;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    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 (options.defaults)
                    object.key = null;
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                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} displayName
             * @memberof E2E.Message.Chat
             * @instance
             */
            Chat.prototype.displayName = "";

            /**
             * Chat id.
             * @member {string} id
             * @memberof E2E.Message.Chat
             * @instance
             */
            Chat.prototype.id = "";

            /**
             * 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";
                if (message.displayName != null && message.hasOwnProperty("displayName"))
                    if (!$util.isString(message.displayName))
                        return "displayName: string expected";
                if (message.id != null && message.hasOwnProperty("id"))
                    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 (options.defaults) {
                    object.displayName = "";
                    object.id = "";
                }
                if (message.displayName != null && message.hasOwnProperty("displayName"))
                    object.displayName = message.displayName;
                if (message.id != null && message.hasOwnProperty("id"))
                    object.id = message.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} status
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.status = 0;

            /**
             * CloudAPIThreadControlNotification senderNotificationTimestampMs.
             * @member {number|Long} senderNotificationTimestampMs
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.senderNotificationTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CloudAPIThreadControlNotification consumerLid.
             * @member {string} consumerLid
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.consumerLid = "";

            /**
             * CloudAPIThreadControlNotification consumerPhoneNumber.
             * @member {string} consumerPhoneNumber
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.consumerPhoneNumber = "";

            /**
             * CloudAPIThreadControlNotification notificationContent.
             * @member {E2E.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent|null|undefined} notificationContent
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.notificationContent = null;

            /**
             * CloudAPIThreadControlNotification shouldSuppressNotification.
             * @member {boolean} shouldSuppressNotification
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.shouldSuppressNotification = false;

            /**
             * 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";
                if (message.status != null && message.hasOwnProperty("status"))
                    switch (message.status) {
                    default:
                        return "status: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.senderNotificationTimestampMs != null && message.hasOwnProperty("senderNotificationTimestampMs"))
                    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"))
                    if (!$util.isString(message.consumerLid))
                        return "consumerLid: string expected";
                if (message.consumerPhoneNumber != null && message.hasOwnProperty("consumerPhoneNumber"))
                    if (!$util.isString(message.consumerPhoneNumber))
                        return "consumerPhoneNumber: string expected";
                if (message.notificationContent != null && message.hasOwnProperty("notificationContent")) {
                    var error = $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.verify(message.notificationContent);
                    if (error)
                        return "notificationContent." + error;
                }
                if (message.shouldSuppressNotification != null && message.hasOwnProperty("shouldSuppressNotification"))
                    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 (options.defaults) {
                    object.status = options.enums === String ? "UNKNOWN" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.senderNotificationTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.senderNotificationTimestampMs = options.longs === String ? "0" : 0;
                    object.consumerLid = "";
                    object.consumerPhoneNumber = "";
                    object.notificationContent = null;
                    object.shouldSuppressNotification = false;
                }
                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 (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 (message.consumerLid != null && message.hasOwnProperty("consumerLid"))
                    object.consumerLid = message.consumerLid;
                if (message.consumerPhoneNumber != null && message.hasOwnProperty("consumerPhoneNumber"))
                    object.consumerPhoneNumber = message.consumerPhoneNumber;
                if (message.notificationContent != null && message.hasOwnProperty("notificationContent"))
                    object.notificationContent = $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.toObject(message.notificationContent, options);
                if (message.shouldSuppressNotification != null && message.hasOwnProperty("shouldSuppressNotification"))
                    object.shouldSuppressNotification = message.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} handoffNotificationText
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @instance
                 */
                CloudAPIThreadControlNotificationContent.prototype.handoffNotificationText = "";

                /**
                 * CloudAPIThreadControlNotificationContent extraJson.
                 * @member {string} extraJson
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @instance
                 */
                CloudAPIThreadControlNotificationContent.prototype.extraJson = "";

                /**
                 * 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";
                    if (message.handoffNotificationText != null && message.hasOwnProperty("handoffNotificationText"))
                        if (!$util.isString(message.handoffNotificationText))
                            return "handoffNotificationText: string expected";
                    if (message.extraJson != null && message.hasOwnProperty("extraJson"))
                        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 (options.defaults) {
                        object.handoffNotificationText = "";
                        object.extraJson = "";
                    }
                    if (message.handoffNotificationText != null && message.hasOwnProperty("handoffNotificationText"))
                        object.handoffNotificationText = message.handoffNotificationText;
                    if (message.extraJson != null && message.hasOwnProperty("extraJson"))
                        object.extraJson = message.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;

            /**
             * 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";
                if (message.message != null && message.hasOwnProperty("message")) {
                    var error = $root.E2E.Message.verify(message.message);
                    if (error)
                        return "message." + error;
                }
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    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 (options.defaults) {
                    object.message = null;
                    object.targetMessageKey = null;
                }
                if (message.message != null && message.hasOwnProperty("message"))
                    object.message = $root.E2E.Message.toObject(message.message, options);
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey"))
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                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} displayName
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            ContactMessage.prototype.displayName = "";

            /**
             * ContactMessage vcard.
             * @member {string} vcard
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            ContactMessage.prototype.vcard = "";

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

            /**
             * 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";
                if (message.displayName != null && message.hasOwnProperty("displayName"))
                    if (!$util.isString(message.displayName))
                        return "displayName: string expected";
                if (message.vcard != null && message.hasOwnProperty("vcard"))
                    if (!$util.isString(message.vcard))
                        return "vcard: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.displayName = "";
                    object.vcard = "";
                    object.contextInfo = null;
                }
                if (message.displayName != null && message.hasOwnProperty("displayName"))
                    object.displayName = message.displayName;
                if (message.vcard != null && message.hasOwnProperty("vcard"))
                    object.vcard = message.vcard;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} displayName
             * @memberof E2E.Message.ContactsArrayMessage
             * @instance
             */
            ContactsArrayMessage.prototype.displayName = "";

            /**
             * 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;

            /**
             * 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";
                if (message.displayName != null && message.hasOwnProperty("displayName"))
                    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")) {
                    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 (options.defaults) {
                    object.displayName = "";
                    object.contextInfo = null;
                }
                if (message.displayName != null && message.hasOwnProperty("displayName"))
                    object.displayName = message.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);
                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;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    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 (options.defaults)
                    object.key = null;
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                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} destinationJid
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            DeviceSentMessage.prototype.destinationJid = "";

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

            /**
             * DeviceSentMessage phash.
             * @member {string} phash
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            DeviceSentMessage.prototype.phash = "";

            /**
             * 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";
                if (message.destinationJid != null && message.hasOwnProperty("destinationJid"))
                    if (!$util.isString(message.destinationJid))
                        return "destinationJid: string expected";
                if (message.message != null && message.hasOwnProperty("message")) {
                    var error = $root.E2E.Message.verify(message.message);
                    if (error)
                        return "message." + error;
                }
                if (message.phash != null && message.hasOwnProperty("phash"))
                    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 (options.defaults) {
                    object.destinationJid = "";
                    object.message = null;
                    object.phash = "";
                }
                if (message.destinationJid != null && message.hasOwnProperty("destinationJid"))
                    object.destinationJid = message.destinationJid;
                if (message.message != null && message.hasOwnProperty("message"))
                    object.message = $root.E2E.Message.toObject(message.message, options);
                if (message.phash != null && message.hasOwnProperty("phash"))
                    object.phash = message.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} url
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.url = "";

            /**
             * DocumentMessage mimetype.
             * @member {string} mimetype
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mimetype = "";

            /**
             * DocumentMessage title.
             * @member {string} title
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.title = "";

            /**
             * DocumentMessage fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * DocumentMessage fileLength.
             * @member {number|Long} fileLength
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DocumentMessage pageCount.
             * @member {number} pageCount
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.pageCount = 0;

            /**
             * DocumentMessage mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mediaKey = $util.newBuffer([]);

            /**
             * DocumentMessage fileName.
             * @member {string} fileName
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileName = "";

            /**
             * DocumentMessage fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * DocumentMessage directPath.
             * @member {string} directPath
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.directPath = "";

            /**
             * DocumentMessage mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * DocumentMessage contactVcard.
             * @member {boolean} contactVcard
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.contactVcard = false;

            /**
             * DocumentMessage thumbnailDirectPath.
             * @member {string} thumbnailDirectPath
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailDirectPath = "";

            /**
             * DocumentMessage thumbnailSha256.
             * @member {Uint8Array} thumbnailSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailSha256 = $util.newBuffer([]);

            /**
             * DocumentMessage thumbnailEncSha256.
             * @member {Uint8Array} thumbnailEncSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]);

            /**
             * DocumentMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.jpegThumbnail = $util.newBuffer([]);

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

            /**
             * DocumentMessage thumbnailHeight.
             * @member {number} thumbnailHeight
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailHeight = 0;

            /**
             * DocumentMessage thumbnailWidth.
             * @member {number} thumbnailWidth
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailWidth = 0;

            /**
             * DocumentMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.caption = "";

            /**
             * DocumentMessage accessibilityLabel.
             * @member {string} accessibilityLabel
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.accessibilityLabel = "";

            /**
             * DocumentMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain} mediaKeyDomain
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mediaKeyDomain = 0;

            /**
             * 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";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                    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"))
                    if (!$util.isInteger(message.pageCount))
                        return "pageCount: integer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.fileName != null && message.hasOwnProperty("fileName"))
                    if (!$util.isString(message.fileName))
                        return "fileName: string expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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"))
                    if (typeof message.contactVcard !== "boolean")
                        return "contactVcard: boolean expected";
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256"))
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256"))
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight"))
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel"))
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain"))
                    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 (options.defaults) {
                    object.url = "";
                    object.mimetype = "";
                    object.title = "";
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    object.pageCount = 0;
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    object.fileName = "";
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    object.directPath = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    object.contactVcard = false;
                    object.thumbnailDirectPath = "";
                    if (options.bytes === String)
                        object.thumbnailSha256 = "";
                    else {
                        object.thumbnailSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256);
                    }
                    if (options.bytes === String)
                        object.thumbnailEncSha256 = "";
                    else {
                        object.thumbnailEncSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256);
                    }
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.contextInfo = null;
                    object.thumbnailHeight = 0;
                    object.thumbnailWidth = 0;
                    object.caption = "";
                    object.accessibilityLabel = "";
                    object.mediaKeyDomain = options.enums === String ? "UNSET" : 0;
                }
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    object.mimetype = message.mimetype;
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.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 (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 (message.pageCount != null && message.hasOwnProperty("pageCount"))
                    object.pageCount = message.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 (message.fileName != null && message.hasOwnProperty("fileName"))
                    object.fileName = message.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 (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.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 (message.contactVcard != null && message.hasOwnProperty("contactVcard"))
                    object.contactVcard = message.contactVcard;
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    object.thumbnailDirectPath = message.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 (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 (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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight"))
                    object.thumbnailHeight = message.thumbnailHeight;
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    object.thumbnailWidth = message.thumbnailWidth;
                if (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.caption;
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel"))
                    object.accessibilityLabel = message.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;
                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} encPayload
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            EncCommentMessage.prototype.encPayload = $util.newBuffer([]);

            /**
             * EncCommentMessage encIv.
             * @member {Uint8Array} encIv
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            EncCommentMessage.prototype.encIv = $util.newBuffer([]);

            /**
             * 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";
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.targetMessageKey);
                    if (error)
                        return "targetMessageKey." + error;
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload"))
                    if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload)))
                        return "encPayload: buffer expected";
                if (message.encIv != null && message.hasOwnProperty("encIv"))
                    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 (options.defaults) {
                    object.targetMessageKey = null;
                    if (options.bytes === String)
                        object.encPayload = "";
                    else {
                        object.encPayload = [];
                        if (options.bytes !== Array)
                            object.encPayload = $util.newBuffer(object.encPayload);
                    }
                    if (options.bytes === String)
                        object.encIv = "";
                    else {
                        object.encIv = [];
                        if (options.bytes !== Array)
                            object.encIv = $util.newBuffer(object.encIv);
                    }
                }
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey"))
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                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 (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;
                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} encPayload
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            EncEventResponseMessage.prototype.encPayload = $util.newBuffer([]);

            /**
             * EncEventResponseMessage encIv.
             * @member {Uint8Array} encIv
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            EncEventResponseMessage.prototype.encIv = $util.newBuffer([]);

            /**
             * 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";
                if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.eventCreationMessageKey);
                    if (error)
                        return "eventCreationMessageKey." + error;
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload"))
                    if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload)))
                        return "encPayload: buffer expected";
                if (message.encIv != null && message.hasOwnProperty("encIv"))
                    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 (options.defaults) {
                    object.eventCreationMessageKey = null;
                    if (options.bytes === String)
                        object.encPayload = "";
                    else {
                        object.encPayload = [];
                        if (options.bytes !== Array)
                            object.encPayload = $util.newBuffer(object.encPayload);
                    }
                    if (options.bytes === String)
                        object.encIv = "";
                    else {
                        object.encIv = [];
                        if (options.bytes !== Array)
                            object.encIv = $util.newBuffer(object.encIv);
                    }
                }
                if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey"))
                    object.eventCreationMessageKey = $root.Protocol.MessageKey.toObject(message.eventCreationMessageKey, options);
                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 (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;
                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} encPayload
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            EncReactionMessage.prototype.encPayload = $util.newBuffer([]);

            /**
             * EncReactionMessage encIv.
             * @member {Uint8Array} encIv
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            EncReactionMessage.prototype.encIv = $util.newBuffer([]);

            /**
             * 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";
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.targetMessageKey);
                    if (error)
                        return "targetMessageKey." + error;
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload"))
                    if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload)))
                        return "encPayload: buffer expected";
                if (message.encIv != null && message.hasOwnProperty("encIv"))
                    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 (options.defaults) {
                    object.targetMessageKey = null;
                    if (options.bytes === String)
                        object.encPayload = "";
                    else {
                        object.encPayload = [];
                        if (options.bytes !== Array)
                            object.encPayload = $util.newBuffer(object.encPayload);
                    }
                    if (options.bytes === String)
                        object.encIv = "";
                    else {
                        object.encIv = [];
                        if (options.bytes !== Array)
                            object.encIv = $util.newBuffer(object.encIv);
                    }
                }
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey"))
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                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 (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;
                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
             */

            /**
             * 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} isCanceled
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.isCanceled = false;

            /**
             * EventMessage name.
             * @member {string} name
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.name = "";

            /**
             * EventMessage description.
             * @member {string} description
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.description = "";

            /**
             * EventMessage location.
             * @member {E2E.Message.ILocationMessage|null|undefined} location
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.location = null;

            /**
             * EventMessage joinLink.
             * @member {string} joinLink
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.joinLink = "";

            /**
             * EventMessage startTime.
             * @member {number|Long} startTime
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * EventMessage endTime.
             * @member {number|Long} endTime
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * EventMessage extraGuestsAllowed.
             * @member {boolean} extraGuestsAllowed
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.extraGuestsAllowed = false;

            /**
             * EventMessage isScheduleCall.
             * @member {boolean} isScheduleCall
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.isScheduleCall = false;

            /**
             * 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);
                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;
                        }
                    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";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.isCanceled != null && message.hasOwnProperty("isCanceled"))
                    if (typeof message.isCanceled !== "boolean")
                        return "isCanceled: boolean expected";
                if (message.name != null && message.hasOwnProperty("name"))
                    if (!$util.isString(message.name))
                        return "name: string expected";
                if (message.description != null && message.hasOwnProperty("description"))
                    if (!$util.isString(message.description))
                        return "description: string expected";
                if (message.location != null && message.hasOwnProperty("location")) {
                    var error = $root.E2E.Message.LocationMessage.verify(message.location);
                    if (error)
                        return "location." + error;
                }
                if (message.joinLink != null && message.hasOwnProperty("joinLink"))
                    if (!$util.isString(message.joinLink))
                        return "joinLink: string expected";
                if (message.startTime != null && message.hasOwnProperty("startTime"))
                    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"))
                    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"))
                    if (typeof message.extraGuestsAllowed !== "boolean")
                        return "extraGuestsAllowed: boolean expected";
                if (message.isScheduleCall != null && message.hasOwnProperty("isScheduleCall"))
                    if (typeof message.isScheduleCall !== "boolean")
                        return "isScheduleCall: boolean 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);
                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 (options.defaults) {
                    object.contextInfo = null;
                    object.isCanceled = false;
                    object.name = "";
                    object.description = "";
                    object.location = null;
                    object.joinLink = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.startTime = options.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.endTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.endTime = options.longs === String ? "0" : 0;
                    object.extraGuestsAllowed = false;
                    object.isScheduleCall = false;
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.isCanceled != null && message.hasOwnProperty("isCanceled"))
                    object.isCanceled = message.isCanceled;
                if (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.name;
                if (message.description != null && message.hasOwnProperty("description"))
                    object.description = message.description;
                if (message.location != null && message.hasOwnProperty("location"))
                    object.location = $root.E2E.Message.LocationMessage.toObject(message.location, options);
                if (message.joinLink != null && message.hasOwnProperty("joinLink"))
                    object.joinLink = message.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 (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 (message.extraGuestsAllowed != null && message.hasOwnProperty("extraGuestsAllowed"))
                    object.extraGuestsAllowed = message.extraGuestsAllowed;
                if (message.isScheduleCall != null && message.hasOwnProperty("isScheduleCall"))
                    object.isScheduleCall = message.isScheduleCall;
                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} response
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            EventResponseMessage.prototype.response = 0;

            /**
             * EventResponseMessage timestampMs.
             * @member {number|Long} timestampMs
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            EventResponseMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * EventResponseMessage extraGuestCount.
             * @member {number} extraGuestCount
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            EventResponseMessage.prototype.extraGuestCount = 0;

            /**
             * 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";
                if (message.response != null && message.hasOwnProperty("response"))
                    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"))
                    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"))
                    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 (options.defaults) {
                    object.response = options.enums === String ? "UNKNOWN" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.timestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.timestampMs = options.longs === String ? "0" : 0;
                    object.extraGuestCount = 0;
                }
                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 (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 (message.extraGuestCount != null && message.hasOwnProperty("extraGuestCount"))
                    object.extraGuestCount = message.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} text
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.text = "";

            /**
             * ExtendedTextMessage matchedText.
             * @member {string} matchedText
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.matchedText = "";

            /**
             * ExtendedTextMessage description.
             * @member {string} description
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.description = "";

            /**
             * ExtendedTextMessage title.
             * @member {string} title
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.title = "";

            /**
             * ExtendedTextMessage textArgb.
             * @member {number} textArgb
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.textArgb = 0;

            /**
             * ExtendedTextMessage backgroundArgb.
             * @member {number} backgroundArgb
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.backgroundArgb = 0;

            /**
             * ExtendedTextMessage font.
             * @member {E2E.Message.ExtendedTextMessage.FontType} font
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.font = 0;

            /**
             * ExtendedTextMessage previewType.
             * @member {E2E.Message.ExtendedTextMessage.PreviewType} previewType
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.previewType = 0;

            /**
             * ExtendedTextMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.jpegThumbnail = $util.newBuffer([]);

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

            /**
             * ExtendedTextMessage doNotPlayInline.
             * @member {boolean} doNotPlayInline
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.doNotPlayInline = false;

            /**
             * ExtendedTextMessage thumbnailDirectPath.
             * @member {string} thumbnailDirectPath
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailDirectPath = "";

            /**
             * ExtendedTextMessage thumbnailSha256.
             * @member {Uint8Array} thumbnailSha256
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailSha256 = $util.newBuffer([]);

            /**
             * ExtendedTextMessage thumbnailEncSha256.
             * @member {Uint8Array} thumbnailEncSha256
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]);

            /**
             * ExtendedTextMessage mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.mediaKey = $util.newBuffer([]);

            /**
             * ExtendedTextMessage mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ExtendedTextMessage thumbnailHeight.
             * @member {number} thumbnailHeight
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailHeight = 0;

            /**
             * ExtendedTextMessage thumbnailWidth.
             * @member {number} thumbnailWidth
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailWidth = 0;

            /**
             * ExtendedTextMessage inviteLinkGroupType.
             * @member {E2E.Message.ExtendedTextMessage.InviteLinkGroupType} inviteLinkGroupType
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkGroupType = 0;

            /**
             * ExtendedTextMessage inviteLinkParentGroupSubjectV2.
             * @member {string} inviteLinkParentGroupSubjectV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = "";

            /**
             * ExtendedTextMessage inviteLinkParentGroupThumbnailV2.
             * @member {Uint8Array} inviteLinkParentGroupThumbnailV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = $util.newBuffer([]);

            /**
             * ExtendedTextMessage inviteLinkGroupTypeV2.
             * @member {E2E.Message.ExtendedTextMessage.InviteLinkGroupType} inviteLinkGroupTypeV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = 0;

            /**
             * ExtendedTextMessage viewOnce.
             * @member {boolean} viewOnce
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.viewOnce = false;

            /**
             * ExtendedTextMessage videoHeight.
             * @member {number} videoHeight
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.videoHeight = 0;

            /**
             * ExtendedTextMessage videoWidth.
             * @member {number} videoWidth
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.videoWidth = 0;

            /**
             * 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} videoContentUrl
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.videoContentUrl = "";

            /**
             * 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;

            /**
             * 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";
                if (message.text != null && message.hasOwnProperty("text"))
                    if (!$util.isString(message.text))
                        return "text: string expected";
                if (message.matchedText != null && message.hasOwnProperty("matchedText"))
                    if (!$util.isString(message.matchedText))
                        return "matchedText: string expected";
                if (message.description != null && message.hasOwnProperty("description"))
                    if (!$util.isString(message.description))
                        return "description: string expected";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.textArgb != null && message.hasOwnProperty("textArgb"))
                    if (!$util.isInteger(message.textArgb))
                        return "textArgb: integer expected";
                if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb"))
                    if (!$util.isInteger(message.backgroundArgb))
                        return "backgroundArgb: integer expected";
                if (message.font != null && message.hasOwnProperty("font"))
                    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"))
                    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"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline"))
                    if (typeof message.doNotPlayInline !== "boolean")
                        return "doNotPlayInline: boolean expected";
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256"))
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256"))
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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"))
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType"))
                    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"))
                    if (!$util.isString(message.inviteLinkParentGroupSubjectV2))
                        return "inviteLinkParentGroupSubjectV2: string expected";
                if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2"))
                    if (!(message.inviteLinkParentGroupThumbnailV2 && typeof message.inviteLinkParentGroupThumbnailV2.length === "number" || $util.isString(message.inviteLinkParentGroupThumbnailV2)))
                        return "inviteLinkParentGroupThumbnailV2: buffer expected";
                if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2"))
                    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"))
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                if (message.videoHeight != null && message.hasOwnProperty("videoHeight"))
                    if (!$util.isInteger(message.videoHeight))
                        return "videoHeight: integer expected";
                if (message.videoWidth != null && message.hasOwnProperty("videoWidth"))
                    if (!$util.isInteger(message.videoWidth))
                        return "videoWidth: integer expected";
                if (message.faviconMMSMetadata != null && message.hasOwnProperty("faviconMMSMetadata")) {
                    var error = $root.E2E.Message.MMSThumbnailMetadata.verify(message.faviconMMSMetadata);
                    if (error)
                        return "faviconMMSMetadata." + error;
                }
                if (message.linkPreviewMetadata != null && message.hasOwnProperty("linkPreviewMetadata")) {
                    var error = $root.E2E.Message.LinkPreviewMetadata.verify(message.linkPreviewMetadata);
                    if (error)
                        return "linkPreviewMetadata." + error;
                }
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata")) {
                    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"))
                    if (!$util.isString(message.videoContentUrl))
                        return "videoContentUrl: string expected";
                if (message.musicMetadata != null && message.hasOwnProperty("musicMetadata")) {
                    var error = $root.E2E.EmbeddedMusic.verify(message.musicMetadata);
                    if (error)
                        return "musicMetadata." + error;
                }
                if (message.paymentExtendedMetadata != null && message.hasOwnProperty("paymentExtendedMetadata")) {
                    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 (options.defaults) {
                    object.text = "";
                    object.matchedText = "";
                    object.description = "";
                    object.title = "";
                    object.textArgb = 0;
                    object.backgroundArgb = 0;
                    object.font = options.enums === String ? "SYSTEM" : 0;
                    object.previewType = options.enums === String ? "NONE" : 0;
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.contextInfo = null;
                    object.doNotPlayInline = false;
                    object.thumbnailDirectPath = "";
                    if (options.bytes === String)
                        object.thumbnailSha256 = "";
                    else {
                        object.thumbnailSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256);
                    }
                    if (options.bytes === String)
                        object.thumbnailEncSha256 = "";
                    else {
                        object.thumbnailEncSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256);
                    }
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    object.thumbnailHeight = 0;
                    object.thumbnailWidth = 0;
                    object.inviteLinkGroupType = options.enums === String ? "DEFAULT" : 0;
                    object.inviteLinkParentGroupSubjectV2 = "";
                    if (options.bytes === String)
                        object.inviteLinkParentGroupThumbnailV2 = "";
                    else {
                        object.inviteLinkParentGroupThumbnailV2 = [];
                        if (options.bytes !== Array)
                            object.inviteLinkParentGroupThumbnailV2 = $util.newBuffer(object.inviteLinkParentGroupThumbnailV2);
                    }
                    object.inviteLinkGroupTypeV2 = options.enums === String ? "DEFAULT" : 0;
                    object.viewOnce = false;
                    object.videoHeight = 0;
                    object.videoWidth = 0;
                    object.faviconMMSMetadata = null;
                    object.linkPreviewMetadata = null;
                    object.paymentLinkMetadata = null;
                    object.videoContentUrl = "";
                    object.musicMetadata = null;
                    object.paymentExtendedMetadata = null;
                }
                if (message.text != null && message.hasOwnProperty("text"))
                    object.text = message.text;
                if (message.matchedText != null && message.hasOwnProperty("matchedText"))
                    object.matchedText = message.matchedText;
                if (message.description != null && message.hasOwnProperty("description"))
                    object.description = message.description;
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.title;
                if (message.textArgb != null && message.hasOwnProperty("textArgb"))
                    object.textArgb = message.textArgb;
                if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb"))
                    object.backgroundArgb = message.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 (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 (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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline"))
                    object.doNotPlayInline = message.doNotPlayInline;
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    object.thumbnailDirectPath = message.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 (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 (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 (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 (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight"))
                    object.thumbnailHeight = message.thumbnailHeight;
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    object.thumbnailWidth = message.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 (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2"))
                    object.inviteLinkParentGroupSubjectV2 = message.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 (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 (message.viewOnce != null && message.hasOwnProperty("viewOnce"))
                    object.viewOnce = message.viewOnce;
                if (message.videoHeight != null && message.hasOwnProperty("videoHeight"))
                    object.videoHeight = message.videoHeight;
                if (message.videoWidth != null && message.hasOwnProperty("videoWidth"))
                    object.videoWidth = message.videoWidth;
                if (message.faviconMMSMetadata != null && message.hasOwnProperty("faviconMMSMetadata"))
                    object.faviconMMSMetadata = $root.E2E.Message.MMSThumbnailMetadata.toObject(message.faviconMMSMetadata, options);
                if (message.linkPreviewMetadata != null && message.hasOwnProperty("linkPreviewMetadata"))
                    object.linkPreviewMetadata = $root.E2E.Message.LinkPreviewMetadata.toObject(message.linkPreviewMetadata, options);
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata"))
                    object.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.toObject(message.paymentLinkMetadata, options);
                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 (message.musicMetadata != null && message.hasOwnProperty("musicMetadata"))
                    object.musicMetadata = $root.E2E.EmbeddedMusic.toObject(message.musicMetadata, options);
                if (message.paymentExtendedMetadata != null && message.hasOwnProperty("paymentExtendedMetadata"))
                    object.paymentExtendedMetadata = $root.E2E.Message.PaymentExtendedMetadata.toObject(message.paymentExtendedMetadata, options);
                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} requestId
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @instance
             */
            FullHistorySyncOnDemandRequestMetadata.prototype.requestId = "";

            /**
             * 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";
                if (message.requestId != null && message.hasOwnProperty("requestId"))
                    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 (options.defaults)
                    object.requestId = "";
                if (message.requestId != null && message.hasOwnProperty("requestId"))
                    object.requestId = message.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;

            /**
             * 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";
                if (message.message != null && message.hasOwnProperty("message")) {
                    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 (options.defaults)
                    object.message = null;
                if (message.message != null && message.hasOwnProperty("message"))
                    object.message = $root.E2E.Message.toObject(message.message, options);
                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} groupJid
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.groupJid = "";

            /**
             * GroupInviteMessage inviteCode.
             * @member {string} inviteCode
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.inviteCode = "";

            /**
             * GroupInviteMessage inviteExpiration.
             * @member {number|Long} inviteExpiration
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * GroupInviteMessage groupName.
             * @member {string} groupName
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.groupName = "";

            /**
             * GroupInviteMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]);

            /**
             * GroupInviteMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.caption = "";

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

            /**
             * GroupInviteMessage groupType.
             * @member {E2E.Message.GroupInviteMessage.GroupType} groupType
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.groupType = 0;

            /**
             * 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";
                if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                    if (!$util.isString(message.groupJid))
                        return "groupJid: string expected";
                if (message.inviteCode != null && message.hasOwnProperty("inviteCode"))
                    if (!$util.isString(message.inviteCode))
                        return "inviteCode: string expected";
                if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration"))
                    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"))
                    if (!$util.isString(message.groupName))
                        return "groupName: string expected";
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.groupType != null && message.hasOwnProperty("groupType"))
                    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 (options.defaults) {
                    object.groupJid = "";
                    object.inviteCode = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.inviteExpiration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.inviteExpiration = options.longs === String ? "0" : 0;
                    object.groupName = "";
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.caption = "";
                    object.contextInfo = null;
                    object.groupType = options.enums === String ? "DEFAULT" : 0;
                }
                if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                    object.groupJid = message.groupJid;
                if (message.inviteCode != null && message.hasOwnProperty("inviteCode"))
                    object.inviteCode = message.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 (message.groupName != null && message.hasOwnProperty("groupName"))
                    object.groupName = message.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 (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.caption;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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;
                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} namespace
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.namespace = "";

            /**
             * HighlyStructuredMessage elementName.
             * @member {string} elementName
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.elementName = "";

            /**
             * HighlyStructuredMessage params.
             * @member {Array.<string>} params
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.params = $util.emptyArray;

            /**
             * HighlyStructuredMessage fallbackLg.
             * @member {string} fallbackLg
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.fallbackLg = "";

            /**
             * HighlyStructuredMessage fallbackLc.
             * @member {string} fallbackLc
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.fallbackLc = "";

            /**
             * HighlyStructuredMessage localizableParams.
             * @member {Array.<E2E.Message.HighlyStructuredMessage.IHSMLocalizableParameter>} localizableParams
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.localizableParams = $util.emptyArray;

            /**
             * HighlyStructuredMessage deterministicLg.
             * @member {string} deterministicLg
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.deterministicLg = "";

            /**
             * HighlyStructuredMessage deterministicLc.
             * @member {string} deterministicLc
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.deterministicLc = "";

            /**
             * HighlyStructuredMessage hydratedHsm.
             * @member {E2E.Message.ITemplateMessage|null|undefined} hydratedHsm
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.hydratedHsm = null;

            /**
             * 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";
                if (message.namespace != null && message.hasOwnProperty("namespace"))
                    if (!$util.isString(message.namespace))
                        return "namespace: string expected";
                if (message.elementName != null && message.hasOwnProperty("elementName"))
                    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"))
                    if (!$util.isString(message.fallbackLg))
                        return "fallbackLg: string expected";
                if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc"))
                    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"))
                    if (!$util.isString(message.deterministicLg))
                        return "deterministicLg: string expected";
                if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc"))
                    if (!$util.isString(message.deterministicLc))
                        return "deterministicLc: string expected";
                if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) {
                    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 (options.defaults) {
                    object.namespace = "";
                    object.elementName = "";
                    object.fallbackLg = "";
                    object.fallbackLc = "";
                    object.deterministicLg = "";
                    object.deterministicLc = "";
                    object.hydratedHsm = null;
                }
                if (message.namespace != null && message.hasOwnProperty("namespace"))
                    object.namespace = message.namespace;
                if (message.elementName != null && message.hasOwnProperty("elementName"))
                    object.elementName = message.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 (message.fallbackLc != null && message.hasOwnProperty("fallbackLc"))
                    object.fallbackLc = message.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 (message.deterministicLc != null && message.hasOwnProperty("deterministicLc"))
                    object.deterministicLc = message.deterministicLc;
                if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm"))
                    object.hydratedHsm = $root.E2E.Message.TemplateMessage.toObject(message.hydratedHsm, options);
                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} default
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @instance
                 */
                HSMLocalizableParameter.prototype["default"] = "";

                /**
                 * 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 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"))
                        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 (options.defaults)
                        object["default"] = "";
                    if (message["default"] != null && message.hasOwnProperty("default"))
                        object["default"] = message["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} currencyCode
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @instance
                     */
                    HSMCurrency.prototype.currencyCode = "";

                    /**
                     * HSMCurrency amount1000.
                     * @member {number|Long} amount1000
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @instance
                     */
                    HSMCurrency.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * 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";
                        if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
                            if (!$util.isString(message.currencyCode))
                                return "currencyCode: string expected";
                        if (message.amount1000 != null && message.hasOwnProperty("amount1000"))
                            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 (options.defaults) {
                            object.currencyCode = "";
                            if ($util.Long) {
                                var long = new $util.Long(0, 0, false);
                                object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                            } else
                                object.amount1000 = options.longs === String ? "0" : 0;
                        }
                        if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
                            object.currencyCode = message.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;
                        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} dayOfWeek
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.dayOfWeek = 1;

                        /**
                         * HSMDateTimeComponent year.
                         * @member {number} year
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.year = 0;

                        /**
                         * HSMDateTimeComponent month.
                         * @member {number} month
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.month = 0;

                        /**
                         * HSMDateTimeComponent dayOfMonth.
                         * @member {number} dayOfMonth
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.dayOfMonth = 0;

                        /**
                         * HSMDateTimeComponent hour.
                         * @member {number} hour
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.hour = 0;

                        /**
                         * HSMDateTimeComponent minute.
                         * @member {number} minute
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.minute = 0;

                        /**
                         * HSMDateTimeComponent calendar.
                         * @member {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType} calendar
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.calendar = 1;

                        /**
                         * 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";
                            if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek"))
                                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"))
                                if (!$util.isInteger(message.year))
                                    return "year: integer expected";
                            if (message.month != null && message.hasOwnProperty("month"))
                                if (!$util.isInteger(message.month))
                                    return "month: integer expected";
                            if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth"))
                                if (!$util.isInteger(message.dayOfMonth))
                                    return "dayOfMonth: integer expected";
                            if (message.hour != null && message.hasOwnProperty("hour"))
                                if (!$util.isInteger(message.hour))
                                    return "hour: integer expected";
                            if (message.minute != null && message.hasOwnProperty("minute"))
                                if (!$util.isInteger(message.minute))
                                    return "minute: integer expected";
                            if (message.calendar != null && message.hasOwnProperty("calendar"))
                                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 (options.defaults) {
                                object.dayOfWeek = options.enums === String ? "MONDAY" : 1;
                                object.year = 0;
                                object.month = 0;
                                object.dayOfMonth = 0;
                                object.hour = 0;
                                object.minute = 0;
                                object.calendar = options.enums === String ? "GREGORIAN" : 1;
                            }
                            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 (message.year != null && message.hasOwnProperty("year"))
                                object.year = message.year;
                            if (message.month != null && message.hasOwnProperty("month"))
                                object.month = message.month;
                            if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth"))
                                object.dayOfMonth = message.dayOfMonth;
                            if (message.hour != null && message.hasOwnProperty("hour"))
                                object.hour = message.hour;
                            if (message.minute != null && message.hasOwnProperty("minute"))
                                object.minute = message.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;
                            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} timestamp
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @instance
                         */
                        HSMDateTimeUnixEpoch.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                        /**
                         * 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";
                            if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                                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 (options.defaults)
                                if ($util.Long) {
                                    var long = new $util.Long(0, 0, false);
                                    object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                                } else
                                    object.timestamp = options.longs === String ? "0" : 0;
                            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;
                            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.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
             */

            /**
             * 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} fileSha256
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * HistorySyncNotification fileLength.
             * @member {number|Long} fileLength
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HistorySyncNotification mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.mediaKey = $util.newBuffer([]);

            /**
             * HistorySyncNotification fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * HistorySyncNotification directPath.
             * @member {string} directPath
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.directPath = "";

            /**
             * HistorySyncNotification syncType.
             * @member {E2E.Message.HistorySyncType} syncType
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.syncType = 0;

            /**
             * HistorySyncNotification chunkOrder.
             * @member {number} chunkOrder
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.chunkOrder = 0;

            /**
             * HistorySyncNotification originalMessageId.
             * @member {string} originalMessageId
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.originalMessageId = "";

            /**
             * HistorySyncNotification progress.
             * @member {number} progress
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.progress = 0;

            /**
             * HistorySyncNotification oldestMsgInChunkTimestampSec.
             * @member {number|Long} oldestMsgInChunkTimestampSec
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.oldestMsgInChunkTimestampSec = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * HistorySyncNotification initialHistBootstrapInlinePayload.
             * @member {Uint8Array} initialHistBootstrapInlinePayload
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.initialHistBootstrapInlinePayload = $util.newBuffer([]);

            /**
             * HistorySyncNotification peerDataRequestSessionId.
             * @member {string} peerDataRequestSessionId
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.peerDataRequestSessionId = "";

            /**
             * HistorySyncNotification fullHistorySyncOnDemandRequestMetadata.
             * @member {E2E.Message.IFullHistorySyncOnDemandRequestMetadata|null|undefined} fullHistorySyncOnDemandRequestMetadata
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fullHistorySyncOnDemandRequestMetadata = null;

            /**
             * HistorySyncNotification encHandle.
             * @member {string} encHandle
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.encHandle = "";

            /**
             * 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);
                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;
                        }
                    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";
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                    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"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.syncType != null && message.hasOwnProperty("syncType"))
                    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:
                        break;
                    }
                if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                    if (!$util.isInteger(message.chunkOrder))
                        return "chunkOrder: integer expected";
                if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId"))
                    if (!$util.isString(message.originalMessageId))
                        return "originalMessageId: string expected";
                if (message.progress != null && message.hasOwnProperty("progress"))
                    if (!$util.isInteger(message.progress))
                        return "progress: integer expected";
                if (message.oldestMsgInChunkTimestampSec != null && message.hasOwnProperty("oldestMsgInChunkTimestampSec"))
                    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"))
                    if (!(message.initialHistBootstrapInlinePayload && typeof message.initialHistBootstrapInlinePayload.length === "number" || $util.isString(message.initialHistBootstrapInlinePayload)))
                        return "initialHistBootstrapInlinePayload: buffer expected";
                if (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId"))
                    if (!$util.isString(message.peerDataRequestSessionId))
                        return "peerDataRequestSessionId: string expected";
                if (message.fullHistorySyncOnDemandRequestMetadata != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestMetadata")) {
                    var error = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.fullHistorySyncOnDemandRequestMetadata);
                    if (error)
                        return "fullHistorySyncOnDemandRequestMetadata." + error;
                }
                if (message.encHandle != null && message.hasOwnProperty("encHandle"))
                    if (!$util.isString(message.encHandle))
                        return "encHandle: string expected";
                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;
                }
                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);
                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 (options.defaults) {
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    object.directPath = "";
                    object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0;
                    object.chunkOrder = 0;
                    object.originalMessageId = "";
                    object.progress = 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.oldestMsgInChunkTimestampSec = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.oldestMsgInChunkTimestampSec = options.longs === String ? "0" : 0;
                    if (options.bytes === String)
                        object.initialHistBootstrapInlinePayload = "";
                    else {
                        object.initialHistBootstrapInlinePayload = [];
                        if (options.bytes !== Array)
                            object.initialHistBootstrapInlinePayload = $util.newBuffer(object.initialHistBootstrapInlinePayload);
                    }
                    object.peerDataRequestSessionId = "";
                    object.fullHistorySyncOnDemandRequestMetadata = null;
                    object.encHandle = "";
                }
                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 (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 (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 (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 (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.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 (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                    object.chunkOrder = message.chunkOrder;
                if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId"))
                    object.originalMessageId = message.originalMessageId;
                if (message.progress != null && message.hasOwnProperty("progress"))
                    object.progress = message.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 (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 (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId"))
                    object.peerDataRequestSessionId = message.peerDataRequestSessionId;
                if (message.fullHistorySyncOnDemandRequestMetadata != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestMetadata"))
                    object.fullHistorySyncOnDemandRequestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.fullHistorySyncOnDemandRequestMetadata, options);
                if (message.encHandle != null && message.hasOwnProperty("encHandle"))
                    object.encHandle = message.encHandle;
                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
         */
        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;
            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} url
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.url = "";

            /**
             * ImageMessage mimetype.
             * @member {string} mimetype
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mimetype = "";

            /**
             * ImageMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.caption = "";

            /**
             * ImageMessage fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * ImageMessage fileLength.
             * @member {number|Long} fileLength
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ImageMessage height.
             * @member {number} height
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.height = 0;

            /**
             * ImageMessage width.
             * @member {number} width
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.width = 0;

            /**
             * ImageMessage mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mediaKey = $util.newBuffer([]);

            /**
             * ImageMessage fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * ImageMessage interactiveAnnotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} interactiveAnnotations
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.interactiveAnnotations = $util.emptyArray;

            /**
             * ImageMessage directPath.
             * @member {string} directPath
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.directPath = "";

            /**
             * ImageMessage mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ImageMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.jpegThumbnail = $util.newBuffer([]);

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

            /**
             * ImageMessage firstScanSidecar.
             * @member {Uint8Array} firstScanSidecar
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.firstScanSidecar = $util.newBuffer([]);

            /**
             * ImageMessage firstScanLength.
             * @member {number} firstScanLength
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.firstScanLength = 0;

            /**
             * ImageMessage experimentGroupId.
             * @member {number} experimentGroupId
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.experimentGroupId = 0;

            /**
             * ImageMessage scansSidecar.
             * @member {Uint8Array} scansSidecar
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.scansSidecar = $util.newBuffer([]);

            /**
             * ImageMessage scanLengths.
             * @member {Array.<number>} scanLengths
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.scanLengths = $util.emptyArray;

            /**
             * ImageMessage midQualityFileSha256.
             * @member {Uint8Array} midQualityFileSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.midQualityFileSha256 = $util.newBuffer([]);

            /**
             * ImageMessage midQualityFileEncSha256.
             * @member {Uint8Array} midQualityFileEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.midQualityFileEncSha256 = $util.newBuffer([]);

            /**
             * ImageMessage viewOnce.
             * @member {boolean} viewOnce
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.viewOnce = false;

            /**
             * ImageMessage thumbnailDirectPath.
             * @member {string} thumbnailDirectPath
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.thumbnailDirectPath = "";

            /**
             * ImageMessage thumbnailSha256.
             * @member {Uint8Array} thumbnailSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.thumbnailSha256 = $util.newBuffer([]);

            /**
             * ImageMessage thumbnailEncSha256.
             * @member {Uint8Array} thumbnailEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]);

            /**
             * ImageMessage staticUrl.
             * @member {string} staticUrl
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.staticUrl = "";

            /**
             * ImageMessage annotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} annotations
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.annotations = $util.emptyArray;

            /**
             * ImageMessage imageSourceType.
             * @member {E2E.Message.ImageMessage.ImageSourceType} imageSourceType
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.imageSourceType = 0;

            /**
             * ImageMessage accessibilityLabel.
             * @member {string} accessibilityLabel
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.accessibilityLabel = "";

            /**
             * ImageMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain} mediaKeyDomain
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mediaKeyDomain = 0;

            /**
             * ImageMessage qrUrl.
             * @member {string} qrUrl
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.qrUrl = "";

            /**
             * 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)
                    for (var i = 0; i < message.scanLengths.length; ++i)
                        writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.scanLengths[i]);
                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";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                    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"))
                    if (!$util.isInteger(message.height))
                        return "height: integer expected";
                if (message.width != null && message.hasOwnProperty("width"))
                    if (!$util.isInteger(message.width))
                        return "width: integer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    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"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar"))
                    if (!(message.firstScanSidecar && typeof message.firstScanSidecar.length === "number" || $util.isString(message.firstScanSidecar)))
                        return "firstScanSidecar: buffer expected";
                if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength"))
                    if (!$util.isInteger(message.firstScanLength))
                        return "firstScanLength: integer expected";
                if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId"))
                    if (!$util.isInteger(message.experimentGroupId))
                        return "experimentGroupId: integer expected";
                if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar"))
                    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"))
                    if (!(message.midQualityFileSha256 && typeof message.midQualityFileSha256.length === "number" || $util.isString(message.midQualityFileSha256)))
                        return "midQualityFileSha256: buffer expected";
                if (message.midQualityFileEncSha256 != null && message.hasOwnProperty("midQualityFileEncSha256"))
                    if (!(message.midQualityFileEncSha256 && typeof message.midQualityFileEncSha256.length === "number" || $util.isString(message.midQualityFileEncSha256)))
                        return "midQualityFileEncSha256: buffer expected";
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce"))
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256"))
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256"))
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                if (message.staticUrl != null && message.hasOwnProperty("staticUrl"))
                    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"))
                    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"))
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain"))
                    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"))
                    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 (options.defaults) {
                    object.url = "";
                    object.mimetype = "";
                    object.caption = "";
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    object.height = 0;
                    object.width = 0;
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    object.directPath = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.contextInfo = null;
                    if (options.bytes === String)
                        object.firstScanSidecar = "";
                    else {
                        object.firstScanSidecar = [];
                        if (options.bytes !== Array)
                            object.firstScanSidecar = $util.newBuffer(object.firstScanSidecar);
                    }
                    object.firstScanLength = 0;
                    object.experimentGroupId = 0;
                    if (options.bytes === String)
                        object.scansSidecar = "";
                    else {
                        object.scansSidecar = [];
                        if (options.bytes !== Array)
                            object.scansSidecar = $util.newBuffer(object.scansSidecar);
                    }
                    if (options.bytes === String)
                        object.midQualityFileSha256 = "";
                    else {
                        object.midQualityFileSha256 = [];
                        if (options.bytes !== Array)
                            object.midQualityFileSha256 = $util.newBuffer(object.midQualityFileSha256);
                    }
                    if (options.bytes === String)
                        object.midQualityFileEncSha256 = "";
                    else {
                        object.midQualityFileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.midQualityFileEncSha256 = $util.newBuffer(object.midQualityFileEncSha256);
                    }
                    object.viewOnce = false;
                    object.thumbnailDirectPath = "";
                    if (options.bytes === String)
                        object.thumbnailSha256 = "";
                    else {
                        object.thumbnailSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256);
                    }
                    if (options.bytes === String)
                        object.thumbnailEncSha256 = "";
                    else {
                        object.thumbnailEncSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256);
                    }
                    object.staticUrl = "";
                    object.imageSourceType = options.enums === String ? "USER_IMAGE" : 0;
                    object.accessibilityLabel = "";
                    object.mediaKeyDomain = options.enums === String ? "UNSET" : 0;
                    object.qrUrl = "";
                }
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    object.mimetype = message.mimetype;
                if (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.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 (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 (message.height != null && message.hasOwnProperty("height"))
                    object.height = message.height;
                if (message.width != null && message.hasOwnProperty("width"))
                    object.width = message.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 (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 (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 (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 (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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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 (message.firstScanLength != null && message.hasOwnProperty("firstScanLength"))
                    object.firstScanLength = message.firstScanLength;
                if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId"))
                    object.experimentGroupId = message.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 (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 (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 (message.viewOnce != null && message.hasOwnProperty("viewOnce"))
                    object.viewOnce = message.viewOnce;
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    object.thumbnailDirectPath = message.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 (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 (message.staticUrl != null && message.hasOwnProperty("staticUrl"))
                    object.staticUrl = message.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 (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel"))
                    object.accessibilityLabel = message.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 (message.qrUrl != null && message.hasOwnProperty("qrUrl"))
                    object.qrUrl = message.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} securityNotificationEnabled
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @instance
             */
            InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = false;

            /**
             * 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";
                if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled"))
                    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 (options.defaults)
                    object.securityNotificationEnabled = false;
                if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled"))
                    object.securityNotificationEnabled = message.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 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")) {
                    var error = $root.E2E.Message.InteractiveMessage.Header.verify(message.header);
                    if (error)
                        return "header." + error;
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    var error = $root.E2E.Message.InteractiveMessage.Body.verify(message.body);
                    if (error)
                        return "body." + error;
                }
                if (message.footer != null && message.hasOwnProperty("footer")) {
                    var error = $root.E2E.Message.InteractiveMessage.Footer.verify(message.footer);
                    if (error)
                        return "footer." + error;
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) {
                    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 (options.defaults) {
                    object.header = null;
                    object.body = null;
                    object.footer = null;
                    object.contextInfo = null;
                    object.urlTrackingMap = null;
                }
                if (message.header != null && message.hasOwnProperty("header"))
                    object.header = $root.E2E.Message.InteractiveMessage.Header.toObject(message.header, options);
                if (message.body != null && message.hasOwnProperty("body"))
                    object.body = $root.E2E.Message.InteractiveMessage.Body.toObject(message.body, options);
                if (message.footer != null && message.hasOwnProperty("footer"))
                    object.footer = $root.E2E.Message.InteractiveMessage.Footer.toObject(message.footer, options);
                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 (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap"))
                    object.urlTrackingMap = $root.E2E.UrlTrackingMap.toObject(message.urlTrackingMap, options);
                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} text
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @instance
                 */
                Body.prototype.text = "";

                /**
                 * 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";
                    if (message.text != null && message.hasOwnProperty("text"))
                        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 (options.defaults)
                        object.text = "";
                    if (message.text != null && message.hasOwnProperty("text"))
                        object.text = message.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} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 */
                CarouselMessage.prototype.messageVersion = 0;

                /**
                 * CarouselMessage carouselCardType.
                 * @member {E2E.Message.InteractiveMessage.CarouselMessage.CarouselCardType} carouselCardType
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 */
                CarouselMessage.prototype.carouselCardType = 0;

                /**
                 * 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";
                    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"))
                        if (!$util.isInteger(message.messageVersion))
                            return "messageVersion: integer expected";
                    if (message.carouselCardType != null && message.hasOwnProperty("carouselCardType"))
                        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 (options.defaults) {
                        object.messageVersion = 0;
                        object.carouselCardType = options.enums === String ? "UNKNOWN" : 0;
                    }
                    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 (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;
                    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} bizJid
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                CollectionMessage.prototype.bizJid = "";

                /**
                 * CollectionMessage id.
                 * @member {string} id
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                CollectionMessage.prototype.id = "";

                /**
                 * CollectionMessage messageVersion.
                 * @member {number} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                CollectionMessage.prototype.messageVersion = 0;

                /**
                 * 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";
                    if (message.bizJid != null && message.hasOwnProperty("bizJid"))
                        if (!$util.isString(message.bizJid))
                            return "bizJid: string expected";
                    if (message.id != null && message.hasOwnProperty("id"))
                        if (!$util.isString(message.id))
                            return "id: string expected";
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion"))
                        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 (options.defaults) {
                        object.bizJid = "";
                        object.id = "";
                        object.messageVersion = 0;
                    }
                    if (message.bizJid != null && message.hasOwnProperty("bizJid"))
                        object.bizJid = message.bizJid;
                    if (message.id != null && message.hasOwnProperty("id"))
                        object.id = message.id;
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion"))
                        object.messageVersion = message.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} text
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Footer.prototype.text = "";

                /**
                 * Footer hasMediaAttachment.
                 * @member {boolean} hasMediaAttachment
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Footer.prototype.hasMediaAttachment = false;

                /**
                 * 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 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"))
                        if (!$util.isString(message.text))
                            return "text: string expected";
                    if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment"))
                        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 (options.defaults) {
                        object.text = "";
                        object.hasMediaAttachment = false;
                    }
                    if (message.text != null && message.hasOwnProperty("text"))
                        object.text = message.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;
                    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} title
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.title = "";

                /**
                 * Header subtitle.
                 * @member {string} subtitle
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.subtitle = "";

                /**
                 * Header hasMediaAttachment.
                 * @member {boolean} hasMediaAttachment
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.hasMediaAttachment = false;

                /**
                 * 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 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"))
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    if (message.subtitle != null && message.hasOwnProperty("subtitle"))
                        if (!$util.isString(message.subtitle))
                            return "subtitle: string expected";
                    if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment"))
                        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 (options.defaults) {
                        object.title = "";
                        object.subtitle = "";
                        object.hasMediaAttachment = false;
                    }
                    if (message.title != null && message.hasOwnProperty("title"))
                        object.title = message.title;
                    if (message.subtitle != null && message.hasOwnProperty("subtitle"))
                        object.subtitle = message.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 (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} messageParamsJson
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 */
                NativeFlowMessage.prototype.messageParamsJson = "";

                /**
                 * NativeFlowMessage messageVersion.
                 * @member {number} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 */
                NativeFlowMessage.prototype.messageVersion = 0;

                /**
                 * 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";
                    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"))
                        if (!$util.isString(message.messageParamsJson))
                            return "messageParamsJson: string expected";
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion"))
                        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 (options.defaults) {
                        object.messageParamsJson = "";
                        object.messageVersion = 0;
                    }
                    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 (message.messageVersion != null && message.hasOwnProperty("messageVersion"))
                        object.messageVersion = message.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} name
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @instance
                     */
                    NativeFlowButton.prototype.name = "";

                    /**
                     * NativeFlowButton buttonParamsJson.
                     * @member {string} buttonParamsJson
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @instance
                     */
                    NativeFlowButton.prototype.buttonParamsJson = "";

                    /**
                     * 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";
                        if (message.name != null && message.hasOwnProperty("name"))
                            if (!$util.isString(message.name))
                                return "name: string expected";
                        if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson"))
                            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 (options.defaults) {
                            object.name = "";
                            object.buttonParamsJson = "";
                        }
                        if (message.name != null && message.hasOwnProperty("name"))
                            object.name = message.name;
                        if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson"))
                            object.buttonParamsJson = message.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} id
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                ShopMessage.prototype.id = "";

                /**
                 * ShopMessage surface.
                 * @member {E2E.Message.InteractiveMessage.ShopMessage.Surface} surface
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                ShopMessage.prototype.surface = 0;

                /**
                 * ShopMessage messageVersion.
                 * @member {number} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                ShopMessage.prototype.messageVersion = 0;

                /**
                 * 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";
                    if (message.id != null && message.hasOwnProperty("id"))
                        if (!$util.isString(message.id))
                            return "id: string expected";
                    if (message.surface != null && message.hasOwnProperty("surface"))
                        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"))
                        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 (options.defaults) {
                        object.id = "";
                        object.surface = options.enums === String ? "UNKNOWN_SURFACE" : 0;
                        object.messageVersion = 0;
                    }
                    if (message.id != null && message.hasOwnProperty("id"))
                        object.id = message.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 (message.messageVersion != null && message.hasOwnProperty("messageVersion"))
                        object.messageVersion = message.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 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")) {
                    var error = $root.E2E.Message.InteractiveResponseMessage.Body.verify(message.body);
                    if (error)
                        return "body." + error;
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.body = null;
                    object.contextInfo = null;
                }
                if (message.body != null && message.hasOwnProperty("body"))
                    object.body = $root.E2E.Message.InteractiveResponseMessage.Body.toObject(message.body, options);
                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);
                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} text
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @instance
                 */
                Body.prototype.text = "";

                /**
                 * Body format.
                 * @member {E2E.Message.InteractiveResponseMessage.Body.Format} format
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @instance
                 */
                Body.prototype.format = 0;

                /**
                 * 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";
                    if (message.text != null && message.hasOwnProperty("text"))
                        if (!$util.isString(message.text))
                            return "text: string expected";
                    if (message.format != null && message.hasOwnProperty("format"))
                        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 (options.defaults) {
                        object.text = "";
                        object.format = options.enums === String ? "DEFAULT" : 0;
                    }
                    if (message.text != null && message.hasOwnProperty("text"))
                        object.text = message.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;
                    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} name
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                NativeFlowResponseMessage.prototype.name = "";

                /**
                 * NativeFlowResponseMessage paramsJson.
                 * @member {string} paramsJson
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                NativeFlowResponseMessage.prototype.paramsJson = "";

                /**
                 * NativeFlowResponseMessage version.
                 * @member {number} version
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                NativeFlowResponseMessage.prototype.version = 0;

                /**
                 * 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";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson"))
                        if (!$util.isString(message.paramsJson))
                            return "paramsJson: string expected";
                    if (message.version != null && message.hasOwnProperty("version"))
                        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 (options.defaults) {
                        object.name = "";
                        object.paramsJson = "";
                        object.version = 0;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson"))
                        object.paramsJson = message.paramsJson;
                    if (message.version != null && message.hasOwnProperty("version"))
                        object.version = message.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} note
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.note = "";

            /**
             * InvoiceMessage token.
             * @member {string} token
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.token = "";

            /**
             * InvoiceMessage attachmentType.
             * @member {E2E.Message.InvoiceMessage.AttachmentType} attachmentType
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentType = 0;

            /**
             * InvoiceMessage attachmentMimetype.
             * @member {string} attachmentMimetype
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentMimetype = "";

            /**
             * InvoiceMessage attachmentMediaKey.
             * @member {Uint8Array} attachmentMediaKey
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentMediaKey = $util.newBuffer([]);

            /**
             * InvoiceMessage attachmentMediaKeyTimestamp.
             * @member {number|Long} attachmentMediaKeyTimestamp
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentMediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * InvoiceMessage attachmentFileSha256.
             * @member {Uint8Array} attachmentFileSha256
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentFileSha256 = $util.newBuffer([]);

            /**
             * InvoiceMessage attachmentFileEncSha256.
             * @member {Uint8Array} attachmentFileEncSha256
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentFileEncSha256 = $util.newBuffer([]);

            /**
             * InvoiceMessage attachmentDirectPath.
             * @member {string} attachmentDirectPath
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentDirectPath = "";

            /**
             * InvoiceMessage attachmentJpegThumbnail.
             * @member {Uint8Array} attachmentJpegThumbnail
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentJpegThumbnail = $util.newBuffer([]);

            /**
             * 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";
                if (message.note != null && message.hasOwnProperty("note"))
                    if (!$util.isString(message.note))
                        return "note: string expected";
                if (message.token != null && message.hasOwnProperty("token"))
                    if (!$util.isString(message.token))
                        return "token: string expected";
                if (message.attachmentType != null && message.hasOwnProperty("attachmentType"))
                    switch (message.attachmentType) {
                    default:
                        return "attachmentType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype"))
                    if (!$util.isString(message.attachmentMimetype))
                        return "attachmentMimetype: string expected";
                if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey"))
                    if (!(message.attachmentMediaKey && typeof message.attachmentMediaKey.length === "number" || $util.isString(message.attachmentMediaKey)))
                        return "attachmentMediaKey: buffer expected";
                if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp"))
                    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"))
                    if (!(message.attachmentFileSha256 && typeof message.attachmentFileSha256.length === "number" || $util.isString(message.attachmentFileSha256)))
                        return "attachmentFileSha256: buffer expected";
                if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256"))
                    if (!(message.attachmentFileEncSha256 && typeof message.attachmentFileEncSha256.length === "number" || $util.isString(message.attachmentFileEncSha256)))
                        return "attachmentFileEncSha256: buffer expected";
                if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath"))
                    if (!$util.isString(message.attachmentDirectPath))
                        return "attachmentDirectPath: string expected";
                if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail"))
                    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 (options.defaults) {
                    object.note = "";
                    object.token = "";
                    object.attachmentType = options.enums === String ? "IMAGE" : 0;
                    object.attachmentMimetype = "";
                    if (options.bytes === String)
                        object.attachmentMediaKey = "";
                    else {
                        object.attachmentMediaKey = [];
                        if (options.bytes !== Array)
                            object.attachmentMediaKey = $util.newBuffer(object.attachmentMediaKey);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.attachmentMediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.attachmentMediaKeyTimestamp = options.longs === String ? "0" : 0;
                    if (options.bytes === String)
                        object.attachmentFileSha256 = "";
                    else {
                        object.attachmentFileSha256 = [];
                        if (options.bytes !== Array)
                            object.attachmentFileSha256 = $util.newBuffer(object.attachmentFileSha256);
                    }
                    if (options.bytes === String)
                        object.attachmentFileEncSha256 = "";
                    else {
                        object.attachmentFileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.attachmentFileEncSha256 = $util.newBuffer(object.attachmentFileEncSha256);
                    }
                    object.attachmentDirectPath = "";
                    if (options.bytes === String)
                        object.attachmentJpegThumbnail = "";
                    else {
                        object.attachmentJpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.attachmentJpegThumbnail = $util.newBuffer(object.attachmentJpegThumbnail);
                    }
                }
                if (message.note != null && message.hasOwnProperty("note"))
                    object.note = message.note;
                if (message.token != null && message.hasOwnProperty("token"))
                    object.token = message.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 (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype"))
                    object.attachmentMimetype = message.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 (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 (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 (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 (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath"))
                    object.attachmentDirectPath = message.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;
                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} keepType
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            KeepInChatMessage.prototype.keepType = 0;

            /**
             * KeepInChatMessage timestampMs.
             * @member {number|Long} timestampMs
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            KeepInChatMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.keepType != null && message.hasOwnProperty("keepType"))
                    switch (message.keepType) {
                    default:
                        return "keepType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs"))
                    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 (options.defaults) {
                    object.key = null;
                    object.keepType = options.enums === String ? "UNKNOWN" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.timestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.timestampMs = options.longs === String ? "0" : 0;
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                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 (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;
                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} fbExperimentId
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.fbExperimentId = 0;

            /**
             * LinkPreviewMetadata linkMediaDuration.
             * @member {number} linkMediaDuration
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.linkMediaDuration = 0;

            /**
             * LinkPreviewMetadata socialMediaPostType.
             * @member {E2E.Message.LinkPreviewMetadata.SocialMediaPostType} socialMediaPostType
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.socialMediaPostType = 0;

            /**
             * LinkPreviewMetadata linkInlineVideoMuted.
             * @member {boolean} linkInlineVideoMuted
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.linkInlineVideoMuted = false;

            /**
             * LinkPreviewMetadata videoContentUrl.
             * @member {string} videoContentUrl
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.videoContentUrl = "";

            /**
             * LinkPreviewMetadata musicMetadata.
             * @member {E2E.IEmbeddedMusic|null|undefined} musicMetadata
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.musicMetadata = null;

            /**
             * LinkPreviewMetadata videoContentCaption.
             * @member {string} videoContentCaption
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.videoContentCaption = "";

            /**
             * 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";
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata")) {
                    var error = $root.E2E.Message.PaymentLinkMetadata.verify(message.paymentLinkMetadata);
                    if (error)
                        return "paymentLinkMetadata." + error;
                }
                if (message.urlMetadata != null && message.hasOwnProperty("urlMetadata")) {
                    var error = $root.E2E.Message.URLMetadata.verify(message.urlMetadata);
                    if (error)
                        return "urlMetadata." + error;
                }
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId"))
                    if (!$util.isInteger(message.fbExperimentId))
                        return "fbExperimentId: integer expected";
                if (message.linkMediaDuration != null && message.hasOwnProperty("linkMediaDuration"))
                    if (!$util.isInteger(message.linkMediaDuration))
                        return "linkMediaDuration: integer expected";
                if (message.socialMediaPostType != null && message.hasOwnProperty("socialMediaPostType"))
                    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"))
                    if (typeof message.linkInlineVideoMuted !== "boolean")
                        return "linkInlineVideoMuted: boolean expected";
                if (message.videoContentUrl != null && message.hasOwnProperty("videoContentUrl"))
                    if (!$util.isString(message.videoContentUrl))
                        return "videoContentUrl: string expected";
                if (message.musicMetadata != null && message.hasOwnProperty("musicMetadata")) {
                    var error = $root.E2E.EmbeddedMusic.verify(message.musicMetadata);
                    if (error)
                        return "musicMetadata." + error;
                }
                if (message.videoContentCaption != null && message.hasOwnProperty("videoContentCaption"))
                    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 (options.defaults) {
                    object.paymentLinkMetadata = null;
                    object.urlMetadata = null;
                    object.fbExperimentId = 0;
                    object.linkMediaDuration = 0;
                    object.socialMediaPostType = options.enums === String ? "NONE" : 0;
                    object.linkInlineVideoMuted = false;
                    object.videoContentUrl = "";
                    object.musicMetadata = null;
                    object.videoContentCaption = "";
                }
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata"))
                    object.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.toObject(message.paymentLinkMetadata, options);
                if (message.urlMetadata != null && message.hasOwnProperty("urlMetadata"))
                    object.urlMetadata = $root.E2E.Message.URLMetadata.toObject(message.urlMetadata, options);
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId"))
                    object.fbExperimentId = message.fbExperimentId;
                if (message.linkMediaDuration != null && message.hasOwnProperty("linkMediaDuration"))
                    object.linkMediaDuration = message.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 (message.linkInlineVideoMuted != null && message.hasOwnProperty("linkInlineVideoMuted"))
                    object.linkInlineVideoMuted = message.linkInlineVideoMuted;
                if (message.videoContentUrl != null && message.hasOwnProperty("videoContentUrl"))
                    object.videoContentUrl = message.videoContentUrl;
                if (message.musicMetadata != null && message.hasOwnProperty("musicMetadata"))
                    object.musicMetadata = $root.E2E.EmbeddedMusic.toObject(message.musicMetadata, options);
                if (message.videoContentCaption != null && message.hasOwnProperty("videoContentCaption"))
                    object.videoContentCaption = message.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} title
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.title = "";

            /**
             * ListMessage description.
             * @member {string} description
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.description = "";

            /**
             * ListMessage buttonText.
             * @member {string} buttonText
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.buttonText = "";

            /**
             * ListMessage listType.
             * @member {E2E.Message.ListMessage.ListType} listType
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.listType = 0;

            /**
             * 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} footerText
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.footerText = "";

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

            /**
             * 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";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.description != null && message.hasOwnProperty("description"))
                    if (!$util.isString(message.description))
                        return "description: string expected";
                if (message.buttonText != null && message.hasOwnProperty("buttonText"))
                    if (!$util.isString(message.buttonText))
                        return "buttonText: string expected";
                if (message.listType != null && message.hasOwnProperty("listType"))
                    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")) {
                    var error = $root.E2E.Message.ListMessage.ProductListInfo.verify(message.productListInfo);
                    if (error)
                        return "productListInfo." + error;
                }
                if (message.footerText != null && message.hasOwnProperty("footerText"))
                    if (!$util.isString(message.footerText))
                        return "footerText: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.title = "";
                    object.description = "";
                    object.buttonText = "";
                    object.listType = options.enums === String ? "UNKNOWN" : 0;
                    object.productListInfo = null;
                    object.footerText = "";
                    object.contextInfo = null;
                }
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.title;
                if (message.description != null && message.hasOwnProperty("description"))
                    object.description = message.description;
                if (message.buttonText != null && message.hasOwnProperty("buttonText"))
                    object.buttonText = message.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 (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 (message.footerText != null && message.hasOwnProperty("footerText"))
                    object.footerText = message.footerText;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} productId
                 * @memberof E2E.Message.ListMessage.Product
                 * @instance
                 */
                Product.prototype.productId = "";

                /**
                 * 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";
                    if (message.productId != null && message.hasOwnProperty("productId"))
                        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 (options.defaults)
                        object.productId = "";
                    if (message.productId != null && message.hasOwnProperty("productId"))
                        object.productId = message.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} productId
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @instance
                 */
                ProductListHeaderImage.prototype.productId = "";

                /**
                 * ProductListHeaderImage jpegThumbnail.
                 * @member {Uint8Array} jpegThumbnail
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @instance
                 */
                ProductListHeaderImage.prototype.jpegThumbnail = $util.newBuffer([]);

                /**
                 * 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";
                    if (message.productId != null && message.hasOwnProperty("productId"))
                        if (!$util.isString(message.productId))
                            return "productId: string expected";
                    if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                        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 (options.defaults) {
                        object.productId = "";
                        if (options.bytes === String)
                            object.jpegThumbnail = "";
                        else {
                            object.jpegThumbnail = [];
                            if (options.bytes !== Array)
                                object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                        }
                    }
                    if (message.productId != null && message.hasOwnProperty("productId"))
                        object.productId = message.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;
                    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} businessOwnerJid
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @instance
                 */
                ProductListInfo.prototype.businessOwnerJid = "";

                /**
                 * 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";
                    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")) {
                        var error = $root.E2E.Message.ListMessage.ProductListHeaderImage.verify(message.headerImage);
                        if (error)
                            return "headerImage." + error;
                    }
                    if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid"))
                        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 (options.defaults) {
                        object.headerImage = null;
                        object.businessOwnerJid = "";
                    }
                    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 (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid"))
                        object.businessOwnerJid = message.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} title
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @instance
                 */
                ProductSection.prototype.title = "";

                /**
                 * ProductSection products.
                 * @member {Array.<E2E.Message.ListMessage.IProduct>} products
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @instance
                 */
                ProductSection.prototype.products = $util.emptyArray;

                /**
                 * 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";
                    if (message.title != null && message.hasOwnProperty("title"))
                        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 (options.defaults)
                        object.title = "";
                    if (message.title != null && message.hasOwnProperty("title"))
                        object.title = message.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} title
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Row.prototype.title = "";

                /**
                 * Row description.
                 * @member {string} description
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Row.prototype.description = "";

                /**
                 * Row rowId.
                 * @member {string} rowId
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Row.prototype.rowId = "";

                /**
                 * 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";
                    if (message.title != null && message.hasOwnProperty("title"))
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    if (message.description != null && message.hasOwnProperty("description"))
                        if (!$util.isString(message.description))
                            return "description: string expected";
                    if (message.rowId != null && message.hasOwnProperty("rowId"))
                        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 (options.defaults) {
                        object.title = "";
                        object.description = "";
                        object.rowId = "";
                    }
                    if (message.title != null && message.hasOwnProperty("title"))
                        object.title = message.title;
                    if (message.description != null && message.hasOwnProperty("description"))
                        object.description = message.description;
                    if (message.rowId != null && message.hasOwnProperty("rowId"))
                        object.rowId = message.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} title
                 * @memberof E2E.Message.ListMessage.Section
                 * @instance
                 */
                Section.prototype.title = "";

                /**
                 * Section rows.
                 * @member {Array.<E2E.Message.ListMessage.IRow>} rows
                 * @memberof E2E.Message.ListMessage.Section
                 * @instance
                 */
                Section.prototype.rows = $util.emptyArray;

                /**
                 * 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";
                    if (message.title != null && message.hasOwnProperty("title"))
                        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 (options.defaults)
                        object.title = "";
                    if (message.title != null && message.hasOwnProperty("title"))
                        object.title = message.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} title
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.title = "";

            /**
             * ListResponseMessage listType.
             * @member {E2E.Message.ListResponseMessage.ListType} listType
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.listType = 0;

            /**
             * 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} description
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.description = "";

            /**
             * 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";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.listType != null && message.hasOwnProperty("listType"))
                    switch (message.listType) {
                    default:
                        return "listType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) {
                    var error = $root.E2E.Message.ListResponseMessage.SingleSelectReply.verify(message.singleSelectReply);
                    if (error)
                        return "singleSelectReply." + error;
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.description != null && message.hasOwnProperty("description"))
                    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 (options.defaults) {
                    object.title = "";
                    object.listType = options.enums === String ? "UNKNOWN" : 0;
                    object.singleSelectReply = null;
                    object.contextInfo = null;
                    object.description = "";
                }
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.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 (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply"))
                    object.singleSelectReply = $root.E2E.Message.ListResponseMessage.SingleSelectReply.toObject(message.singleSelectReply, options);
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.description != null && message.hasOwnProperty("description"))
                    object.description = message.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} selectedRowId
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @instance
                 */
                SingleSelectReply.prototype.selectedRowId = "";

                /**
                 * 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";
                    if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId"))
                        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 (options.defaults)
                        object.selectedRowId = "";
                    if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId"))
                        object.selectedRowId = message.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} degreesLatitude
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.degreesLatitude = 0;

            /**
             * LiveLocationMessage degreesLongitude.
             * @member {number} degreesLongitude
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.degreesLongitude = 0;

            /**
             * LiveLocationMessage accuracyInMeters.
             * @member {number} accuracyInMeters
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.accuracyInMeters = 0;

            /**
             * LiveLocationMessage speedInMps.
             * @member {number} speedInMps
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.speedInMps = 0;

            /**
             * LiveLocationMessage degreesClockwiseFromMagneticNorth.
             * @member {number} degreesClockwiseFromMagneticNorth
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0;

            /**
             * LiveLocationMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.caption = "";

            /**
             * LiveLocationMessage sequenceNumber.
             * @member {number|Long} sequenceNumber
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * LiveLocationMessage timeOffset.
             * @member {number} timeOffset
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.timeOffset = 0;

            /**
             * LiveLocationMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.jpegThumbnail = $util.newBuffer([]);

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

            /**
             * 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";
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude"))
                    if (typeof message.degreesLatitude !== "number")
                        return "degreesLatitude: number expected";
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude"))
                    if (typeof message.degreesLongitude !== "number")
                        return "degreesLongitude: number expected";
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters"))
                    if (!$util.isInteger(message.accuracyInMeters))
                        return "accuracyInMeters: integer expected";
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps"))
                    if (typeof message.speedInMps !== "number")
                        return "speedInMps: number expected";
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth"))
                    if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth))
                        return "degreesClockwiseFromMagneticNorth: integer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
                    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"))
                    if (!$util.isInteger(message.timeOffset))
                        return "timeOffset: integer expected";
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.degreesLatitude = 0;
                    object.degreesLongitude = 0;
                    object.accuracyInMeters = 0;
                    object.speedInMps = 0;
                    object.degreesClockwiseFromMagneticNorth = 0;
                    object.caption = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.sequenceNumber = options.longs === String ? "0" : 0;
                    object.timeOffset = 0;
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.contextInfo = null;
                }
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude"))
                    object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude;
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude"))
                    object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude;
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters"))
                    object.accuracyInMeters = message.accuracyInMeters;
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps"))
                    object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps;
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth"))
                    object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth;
                if (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.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 (message.timeOffset != null && message.hasOwnProperty("timeOffset"))
                    object.timeOffset = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} degreesLatitude
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.degreesLatitude = 0;

            /**
             * LocationMessage degreesLongitude.
             * @member {number} degreesLongitude
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.degreesLongitude = 0;

            /**
             * LocationMessage name.
             * @member {string} name
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.name = "";

            /**
             * LocationMessage address.
             * @member {string} address
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.address = "";

            /**
             * LocationMessage url.
             * @member {string} url
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.url = "";

            /**
             * LocationMessage isLive.
             * @member {boolean} isLive
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.isLive = false;

            /**
             * LocationMessage accuracyInMeters.
             * @member {number} accuracyInMeters
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.accuracyInMeters = 0;

            /**
             * LocationMessage speedInMps.
             * @member {number} speedInMps
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.speedInMps = 0;

            /**
             * LocationMessage degreesClockwiseFromMagneticNorth.
             * @member {number} degreesClockwiseFromMagneticNorth
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0;

            /**
             * LocationMessage comment.
             * @member {string} comment
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.comment = "";

            /**
             * LocationMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.jpegThumbnail = $util.newBuffer([]);

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

            /**
             * 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";
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude"))
                    if (typeof message.degreesLatitude !== "number")
                        return "degreesLatitude: number expected";
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude"))
                    if (typeof message.degreesLongitude !== "number")
                        return "degreesLongitude: number expected";
                if (message.name != null && message.hasOwnProperty("name"))
                    if (!$util.isString(message.name))
                        return "name: string expected";
                if (message.address != null && message.hasOwnProperty("address"))
                    if (!$util.isString(message.address))
                        return "address: string expected";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.isLive != null && message.hasOwnProperty("isLive"))
                    if (typeof message.isLive !== "boolean")
                        return "isLive: boolean expected";
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters"))
                    if (!$util.isInteger(message.accuracyInMeters))
                        return "accuracyInMeters: integer expected";
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps"))
                    if (typeof message.speedInMps !== "number")
                        return "speedInMps: number expected";
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth"))
                    if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth))
                        return "degreesClockwiseFromMagneticNorth: integer expected";
                if (message.comment != null && message.hasOwnProperty("comment"))
                    if (!$util.isString(message.comment))
                        return "comment: string expected";
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.degreesLatitude = 0;
                    object.degreesLongitude = 0;
                    object.name = "";
                    object.address = "";
                    object.url = "";
                    object.isLive = false;
                    object.accuracyInMeters = 0;
                    object.speedInMps = 0;
                    object.degreesClockwiseFromMagneticNorth = 0;
                    object.comment = "";
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.contextInfo = null;
                }
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude"))
                    object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude;
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude"))
                    object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude;
                if (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.name;
                if (message.address != null && message.hasOwnProperty("address"))
                    object.address = message.address;
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                if (message.isLive != null && message.hasOwnProperty("isLive"))
                    object.isLive = message.isLive;
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters"))
                    object.accuracyInMeters = message.accuracyInMeters;
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps"))
                    object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps;
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth"))
                    object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth;
                if (message.comment != null && message.hasOwnProperty("comment"))
                    object.comment = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} thumbnailDirectPath
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailDirectPath = "";

            /**
             * MMSThumbnailMetadata thumbnailSha256.
             * @member {Uint8Array} thumbnailSha256
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailSha256 = $util.newBuffer([]);

            /**
             * MMSThumbnailMetadata thumbnailEncSha256.
             * @member {Uint8Array} thumbnailEncSha256
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailEncSha256 = $util.newBuffer([]);

            /**
             * MMSThumbnailMetadata mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.mediaKey = $util.newBuffer([]);

            /**
             * MMSThumbnailMetadata mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MMSThumbnailMetadata thumbnailHeight.
             * @member {number} thumbnailHeight
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailHeight = 0;

            /**
             * MMSThumbnailMetadata thumbnailWidth.
             * @member {number} thumbnailWidth
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailWidth = 0;

            /**
             * MMSThumbnailMetadata mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain} mediaKeyDomain
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.mediaKeyDomain = 0;

            /**
             * 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";
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256"))
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256"))
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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"))
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain"))
                    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 (options.defaults) {
                    object.thumbnailDirectPath = "";
                    if (options.bytes === String)
                        object.thumbnailSha256 = "";
                    else {
                        object.thumbnailSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256);
                    }
                    if (options.bytes === String)
                        object.thumbnailEncSha256 = "";
                    else {
                        object.thumbnailEncSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256);
                    }
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    object.thumbnailHeight = 0;
                    object.thumbnailWidth = 0;
                    object.mediaKeyDomain = options.enums === String ? "UNSET" : 0;
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    object.thumbnailDirectPath = message.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 (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 (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 (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 (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight"))
                    object.thumbnailHeight = message.thumbnailHeight;
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    object.thumbnailWidth = message.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;
                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} mimetype
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.mimetype = "";

            /**
             * MessageHistoryBundle fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * MessageHistoryBundle mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.mediaKey = $util.newBuffer([]);

            /**
             * MessageHistoryBundle fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * MessageHistoryBundle directPath.
             * @member {string} directPath
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.directPath = "";

            /**
             * MessageHistoryBundle mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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;

            /**
             * 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";
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata")) {
                    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 (options.defaults) {
                    object.mimetype = "";
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    object.directPath = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    object.contextInfo = null;
                    object.messageHistoryMetadata = null;
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    object.mimetype = message.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 (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 (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 (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata"))
                    object.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.toObject(message.messageHistoryMetadata, options);
                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} oldestMessageTimestamp
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             */
            MessageHistoryMetadata.prototype.oldestMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MessageHistoryMetadata messageCount.
             * @member {number|Long} messageCount
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             */
            MessageHistoryMetadata.prototype.messageCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                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"))
                    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"))
                    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 (options.defaults) {
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.oldestMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.oldestMessageTimestamp = options.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.messageCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.messageCount = options.longs === String ? "0" : 0;
                }
                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 (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;
                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;

            /**
             * 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";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata")) {
                    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 (options.defaults) {
                    object.contextInfo = null;
                    object.messageHistoryMetadata = null;
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata"))
                    object.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.toObject(message.messageHistoryMetadata, options);
                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} newsletterJid
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.newsletterJid = "";

            /**
             * NewsletterAdminInviteMessage newsletterName.
             * @member {string} newsletterName
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.newsletterName = "";

            /**
             * NewsletterAdminInviteMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]);

            /**
             * NewsletterAdminInviteMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.caption = "";

            /**
             * NewsletterAdminInviteMessage inviteExpiration.
             * @member {number|Long} inviteExpiration
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

            /**
             * 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";
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid"))
                    if (!$util.isString(message.newsletterJid))
                        return "newsletterJid: string expected";
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName"))
                    if (!$util.isString(message.newsletterName))
                        return "newsletterName: string expected";
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration"))
                    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")) {
                    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 (options.defaults) {
                    object.newsletterJid = "";
                    object.newsletterName = "";
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.caption = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.inviteExpiration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.inviteExpiration = options.longs === String ? "0" : 0;
                    object.contextInfo = null;
                }
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid"))
                    object.newsletterJid = message.newsletterJid;
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName"))
                    object.newsletterName = message.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 (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} newsletterJid
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.newsletterJid = "";

            /**
             * NewsletterFollowerInviteMessage newsletterName.
             * @member {string} newsletterName
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.newsletterName = "";

            /**
             * NewsletterFollowerInviteMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]);

            /**
             * NewsletterFollowerInviteMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.caption = "";

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

            /**
             * 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";
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid"))
                    if (!$util.isString(message.newsletterJid))
                        return "newsletterJid: string expected";
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName"))
                    if (!$util.isString(message.newsletterName))
                        return "newsletterName: string expected";
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.newsletterJid = "";
                    object.newsletterName = "";
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.caption = "";
                    object.contextInfo = null;
                }
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid"))
                    object.newsletterJid = message.newsletterJid;
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName"))
                    object.newsletterName = message.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 (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.caption;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} orderId
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.orderId = "";

            /**
             * OrderMessage thumbnail.
             * @member {Uint8Array} thumbnail
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.thumbnail = $util.newBuffer([]);

            /**
             * OrderMessage itemCount.
             * @member {number} itemCount
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.itemCount = 0;

            /**
             * OrderMessage status.
             * @member {E2E.Message.OrderMessage.OrderStatus} status
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.status = 1;

            /**
             * OrderMessage surface.
             * @member {E2E.Message.OrderMessage.OrderSurface} surface
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.surface = 1;

            /**
             * OrderMessage message.
             * @member {string} message
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.message = "";

            /**
             * OrderMessage orderTitle.
             * @member {string} orderTitle
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.orderTitle = "";

            /**
             * OrderMessage sellerJid.
             * @member {string} sellerJid
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.sellerJid = "";

            /**
             * OrderMessage token.
             * @member {string} token
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.token = "";

            /**
             * OrderMessage totalAmount1000.
             * @member {number|Long} totalAmount1000
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.totalAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * OrderMessage totalCurrencyCode.
             * @member {string} totalCurrencyCode
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.totalCurrencyCode = "";

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

            /**
             * OrderMessage messageVersion.
             * @member {number} messageVersion
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.messageVersion = 0;

            /**
             * OrderMessage orderRequestMessageId.
             * @member {Protocol.IMessageKey|null|undefined} orderRequestMessageId
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.orderRequestMessageId = null;

            /**
             * OrderMessage catalogType.
             * @member {string} catalogType
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.catalogType = "";

            /**
             * 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";
                if (message.orderId != null && message.hasOwnProperty("orderId"))
                    if (!$util.isString(message.orderId))
                        return "orderId: string expected";
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail"))
                    if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail)))
                        return "thumbnail: buffer expected";
                if (message.itemCount != null && message.hasOwnProperty("itemCount"))
                    if (!$util.isInteger(message.itemCount))
                        return "itemCount: integer expected";
                if (message.status != null && message.hasOwnProperty("status"))
                    switch (message.status) {
                    default:
                        return "status: enum value expected";
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                if (message.surface != null && message.hasOwnProperty("surface"))
                    switch (message.surface) {
                    default:
                        return "surface: enum value expected";
                    case 1:
                        break;
                    }
                if (message.message != null && message.hasOwnProperty("message"))
                    if (!$util.isString(message.message))
                        return "message: string expected";
                if (message.orderTitle != null && message.hasOwnProperty("orderTitle"))
                    if (!$util.isString(message.orderTitle))
                        return "orderTitle: string expected";
                if (message.sellerJid != null && message.hasOwnProperty("sellerJid"))
                    if (!$util.isString(message.sellerJid))
                        return "sellerJid: string expected";
                if (message.token != null && message.hasOwnProperty("token"))
                    if (!$util.isString(message.token))
                        return "token: string expected";
                if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000"))
                    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"))
                    if (!$util.isString(message.totalCurrencyCode))
                        return "totalCurrencyCode: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.messageVersion != null && message.hasOwnProperty("messageVersion"))
                    if (!$util.isInteger(message.messageVersion))
                        return "messageVersion: integer expected";
                if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) {
                    var error = $root.Protocol.MessageKey.verify(message.orderRequestMessageId);
                    if (error)
                        return "orderRequestMessageId." + error;
                }
                if (message.catalogType != null && message.hasOwnProperty("catalogType"))
                    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 (options.defaults) {
                    object.orderId = "";
                    if (options.bytes === String)
                        object.thumbnail = "";
                    else {
                        object.thumbnail = [];
                        if (options.bytes !== Array)
                            object.thumbnail = $util.newBuffer(object.thumbnail);
                    }
                    object.itemCount = 0;
                    object.status = options.enums === String ? "INQUIRY" : 1;
                    object.surface = options.enums === String ? "CATALOG" : 1;
                    object.message = "";
                    object.orderTitle = "";
                    object.sellerJid = "";
                    object.token = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.totalAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.totalAmount1000 = options.longs === String ? "0" : 0;
                    object.totalCurrencyCode = "";
                    object.messageVersion = 0;
                    object.orderRequestMessageId = null;
                    object.catalogType = "";
                    object.contextInfo = null;
                }
                if (message.orderId != null && message.hasOwnProperty("orderId"))
                    object.orderId = message.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 (message.itemCount != null && message.hasOwnProperty("itemCount"))
                    object.itemCount = message.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 (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 (message.message != null && message.hasOwnProperty("message"))
                    object.message = message.message;
                if (message.orderTitle != null && message.hasOwnProperty("orderTitle"))
                    object.orderTitle = message.orderTitle;
                if (message.sellerJid != null && message.hasOwnProperty("sellerJid"))
                    object.sellerJid = message.sellerJid;
                if (message.token != null && message.hasOwnProperty("token"))
                    object.token = message.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 (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode"))
                    object.totalCurrencyCode = message.totalCurrencyCode;
                if (message.messageVersion != null && message.hasOwnProperty("messageVersion"))
                    object.messageVersion = message.messageVersion;
                if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId"))
                    object.orderRequestMessageId = $root.Protocol.MessageKey.toObject(message.orderRequestMessageId, options);
                if (message.catalogType != null && message.hasOwnProperty("catalogType"))
                    object.catalogType = message.catalogType;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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
             * @property {string|null} [messageParamsJson] PaymentExtendedMetadata messageParamsJson
             */

            /**
             * 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} type
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             */
            PaymentExtendedMetadata.prototype.type = 0;

            /**
             * PaymentExtendedMetadata platform.
             * @member {string} platform
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             */
            PaymentExtendedMetadata.prototype.platform = "";

            /**
             * PaymentExtendedMetadata messageParamsJson.
             * @member {string} messageParamsJson
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             */
            PaymentExtendedMetadata.prototype.messageParamsJson = "";

            /**
             * 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);
                if (message.messageParamsJson != null && Object.hasOwnProperty.call(message, "messageParamsJson"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageParamsJson);
                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;
                        }
                    case 3: {
                            message.messageParamsJson = 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";
                if (message.type != null && message.hasOwnProperty("type"))
                    if (!$util.isInteger(message.type))
                        return "type: integer expected";
                if (message.platform != null && message.hasOwnProperty("platform"))
                    if (!$util.isString(message.platform))
                        return "platform: string expected";
                if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson"))
                    if (!$util.isString(message.messageParamsJson))
                        return "messageParamsJson: 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);
                if (object.messageParamsJson != null)
                    message.messageParamsJson = String(object.messageParamsJson);
                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 (options.defaults) {
                    object.type = 0;
                    object.platform = "";
                    object.messageParamsJson = "";
                }
                if (message.type != null && message.hasOwnProperty("type"))
                    object.type = message.type;
                if (message.platform != null && message.hasOwnProperty("platform"))
                    object.platform = message.platform;
                if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson"))
                    object.messageParamsJson = message.messageParamsJson;
                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} serviceType
             * @memberof E2E.Message.PaymentInviteMessage
             * @instance
             */
            PaymentInviteMessage.prototype.serviceType = 0;

            /**
             * PaymentInviteMessage expiryTimestamp.
             * @member {number|Long} expiryTimestamp
             * @memberof E2E.Message.PaymentInviteMessage
             * @instance
             */
            PaymentInviteMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                if (message.serviceType != null && message.hasOwnProperty("serviceType"))
                    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"))
                    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 (options.defaults) {
                    object.serviceType = options.enums === String ? "UNKNOWN" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.expiryTimestamp = options.longs === String ? "0" : 0;
                }
                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 (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;
                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;

            /**
             * 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";
                if (message.button != null && message.hasOwnProperty("button")) {
                    var error = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton.verify(message.button);
                    if (error)
                        return "button." + error;
                }
                if (message.header != null && message.hasOwnProperty("header")) {
                    var error = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.verify(message.header);
                    if (error)
                        return "header." + error;
                }
                if (message.provider != null && message.hasOwnProperty("provider")) {
                    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 (options.defaults) {
                    object.button = null;
                    object.header = null;
                    object.provider = null;
                }
                if (message.button != null && message.hasOwnProperty("button"))
                    object.button = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton.toObject(message.button, options);
                if (message.header != null && message.hasOwnProperty("header"))
                    object.header = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.toObject(message.header, options);
                if (message.provider != null && message.hasOwnProperty("provider"))
                    object.provider = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.toObject(message.provider, options);
                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} displayText
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @instance
                 */
                PaymentLinkButton.prototype.displayText = "";

                /**
                 * 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";
                    if (message.displayText != null && message.hasOwnProperty("displayText"))
                        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 (options.defaults)
                        object.displayText = "";
                    if (message.displayText != null && message.hasOwnProperty("displayText"))
                        object.displayText = message.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} headerType
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @instance
                 */
                PaymentLinkHeader.prototype.headerType = 0;

                /**
                 * 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";
                    if (message.headerType != null && message.hasOwnProperty("headerType"))
                        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 (options.defaults)
                        object.headerType = options.enums === String ? "LINK_PREVIEW" : 0;
                    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;
                    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} paramsJson
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @instance
                 */
                PaymentLinkProvider.prototype.paramsJson = "";

                /**
                 * 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";
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson"))
                        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 (options.defaults)
                        object.paramsJson = "";
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson"))
                        object.paramsJson = message.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} peerDataOperationRequestType
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.peerDataOperationRequestType = 0;

            /**
             * 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;

            /**
             * 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";
                if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType"))
                    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")) {
                    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")) {
                    var error = $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify(message.fullHistorySyncOnDemandRequest);
                    if (error)
                        return "fullHistorySyncOnDemandRequest." + error;
                }
                if (message.syncdCollectionFatalRecoveryRequest != null && message.hasOwnProperty("syncdCollectionFatalRecoveryRequest")) {
                    var error = $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.verify(message.syncdCollectionFatalRecoveryRequest);
                    if (error)
                        return "syncdCollectionFatalRecoveryRequest." + error;
                }
                if (message.historySyncChunkRetryRequest != null && message.hasOwnProperty("historySyncChunkRetryRequest")) {
                    var error = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.verify(message.historySyncChunkRetryRequest);
                    if (error)
                        return "historySyncChunkRetryRequest." + error;
                }
                if (message.galaxyFlowAction != null && message.hasOwnProperty("galaxyFlowAction")) {
                    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 (options.defaults) {
                    object.peerDataOperationRequestType = options.enums === String ? "UPLOAD_STICKER" : 0;
                    object.historySyncOnDemandRequest = null;
                    object.fullHistorySyncOnDemandRequest = null;
                    object.syncdCollectionFatalRecoveryRequest = null;
                    object.historySyncChunkRetryRequest = null;
                    object.galaxyFlowAction = null;
                }
                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 (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 (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 (message.syncdCollectionFatalRecoveryRequest != null && message.hasOwnProperty("syncdCollectionFatalRecoveryRequest"))
                    object.syncdCollectionFatalRecoveryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.toObject(message.syncdCollectionFatalRecoveryRequest, options);
                if (message.historySyncChunkRetryRequest != null && message.hasOwnProperty("historySyncChunkRetryRequest"))
                    object.historySyncChunkRetryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.toObject(message.historySyncChunkRetryRequest, options);
                if (message.galaxyFlowAction != null && message.hasOwnProperty("galaxyFlowAction"))
                    object.galaxyFlowAction = $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.toObject(message.galaxyFlowAction, options);
                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;

                /**
                 * 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";
                    if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) {
                        var error = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.requestMetadata);
                        if (error)
                            return "requestMetadata." + error;
                    }
                    if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) {
                        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 (options.defaults) {
                        object.requestMetadata = null;
                        object.historySyncConfig = null;
                    }
                    if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata"))
                        object.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.requestMetadata, options);
                    if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig"))
                        object.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options);
                    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} type GalaxyFlowAction type
                 * @property {string} flowId GalaxyFlowAction flowId
                 * @property {string} 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} type
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                GalaxyFlowAction.prototype.type = 1;

                /**
                 * GalaxyFlowAction flowId.
                 * @member {string} flowId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                GalaxyFlowAction.prototype.flowId = "";

                /**
                 * GalaxyFlowAction stanzaId.
                 * @member {string} stanzaId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                GalaxyFlowAction.prototype.stanzaId = "";

                /**
                 * 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();
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowId);
                    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;
                        }
                    }
                    if (!message.hasOwnProperty("type"))
                        throw $util.ProtocolError("missing required 'type'", { instance: message });
                    if (!message.hasOwnProperty("flowId"))
                        throw $util.ProtocolError("missing required 'flowId'", { instance: message });
                    if (!message.hasOwnProperty("stanzaId"))
                        throw $util.ProtocolError("missing required 'stanzaId'", { instance: message });
                    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";
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 1:
                        break;
                    }
                    if (!$util.isString(message.flowId))
                        return "flowId: string expected";
                    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 (options.defaults) {
                        object.type = options.enums === String ? "NOTIFY_LAUNCH" : 1;
                        object.flowId = "";
                        object.stanzaId = "";
                    }
                    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 (message.flowId != null && message.hasOwnProperty("flowId"))
                        object.flowId = message.flowId;
                    if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                        object.stanzaId = message.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} syncType
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.syncType = 0;

                /**
                 * HistorySyncChunkRetryRequest chunkOrder.
                 * @member {number} chunkOrder
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.chunkOrder = 0;

                /**
                 * HistorySyncChunkRetryRequest chunkNotificationId.
                 * @member {string} chunkNotificationId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.chunkNotificationId = "";

                /**
                 * HistorySyncChunkRetryRequest regenerateChunk.
                 * @member {boolean} regenerateChunk
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.regenerateChunk = false;

                /**
                 * 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";
                    if (message.syncType != null && message.hasOwnProperty("syncType"))
                        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:
                            break;
                        }
                    if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                        if (!$util.isInteger(message.chunkOrder))
                            return "chunkOrder: integer expected";
                    if (message.chunkNotificationId != null && message.hasOwnProperty("chunkNotificationId"))
                        if (!$util.isString(message.chunkNotificationId))
                            return "chunkNotificationId: string expected";
                    if (message.regenerateChunk != null && message.hasOwnProperty("regenerateChunk"))
                        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;
                    }
                    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 (options.defaults) {
                        object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0;
                        object.chunkOrder = 0;
                        object.chunkNotificationId = "";
                        object.regenerateChunk = false;
                    }
                    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 (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                        object.chunkOrder = message.chunkOrder;
                    if (message.chunkNotificationId != null && message.hasOwnProperty("chunkNotificationId"))
                        object.chunkNotificationId = message.chunkNotificationId;
                    if (message.regenerateChunk != null && message.hasOwnProperty("regenerateChunk"))
                        object.regenerateChunk = message.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} chatJid
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.chatJid = "";

                /**
                 * HistorySyncOnDemandRequest oldestMsgId.
                 * @member {string} oldestMsgId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.oldestMsgId = "";

                /**
                 * HistorySyncOnDemandRequest oldestMsgFromMe.
                 * @member {boolean} oldestMsgFromMe
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.oldestMsgFromMe = false;

                /**
                 * HistorySyncOnDemandRequest onDemandMsgCount.
                 * @member {number} onDemandMsgCount
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.onDemandMsgCount = 0;

                /**
                 * HistorySyncOnDemandRequest oldestMsgTimestampMs.
                 * @member {number|Long} oldestMsgTimestampMs
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.oldestMsgTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * HistorySyncOnDemandRequest accountLid.
                 * @member {string} accountLid
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.accountLid = "";

                /**
                 * 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";
                    if (message.chatJid != null && message.hasOwnProperty("chatJid"))
                        if (!$util.isString(message.chatJid))
                            return "chatJid: string expected";
                    if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId"))
                        if (!$util.isString(message.oldestMsgId))
                            return "oldestMsgId: string expected";
                    if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe"))
                        if (typeof message.oldestMsgFromMe !== "boolean")
                            return "oldestMsgFromMe: boolean expected";
                    if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount"))
                        if (!$util.isInteger(message.onDemandMsgCount))
                            return "onDemandMsgCount: integer expected";
                    if (message.oldestMsgTimestampMs != null && message.hasOwnProperty("oldestMsgTimestampMs"))
                        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"))
                        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 (options.defaults) {
                        object.chatJid = "";
                        object.oldestMsgId = "";
                        object.oldestMsgFromMe = false;
                        object.onDemandMsgCount = 0;
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.oldestMsgTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.oldestMsgTimestampMs = options.longs === String ? "0" : 0;
                        object.accountLid = "";
                    }
                    if (message.chatJid != null && message.hasOwnProperty("chatJid"))
                        object.chatJid = message.chatJid;
                    if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId"))
                        object.oldestMsgId = message.oldestMsgId;
                    if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe"))
                        object.oldestMsgFromMe = message.oldestMsgFromMe;
                    if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount"))
                        object.onDemandMsgCount = message.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 (message.accountLid != null && message.hasOwnProperty("accountLid"))
                        object.accountLid = message.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;

                /**
                 * 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";
                    if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                        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 (options.defaults)
                        object.messageKey = null;
                    if (message.messageKey != null && message.hasOwnProperty("messageKey"))
                        object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
                    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} fileSha256
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @instance
                 */
                RequestStickerReupload.prototype.fileSha256 = "";

                /**
                 * 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";
                    if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                        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 (options.defaults)
                        object.fileSha256 = "";
                    if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                        object.fileSha256 = message.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} url
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @instance
                 */
                RequestUrlPreview.prototype.url = "";

                /**
                 * RequestUrlPreview includeHqThumbnail.
                 * @member {boolean} includeHqThumbnail
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @instance
                 */
                RequestUrlPreview.prototype.includeHqThumbnail = false;

                /**
                 * 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";
                    if (message.url != null && message.hasOwnProperty("url"))
                        if (!$util.isString(message.url))
                            return "url: string expected";
                    if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail"))
                        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 (options.defaults) {
                        object.url = "";
                        object.includeHqThumbnail = false;
                    }
                    if (message.url != null && message.hasOwnProperty("url"))
                        object.url = message.url;
                    if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail"))
                        object.includeHqThumbnail = message.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} collectionName
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @instance
                 */
                SyncDCollectionFatalRecoveryRequest.prototype.collectionName = "";

                /**
                 * SyncDCollectionFatalRecoveryRequest timestamp.
                 * @member {number|Long} timestamp
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @instance
                 */
                SyncDCollectionFatalRecoveryRequest.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * 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";
                    if (message.collectionName != null && message.hasOwnProperty("collectionName"))
                        if (!$util.isString(message.collectionName))
                            return "collectionName: string expected";
                    if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                        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 (options.defaults) {
                        object.collectionName = "";
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.timestamp = options.longs === String ? "0" : 0;
                    }
                    if (message.collectionName != null && message.hasOwnProperty("collectionName"))
                        object.collectionName = message.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;
                    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} peerDataOperationRequestType
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            PeerDataOperationRequestResponseMessage.prototype.peerDataOperationRequestType = 0;

            /**
             * PeerDataOperationRequestResponseMessage stanzaId.
             * @member {string} stanzaId
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            PeerDataOperationRequestResponseMessage.prototype.stanzaId = "";

            /**
             * PeerDataOperationRequestResponseMessage peerDataOperationResult.
             * @member {Array.<E2E.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult>} peerDataOperationResult
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            PeerDataOperationRequestResponseMessage.prototype.peerDataOperationResult = $util.emptyArray;

            /**
             * 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";
                if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType"))
                    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"))
                    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 (options.defaults) {
                    object.peerDataOperationRequestType = options.enums === String ? "UPLOAD_STICKER" : 0;
                    object.stanzaId = "";
                }
                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 (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                    object.stanzaId = message.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} mediaUploadResult
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.mediaUploadResult = 0;

                /**
                 * 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;

                /**
                 * 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";
                    if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult"))
                        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")) {
                        var error = $root.E2E.Message.StickerMessage.verify(message.stickerMessage);
                        if (error)
                            return "stickerMessage." + error;
                    }
                    if (message.linkPreviewResponse != null && message.hasOwnProperty("linkPreviewResponse")) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.verify(message.linkPreviewResponse);
                        if (error)
                            return "linkPreviewResponse." + error;
                    }
                    if (message.placeholderMessageResendResponse != null && message.hasOwnProperty("placeholderMessageResendResponse")) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.verify(message.placeholderMessageResendResponse);
                        if (error)
                            return "placeholderMessageResendResponse." + error;
                    }
                    if (message.waffleNonceFetchRequestResponse != null && message.hasOwnProperty("waffleNonceFetchRequestResponse")) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify(message.waffleNonceFetchRequestResponse);
                        if (error)
                            return "waffleNonceFetchRequestResponse." + error;
                    }
                    if (message.fullHistorySyncOnDemandRequestResponse != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestResponse")) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify(message.fullHistorySyncOnDemandRequestResponse);
                        if (error)
                            return "fullHistorySyncOnDemandRequestResponse." + error;
                    }
                    if (message.companionMetaNonceFetchRequestResponse != null && message.hasOwnProperty("companionMetaNonceFetchRequestResponse")) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify(message.companionMetaNonceFetchRequestResponse);
                        if (error)
                            return "companionMetaNonceFetchRequestResponse." + error;
                    }
                    if (message.syncdSnapshotFatalRecoveryResponse != null && message.hasOwnProperty("syncdSnapshotFatalRecoveryResponse")) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.verify(message.syncdSnapshotFatalRecoveryResponse);
                        if (error)
                            return "syncdSnapshotFatalRecoveryResponse." + error;
                    }
                    if (message.companionCanonicalUserNonceFetchRequestResponse != null && message.hasOwnProperty("companionCanonicalUserNonceFetchRequestResponse")) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.verify(message.companionCanonicalUserNonceFetchRequestResponse);
                        if (error)
                            return "companionCanonicalUserNonceFetchRequestResponse." + error;
                    }
                    if (message.historySyncChunkRetryResponse != null && message.hasOwnProperty("historySyncChunkRetryResponse")) {
                        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 (options.defaults) {
                        object.mediaUploadResult = options.enums === String ? "GENERAL_ERROR" : 0;
                        object.stickerMessage = null;
                        object.linkPreviewResponse = null;
                        object.placeholderMessageResendResponse = null;
                        object.waffleNonceFetchRequestResponse = null;
                        object.fullHistorySyncOnDemandRequestResponse = null;
                        object.companionMetaNonceFetchRequestResponse = null;
                        object.syncdSnapshotFatalRecoveryResponse = null;
                        object.companionCanonicalUserNonceFetchRequestResponse = null;
                        object.historySyncChunkRetryResponse = null;
                    }
                    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 (message.stickerMessage != null && message.hasOwnProperty("stickerMessage"))
                        object.stickerMessage = $root.E2E.Message.StickerMessage.toObject(message.stickerMessage, options);
                    if (message.linkPreviewResponse != null && message.hasOwnProperty("linkPreviewResponse"))
                        object.linkPreviewResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.toObject(message.linkPreviewResponse, options);
                    if (message.placeholderMessageResendResponse != null && message.hasOwnProperty("placeholderMessageResendResponse"))
                        object.placeholderMessageResendResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.toObject(message.placeholderMessageResendResponse, options);
                    if (message.waffleNonceFetchRequestResponse != null && message.hasOwnProperty("waffleNonceFetchRequestResponse"))
                        object.waffleNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.toObject(message.waffleNonceFetchRequestResponse, options);
                    if (message.fullHistorySyncOnDemandRequestResponse != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestResponse"))
                        object.fullHistorySyncOnDemandRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.toObject(message.fullHistorySyncOnDemandRequestResponse, options);
                    if (message.companionMetaNonceFetchRequestResponse != null && message.hasOwnProperty("companionMetaNonceFetchRequestResponse"))
                        object.companionMetaNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.toObject(message.companionMetaNonceFetchRequestResponse, options);
                    if (message.syncdSnapshotFatalRecoveryResponse != null && message.hasOwnProperty("syncdSnapshotFatalRecoveryResponse"))
                        object.syncdSnapshotFatalRecoveryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.toObject(message.syncdSnapshotFatalRecoveryResponse, options);
                    if (message.companionCanonicalUserNonceFetchRequestResponse != null && message.hasOwnProperty("companionCanonicalUserNonceFetchRequestResponse"))
                        object.companionCanonicalUserNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.toObject(message.companionCanonicalUserNonceFetchRequestResponse, options);
                    if (message.historySyncChunkRetryResponse != null && message.hasOwnProperty("historySyncChunkRetryResponse"))
                        object.historySyncChunkRetryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.toObject(message.historySyncChunkRetryResponse, options);
                    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} nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    CompanionCanonicalUserNonceFetchResponse.prototype.nonce = "";

                    /**
                     * CompanionCanonicalUserNonceFetchResponse waFbid.
                     * @member {string} waFbid
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    CompanionCanonicalUserNonceFetchResponse.prototype.waFbid = "";

                    /**
                     * CompanionCanonicalUserNonceFetchResponse forceRefresh.
                     * @member {boolean} forceRefresh
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    CompanionCanonicalUserNonceFetchResponse.prototype.forceRefresh = false;

                    /**
                     * 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";
                        if (message.nonce != null && message.hasOwnProperty("nonce"))
                            if (!$util.isString(message.nonce))
                                return "nonce: string expected";
                        if (message.waFbid != null && message.hasOwnProperty("waFbid"))
                            if (!$util.isString(message.waFbid))
                                return "waFbid: string expected";
                        if (message.forceRefresh != null && message.hasOwnProperty("forceRefresh"))
                            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 (options.defaults) {
                            object.nonce = "";
                            object.waFbid = "";
                            object.forceRefresh = false;
                        }
                        if (message.nonce != null && message.hasOwnProperty("nonce"))
                            object.nonce = message.nonce;
                        if (message.waFbid != null && message.hasOwnProperty("waFbid"))
                            object.waFbid = message.waFbid;
                        if (message.forceRefresh != null && message.hasOwnProperty("forceRefresh"))
                            object.forceRefresh = message.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} nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @instance
                     */
                    CompanionMetaNonceFetchResponse.prototype.nonce = "";

                    /**
                     * 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";
                        if (message.nonce != null && message.hasOwnProperty("nonce"))
                            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 (options.defaults)
                            object.nonce = "";
                        if (message.nonce != null && message.hasOwnProperty("nonce"))
                            object.nonce = message.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} responseCode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @instance
                     */
                    FullHistorySyncOnDemandRequestResponse.prototype.responseCode = 0;

                    /**
                     * 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";
                        if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) {
                            var error = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.requestMetadata);
                            if (error)
                                return "requestMetadata." + error;
                        }
                        if (message.responseCode != null && message.hasOwnProperty("responseCode"))
                            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 (options.defaults) {
                            object.requestMetadata = null;
                            object.responseCode = options.enums === String ? "REQUEST_SUCCESS" : 0;
                        }
                        if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata"))
                            object.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.requestMetadata, options);
                        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;
                        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} syncType
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.syncType = 0;

                    /**
                     * HistorySyncChunkRetryResponse chunkOrder.
                     * @member {number} chunkOrder
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.chunkOrder = 0;

                    /**
                     * HistorySyncChunkRetryResponse requestId.
                     * @member {string} requestId
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.requestId = "";

                    /**
                     * HistorySyncChunkRetryResponse responseCode.
                     * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode} responseCode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.responseCode = 1;

                    /**
                     * HistorySyncChunkRetryResponse canRecover.
                     * @member {boolean} canRecover
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.canRecover = false;

                    /**
                     * 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";
                        if (message.syncType != null && message.hasOwnProperty("syncType"))
                            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:
                                break;
                            }
                        if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                            if (!$util.isInteger(message.chunkOrder))
                                return "chunkOrder: integer expected";
                        if (message.requestId != null && message.hasOwnProperty("requestId"))
                            if (!$util.isString(message.requestId))
                                return "requestId: string expected";
                        if (message.responseCode != null && message.hasOwnProperty("responseCode"))
                            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"))
                            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;
                        }
                        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 (options.defaults) {
                            object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0;
                            object.chunkOrder = 0;
                            object.requestId = "";
                            object.responseCode = options.enums === String ? "GENERATION_ERROR" : 1;
                            object.canRecover = false;
                        }
                        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 (message.chunkOrder != null && message.hasOwnProperty("chunkOrder"))
                            object.chunkOrder = message.chunkOrder;
                        if (message.requestId != null && message.hasOwnProperty("requestId"))
                            object.requestId = message.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 (message.canRecover != null && message.hasOwnProperty("canRecover"))
                            object.canRecover = message.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} url
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.url = "";

                    /**
                     * LinkPreviewResponse title.
                     * @member {string} title
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.title = "";

                    /**
                     * LinkPreviewResponse description.
                     * @member {string} description
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.description = "";

                    /**
                     * LinkPreviewResponse thumbData.
                     * @member {Uint8Array} thumbData
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.thumbData = $util.newBuffer([]);

                    /**
                     * LinkPreviewResponse matchText.
                     * @member {string} matchText
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.matchText = "";

                    /**
                     * LinkPreviewResponse previewType.
                     * @member {string} previewType
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.previewType = "";

                    /**
                     * 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;

                    /**
                     * 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";
                        if (message.url != null && message.hasOwnProperty("url"))
                            if (!$util.isString(message.url))
                                return "url: string expected";
                        if (message.title != null && message.hasOwnProperty("title"))
                            if (!$util.isString(message.title))
                                return "title: string expected";
                        if (message.description != null && message.hasOwnProperty("description"))
                            if (!$util.isString(message.description))
                                return "description: string expected";
                        if (message.thumbData != null && message.hasOwnProperty("thumbData"))
                            if (!(message.thumbData && typeof message.thumbData.length === "number" || $util.isString(message.thumbData)))
                                return "thumbData: buffer expected";
                        if (message.matchText != null && message.hasOwnProperty("matchText"))
                            if (!$util.isString(message.matchText))
                                return "matchText: string expected";
                        if (message.previewType != null && message.hasOwnProperty("previewType"))
                            if (!$util.isString(message.previewType))
                                return "previewType: string expected";
                        if (message.hqThumbnail != null && message.hasOwnProperty("hqThumbnail")) {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.verify(message.hqThumbnail);
                            if (error)
                                return "hqThumbnail." + error;
                        }
                        if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata")) {
                            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 (options.defaults) {
                            object.url = "";
                            object.title = "";
                            object.description = "";
                            if (options.bytes === String)
                                object.thumbData = "";
                            else {
                                object.thumbData = [];
                                if (options.bytes !== Array)
                                    object.thumbData = $util.newBuffer(object.thumbData);
                            }
                            object.matchText = "";
                            object.previewType = "";
                            object.hqThumbnail = null;
                            object.previewMetadata = null;
                        }
                        if (message.url != null && message.hasOwnProperty("url"))
                            object.url = message.url;
                        if (message.title != null && message.hasOwnProperty("title"))
                            object.title = message.title;
                        if (message.description != null && message.hasOwnProperty("description"))
                            object.description = message.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 (message.matchText != null && message.hasOwnProperty("matchText"))
                            object.matchText = message.matchText;
                        if (message.previewType != null && message.hasOwnProperty("previewType"))
                            object.previewType = message.previewType;
                        if (message.hqThumbnail != null && message.hasOwnProperty("hqThumbnail"))
                            object.hqThumbnail = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.toObject(message.hqThumbnail, options);
                        if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata"))
                            object.previewMetadata = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.toObject(message.previewMetadata, options);
                        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} directPath
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.directPath = "";

                        /**
                         * LinkPreviewHighQualityThumbnail thumbHash.
                         * @member {string} thumbHash
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.thumbHash = "";

                        /**
                         * LinkPreviewHighQualityThumbnail encThumbHash.
                         * @member {string} encThumbHash
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.encThumbHash = "";

                        /**
                         * LinkPreviewHighQualityThumbnail mediaKey.
                         * @member {Uint8Array} mediaKey
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.mediaKey = $util.newBuffer([]);

                        /**
                         * LinkPreviewHighQualityThumbnail mediaKeyTimestampMs.
                         * @member {number|Long} mediaKeyTimestampMs
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.mediaKeyTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                        /**
                         * LinkPreviewHighQualityThumbnail thumbWidth.
                         * @member {number} thumbWidth
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.thumbWidth = 0;

                        /**
                         * LinkPreviewHighQualityThumbnail thumbHeight.
                         * @member {number} thumbHeight
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.thumbHeight = 0;

                        /**
                         * 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";
                            if (message.directPath != null && message.hasOwnProperty("directPath"))
                                if (!$util.isString(message.directPath))
                                    return "directPath: string expected";
                            if (message.thumbHash != null && message.hasOwnProperty("thumbHash"))
                                if (!$util.isString(message.thumbHash))
                                    return "thumbHash: string expected";
                            if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash"))
                                if (!$util.isString(message.encThumbHash))
                                    return "encThumbHash: string expected";
                            if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                                if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                                    return "mediaKey: buffer expected";
                            if (message.mediaKeyTimestampMs != null && message.hasOwnProperty("mediaKeyTimestampMs"))
                                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"))
                                if (!$util.isInteger(message.thumbWidth))
                                    return "thumbWidth: integer expected";
                            if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight"))
                                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 (options.defaults) {
                                object.directPath = "";
                                object.thumbHash = "";
                                object.encThumbHash = "";
                                if (options.bytes === String)
                                    object.mediaKey = "";
                                else {
                                    object.mediaKey = [];
                                    if (options.bytes !== Array)
                                        object.mediaKey = $util.newBuffer(object.mediaKey);
                                }
                                if ($util.Long) {
                                    var long = new $util.Long(0, 0, false);
                                    object.mediaKeyTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                                } else
                                    object.mediaKeyTimestampMs = options.longs === String ? "0" : 0;
                                object.thumbWidth = 0;
                                object.thumbHeight = 0;
                            }
                            if (message.directPath != null && message.hasOwnProperty("directPath"))
                                object.directPath = message.directPath;
                            if (message.thumbHash != null && message.hasOwnProperty("thumbHash"))
                                object.thumbHash = message.thumbHash;
                            if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash"))
                                object.encThumbHash = message.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 (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 (message.thumbWidth != null && message.hasOwnProperty("thumbWidth"))
                                object.thumbWidth = message.thumbWidth;
                            if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight"))
                                object.thumbHeight = message.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} isBusinessVerified
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @instance
                         */
                        PaymentLinkPreviewMetadata.prototype.isBusinessVerified = false;

                        /**
                         * PaymentLinkPreviewMetadata providerName.
                         * @member {string} providerName
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @instance
                         */
                        PaymentLinkPreviewMetadata.prototype.providerName = "";

                        /**
                         * 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";
                            if (message.isBusinessVerified != null && message.hasOwnProperty("isBusinessVerified"))
                                if (typeof message.isBusinessVerified !== "boolean")
                                    return "isBusinessVerified: boolean expected";
                            if (message.providerName != null && message.hasOwnProperty("providerName"))
                                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 (options.defaults) {
                                object.isBusinessVerified = false;
                                object.providerName = "";
                            }
                            if (message.isBusinessVerified != null && message.hasOwnProperty("isBusinessVerified"))
                                object.isBusinessVerified = message.isBusinessVerified;
                            if (message.providerName != null && message.hasOwnProperty("providerName"))
                                object.providerName = message.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} webMessageInfoBytes
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @instance
                     */
                    PlaceholderMessageResendResponse.prototype.webMessageInfoBytes = $util.newBuffer([]);

                    /**
                     * 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";
                        if (message.webMessageInfoBytes != null && message.hasOwnProperty("webMessageInfoBytes"))
                            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 (options.defaults)
                            if (options.bytes === String)
                                object.webMessageInfoBytes = "";
                            else {
                                object.webMessageInfoBytes = [];
                                if (options.bytes !== Array)
                                    object.webMessageInfoBytes = $util.newBuffer(object.webMessageInfoBytes);
                            }
                        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;
                        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} collectionSnapshot
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @instance
                     */
                    SyncDSnapshotFatalRecoveryResponse.prototype.collectionSnapshot = $util.newBuffer([]);

                    /**
                     * SyncDSnapshotFatalRecoveryResponse isCompressed.
                     * @member {boolean} isCompressed
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @instance
                     */
                    SyncDSnapshotFatalRecoveryResponse.prototype.isCompressed = false;

                    /**
                     * 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";
                        if (message.collectionSnapshot != null && message.hasOwnProperty("collectionSnapshot"))
                            if (!(message.collectionSnapshot && typeof message.collectionSnapshot.length === "number" || $util.isString(message.collectionSnapshot)))
                                return "collectionSnapshot: buffer expected";
                        if (message.isCompressed != null && message.hasOwnProperty("isCompressed"))
                            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 (options.defaults) {
                            if (options.bytes === String)
                                object.collectionSnapshot = "";
                            else {
                                object.collectionSnapshot = [];
                                if (options.bytes !== Array)
                                    object.collectionSnapshot = $util.newBuffer(object.collectionSnapshot);
                            }
                            object.isCompressed = false;
                        }
                        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 (message.isCompressed != null && message.hasOwnProperty("isCompressed"))
                            object.isCompressed = message.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} nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @instance
                     */
                    WaffleNonceFetchResponse.prototype.nonce = "";

                    /**
                     * WaffleNonceFetchResponse waEntFbid.
                     * @member {string} waEntFbid
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @instance
                     */
                    WaffleNonceFetchResponse.prototype.waEntFbid = "";

                    /**
                     * 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";
                        if (message.nonce != null && message.hasOwnProperty("nonce"))
                            if (!$util.isString(message.nonce))
                                return "nonce: string expected";
                        if (message.waEntFbid != null && message.hasOwnProperty("waEntFbid"))
                            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 (options.defaults) {
                            object.nonce = "";
                            object.waEntFbid = "";
                        }
                        if (message.nonce != null && message.hasOwnProperty("nonce"))
                            object.nonce = message.nonce;
                        if (message.waEntFbid != null && message.hasOwnProperty("waEntFbid"))
                            object.waEntFbid = message.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} type
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            PinInChatMessage.prototype.type = 0;

            /**
             * PinInChatMessage senderTimestampMs.
             * @member {number|Long} senderTimestampMs
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            PinInChatMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.type != null && message.hasOwnProperty("type"))
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs"))
                    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 (options.defaults) {
                    object.key = null;
                    object.type = options.enums === String ? "UNKNOWN_TYPE" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.senderTimestampMs = options.longs === String ? "0" : 0;
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                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 (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;
                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} type
             * @memberof E2E.Message.PlaceholderMessage
             * @instance
             */
            PlaceholderMessage.prototype.type = 0;

            /**
             * 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";
                if (message.type != null && message.hasOwnProperty("type"))
                    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 (options.defaults)
                    object.type = options.enums === String ? "MASK_LINKED_DEVICES" : 0;
                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;
                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} encKey
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.encKey = $util.newBuffer([]);

            /**
             * PollCreationMessage name.
             * @member {string} name
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.name = "";

            /**
             * PollCreationMessage options.
             * @member {Array.<E2E.Message.PollCreationMessage.IOption>} options
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.options = $util.emptyArray;

            /**
             * PollCreationMessage selectableOptionsCount.
             * @member {number} selectableOptionsCount
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.selectableOptionsCount = 0;

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

            /**
             * PollCreationMessage pollContentType.
             * @member {E2E.Message.PollContentType} pollContentType
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.pollContentType = 0;

            /**
             * PollCreationMessage pollType.
             * @member {E2E.Message.PollType} pollType
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.pollType = 0;

            /**
             * PollCreationMessage correctAnswer.
             * @member {E2E.Message.PollCreationMessage.IOption|null|undefined} correctAnswer
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.correctAnswer = null;

            /**
             * 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";
                if (message.encKey != null && message.hasOwnProperty("encKey"))
                    if (!(message.encKey && typeof message.encKey.length === "number" || $util.isString(message.encKey)))
                        return "encKey: buffer expected";
                if (message.name != null && message.hasOwnProperty("name"))
                    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"))
                    if (!$util.isInteger(message.selectableOptionsCount))
                        return "selectableOptionsCount: integer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.pollContentType != null && message.hasOwnProperty("pollContentType"))
                    switch (message.pollContentType) {
                    default:
                        return "pollContentType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.pollType != null && message.hasOwnProperty("pollType"))
                    switch (message.pollType) {
                    default:
                        return "pollType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                if (message.correctAnswer != null && message.hasOwnProperty("correctAnswer")) {
                    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 (options.defaults) {
                    if (options.bytes === String)
                        object.encKey = "";
                    else {
                        object.encKey = [];
                        if (options.bytes !== Array)
                            object.encKey = $util.newBuffer(object.encKey);
                    }
                    object.name = "";
                    object.selectableOptionsCount = 0;
                    object.contextInfo = null;
                    object.pollContentType = options.enums === String ? "UNKNOWN" : 0;
                    object.pollType = options.enums === String ? "POLL" : 0;
                    object.correctAnswer = null;
                }
                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 (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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 (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 (message.correctAnswer != null && message.hasOwnProperty("correctAnswer"))
                    object.correctAnswer = $root.E2E.Message.PollCreationMessage.Option.toObject(message.correctAnswer, options);
                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} optionName
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @instance
                 */
                Option.prototype.optionName = "";

                /**
                 * Option optionHash.
                 * @member {string} optionHash
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @instance
                 */
                Option.prototype.optionHash = "";

                /**
                 * 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";
                    if (message.optionName != null && message.hasOwnProperty("optionName"))
                        if (!$util.isString(message.optionName))
                            return "optionName: string expected";
                    if (message.optionHash != null && message.hasOwnProperty("optionHash"))
                        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 (options.defaults) {
                        object.optionName = "";
                        object.optionHash = "";
                    }
                    if (message.optionName != null && message.hasOwnProperty("optionName"))
                        object.optionName = message.optionName;
                    if (message.optionHash != null && message.hasOwnProperty("optionHash"))
                        object.optionHash = message.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} encPayload
             * @memberof E2E.Message.PollEncValue
             * @instance
             */
            PollEncValue.prototype.encPayload = $util.newBuffer([]);

            /**
             * PollEncValue encIv.
             * @member {Uint8Array} encIv
             * @memberof E2E.Message.PollEncValue
             * @instance
             */
            PollEncValue.prototype.encIv = $util.newBuffer([]);

            /**
             * 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";
                if (message.encPayload != null && message.hasOwnProperty("encPayload"))
                    if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload)))
                        return "encPayload: buffer expected";
                if (message.encIv != null && message.hasOwnProperty("encIv"))
                    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 (options.defaults) {
                    if (options.bytes === String)
                        object.encPayload = "";
                    else {
                        object.encPayload = [];
                        if (options.bytes !== Array)
                            object.encPayload = $util.newBuffer(object.encPayload);
                    }
                    if (options.bytes === String)
                        object.encIv = "";
                    else {
                        object.encIv = [];
                        if (options.bytes !== Array)
                            object.encIv = $util.newBuffer(object.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 (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;
                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} name
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            PollResultSnapshotMessage.prototype.name = "";

            /**
             * 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} pollType
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            PollResultSnapshotMessage.prototype.pollType = 0;

            /**
             * 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";
                if (message.name != null && message.hasOwnProperty("name"))
                    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")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.pollType != null && message.hasOwnProperty("pollType"))
                    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 (options.defaults) {
                    object.name = "";
                    object.contextInfo = null;
                    object.pollType = options.enums === String ? "POLL" : 0;
                }
                if (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.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 (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;
                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} optionName
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @instance
                 */
                PollVote.prototype.optionName = "";

                /**
                 * PollVote optionVoteCount.
                 * @member {number|Long} optionVoteCount
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @instance
                 */
                PollVote.prototype.optionVoteCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * 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";
                    if (message.optionName != null && message.hasOwnProperty("optionName"))
                        if (!$util.isString(message.optionName))
                            return "optionName: string expected";
                    if (message.optionVoteCount != null && message.hasOwnProperty("optionVoteCount"))
                        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 (options.defaults) {
                        object.optionName = "";
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.optionVoteCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.optionVoteCount = options.longs === String ? "0" : 0;
                    }
                    if (message.optionName != null && message.hasOwnProperty("optionName"))
                        object.optionName = message.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;
                    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} senderTimestampMs
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            PollUpdateMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.pollCreationMessageKey);
                    if (error)
                        return "pollCreationMessageKey." + error;
                }
                if (message.vote != null && message.hasOwnProperty("vote")) {
                    var error = $root.E2E.Message.PollEncValue.verify(message.vote);
                    if (error)
                        return "vote." + error;
                }
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    var error = $root.E2E.Message.PollUpdateMessageMetadata.verify(message.metadata);
                    if (error)
                        return "metadata." + error;
                }
                if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs"))
                    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 (options.defaults) {
                    object.pollCreationMessageKey = null;
                    object.vote = null;
                    object.metadata = null;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.senderTimestampMs = options.longs === String ? "0" : 0;
                }
                if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey"))
                    object.pollCreationMessageKey = $root.Protocol.MessageKey.toObject(message.pollCreationMessageKey, options);
                if (message.vote != null && message.hasOwnProperty("vote"))
                    object.vote = $root.E2E.Message.PollEncValue.toObject(message.vote, options);
                if (message.metadata != null && message.hasOwnProperty("metadata"))
                    object.metadata = $root.E2E.Message.PollUpdateMessageMetadata.toObject(message.metadata, options);
                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;
                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} businessOwnerJid
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.businessOwnerJid = "";

            /**
             * ProductMessage catalog.
             * @member {E2E.Message.ProductMessage.ICatalogSnapshot|null|undefined} catalog
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.catalog = null;

            /**
             * ProductMessage body.
             * @member {string} body
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.body = "";

            /**
             * ProductMessage footer.
             * @member {string} footer
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.footer = "";

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

            /**
             * 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";
                if (message.product != null && message.hasOwnProperty("product")) {
                    var error = $root.E2E.Message.ProductMessage.ProductSnapshot.verify(message.product);
                    if (error)
                        return "product." + error;
                }
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid"))
                    if (!$util.isString(message.businessOwnerJid))
                        return "businessOwnerJid: string expected";
                if (message.catalog != null && message.hasOwnProperty("catalog")) {
                    var error = $root.E2E.Message.ProductMessage.CatalogSnapshot.verify(message.catalog);
                    if (error)
                        return "catalog." + error;
                }
                if (message.body != null && message.hasOwnProperty("body"))
                    if (!$util.isString(message.body))
                        return "body: string expected";
                if (message.footer != null && message.hasOwnProperty("footer"))
                    if (!$util.isString(message.footer))
                        return "footer: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults) {
                    object.product = null;
                    object.businessOwnerJid = "";
                    object.catalog = null;
                    object.body = "";
                    object.footer = "";
                    object.contextInfo = null;
                }
                if (message.product != null && message.hasOwnProperty("product"))
                    object.product = $root.E2E.Message.ProductMessage.ProductSnapshot.toObject(message.product, options);
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid"))
                    object.businessOwnerJid = message.businessOwnerJid;
                if (message.catalog != null && message.hasOwnProperty("catalog"))
                    object.catalog = $root.E2E.Message.ProductMessage.CatalogSnapshot.toObject(message.catalog, options);
                if (message.body != null && message.hasOwnProperty("body"))
                    object.body = message.body;
                if (message.footer != null && message.hasOwnProperty("footer"))
                    object.footer = message.footer;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} title
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                CatalogSnapshot.prototype.title = "";

                /**
                 * CatalogSnapshot description.
                 * @member {string} description
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                CatalogSnapshot.prototype.description = "";

                /**
                 * 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";
                    if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) {
                        var error = $root.E2E.Message.ImageMessage.verify(message.catalogImage);
                        if (error)
                            return "catalogImage." + error;
                    }
                    if (message.title != null && message.hasOwnProperty("title"))
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    if (message.description != null && message.hasOwnProperty("description"))
                        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 (options.defaults) {
                        object.catalogImage = null;
                        object.title = "";
                        object.description = "";
                    }
                    if (message.catalogImage != null && message.hasOwnProperty("catalogImage"))
                        object.catalogImage = $root.E2E.Message.ImageMessage.toObject(message.catalogImage, options);
                    if (message.title != null && message.hasOwnProperty("title"))
                        object.title = message.title;
                    if (message.description != null && message.hasOwnProperty("description"))
                        object.description = message.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} productId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.productId = "";

                /**
                 * ProductSnapshot title.
                 * @member {string} title
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.title = "";

                /**
                 * ProductSnapshot description.
                 * @member {string} description
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.description = "";

                /**
                 * ProductSnapshot currencyCode.
                 * @member {string} currencyCode
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.currencyCode = "";

                /**
                 * ProductSnapshot priceAmount1000.
                 * @member {number|Long} priceAmount1000
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.priceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProductSnapshot retailerId.
                 * @member {string} retailerId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.retailerId = "";

                /**
                 * ProductSnapshot url.
                 * @member {string} url
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.url = "";

                /**
                 * ProductSnapshot productImageCount.
                 * @member {number} productImageCount
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.productImageCount = 0;

                /**
                 * ProductSnapshot firstImageId.
                 * @member {string} firstImageId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.firstImageId = "";

                /**
                 * ProductSnapshot salePriceAmount1000.
                 * @member {number|Long} salePriceAmount1000
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.salePriceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProductSnapshot signedUrl.
                 * @member {string} signedUrl
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.signedUrl = "";

                /**
                 * 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";
                    if (message.productImage != null && message.hasOwnProperty("productImage")) {
                        var error = $root.E2E.Message.ImageMessage.verify(message.productImage);
                        if (error)
                            return "productImage." + error;
                    }
                    if (message.productId != null && message.hasOwnProperty("productId"))
                        if (!$util.isString(message.productId))
                            return "productId: string expected";
                    if (message.title != null && message.hasOwnProperty("title"))
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    if (message.description != null && message.hasOwnProperty("description"))
                        if (!$util.isString(message.description))
                            return "description: string expected";
                    if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
                        if (!$util.isString(message.currencyCode))
                            return "currencyCode: string expected";
                    if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000"))
                        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"))
                        if (!$util.isString(message.retailerId))
                            return "retailerId: string expected";
                    if (message.url != null && message.hasOwnProperty("url"))
                        if (!$util.isString(message.url))
                            return "url: string expected";
                    if (message.productImageCount != null && message.hasOwnProperty("productImageCount"))
                        if (!$util.isInteger(message.productImageCount))
                            return "productImageCount: integer expected";
                    if (message.firstImageId != null && message.hasOwnProperty("firstImageId"))
                        if (!$util.isString(message.firstImageId))
                            return "firstImageId: string expected";
                    if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000"))
                        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"))
                        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 (options.defaults) {
                        object.productImage = null;
                        object.productId = "";
                        object.title = "";
                        object.description = "";
                        object.currencyCode = "";
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.priceAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.priceAmount1000 = options.longs === String ? "0" : 0;
                        object.retailerId = "";
                        object.url = "";
                        object.productImageCount = 0;
                        object.firstImageId = "";
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.salePriceAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.salePriceAmount1000 = options.longs === String ? "0" : 0;
                        object.signedUrl = "";
                    }
                    if (message.productImage != null && message.hasOwnProperty("productImage"))
                        object.productImage = $root.E2E.Message.ImageMessage.toObject(message.productImage, options);
                    if (message.productId != null && message.hasOwnProperty("productId"))
                        object.productId = message.productId;
                    if (message.title != null && message.hasOwnProperty("title"))
                        object.title = message.title;
                    if (message.description != null && message.hasOwnProperty("description"))
                        object.description = message.description;
                    if (message.currencyCode != null && message.hasOwnProperty("currencyCode"))
                        object.currencyCode = message.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 (message.retailerId != null && message.hasOwnProperty("retailerId"))
                        object.retailerId = message.retailerId;
                    if (message.url != null && message.hasOwnProperty("url"))
                        object.url = message.url;
                    if (message.productImageCount != null && message.hasOwnProperty("productImageCount"))
                        object.productImageCount = message.productImageCount;
                    if (message.firstImageId != null && message.hasOwnProperty("firstImageId"))
                        object.firstImageId = message.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 (message.signedUrl != null && message.hasOwnProperty("signedUrl"))
                        object.signedUrl = message.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} type
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.type = 0;

            /**
             * ProtocolMessage ephemeralExpiration.
             * @member {number} ephemeralExpiration
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.ephemeralExpiration = 0;

            /**
             * ProtocolMessage ephemeralSettingTimestamp.
             * @member {number|Long} ephemeralSettingTimestamp
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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} timestampMs
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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} invokerJid
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.invokerJid = "";

            /**
             * 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} aiPsiMetadata
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.aiPsiMetadata = $util.newBuffer([]);

            /**
             * 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;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.type != null && message.hasOwnProperty("type"))
                    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"))
                    if (!$util.isInteger(message.ephemeralExpiration))
                        return "ephemeralExpiration: integer expected";
                if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp"))
                    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")) {
                    var error = $root.E2E.Message.HistorySyncNotification.verify(message.historySyncNotification);
                    if (error)
                        return "historySyncNotification." + error;
                }
                if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) {
                    var error = $root.E2E.Message.AppStateSyncKeyShare.verify(message.appStateSyncKeyShare);
                    if (error)
                        return "appStateSyncKeyShare." + error;
                }
                if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) {
                    var error = $root.E2E.Message.AppStateSyncKeyRequest.verify(message.appStateSyncKeyRequest);
                    if (error)
                        return "appStateSyncKeyRequest." + error;
                }
                if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) {
                    var error = $root.E2E.Message.InitialSecurityNotificationSettingSync.verify(message.initialSecurityNotificationSettingSync);
                    if (error)
                        return "initialSecurityNotificationSettingSync." + error;
                }
                if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) {
                    var error = $root.E2E.Message.AppStateFatalExceptionNotification.verify(message.appStateFatalExceptionNotification);
                    if (error)
                        return "appStateFatalExceptionNotification." + error;
                }
                if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                    var error = $root.E2E.DisappearingMode.verify(message.disappearingMode);
                    if (error)
                        return "disappearingMode." + error;
                }
                if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) {
                    var error = $root.E2E.Message.verify(message.editedMessage);
                    if (error)
                        return "editedMessage." + error;
                }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs"))
                    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")) {
                    var error = $root.E2E.Message.PeerDataOperationRequestMessage.verify(message.peerDataOperationRequestMessage);
                    if (error)
                        return "peerDataOperationRequestMessage." + error;
                }
                if (message.peerDataOperationRequestResponseMessage != null && message.hasOwnProperty("peerDataOperationRequestResponseMessage")) {
                    var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.verify(message.peerDataOperationRequestResponseMessage);
                    if (error)
                        return "peerDataOperationRequestResponseMessage." + error;
                }
                if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage")) {
                    var error = $root.AICommon.BotFeedbackMessage.verify(message.botFeedbackMessage);
                    if (error)
                        return "botFeedbackMessage." + error;
                }
                if (message.invokerJid != null && message.hasOwnProperty("invokerJid"))
                    if (!$util.isString(message.invokerJid))
                        return "invokerJid: string expected";
                if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) {
                    var error = $root.E2E.Message.RequestWelcomeMessageMetadata.verify(message.requestWelcomeMessageMetadata);
                    if (error)
                        return "requestWelcomeMessageMetadata." + error;
                }
                if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) {
                    var error = $root.E2E.MediaNotifyMessage.verify(message.mediaNotifyMessage);
                    if (error)
                        return "mediaNotifyMessage." + error;
                }
                if (message.cloudApiThreadControlNotification != null && message.hasOwnProperty("cloudApiThreadControlNotification")) {
                    var error = $root.E2E.Message.CloudAPIThreadControlNotification.verify(message.cloudApiThreadControlNotification);
                    if (error)
                        return "cloudApiThreadControlNotification." + error;
                }
                if (message.lidMigrationMappingSyncMessage != null && message.hasOwnProperty("lidMigrationMappingSyncMessage")) {
                    var error = $root.E2E.LIDMigrationMappingSyncMessage.verify(message.lidMigrationMappingSyncMessage);
                    if (error)
                        return "lidMigrationMappingSyncMessage." + error;
                }
                if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) {
                    var error = $root.Protocol.LimitSharing.verify(message.limitSharing);
                    if (error)
                        return "limitSharing." + error;
                }
                if (message.aiPsiMetadata != null && message.hasOwnProperty("aiPsiMetadata"))
                    if (!(message.aiPsiMetadata && typeof message.aiPsiMetadata.length === "number" || $util.isString(message.aiPsiMetadata)))
                        return "aiPsiMetadata: buffer expected";
                if (message.aiQueryFanout != null && message.hasOwnProperty("aiQueryFanout")) {
                    var error = $root.E2E.AIQueryFanout.verify(message.aiQueryFanout);
                    if (error)
                        return "aiQueryFanout." + error;
                }
                if (message.memberLabel != null && message.hasOwnProperty("memberLabel")) {
                    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 (options.defaults) {
                    object.key = null;
                    object.type = options.enums === String ? "REVOKE" : 0;
                    object.ephemeralExpiration = 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0;
                    object.historySyncNotification = null;
                    object.appStateSyncKeyShare = null;
                    object.appStateSyncKeyRequest = null;
                    object.initialSecurityNotificationSettingSync = null;
                    object.appStateFatalExceptionNotification = null;
                    object.disappearingMode = null;
                    object.editedMessage = null;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.timestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.timestampMs = options.longs === String ? "0" : 0;
                    object.peerDataOperationRequestMessage = null;
                    object.peerDataOperationRequestResponseMessage = null;
                    object.botFeedbackMessage = null;
                    object.invokerJid = "";
                    object.requestWelcomeMessageMetadata = null;
                    object.mediaNotifyMessage = null;
                    object.cloudApiThreadControlNotification = null;
                    object.lidMigrationMappingSyncMessage = null;
                    object.limitSharing = null;
                    if (options.bytes === String)
                        object.aiPsiMetadata = "";
                    else {
                        object.aiPsiMetadata = [];
                        if (options.bytes !== Array)
                            object.aiPsiMetadata = $util.newBuffer(object.aiPsiMetadata);
                    }
                    object.aiQueryFanout = null;
                    object.memberLabel = null;
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                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 (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration"))
                    object.ephemeralExpiration = message.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 (message.historySyncNotification != null && message.hasOwnProperty("historySyncNotification"))
                    object.historySyncNotification = $root.E2E.Message.HistorySyncNotification.toObject(message.historySyncNotification, options);
                if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare"))
                    object.appStateSyncKeyShare = $root.E2E.Message.AppStateSyncKeyShare.toObject(message.appStateSyncKeyShare, options);
                if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest"))
                    object.appStateSyncKeyRequest = $root.E2E.Message.AppStateSyncKeyRequest.toObject(message.appStateSyncKeyRequest, options);
                if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync"))
                    object.initialSecurityNotificationSettingSync = $root.E2E.Message.InitialSecurityNotificationSettingSync.toObject(message.initialSecurityNotificationSettingSync, options);
                if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification"))
                    object.appStateFatalExceptionNotification = $root.E2E.Message.AppStateFatalExceptionNotification.toObject(message.appStateFatalExceptionNotification, options);
                if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode"))
                    object.disappearingMode = $root.E2E.DisappearingMode.toObject(message.disappearingMode, options);
                if (message.editedMessage != null && message.hasOwnProperty("editedMessage"))
                    object.editedMessage = $root.E2E.Message.toObject(message.editedMessage, options);
                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 (message.peerDataOperationRequestMessage != null && message.hasOwnProperty("peerDataOperationRequestMessage"))
                    object.peerDataOperationRequestMessage = $root.E2E.Message.PeerDataOperationRequestMessage.toObject(message.peerDataOperationRequestMessage, options);
                if (message.peerDataOperationRequestResponseMessage != null && message.hasOwnProperty("peerDataOperationRequestResponseMessage"))
                    object.peerDataOperationRequestResponseMessage = $root.E2E.Message.PeerDataOperationRequestResponseMessage.toObject(message.peerDataOperationRequestResponseMessage, options);
                if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage"))
                    object.botFeedbackMessage = $root.AICommon.BotFeedbackMessage.toObject(message.botFeedbackMessage, options);
                if (message.invokerJid != null && message.hasOwnProperty("invokerJid"))
                    object.invokerJid = message.invokerJid;
                if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata"))
                    object.requestWelcomeMessageMetadata = $root.E2E.Message.RequestWelcomeMessageMetadata.toObject(message.requestWelcomeMessageMetadata, options);
                if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage"))
                    object.mediaNotifyMessage = $root.E2E.MediaNotifyMessage.toObject(message.mediaNotifyMessage, options);
                if (message.cloudApiThreadControlNotification != null && message.hasOwnProperty("cloudApiThreadControlNotification"))
                    object.cloudApiThreadControlNotification = $root.E2E.Message.CloudAPIThreadControlNotification.toObject(message.cloudApiThreadControlNotification, options);
                if (message.lidMigrationMappingSyncMessage != null && message.hasOwnProperty("lidMigrationMappingSyncMessage"))
                    object.lidMigrationMappingSyncMessage = $root.E2E.LIDMigrationMappingSyncMessage.toObject(message.lidMigrationMappingSyncMessage, options);
                if (message.limitSharing != null && message.hasOwnProperty("limitSharing"))
                    object.limitSharing = $root.Protocol.LimitSharing.toObject(message.limitSharing, options);
                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 (message.aiQueryFanout != null && message.hasOwnProperty("aiQueryFanout"))
                    object.aiQueryFanout = $root.E2E.AIQueryFanout.toObject(message.aiQueryFanout, options);
                if (message.memberLabel != null && message.hasOwnProperty("memberLabel"))
                    object.memberLabel = $root.E2E.MemberLabel.toObject(message.memberLabel, options);
                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} text
             * @memberof E2E.Message.QuestionResponseMessage
             * @instance
             */
            QuestionResponseMessage.prototype.text = "";

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.text != null && message.hasOwnProperty("text"))
                    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 (options.defaults) {
                    object.key = null;
                    object.text = "";
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (message.text != null && message.hasOwnProperty("text"))
                    object.text = message.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} text
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            ReactionMessage.prototype.text = "";

            /**
             * ReactionMessage groupingKey.
             * @member {string} groupingKey
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            ReactionMessage.prototype.groupingKey = "";

            /**
             * ReactionMessage senderTimestampMs.
             * @member {number|Long} senderTimestampMs
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            ReactionMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.text != null && message.hasOwnProperty("text"))
                    if (!$util.isString(message.text))
                        return "text: string expected";
                if (message.groupingKey != null && message.hasOwnProperty("groupingKey"))
                    if (!$util.isString(message.groupingKey))
                        return "groupingKey: string expected";
                if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs"))
                    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 (options.defaults) {
                    object.key = null;
                    object.text = "";
                    object.groupingKey = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.senderTimestampMs = options.longs === String ? "0" : 0;
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (message.text != null && message.hasOwnProperty("text"))
                    object.text = message.text;
                if (message.groupingKey != null && message.hasOwnProperty("groupingKey"))
                    object.groupingKey = message.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;
                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.RequestContactInfoMessage = (function() {

            /**
             * Properties of a RequestContactInfoMessage.
             * @memberof E2E.Message
             * @interface IRequestContactInfoMessage
             * @property {string|null} [text] RequestContactInfoMessage text
             * @property {string|null} [ctaButtonText] RequestContactInfoMessage ctaButtonText
             * @property {E2E.IContextInfo|null} [contextInfo] RequestContactInfoMessage contextInfo
             */

            /**
             * Constructs a new RequestContactInfoMessage.
             * @memberof E2E.Message
             * @classdesc Represents a RequestContactInfoMessage.
             * @implements IRequestContactInfoMessage
             * @constructor
             * @param {E2E.Message.IRequestContactInfoMessage=} [properties] Properties to set
             */
            function RequestContactInfoMessage(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * RequestContactInfoMessage text.
             * @member {string} text
             * @memberof E2E.Message.RequestContactInfoMessage
             * @instance
             */
            RequestContactInfoMessage.prototype.text = "";

            /**
             * RequestContactInfoMessage ctaButtonText.
             * @member {string} ctaButtonText
             * @memberof E2E.Message.RequestContactInfoMessage
             * @instance
             */
            RequestContactInfoMessage.prototype.ctaButtonText = "";

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

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

            /**
             * Encodes the specified RequestContactInfoMessage message. Does not implicitly {@link E2E.Message.RequestContactInfoMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.RequestContactInfoMessage
             * @static
             * @param {E2E.Message.IRequestContactInfoMessage} message RequestContactInfoMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RequestContactInfoMessage.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.ctaButtonText != null && Object.hasOwnProperty.call(message, "ctaButtonText"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.ctaButtonText);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

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

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

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

            /**
             * Verifies a RequestContactInfoMessage message.
             * @function verify
             * @memberof E2E.Message.RequestContactInfoMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RequestContactInfoMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.text != null && message.hasOwnProperty("text"))
                    if (!$util.isString(message.text))
                        return "text: string expected";
                if (message.ctaButtonText != null && message.hasOwnProperty("ctaButtonText"))
                    if (!$util.isString(message.ctaButtonText))
                        return "ctaButtonText: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                return null;
            };

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

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

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

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

            return RequestContactInfoMessage;
        })();

        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} currencyCodeIso4217
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.currencyCodeIso4217 = "";

            /**
             * RequestPaymentMessage amount1000.
             * @member {number|Long} amount1000
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * RequestPaymentMessage requestFrom.
             * @member {string} requestFrom
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.requestFrom = "";

            /**
             * RequestPaymentMessage expiryTimestamp.
             * @member {number|Long} expiryTimestamp
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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;

            /**
             * 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";
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) {
                    var error = $root.E2E.Message.verify(message.noteMessage);
                    if (error)
                        return "noteMessage." + error;
                }
                if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217"))
                    if (!$util.isString(message.currencyCodeIso4217))
                        return "currencyCodeIso4217: string expected";
                if (message.amount1000 != null && message.hasOwnProperty("amount1000"))
                    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"))
                    if (!$util.isString(message.requestFrom))
                        return "requestFrom: string expected";
                if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp"))
                    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")) {
                    var error = $root.E2E.Money.verify(message.amount);
                    if (error)
                        return "amount." + error;
                }
                if (message.background != null && message.hasOwnProperty("background")) {
                    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 (options.defaults) {
                    object.currencyCodeIso4217 = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.amount1000 = options.longs === String ? "0" : 0;
                    object.requestFrom = "";
                    object.noteMessage = null;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.expiryTimestamp = options.longs === String ? "0" : 0;
                    object.amount = null;
                    object.background = null;
                }
                if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217"))
                    object.currencyCodeIso4217 = message.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 (message.requestFrom != null && message.hasOwnProperty("requestFrom"))
                    object.requestFrom = message.requestFrom;
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage"))
                    object.noteMessage = $root.E2E.Message.toObject(message.noteMessage, options);
                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 (message.amount != null && message.hasOwnProperty("amount"))
                    object.amount = $root.E2E.Money.toObject(message.amount, options);
                if (message.background != null && message.hasOwnProperty("background"))
                    object.background = $root.E2E.PaymentBackground.toObject(message.background, options);
                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;

            /**
             * 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";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    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 (options.defaults)
                    object.contextInfo = null;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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} localChatState
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @instance
             */
            RequestWelcomeMessageMetadata.prototype.localChatState = 0;

            /**
             * 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";
                if (message.localChatState != null && message.hasOwnProperty("localChatState"))
                    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 (options.defaults)
                    object.localChatState = options.enums === String ? "EMPTY" : 0;
                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;
                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} scheduledTimestampMs
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            ScheduledCallCreationMessage.prototype.scheduledTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ScheduledCallCreationMessage callType.
             * @member {E2E.Message.ScheduledCallCreationMessage.CallType} callType
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            ScheduledCallCreationMessage.prototype.callType = 0;

            /**
             * ScheduledCallCreationMessage title.
             * @member {string} title
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            ScheduledCallCreationMessage.prototype.title = "";

            /**
             * 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";
                if (message.scheduledTimestampMs != null && message.hasOwnProperty("scheduledTimestampMs"))
                    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"))
                    switch (message.callType) {
                    default:
                        return "callType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.title != null && message.hasOwnProperty("title"))
                    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 (options.defaults) {
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.scheduledTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.scheduledTimestampMs = options.longs === String ? "0" : 0;
                    object.callType = options.enums === String ? "UNKNOWN" : 0;
                    object.title = "";
                }
                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 (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 (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.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} editType
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @instance
             */
            ScheduledCallEditMessage.prototype.editType = 0;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.editType != null && message.hasOwnProperty("editType"))
                    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 (options.defaults) {
                    object.key = null;
                    object.editType = options.enums === String ? "UNKNOWN" : 0;
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                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;
                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} encPayload
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            SecretEncryptedMessage.prototype.encPayload = $util.newBuffer([]);

            /**
             * SecretEncryptedMessage encIv.
             * @member {Uint8Array} encIv
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            SecretEncryptedMessage.prototype.encIv = $util.newBuffer([]);

            /**
             * SecretEncryptedMessage secretEncType.
             * @member {E2E.Message.SecretEncryptedMessage.SecretEncType} secretEncType
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            SecretEncryptedMessage.prototype.secretEncType = 0;

            /**
             * 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";
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.targetMessageKey);
                    if (error)
                        return "targetMessageKey." + error;
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload"))
                    if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload)))
                        return "encPayload: buffer expected";
                if (message.encIv != null && message.hasOwnProperty("encIv"))
                    if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv)))
                        return "encIv: buffer expected";
                if (message.secretEncType != null && message.hasOwnProperty("secretEncType"))
                    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 (options.defaults) {
                    object.targetMessageKey = null;
                    if (options.bytes === String)
                        object.encPayload = "";
                    else {
                        object.encPayload = [];
                        if (options.bytes !== Array)
                            object.encPayload = $util.newBuffer(object.encPayload);
                    }
                    if (options.bytes === String)
                        object.encIv = "";
                    else {
                        object.encIv = [];
                        if (options.bytes !== Array)
                            object.encIv = $util.newBuffer(object.encIv);
                    }
                    object.secretEncType = options.enums === String ? "UNKNOWN" : 0;
                }
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey"))
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                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 (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 (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;
                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} transactionData
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            SendPaymentMessage.prototype.transactionData = "";

            /**
             * 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";
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) {
                    var error = $root.E2E.Message.verify(message.noteMessage);
                    if (error)
                        return "noteMessage." + error;
                }
                if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.requestMessageKey);
                    if (error)
                        return "requestMessageKey." + error;
                }
                if (message.background != null && message.hasOwnProperty("background")) {
                    var error = $root.E2E.PaymentBackground.verify(message.background);
                    if (error)
                        return "background." + error;
                }
                if (message.transactionData != null && message.hasOwnProperty("transactionData"))
                    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 (options.defaults) {
                    object.noteMessage = null;
                    object.requestMessageKey = null;
                    object.background = null;
                    object.transactionData = "";
                }
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage"))
                    object.noteMessage = $root.E2E.Message.toObject(message.noteMessage, options);
                if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey"))
                    object.requestMessageKey = $root.Protocol.MessageKey.toObject(message.requestMessageKey, options);
                if (message.background != null && message.hasOwnProperty("background"))
                    object.background = $root.E2E.PaymentBackground.toObject(message.background, options);
                if (message.transactionData != null && message.hasOwnProperty("transactionData"))
                    object.transactionData = message.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} groupId
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @instance
             */
            SenderKeyDistributionMessage.prototype.groupId = "";

            /**
             * SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage.
             * @member {Uint8Array} axolotlSenderKeyDistributionMessage
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @instance
             */
            SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = $util.newBuffer([]);

            /**
             * 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";
                if (message.groupId != null && message.hasOwnProperty("groupId"))
                    if (!$util.isString(message.groupId))
                        return "groupId: string expected";
                if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage"))
                    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 (options.defaults) {
                    object.groupId = "";
                    if (options.bytes === String)
                        object.axolotlSenderKeyDistributionMessage = "";
                    else {
                        object.axolotlSenderKeyDistributionMessage = [];
                        if (options.bytes !== Array)
                            object.axolotlSenderKeyDistributionMessage = $util.newBuffer(object.axolotlSenderKeyDistributionMessage);
                    }
                }
                if (message.groupId != null && message.hasOwnProperty("groupId"))
                    object.groupId = message.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;
                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} type
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             */
            StatusNotificationMessage.prototype.type = 0;

            /**
             * 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";
                if (message.responseMessageKey != null && message.hasOwnProperty("responseMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.responseMessageKey);
                    if (error)
                        return "responseMessageKey." + error;
                }
                if (message.originalMessageKey != null && message.hasOwnProperty("originalMessageKey")) {
                    var error = $root.Protocol.MessageKey.verify(message.originalMessageKey);
                    if (error)
                        return "originalMessageKey." + error;
                }
                if (message.type != null && message.hasOwnProperty("type"))
                    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 (options.defaults) {
                    object.responseMessageKey = null;
                    object.originalMessageKey = null;
                    object.type = options.enums === String ? "UNKNOWN" : 0;
                }
                if (message.responseMessageKey != null && message.hasOwnProperty("responseMessageKey"))
                    object.responseMessageKey = $root.Protocol.MessageKey.toObject(message.responseMessageKey, options);
                if (message.originalMessageKey != null && message.hasOwnProperty("originalMessageKey"))
                    object.originalMessageKey = $root.Protocol.MessageKey.toObject(message.originalMessageKey, options);
                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;
                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} text
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @instance
             */
            StatusQuestionAnswerMessage.prototype.text = "";

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.text != null && message.hasOwnProperty("text"))
                    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 (options.defaults) {
                    object.key = null;
                    object.text = "";
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (message.text != null && message.hasOwnProperty("text"))
                    object.text = message.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} type
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.type = 1;

            /**
             * StatusQuotedMessage text.
             * @member {string} text
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.text = "";

            /**
             * StatusQuotedMessage thumbnail.
             * @member {Uint8Array} thumbnail
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.thumbnail = $util.newBuffer([]);

            /**
             * StatusQuotedMessage originalStatusId.
             * @member {Protocol.IMessageKey|null|undefined} originalStatusId
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.originalStatusId = null;

            /**
             * 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";
                if (message.type != null && message.hasOwnProperty("type"))
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 1:
                        break;
                    }
                if (message.text != null && message.hasOwnProperty("text"))
                    if (!$util.isString(message.text))
                        return "text: string expected";
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail"))
                    if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail)))
                        return "thumbnail: buffer expected";
                if (message.originalStatusId != null && message.hasOwnProperty("originalStatusId")) {
                    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 (options.defaults) {
                    object.type = options.enums === String ? "QUESTION_ANSWER" : 1;
                    object.text = "";
                    if (options.bytes === String)
                        object.thumbnail = "";
                    else {
                        object.thumbnail = [];
                        if (options.bytes !== Array)
                            object.thumbnail = $util.newBuffer(object.thumbnail);
                    }
                    object.originalStatusId = null;
                }
                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 (message.text != null && message.hasOwnProperty("text"))
                    object.text = message.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 (message.originalStatusId != null && message.hasOwnProperty("originalStatusId"))
                    object.originalStatusId = $root.Protocol.MessageKey.toObject(message.originalStatusId, options);
                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} stickerKey
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            StatusStickerInteractionMessage.prototype.stickerKey = "";

            /**
             * StatusStickerInteractionMessage type.
             * @member {E2E.Message.StatusStickerInteractionMessage.StatusStickerType} type
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            StatusStickerInteractionMessage.prototype.type = 0;

            /**
             * 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";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.stickerKey != null && message.hasOwnProperty("stickerKey"))
                    if (!$util.isString(message.stickerKey))
                        return "stickerKey: string expected";
                if (message.type != null && message.hasOwnProperty("type"))
                    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 (options.defaults) {
                    object.key = null;
                    object.stickerKey = "";
                    object.type = options.enums === String ? "UNKNOWN" : 0;
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (message.stickerKey != null && message.hasOwnProperty("stickerKey"))
                    object.stickerKey = message.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;
                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} url
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.url = "";

            /**
             * StickerMessage fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * StickerMessage fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * StickerMessage mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mediaKey = $util.newBuffer([]);

            /**
             * StickerMessage mimetype.
             * @member {string} mimetype
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mimetype = "";

            /**
             * StickerMessage height.
             * @member {number} height
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.height = 0;

            /**
             * StickerMessage width.
             * @member {number} width
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.width = 0;

            /**
             * StickerMessage directPath.
             * @member {string} directPath
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.directPath = "";

            /**
             * StickerMessage fileLength.
             * @member {number|Long} fileLength
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * StickerMessage mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * StickerMessage firstFrameLength.
             * @member {number} firstFrameLength
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.firstFrameLength = 0;

            /**
             * StickerMessage firstFrameSidecar.
             * @member {Uint8Array} firstFrameSidecar
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.firstFrameSidecar = $util.newBuffer([]);

            /**
             * StickerMessage isAnimated.
             * @member {boolean} isAnimated
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isAnimated = false;

            /**
             * StickerMessage pngThumbnail.
             * @member {Uint8Array} pngThumbnail
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.pngThumbnail = $util.newBuffer([]);

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

            /**
             * StickerMessage stickerSentTs.
             * @member {number|Long} stickerSentTs
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.stickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * StickerMessage isAvatar.
             * @member {boolean} isAvatar
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isAvatar = false;

            /**
             * StickerMessage isAiSticker.
             * @member {boolean} isAiSticker
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isAiSticker = false;

            /**
             * StickerMessage isLottie.
             * @member {boolean} isLottie
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isLottie = false;

            /**
             * StickerMessage accessibilityLabel.
             * @member {string} accessibilityLabel
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.accessibilityLabel = "";

            /**
             * StickerMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain} mediaKeyDomain
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mediaKeyDomain = 0;

            /**
             * 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";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                if (message.height != null && message.hasOwnProperty("height"))
                    if (!$util.isInteger(message.height))
                        return "height: integer expected";
                if (message.width != null && message.hasOwnProperty("width"))
                    if (!$util.isInteger(message.width))
                        return "width: integer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                    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"))
                    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"))
                    if (!$util.isInteger(message.firstFrameLength))
                        return "firstFrameLength: integer expected";
                if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar"))
                    if (!(message.firstFrameSidecar && typeof message.firstFrameSidecar.length === "number" || $util.isString(message.firstFrameSidecar)))
                        return "firstFrameSidecar: buffer expected";
                if (message.isAnimated != null && message.hasOwnProperty("isAnimated"))
                    if (typeof message.isAnimated !== "boolean")
                        return "isAnimated: boolean expected";
                if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail"))
                    if (!(message.pngThumbnail && typeof message.pngThumbnail.length === "number" || $util.isString(message.pngThumbnail)))
                        return "pngThumbnail: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.stickerSentTs != null && message.hasOwnProperty("stickerSentTs"))
                    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"))
                    if (typeof message.isAvatar !== "boolean")
                        return "isAvatar: boolean expected";
                if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker"))
                    if (typeof message.isAiSticker !== "boolean")
                        return "isAiSticker: boolean expected";
                if (message.isLottie != null && message.hasOwnProperty("isLottie"))
                    if (typeof message.isLottie !== "boolean")
                        return "isLottie: boolean expected";
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel"))
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain"))
                    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 (options.defaults) {
                    object.url = "";
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    object.mimetype = "";
                    object.height = 0;
                    object.width = 0;
                    object.directPath = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    object.firstFrameLength = 0;
                    if (options.bytes === String)
                        object.firstFrameSidecar = "";
                    else {
                        object.firstFrameSidecar = [];
                        if (options.bytes !== Array)
                            object.firstFrameSidecar = $util.newBuffer(object.firstFrameSidecar);
                    }
                    object.isAnimated = false;
                    if (options.bytes === String)
                        object.pngThumbnail = "";
                    else {
                        object.pngThumbnail = [];
                        if (options.bytes !== Array)
                            object.pngThumbnail = $util.newBuffer(object.pngThumbnail);
                    }
                    object.contextInfo = null;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.stickerSentTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.stickerSentTs = options.longs === String ? "0" : 0;
                    object.isAvatar = false;
                    object.isAiSticker = false;
                    object.isLottie = false;
                    object.accessibilityLabel = "";
                    object.mediaKeyDomain = options.enums === String ? "UNSET" : 0;
                }
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.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 (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 (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 (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    object.mimetype = message.mimetype;
                if (message.height != null && message.hasOwnProperty("height"))
                    object.height = message.height;
                if (message.width != null && message.hasOwnProperty("width"))
                    object.width = message.width;
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.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 (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 (message.firstFrameLength != null && message.hasOwnProperty("firstFrameLength"))
                    object.firstFrameLength = message.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 (message.isAnimated != null && message.hasOwnProperty("isAnimated"))
                    object.isAnimated = message.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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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 (message.isAvatar != null && message.hasOwnProperty("isAvatar"))
                    object.isAvatar = message.isAvatar;
                if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker"))
                    object.isAiSticker = message.isAiSticker;
                if (message.isLottie != null && message.hasOwnProperty("isLottie"))
                    object.isLottie = message.isLottie;
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel"))
                    object.accessibilityLabel = message.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;
                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} stickerPackId
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickerPackId = "";

            /**
             * StickerPackMessage name.
             * @member {string} name
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.name = "";

            /**
             * StickerPackMessage publisher.
             * @member {string} publisher
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.publisher = "";

            /**
             * StickerPackMessage stickers.
             * @member {Array.<E2E.Message.StickerPackMessage.ISticker>} stickers
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickers = $util.emptyArray;

            /**
             * StickerPackMessage fileLength.
             * @member {number|Long} fileLength
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * StickerPackMessage fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * StickerPackMessage fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * StickerPackMessage mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.mediaKey = $util.newBuffer([]);

            /**
             * StickerPackMessage directPath.
             * @member {string} directPath
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.directPath = "";

            /**
             * StickerPackMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.caption = "";

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

            /**
             * StickerPackMessage packDescription.
             * @member {string} packDescription
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.packDescription = "";

            /**
             * StickerPackMessage mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * StickerPackMessage trayIconFileName.
             * @member {string} trayIconFileName
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.trayIconFileName = "";

            /**
             * StickerPackMessage thumbnailDirectPath.
             * @member {string} thumbnailDirectPath
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailDirectPath = "";

            /**
             * StickerPackMessage thumbnailSha256.
             * @member {Uint8Array} thumbnailSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailSha256 = $util.newBuffer([]);

            /**
             * StickerPackMessage thumbnailEncSha256.
             * @member {Uint8Array} thumbnailEncSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]);

            /**
             * StickerPackMessage thumbnailHeight.
             * @member {number} thumbnailHeight
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailHeight = 0;

            /**
             * StickerPackMessage thumbnailWidth.
             * @member {number} thumbnailWidth
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailWidth = 0;

            /**
             * StickerPackMessage imageDataHash.
             * @member {string} imageDataHash
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.imageDataHash = "";

            /**
             * StickerPackMessage stickerPackSize.
             * @member {number|Long} stickerPackSize
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickerPackSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * StickerPackMessage stickerPackOrigin.
             * @member {E2E.Message.StickerPackMessage.StickerPackOrigin} stickerPackOrigin
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickerPackOrigin = 0;

            /**
             * 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";
                if (message.stickerPackId != null && message.hasOwnProperty("stickerPackId"))
                    if (!$util.isString(message.stickerPackId))
                        return "stickerPackId: string expected";
                if (message.name != null && message.hasOwnProperty("name"))
                    if (!$util.isString(message.name))
                        return "name: string expected";
                if (message.publisher != null && message.hasOwnProperty("publisher"))
                    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"))
                    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"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.packDescription != null && message.hasOwnProperty("packDescription"))
                    if (!$util.isString(message.packDescription))
                        return "packDescription: string expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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"))
                    if (!$util.isString(message.trayIconFileName))
                        return "trayIconFileName: string expected";
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256"))
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256"))
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight"))
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                if (message.imageDataHash != null && message.hasOwnProperty("imageDataHash"))
                    if (!$util.isString(message.imageDataHash))
                        return "imageDataHash: string expected";
                if (message.stickerPackSize != null && message.hasOwnProperty("stickerPackSize"))
                    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"))
                    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 (options.defaults) {
                    object.stickerPackId = "";
                    object.name = "";
                    object.publisher = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    object.directPath = "";
                    object.caption = "";
                    object.contextInfo = null;
                    object.packDescription = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    object.trayIconFileName = "";
                    object.thumbnailDirectPath = "";
                    if (options.bytes === String)
                        object.thumbnailSha256 = "";
                    else {
                        object.thumbnailSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256);
                    }
                    if (options.bytes === String)
                        object.thumbnailEncSha256 = "";
                    else {
                        object.thumbnailEncSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256);
                    }
                    object.thumbnailHeight = 0;
                    object.thumbnailWidth = 0;
                    object.imageDataHash = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.stickerPackSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.stickerPackSize = options.longs === String ? "0" : 0;
                    object.stickerPackOrigin = options.enums === String ? "FIRST_PARTY" : 0;
                }
                if (message.stickerPackId != null && message.hasOwnProperty("stickerPackId"))
                    object.stickerPackId = message.stickerPackId;
                if (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.name;
                if (message.publisher != null && message.hasOwnProperty("publisher"))
                    object.publisher = message.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 (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 (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 (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 (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.directPath;
                if (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.caption;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.packDescription != null && message.hasOwnProperty("packDescription"))
                    object.packDescription = message.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 (message.trayIconFileName != null && message.hasOwnProperty("trayIconFileName"))
                    object.trayIconFileName = message.trayIconFileName;
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    object.thumbnailDirectPath = message.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 (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 (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight"))
                    object.thumbnailHeight = message.thumbnailHeight;
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth"))
                    object.thumbnailWidth = message.thumbnailWidth;
                if (message.imageDataHash != null && message.hasOwnProperty("imageDataHash"))
                    object.imageDataHash = message.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 (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;
                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} fileName
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.fileName = "";

                /**
                 * Sticker isAnimated.
                 * @member {boolean} isAnimated
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.isAnimated = false;

                /**
                 * Sticker emojis.
                 * @member {Array.<string>} emojis
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.emojis = $util.emptyArray;

                /**
                 * Sticker accessibilityLabel.
                 * @member {string} accessibilityLabel
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.accessibilityLabel = "";

                /**
                 * Sticker isLottie.
                 * @member {boolean} isLottie
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.isLottie = false;

                /**
                 * Sticker mimetype.
                 * @member {string} mimetype
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.mimetype = "";

                /**
                 * 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";
                    if (message.fileName != null && message.hasOwnProperty("fileName"))
                        if (!$util.isString(message.fileName))
                            return "fileName: string expected";
                    if (message.isAnimated != null && message.hasOwnProperty("isAnimated"))
                        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"))
                        if (!$util.isString(message.accessibilityLabel))
                            return "accessibilityLabel: string expected";
                    if (message.isLottie != null && message.hasOwnProperty("isLottie"))
                        if (typeof message.isLottie !== "boolean")
                            return "isLottie: boolean expected";
                    if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                        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 (options.defaults) {
                        object.fileName = "";
                        object.isAnimated = false;
                        object.accessibilityLabel = "";
                        object.isLottie = false;
                        object.mimetype = "";
                    }
                    if (message.fileName != null && message.hasOwnProperty("fileName"))
                        object.fileName = message.fileName;
                    if (message.isAnimated != null && message.hasOwnProperty("isAnimated"))
                        object.isAnimated = message.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 (message.isLottie != null && message.hasOwnProperty("isLottie"))
                        object.isLottie = message.isLottie;
                    if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                        object.mimetype = message.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} rmrSource
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             */
            StickerSyncRMRMessage.prototype.rmrSource = "";

            /**
             * StickerSyncRMRMessage requestTimestamp.
             * @member {number|Long} requestTimestamp
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             */
            StickerSyncRMRMessage.prototype.requestTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * 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";
                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"))
                    if (!$util.isString(message.rmrSource))
                        return "rmrSource: string expected";
                if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp"))
                    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 (options.defaults) {
                    object.rmrSource = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.requestTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.requestTimestamp = options.longs === String ? "0" : 0;
                }
                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 (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;
                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} selectedId
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedId = "";

            /**
             * TemplateButtonReplyMessage selectedDisplayText.
             * @member {string} selectedDisplayText
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedDisplayText = "";

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

            /**
             * TemplateButtonReplyMessage selectedIndex.
             * @member {number} selectedIndex
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedIndex = 0;

            /**
             * TemplateButtonReplyMessage selectedCarouselCardIndex.
             * @member {number} selectedCarouselCardIndex
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedCarouselCardIndex = 0;

            /**
             * 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";
                if (message.selectedId != null && message.hasOwnProperty("selectedId"))
                    if (!$util.isString(message.selectedId))
                        return "selectedId: string expected";
                if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText"))
                    if (!$util.isString(message.selectedDisplayText))
                        return "selectedDisplayText: string expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex"))
                    if (!$util.isInteger(message.selectedIndex))
                        return "selectedIndex: integer expected";
                if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex"))
                    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 (options.defaults) {
                    object.selectedId = "";
                    object.selectedDisplayText = "";
                    object.contextInfo = null;
                    object.selectedIndex = 0;
                    object.selectedCarouselCardIndex = 0;
                }
                if (message.selectedId != null && message.hasOwnProperty("selectedId"))
                    object.selectedId = message.selectedId;
                if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText"))
                    object.selectedDisplayText = message.selectedDisplayText;
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex"))
                    object.selectedIndex = message.selectedIndex;
                if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex"))
                    object.selectedCarouselCardIndex = message.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} templateId
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            TemplateMessage.prototype.templateId = "";

            /**
             * 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 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")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) {
                    var error = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.verify(message.hydratedTemplate);
                    if (error)
                        return "hydratedTemplate." + error;
                }
                if (message.templateId != null && message.hasOwnProperty("templateId"))
                    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 (options.defaults) {
                    object.contextInfo = null;
                    object.hydratedTemplate = null;
                    object.templateId = "";
                }
                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 (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate"))
                    object.hydratedTemplate = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.toObject(message.hydratedTemplate, options);
                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;
                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 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")) {
                        var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.content);
                        if (error)
                            return "content." + error;
                    }
                    if (message.footer != null && message.hasOwnProperty("footer")) {
                        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 (options.defaults) {
                        object.content = null;
                        object.footer = null;
                    }
                    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 (message.footer != null && message.hasOwnProperty("footer"))
                        object.footer = $root.E2E.Message.HighlyStructuredMessage.toObject(message.footer, options);
                    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} hydratedContentText
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.hydratedContentText = "";

                /**
                 * HydratedFourRowTemplate hydratedFooterText.
                 * @member {string} hydratedFooterText
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.hydratedFooterText = "";

                /**
                 * HydratedFourRowTemplate hydratedButtons.
                 * @member {Array.<E2E.IHydratedTemplateButton>} hydratedButtons
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.hydratedButtons = $util.emptyArray;

                /**
                 * HydratedFourRowTemplate templateId.
                 * @member {string} templateId
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.templateId = "";

                /**
                 * HydratedFourRowTemplate maskLinkedDevices.
                 * @member {boolean} maskLinkedDevices
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.maskLinkedDevices = false;

                /**
                 * 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 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"))
                        if (!$util.isString(message.hydratedContentText))
                            return "hydratedContentText: string expected";
                    if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText"))
                        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"))
                        if (!$util.isString(message.templateId))
                            return "templateId: string expected";
                    if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices"))
                        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 (options.defaults) {
                        object.hydratedContentText = "";
                        object.hydratedFooterText = "";
                        object.templateId = "";
                        object.maskLinkedDevices = false;
                    }
                    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 (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText"))
                        object.hydratedFooterText = message.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 (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices"))
                        object.maskLinkedDevices = message.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} fbExperimentId
             * @memberof E2E.Message.URLMetadata
             * @instance
             */
            URLMetadata.prototype.fbExperimentId = 0;

            /**
             * 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";
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId"))
                    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 (options.defaults)
                    object.fbExperimentId = 0;
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId"))
                    object.fbExperimentId = message.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} username VideoEndCard username
             * @property {string} caption VideoEndCard caption
             * @property {string} thumbnailImageUrl VideoEndCard thumbnailImageUrl
             * @property {string} 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} username
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.username = "";

            /**
             * VideoEndCard caption.
             * @member {string} caption
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.caption = "";

            /**
             * VideoEndCard thumbnailImageUrl.
             * @member {string} thumbnailImageUrl
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.thumbnailImageUrl = "";

            /**
             * VideoEndCard profilePictureUrl.
             * @member {string} profilePictureUrl
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.profilePictureUrl = "";

            /**
             * 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();
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.username);
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.caption);
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.thumbnailImageUrl);
                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;
                    }
                }
                if (!message.hasOwnProperty("username"))
                    throw $util.ProtocolError("missing required 'username'", { instance: message });
                if (!message.hasOwnProperty("caption"))
                    throw $util.ProtocolError("missing required 'caption'", { instance: message });
                if (!message.hasOwnProperty("thumbnailImageUrl"))
                    throw $util.ProtocolError("missing required 'thumbnailImageUrl'", { instance: message });
                if (!message.hasOwnProperty("profilePictureUrl"))
                    throw $util.ProtocolError("missing required 'profilePictureUrl'", { instance: message });
                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";
                if (!$util.isString(message.username))
                    return "username: string expected";
                if (!$util.isString(message.caption))
                    return "caption: string expected";
                if (!$util.isString(message.thumbnailImageUrl))
                    return "thumbnailImageUrl: string expected";
                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 (options.defaults) {
                    object.username = "";
                    object.caption = "";
                    object.thumbnailImageUrl = "";
                    object.profilePictureUrl = "";
                }
                if (message.username != null && message.hasOwnProperty("username"))
                    object.username = message.username;
                if (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.caption;
                if (message.thumbnailImageUrl != null && message.hasOwnProperty("thumbnailImageUrl"))
                    object.thumbnailImageUrl = message.thumbnailImageUrl;
                if (message.profilePictureUrl != null && message.hasOwnProperty("profilePictureUrl"))
                    object.profilePictureUrl = message.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} url
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.url = "";

            /**
             * VideoMessage mimetype.
             * @member {string} mimetype
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mimetype = "";

            /**
             * VideoMessage fileSha256.
             * @member {Uint8Array} fileSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.fileSha256 = $util.newBuffer([]);

            /**
             * VideoMessage fileLength.
             * @member {number|Long} fileLength
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * VideoMessage seconds.
             * @member {number} seconds
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.seconds = 0;

            /**
             * VideoMessage mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mediaKey = $util.newBuffer([]);

            /**
             * VideoMessage caption.
             * @member {string} caption
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.caption = "";

            /**
             * VideoMessage gifPlayback.
             * @member {boolean} gifPlayback
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.gifPlayback = false;

            /**
             * VideoMessage height.
             * @member {number} height
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.height = 0;

            /**
             * VideoMessage width.
             * @member {number} width
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.width = 0;

            /**
             * VideoMessage fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * VideoMessage interactiveAnnotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} interactiveAnnotations
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.interactiveAnnotations = $util.emptyArray;

            /**
             * VideoMessage directPath.
             * @member {string} directPath
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.directPath = "";

            /**
             * VideoMessage mediaKeyTimestamp.
             * @member {number|Long} mediaKeyTimestamp
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * VideoMessage jpegThumbnail.
             * @member {Uint8Array} jpegThumbnail
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.jpegThumbnail = $util.newBuffer([]);

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

            /**
             * VideoMessage streamingSidecar.
             * @member {Uint8Array} streamingSidecar
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.streamingSidecar = $util.newBuffer([]);

            /**
             * VideoMessage gifAttribution.
             * @member {E2E.Message.VideoMessage.Attribution} gifAttribution
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.gifAttribution = 0;

            /**
             * VideoMessage viewOnce.
             * @member {boolean} viewOnce
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.viewOnce = false;

            /**
             * VideoMessage thumbnailDirectPath.
             * @member {string} thumbnailDirectPath
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.thumbnailDirectPath = "";

            /**
             * VideoMessage thumbnailSha256.
             * @member {Uint8Array} thumbnailSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.thumbnailSha256 = $util.newBuffer([]);

            /**
             * VideoMessage thumbnailEncSha256.
             * @member {Uint8Array} thumbnailEncSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]);

            /**
             * VideoMessage staticUrl.
             * @member {string} staticUrl
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.staticUrl = "";

            /**
             * VideoMessage annotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} annotations
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.annotations = $util.emptyArray;

            /**
             * VideoMessage accessibilityLabel.
             * @member {string} accessibilityLabel
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.accessibilityLabel = "";

            /**
             * VideoMessage processedVideos.
             * @member {Array.<E2E.IProcessedVideo>} processedVideos
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.processedVideos = $util.emptyArray;

            /**
             * VideoMessage externalShareFullVideoDurationInSeconds.
             * @member {number} externalShareFullVideoDurationInSeconds
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.externalShareFullVideoDurationInSeconds = 0;

            /**
             * VideoMessage motionPhotoPresentationOffsetMs.
             * @member {number|Long} motionPhotoPresentationOffsetMs
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.motionPhotoPresentationOffsetMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * VideoMessage metadataUrl.
             * @member {string} metadataUrl
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.metadataUrl = "";

            /**
             * VideoMessage videoSourceType.
             * @member {E2E.Message.VideoMessage.VideoSourceType} videoSourceType
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.videoSourceType = 0;

            /**
             * VideoMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain} mediaKeyDomain
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mediaKeyDomain = 0;

            /**
             * 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";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                    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"))
                    if (!$util.isInteger(message.seconds))
                        return "seconds: integer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.caption != null && message.hasOwnProperty("caption"))
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback"))
                    if (typeof message.gifPlayback !== "boolean")
                        return "gifPlayback: boolean expected";
                if (message.height != null && message.hasOwnProperty("height"))
                    if (!$util.isInteger(message.height))
                        return "height: integer expected";
                if (message.width != null && message.hasOwnProperty("width"))
                    if (!$util.isInteger(message.width))
                        return "width: integer expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    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"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                    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"))
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
                if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar"))
                    if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar)))
                        return "streamingSidecar: buffer expected";
                if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution"))
                    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"))
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256"))
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256"))
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                if (message.staticUrl != null && message.hasOwnProperty("staticUrl"))
                    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"))
                    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"))
                    if (!$util.isInteger(message.externalShareFullVideoDurationInSeconds))
                        return "externalShareFullVideoDurationInSeconds: integer expected";
                if (message.motionPhotoPresentationOffsetMs != null && message.hasOwnProperty("motionPhotoPresentationOffsetMs"))
                    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"))
                    if (!$util.isString(message.metadataUrl))
                        return "metadataUrl: string expected";
                if (message.videoSourceType != null && message.hasOwnProperty("videoSourceType"))
                    switch (message.videoSourceType) {
                    default:
                        return "videoSourceType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain"))
                    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 (options.defaults) {
                    object.url = "";
                    object.mimetype = "";
                    if (options.bytes === String)
                        object.fileSha256 = "";
                    else {
                        object.fileSha256 = [];
                        if (options.bytes !== Array)
                            object.fileSha256 = $util.newBuffer(object.fileSha256);
                    }
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    object.seconds = 0;
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    object.caption = "";
                    object.gifPlayback = false;
                    object.height = 0;
                    object.width = 0;
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    object.directPath = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                    if (options.bytes === String)
                        object.jpegThumbnail = "";
                    else {
                        object.jpegThumbnail = [];
                        if (options.bytes !== Array)
                            object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail);
                    }
                    object.contextInfo = null;
                    if (options.bytes === String)
                        object.streamingSidecar = "";
                    else {
                        object.streamingSidecar = [];
                        if (options.bytes !== Array)
                            object.streamingSidecar = $util.newBuffer(object.streamingSidecar);
                    }
                    object.gifAttribution = options.enums === String ? "NONE" : 0;
                    object.viewOnce = false;
                    object.thumbnailDirectPath = "";
                    if (options.bytes === String)
                        object.thumbnailSha256 = "";
                    else {
                        object.thumbnailSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256);
                    }
                    if (options.bytes === String)
                        object.thumbnailEncSha256 = "";
                    else {
                        object.thumbnailEncSha256 = [];
                        if (options.bytes !== Array)
                            object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256);
                    }
                    object.staticUrl = "";
                    object.accessibilityLabel = "";
                    object.externalShareFullVideoDurationInSeconds = 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.motionPhotoPresentationOffsetMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.motionPhotoPresentationOffsetMs = options.longs === String ? "0" : 0;
                    object.metadataUrl = "";
                    object.videoSourceType = options.enums === String ? "USER_VIDEO" : 0;
                    object.mediaKeyDomain = options.enums === String ? "UNSET" : 0;
                }
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    object.mimetype = message.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 (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 (message.seconds != null && message.hasOwnProperty("seconds"))
                    object.seconds = message.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 (message.caption != null && message.hasOwnProperty("caption"))
                    object.caption = message.caption;
                if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback"))
                    object.gifPlayback = message.gifPlayback;
                if (message.height != null && message.hasOwnProperty("height"))
                    object.height = message.height;
                if (message.width != null && message.hasOwnProperty("width"))
                    object.width = message.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 (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 (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 (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 (message.contextInfo != null && message.hasOwnProperty("contextInfo"))
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                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 (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 (message.viewOnce != null && message.hasOwnProperty("viewOnce"))
                    object.viewOnce = message.viewOnce;
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath"))
                    object.thumbnailDirectPath = message.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 (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 (message.staticUrl != null && message.hasOwnProperty("staticUrl"))
                    object.staticUrl = message.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 (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 (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 (message.metadataUrl != null && message.hasOwnProperty("metadataUrl"))
                    object.metadataUrl = message.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 (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;
                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;
    })();

    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} sharingLimited
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.sharingLimited = false;

        /**
         * LimitSharing trigger.
         * @member {Protocol.LimitSharing.TriggerType} trigger
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.trigger = 0;

        /**
         * LimitSharing limitSharingSettingTimestamp.
         * @member {number|Long} limitSharingSettingTimestamp
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.limitSharingSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * LimitSharing initiatedByMe.
         * @member {boolean} initiatedByMe
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.initiatedByMe = false;

        /**
         * 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";
            if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited"))
                if (typeof message.sharingLimited !== "boolean")
                    return "sharingLimited: boolean expected";
            if (message.trigger != null && message.hasOwnProperty("trigger"))
                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"))
                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"))
                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 (options.defaults) {
                object.sharingLimited = false;
                object.trigger = options.enums === String ? "UNKNOWN" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.limitSharingSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.limitSharingSettingTimestamp = options.longs === String ? "0" : 0;
                object.initiatedByMe = false;
            }
            if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited"))
                object.sharingLimited = message.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 (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 (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe"))
                object.initiatedByMe = message.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} remoteJid
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.remoteJid = "";

        /**
         * MessageKey fromMe.
         * @member {boolean} fromMe
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.fromMe = false;

        /**
         * MessageKey id.
         * @member {string} id
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.id = "";

        /**
         * MessageKey participant.
         * @member {string} participant
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.participant = "";

        /**
         * 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";
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid"))
                if (!$util.isString(message.remoteJid))
                    return "remoteJid: string expected";
            if (message.fromMe != null && message.hasOwnProperty("fromMe"))
                if (typeof message.fromMe !== "boolean")
                    return "fromMe: boolean expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.participant != null && message.hasOwnProperty("participant"))
                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 (options.defaults) {
                object.remoteJid = "";
                object.fromMe = false;
                object.id = "";
                object.participant = "";
            }
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid"))
                object.remoteJid = message.remoteJid;
            if (message.fromMe != null && message.hasOwnProperty("fromMe"))
                object.fromMe = message.fromMe;
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.participant != null && message.hasOwnProperty("participant"))
                object.participant = message.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.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} messageType
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.messageType = 0;

        /**
         * AIRichResponseSubMessage gridImageMetadata.
         * @member {AICommon.IAIRichResponseGridImageMetadata|null|undefined} gridImageMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.gridImageMetadata = null;

        /**
         * AIRichResponseSubMessage messageText.
         * @member {string} messageText
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.messageText = "";

        /**
         * 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;

        /**
         * 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";
            if (message.messageType != null && message.hasOwnProperty("messageType"))
                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")) {
                var error = $root.AICommon.AIRichResponseGridImageMetadata.verify(message.gridImageMetadata);
                if (error)
                    return "gridImageMetadata." + error;
            }
            if (message.messageText != null && message.hasOwnProperty("messageText"))
                if (!$util.isString(message.messageText))
                    return "messageText: string expected";
            if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) {
                var error = $root.AICommon.AIRichResponseInlineImageMetadata.verify(message.imageMetadata);
                if (error)
                    return "imageMetadata." + error;
            }
            if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
                var error = $root.AICommon.AIRichResponseCodeMetadata.verify(message.codeMetadata);
                if (error)
                    return "codeMetadata." + error;
            }
            if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
                var error = $root.AICommon.AIRichResponseTableMetadata.verify(message.tableMetadata);
                if (error)
                    return "tableMetadata." + error;
            }
            if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
                var error = $root.AICommon.AIRichResponseDynamicMetadata.verify(message.dynamicMetadata);
                if (error)
                    return "dynamicMetadata." + error;
            }
            if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) {
                var error = $root.AICommon.AIRichResponseLatexMetadata.verify(message.latexMetadata);
                if (error)
                    return "latexMetadata." + error;
            }
            if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) {
                var error = $root.AICommon.AIRichResponseMapMetadata.verify(message.mapMetadata);
                if (error)
                    return "mapMetadata." + error;
            }
            if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) {
                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 (options.defaults) {
                object.messageType = options.enums === String ? "AI_RICH_RESPONSE_UNKNOWN" : 0;
                object.gridImageMetadata = null;
                object.messageText = "";
                object.imageMetadata = null;
                object.codeMetadata = null;
                object.tableMetadata = null;
                object.dynamicMetadata = null;
                object.latexMetadata = null;
                object.mapMetadata = null;
                object.contentItemsMetadata = null;
            }
            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 (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata"))
                object.gridImageMetadata = $root.AICommon.AIRichResponseGridImageMetadata.toObject(message.gridImageMetadata, options);
            if (message.messageText != null && message.hasOwnProperty("messageText"))
                object.messageText = message.messageText;
            if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata"))
                object.imageMetadata = $root.AICommon.AIRichResponseInlineImageMetadata.toObject(message.imageMetadata, options);
            if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata"))
                object.codeMetadata = $root.AICommon.AIRichResponseCodeMetadata.toObject(message.codeMetadata, options);
            if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata"))
                object.tableMetadata = $root.AICommon.AIRichResponseTableMetadata.toObject(message.tableMetadata, options);
            if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata"))
                object.dynamicMetadata = $root.AICommon.AIRichResponseDynamicMetadata.toObject(message.dynamicMetadata, options);
            if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata"))
                object.latexMetadata = $root.AICommon.AIRichResponseLatexMetadata.toObject(message.latexMetadata, options);
            if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata"))
                object.mapMetadata = $root.AICommon.AIRichResponseMapMetadata.toObject(message.mapMetadata, options);
            if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata"))
                object.contentItemsMetadata = $root.AICommon.AIRichResponseContentItemsMetadata.toObject(message.contentItemsMetadata, options);
            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} contentType
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         */
        AIRichResponseContentItemsMetadata.prototype.contentType = 0;

        /**
         * 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";
            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"))
                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 (options.defaults)
                object.contentType = options.enums === String ? "DEFAULT" : 0;
            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;
            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} title
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.title = "";

            /**
             * AIRichResponseReelItem profileIconUrl.
             * @member {string} profileIconUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.profileIconUrl = "";

            /**
             * AIRichResponseReelItem thumbnailUrl.
             * @member {string} thumbnailUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.thumbnailUrl = "";

            /**
             * AIRichResponseReelItem videoUrl.
             * @member {string} videoUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.videoUrl = "";

            /**
             * 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";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl"))
                    if (!$util.isString(message.profileIconUrl))
                        return "profileIconUrl: string expected";
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl"))
                    if (!$util.isString(message.thumbnailUrl))
                        return "thumbnailUrl: string expected";
                if (message.videoUrl != null && message.hasOwnProperty("videoUrl"))
                    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 (options.defaults) {
                    object.title = "";
                    object.profileIconUrl = "";
                    object.thumbnailUrl = "";
                    object.videoUrl = "";
                }
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.title;
                if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl"))
                    object.profileIconUrl = message.profileIconUrl;
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl"))
                    object.thumbnailUrl = message.thumbnailUrl;
                if (message.videoUrl != null && message.hasOwnProperty("videoUrl"))
                    object.videoUrl = message.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} centerLatitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.centerLatitude = 0;

        /**
         * AIRichResponseMapMetadata centerLongitude.
         * @member {number} centerLongitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.centerLongitude = 0;

        /**
         * AIRichResponseMapMetadata latitudeDelta.
         * @member {number} latitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.latitudeDelta = 0;

        /**
         * AIRichResponseMapMetadata longitudeDelta.
         * @member {number} longitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.longitudeDelta = 0;

        /**
         * AIRichResponseMapMetadata annotations.
         * @member {Array.<AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation>} annotations
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.annotations = $util.emptyArray;

        /**
         * AIRichResponseMapMetadata showInfoList.
         * @member {boolean} showInfoList
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.showInfoList = false;

        /**
         * 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";
            if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude"))
                if (typeof message.centerLatitude !== "number")
                    return "centerLatitude: number expected";
            if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude"))
                if (typeof message.centerLongitude !== "number")
                    return "centerLongitude: number expected";
            if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta"))
                if (typeof message.latitudeDelta !== "number")
                    return "latitudeDelta: number expected";
            if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta"))
                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"))
                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 (options.defaults) {
                object.centerLatitude = 0;
                object.centerLongitude = 0;
                object.latitudeDelta = 0;
                object.longitudeDelta = 0;
                object.showInfoList = false;
            }
            if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude"))
                object.centerLatitude = options.json && !isFinite(message.centerLatitude) ? String(message.centerLatitude) : message.centerLatitude;
            if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude"))
                object.centerLongitude = options.json && !isFinite(message.centerLongitude) ? String(message.centerLongitude) : message.centerLongitude;
            if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta"))
                object.latitudeDelta = options.json && !isFinite(message.latitudeDelta) ? String(message.latitudeDelta) : message.latitudeDelta;
            if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta"))
                object.longitudeDelta = options.json && !isFinite(message.longitudeDelta) ? String(message.longitudeDelta) : message.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;
            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} annotationNumber
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.annotationNumber = 0;

            /**
             * AIRichResponseMapAnnotation latitude.
             * @member {number} latitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.latitude = 0;

            /**
             * AIRichResponseMapAnnotation longitude.
             * @member {number} longitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.longitude = 0;

            /**
             * AIRichResponseMapAnnotation title.
             * @member {string} title
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.title = "";

            /**
             * AIRichResponseMapAnnotation body.
             * @member {string} body
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.body = "";

            /**
             * 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";
                if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber"))
                    if (!$util.isInteger(message.annotationNumber))
                        return "annotationNumber: integer expected";
                if (message.latitude != null && message.hasOwnProperty("latitude"))
                    if (typeof message.latitude !== "number")
                        return "latitude: number expected";
                if (message.longitude != null && message.hasOwnProperty("longitude"))
                    if (typeof message.longitude !== "number")
                        return "longitude: number expected";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.body != null && message.hasOwnProperty("body"))
                    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 (options.defaults) {
                    object.annotationNumber = 0;
                    object.latitude = 0;
                    object.longitude = 0;
                    object.title = "";
                    object.body = "";
                }
                if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber"))
                    object.annotationNumber = message.annotationNumber;
                if (message.latitude != null && message.hasOwnProperty("latitude"))
                    object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
                if (message.longitude != null && message.hasOwnProperty("longitude"))
                    object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.title;
                if (message.body != null && message.hasOwnProperty("body"))
                    object.body = message.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} text
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @instance
         */
        AIRichResponseLatexMetadata.prototype.text = "";

        /**
         * AIRichResponseLatexMetadata expressions.
         * @member {Array.<AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression>} expressions
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @instance
         */
        AIRichResponseLatexMetadata.prototype.expressions = $util.emptyArray;

        /**
         * 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";
            if (message.text != null && message.hasOwnProperty("text"))
                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 (options.defaults)
                object.text = "";
            if (message.text != null && message.hasOwnProperty("text"))
                object.text = message.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} latexExpression
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.latexExpression = "";

            /**
             * AIRichResponseLatexExpression url.
             * @member {string} url
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.url = "";

            /**
             * AIRichResponseLatexExpression width.
             * @member {number} width
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.width = 0;

            /**
             * AIRichResponseLatexExpression height.
             * @member {number} height
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.height = 0;

            /**
             * AIRichResponseLatexExpression fontHeight.
             * @member {number} fontHeight
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.fontHeight = 0;

            /**
             * AIRichResponseLatexExpression imageTopPadding.
             * @member {number} imageTopPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageTopPadding = 0;

            /**
             * AIRichResponseLatexExpression imageLeadingPadding.
             * @member {number} imageLeadingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageLeadingPadding = 0;

            /**
             * AIRichResponseLatexExpression imageBottomPadding.
             * @member {number} imageBottomPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageBottomPadding = 0;

            /**
             * AIRichResponseLatexExpression imageTrailingPadding.
             * @member {number} imageTrailingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageTrailingPadding = 0;

            /**
             * 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";
                if (message.latexExpression != null && message.hasOwnProperty("latexExpression"))
                    if (!$util.isString(message.latexExpression))
                        return "latexExpression: string expected";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.width != null && message.hasOwnProperty("width"))
                    if (typeof message.width !== "number")
                        return "width: number expected";
                if (message.height != null && message.hasOwnProperty("height"))
                    if (typeof message.height !== "number")
                        return "height: number expected";
                if (message.fontHeight != null && message.hasOwnProperty("fontHeight"))
                    if (typeof message.fontHeight !== "number")
                        return "fontHeight: number expected";
                if (message.imageTopPadding != null && message.hasOwnProperty("imageTopPadding"))
                    if (typeof message.imageTopPadding !== "number")
                        return "imageTopPadding: number expected";
                if (message.imageLeadingPadding != null && message.hasOwnProperty("imageLeadingPadding"))
                    if (typeof message.imageLeadingPadding !== "number")
                        return "imageLeadingPadding: number expected";
                if (message.imageBottomPadding != null && message.hasOwnProperty("imageBottomPadding"))
                    if (typeof message.imageBottomPadding !== "number")
                        return "imageBottomPadding: number expected";
                if (message.imageTrailingPadding != null && message.hasOwnProperty("imageTrailingPadding"))
                    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 (options.defaults) {
                    object.latexExpression = "";
                    object.url = "";
                    object.width = 0;
                    object.height = 0;
                    object.fontHeight = 0;
                    object.imageTopPadding = 0;
                    object.imageLeadingPadding = 0;
                    object.imageBottomPadding = 0;
                    object.imageTrailingPadding = 0;
                }
                if (message.latexExpression != null && message.hasOwnProperty("latexExpression"))
                    object.latexExpression = message.latexExpression;
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                if (message.width != null && message.hasOwnProperty("width"))
                    object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width;
                if (message.height != null && message.hasOwnProperty("height"))
                    object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height;
                if (message.fontHeight != null && message.hasOwnProperty("fontHeight"))
                    object.fontHeight = options.json && !isFinite(message.fontHeight) ? String(message.fontHeight) : message.fontHeight;
                if (message.imageTopPadding != null && message.hasOwnProperty("imageTopPadding"))
                    object.imageTopPadding = options.json && !isFinite(message.imageTopPadding) ? String(message.imageTopPadding) : message.imageTopPadding;
                if (message.imageLeadingPadding != null && message.hasOwnProperty("imageLeadingPadding"))
                    object.imageLeadingPadding = options.json && !isFinite(message.imageLeadingPadding) ? String(message.imageLeadingPadding) : message.imageLeadingPadding;
                if (message.imageBottomPadding != null && message.hasOwnProperty("imageBottomPadding"))
                    object.imageBottomPadding = options.json && !isFinite(message.imageBottomPadding) ? String(message.imageBottomPadding) : message.imageBottomPadding;
                if (message.imageTrailingPadding != null && message.hasOwnProperty("imageTrailingPadding"))
                    object.imageTrailingPadding = options.json && !isFinite(message.imageTrailingPadding) ? String(message.imageTrailingPadding) : message.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} data
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @instance
         */
        AIRichResponseUnifiedResponse.prototype.data = $util.newBuffer([]);

        /**
         * 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";
            if (message.data != null && message.hasOwnProperty("data"))
                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 (options.defaults)
                if (options.bytes === String)
                    object.data = "";
                else {
                    object.data = [];
                    if (options.bytes !== Array)
                        object.data = $util.newBuffer(object.data);
                }
            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;
            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} type
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.type = 0;

        /**
         * AIRichResponseDynamicMetadata version.
         * @member {number|Long} version
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * AIRichResponseDynamicMetadata url.
         * @member {string} url
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.url = "";

        /**
         * AIRichResponseDynamicMetadata loopCount.
         * @member {number} loopCount
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.loopCount = 0;

        /**
         * 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";
            if (message.type != null && message.hasOwnProperty("type"))
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.version != null && message.hasOwnProperty("version"))
                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"))
                if (!$util.isString(message.url))
                    return "url: string expected";
            if (message.loopCount != null && message.hasOwnProperty("loopCount"))
                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 (options.defaults) {
                object.type = options.enums === String ? "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.version = options.longs === String ? "0" : 0;
                object.url = "";
                object.loopCount = 0;
            }
            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 (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 (message.url != null && message.hasOwnProperty("url"))
                object.url = message.url;
            if (message.loopCount != null && message.hasOwnProperty("loopCount"))
                object.loopCount = message.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} title
         * @memberof AICommon.AIRichResponseTableMetadata
         * @instance
         */
        AIRichResponseTableMetadata.prototype.title = "";

        /**
         * 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";
            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"))
                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 (options.defaults)
                object.title = "";
            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;
            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} isHeading
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             */
            AIRichResponseTableRow.prototype.isHeading = false;

            /**
             * 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";
                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"))
                    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 (options.defaults)
                    object.isHeading = false;
                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;
                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} codeLanguage
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         */
        AIRichResponseCodeMetadata.prototype.codeLanguage = "";

        /**
         * AIRichResponseCodeMetadata codeBlocks.
         * @member {Array.<AICommon.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock>} codeBlocks
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         */
        AIRichResponseCodeMetadata.prototype.codeBlocks = $util.emptyArray;

        /**
         * 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";
            if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage"))
                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 (options.defaults)
                object.codeLanguage = "";
            if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage"))
                object.codeLanguage = message.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} highlightType
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            AIRichResponseCodeBlock.prototype.highlightType = 0;

            /**
             * AIRichResponseCodeBlock codeContent.
             * @member {string} codeContent
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            AIRichResponseCodeBlock.prototype.codeContent = "";

            /**
             * 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";
                if (message.highlightType != null && message.hasOwnProperty("highlightType"))
                    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"))
                    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 (options.defaults) {
                    object.highlightType = options.enums === String ? "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT" : 0;
                    object.codeContent = "";
                }
                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 (message.codeContent != null && message.hasOwnProperty("codeContent"))
                    object.codeContent = message.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} imageText
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.imageText = "";

        /**
         * AIRichResponseInlineImageMetadata alignment.
         * @member {AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment} alignment
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.alignment = 0;

        /**
         * AIRichResponseInlineImageMetadata tapLinkUrl.
         * @member {string} tapLinkUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = "";

        /**
         * 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";
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
                var error = $root.AICommon.AIRichResponseImageURL.verify(message.imageUrl);
                if (error)
                    return "imageUrl." + error;
            }
            if (message.imageText != null && message.hasOwnProperty("imageText"))
                if (!$util.isString(message.imageText))
                    return "imageText: string expected";
            if (message.alignment != null && message.hasOwnProperty("alignment"))
                switch (message.alignment) {
                default:
                    return "alignment: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl"))
                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 (options.defaults) {
                object.imageUrl = null;
                object.imageText = "";
                object.alignment = options.enums === String ? "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED" : 0;
                object.tapLinkUrl = "";
            }
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl"))
                object.imageUrl = $root.AICommon.AIRichResponseImageURL.toObject(message.imageUrl, options);
            if (message.imageText != null && message.hasOwnProperty("imageText"))
                object.imageText = message.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 (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl"))
                object.tapLinkUrl = message.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;

        /**
         * 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";
            if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl")) {
                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 (options.defaults)
                object.gridImageUrl = null;
            if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl"))
                object.gridImageUrl = $root.AICommon.AIRichResponseImageURL.toObject(message.gridImageUrl, options);
            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} imagePreviewUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.imagePreviewUrl = "";

        /**
         * AIRichResponseImageURL imageHighResUrl.
         * @member {string} imageHighResUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.imageHighResUrl = "";

        /**
         * AIRichResponseImageURL sourceUrl.
         * @member {string} sourceUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.sourceUrl = "";

        /**
         * 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";
            if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl"))
                if (!$util.isString(message.imagePreviewUrl))
                    return "imagePreviewUrl: string expected";
            if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl"))
                if (!$util.isString(message.imageHighResUrl))
                    return "imageHighResUrl: string expected";
            if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl"))
                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 (options.defaults) {
                object.imagePreviewUrl = "";
                object.imageHighResUrl = "";
                object.sourceUrl = "";
            }
            if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl"))
                object.imagePreviewUrl = message.imagePreviewUrl;
            if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl"))
                object.imageHighResUrl = message.imageHighResUrl;
            if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl"))
                object.sourceUrl = message.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} botEntryPointOrigin
         * @memberof AICommon.BotMessageSharingInfo
         * @instance
         */
        BotMessageSharingInfo.prototype.botEntryPointOrigin = 0;

        /**
         * BotMessageSharingInfo forwardScore.
         * @member {number} forwardScore
         * @memberof AICommon.BotMessageSharingInfo
         * @instance
         */
        BotMessageSharingInfo.prototype.forwardScore = 0;

        /**
         * 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";
            if (message.botEntryPointOrigin != null && message.hasOwnProperty("botEntryPointOrigin"))
                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:
                    break;
                }
            if (message.forwardScore != null && message.hasOwnProperty("forwardScore"))
                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;
            }
            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 (options.defaults) {
                object.botEntryPointOrigin = options.enums === String ? "UNDEFINED_ENTRY_POINT" : 0;
                object.forwardScore = 0;
            }
            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 (message.forwardScore != null && message.hasOwnProperty("forwardScore"))
                object.forwardScore = message.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} botName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.botName = "";

        /**
         * ForwardedAIBotMessageInfo botJid.
         * @member {string} botJid
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.botJid = "";

        /**
         * ForwardedAIBotMessageInfo creatorName.
         * @member {string} creatorName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.creatorName = "";

        /**
         * 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";
            if (message.botName != null && message.hasOwnProperty("botName"))
                if (!$util.isString(message.botName))
                    return "botName: string expected";
            if (message.botJid != null && message.hasOwnProperty("botJid"))
                if (!$util.isString(message.botJid))
                    return "botJid: string expected";
            if (message.creatorName != null && message.hasOwnProperty("creatorName"))
                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 (options.defaults) {
                object.botName = "";
                object.botJid = "";
                object.creatorName = "";
            }
            if (message.botName != null && message.hasOwnProperty("botName"))
                object.botName = message.botName;
            if (message.botJid != null && message.hasOwnProperty("botJid"))
                object.botJid = message.botJid;
            if (message.creatorName != null && message.hasOwnProperty("creatorName"))
                object.creatorName = message.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} kind
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kind = 0;

        /**
         * BotFeedbackMessage text.
         * @member {string} text
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.text = "";

        /**
         * BotFeedbackMessage kindNegative.
         * @member {number|Long} kindNegative
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindNegative = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * BotFeedbackMessage kindPositive.
         * @member {number|Long} kindPositive
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindPositive = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * BotFeedbackMessage kindReport.
         * @member {AICommon.BotFeedbackMessage.ReportKind} kindReport
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindReport = 0;

        /**
         * BotFeedbackMessage sideBySideSurveyMetadata.
         * @member {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata|null|undefined} sideBySideSurveyMetadata
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.sideBySideSurveyMetadata = null;

        /**
         * 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";
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                var error = $root.Protocol.MessageKey.verify(message.messageKey);
                if (error)
                    return "messageKey." + error;
            }
            if (message.kind != null && message.hasOwnProperty("kind"))
                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"))
                if (!$util.isString(message.text))
                    return "text: string expected";
            if (message.kindNegative != null && message.hasOwnProperty("kindNegative"))
                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"))
                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"))
                switch (message.kindReport) {
                default:
                    return "kindReport: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.sideBySideSurveyMetadata != null && message.hasOwnProperty("sideBySideSurveyMetadata")) {
                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 (options.defaults) {
                object.messageKey = null;
                object.kind = options.enums === String ? "BOT_FEEDBACK_POSITIVE" : 0;
                object.text = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.kindNegative = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.kindNegative = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.kindPositive = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.kindPositive = options.longs === String ? "0" : 0;
                object.kindReport = options.enums === String ? "NONE" : 0;
                object.sideBySideSurveyMetadata = null;
            }
            if (message.messageKey != null && message.hasOwnProperty("messageKey"))
                object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
            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 (message.text != null && message.hasOwnProperty("text"))
                object.text = message.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 (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 (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 (message.sideBySideSurveyMetadata != null && message.hasOwnProperty("sideBySideSurveyMetadata"))
                object.sideBySideSurveyMetadata = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.toObject(message.sideBySideSurveyMetadata, options);
            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
             */

            /**
             * 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} selectedRequestId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.selectedRequestId = "";

            /**
             * SideBySideSurveyMetadata surveyId.
             * @member {number} surveyId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.surveyId = 0;

            /**
             * SideBySideSurveyMetadata simonSessionFbid.
             * @member {string} simonSessionFbid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.simonSessionFbid = "";

            /**
             * SideBySideSurveyMetadata responseOtid.
             * @member {string} responseOtid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.responseOtid = "";

            /**
             * SideBySideSurveyMetadata responseTimestampMsString.
             * @member {string} responseTimestampMsString
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.responseTimestampMsString = "";

            /**
             * SideBySideSurveyMetadata isSelectedResponsePrimary.
             * @member {boolean} isSelectedResponsePrimary
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.isSelectedResponsePrimary = false;

            /**
             * SideBySideSurveyMetadata messageIdToEdit.
             * @member {string} messageIdToEdit
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.messageIdToEdit = "";

            /**
             * SideBySideSurveyMetadata analyticsData.
             * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData|null|undefined} analyticsData
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.analyticsData = null;

            /**
             * 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();
                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;
                        }
                    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";
                if (message.selectedRequestId != null && message.hasOwnProperty("selectedRequestId"))
                    if (!$util.isString(message.selectedRequestId))
                        return "selectedRequestId: string expected";
                if (message.surveyId != null && message.hasOwnProperty("surveyId"))
                    if (!$util.isInteger(message.surveyId))
                        return "surveyId: integer expected";
                if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid"))
                    if (!$util.isString(message.simonSessionFbid))
                        return "simonSessionFbid: string expected";
                if (message.responseOtid != null && message.hasOwnProperty("responseOtid"))
                    if (!$util.isString(message.responseOtid))
                        return "responseOtid: string expected";
                if (message.responseTimestampMsString != null && message.hasOwnProperty("responseTimestampMsString"))
                    if (!$util.isString(message.responseTimestampMsString))
                        return "responseTimestampMsString: string expected";
                if (message.isSelectedResponsePrimary != null && message.hasOwnProperty("isSelectedResponsePrimary"))
                    if (typeof message.isSelectedResponsePrimary !== "boolean")
                        return "isSelectedResponsePrimary: boolean expected";
                if (message.messageIdToEdit != null && message.hasOwnProperty("messageIdToEdit"))
                    if (!$util.isString(message.messageIdToEdit))
                        return "messageIdToEdit: string expected";
                if (message.analyticsData != null && message.hasOwnProperty("analyticsData")) {
                    var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.verify(message.analyticsData);
                    if (error)
                        return "analyticsData." + 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);
                }
                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 (options.defaults) {
                    object.selectedRequestId = "";
                    object.surveyId = 0;
                    object.simonSessionFbid = "";
                    object.responseOtid = "";
                    object.responseTimestampMsString = "";
                    object.isSelectedResponsePrimary = false;
                    object.messageIdToEdit = "";
                    object.analyticsData = null;
                }
                if (message.selectedRequestId != null && message.hasOwnProperty("selectedRequestId"))
                    object.selectedRequestId = message.selectedRequestId;
                if (message.surveyId != null && message.hasOwnProperty("surveyId"))
                    object.surveyId = message.surveyId;
                if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid"))
                    object.simonSessionFbid = message.simonSessionFbid;
                if (message.responseOtid != null && message.hasOwnProperty("responseOtid"))
                    object.responseOtid = message.responseOtid;
                if (message.responseTimestampMsString != null && message.hasOwnProperty("responseTimestampMsString"))
                    object.responseTimestampMsString = message.responseTimestampMsString;
                if (message.isSelectedResponsePrimary != null && message.hasOwnProperty("isSelectedResponsePrimary"))
                    object.isSelectedResponsePrimary = message.isSelectedResponsePrimary;
                if (message.messageIdToEdit != null && message.hasOwnProperty("messageIdToEdit"))
                    object.messageIdToEdit = message.messageIdToEdit;
                if (message.analyticsData != null && message.hasOwnProperty("analyticsData"))
                    object.analyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.toObject(message.analyticsData, options);
                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
                 */

                /**
                 * 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} tessaEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                SideBySideSurveyAnalyticsData.prototype.tessaEvent = "";

                /**
                 * SideBySideSurveyAnalyticsData tessaSessionFbid.
                 * @member {string} tessaSessionFbid
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                SideBySideSurveyAnalyticsData.prototype.tessaSessionFbid = "";

                /**
                 * 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);
                    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;
                            }
                        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";
                    if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent"))
                        if (!$util.isString(message.tessaEvent))
                            return "tessaEvent: string expected";
                    if (message.tessaSessionFbid != null && message.hasOwnProperty("tessaSessionFbid"))
                        if (!$util.isString(message.tessaSessionFbid))
                            return "tessaSessionFbid: 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);
                    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 (options.defaults) {
                        object.tessaEvent = "";
                        object.tessaSessionFbid = "";
                    }
                    if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent"))
                        object.tessaEvent = message.tessaEvent;
                    if (message.tessaSessionFbid != null && message.hasOwnProperty("tessaSessionFbid"))
                        object.tessaSessionFbid = message.tessaSessionFbid;
                    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;
            })();

            return SideBySideSurveyMetadata;
        })();

        return BotFeedbackMessage;
    })();

    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 {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} personaId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.personaId = "";

        /**
         * 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} invokerJid
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.invokerJid = "";

        /**
         * 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} timezone
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.timezone = "";

        /**
         * 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} messageDisclaimerText
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.messageDisclaimerText = "";

        /**
         * 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} aiConversationContext
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.aiConversationContext = $util.newBuffer([]);

        /**
         * 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} conversationStarterPromptId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.conversationStarterPromptId = "";

        /**
         * BotMetadata botResponseId.
         * @member {string} botResponseId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botResponseId = "";

        /**
         * 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 internalMetadata.
         * @member {Uint8Array} internalMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.internalMetadata = $util.newBuffer([]);

        /**
         * 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.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 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";
            if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) {
                var error = $root.AICommon.BotAvatarMetadata.verify(message.avatarMetadata);
                if (error)
                    return "avatarMetadata." + error;
            }
            if (message.personaId != null && message.hasOwnProperty("personaId"))
                if (!$util.isString(message.personaId))
                    return "personaId: string expected";
            if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) {
                var error = $root.AICommon.BotPluginMetadata.verify(message.pluginMetadata);
                if (error)
                    return "pluginMetadata." + error;
            }
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) {
                var error = $root.AICommon.BotSuggestedPromptMetadata.verify(message.suggestedPromptMetadata);
                if (error)
                    return "suggestedPromptMetadata." + error;
            }
            if (message.invokerJid != null && message.hasOwnProperty("invokerJid"))
                if (!$util.isString(message.invokerJid))
                    return "invokerJid: string expected";
            if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata")) {
                var error = $root.AICommon.BotSessionMetadata.verify(message.sessionMetadata);
                if (error)
                    return "sessionMetadata." + error;
            }
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) {
                var error = $root.AICommon.BotMemuMetadata.verify(message.memuMetadata);
                if (error)
                    return "memuMetadata." + error;
            }
            if (message.timezone != null && message.hasOwnProperty("timezone"))
                if (!$util.isString(message.timezone))
                    return "timezone: string expected";
            if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata")) {
                var error = $root.AICommon.BotReminderMetadata.verify(message.reminderMetadata);
                if (error)
                    return "reminderMetadata." + error;
            }
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) {
                var error = $root.AICommon.BotModelMetadata.verify(message.modelMetadata);
                if (error)
                    return "modelMetadata." + error;
            }
            if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText"))
                if (!$util.isString(message.messageDisclaimerText))
                    return "messageDisclaimerText: string expected";
            if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata")) {
                var error = $root.AICommon.BotProgressIndicatorMetadata.verify(message.progressIndicatorMetadata);
                if (error)
                    return "progressIndicatorMetadata." + error;
            }
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) {
                var error = $root.AICommon.BotCapabilityMetadata.verify(message.capabilityMetadata);
                if (error)
                    return "capabilityMetadata." + error;
            }
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) {
                var error = $root.AICommon.BotImagineMetadata.verify(message.imagineMetadata);
                if (error)
                    return "imagineMetadata." + error;
            }
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) {
                var error = $root.AICommon.BotMemoryMetadata.verify(message.memoryMetadata);
                if (error)
                    return "memoryMetadata." + error;
            }
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) {
                var error = $root.AICommon.BotRenderingMetadata.verify(message.renderingMetadata);
                if (error)
                    return "renderingMetadata." + error;
            }
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) {
                var error = $root.AICommon.BotMetricsMetadata.verify(message.botMetricsMetadata);
                if (error)
                    return "botMetricsMetadata." + error;
            }
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) {
                var error = $root.AICommon.BotLinkedAccountsMetadata.verify(message.botLinkedAccountsMetadata);
                if (error)
                    return "botLinkedAccountsMetadata." + error;
            }
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata")) {
                var error = $root.AICommon.BotSourcesMetadata.verify(message.richResponseSourcesMetadata);
                if (error)
                    return "richResponseSourcesMetadata." + error;
            }
            if (message.aiConversationContext != null && message.hasOwnProperty("aiConversationContext"))
                if (!(message.aiConversationContext && typeof message.aiConversationContext.length === "number" || $util.isString(message.aiConversationContext)))
                    return "aiConversationContext: buffer expected";
            if (message.botPromotionMessageMetadata != null && message.hasOwnProperty("botPromotionMessageMetadata")) {
                var error = $root.AICommon.BotPromotionMessageMetadata.verify(message.botPromotionMessageMetadata);
                if (error)
                    return "botPromotionMessageMetadata." + error;
            }
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata")) {
                var error = $root.AICommon.BotModeSelectionMetadata.verify(message.botModeSelectionMetadata);
                if (error)
                    return "botModeSelectionMetadata." + error;
            }
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata")) {
                var error = $root.AICommon.BotQuotaMetadata.verify(message.botQuotaMetadata);
                if (error)
                    return "botQuotaMetadata." + error;
            }
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata")) {
                var error = $root.AICommon.BotAgeCollectionMetadata.verify(message.botAgeCollectionMetadata);
                if (error)
                    return "botAgeCollectionMetadata." + error;
            }
            if (message.conversationStarterPromptId != null && message.hasOwnProperty("conversationStarterPromptId"))
                if (!$util.isString(message.conversationStarterPromptId))
                    return "conversationStarterPromptId: string expected";
            if (message.botResponseId != null && message.hasOwnProperty("botResponseId"))
                if (!$util.isString(message.botResponseId))
                    return "botResponseId: string expected";
            if (message.verificationMetadata != null && message.hasOwnProperty("verificationMetadata")) {
                var error = $root.AICommon.BotSignatureVerificationMetadata.verify(message.verificationMetadata);
                if (error)
                    return "verificationMetadata." + error;
            }
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation")) {
                var error = $root.AICommon.BotUnifiedResponseMutation.verify(message.unifiedResponseMutation);
                if (error)
                    return "unifiedResponseMutation." + error;
            }
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata")) {
                var error = $root.AICommon.BotMessageOriginMetadata.verify(message.botMessageOriginMetadata);
                if (error)
                    return "botMessageOriginMetadata." + error;
            }
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata")) {
                var error = $root.AICommon.InThreadSurveyMetadata.verify(message.inThreadSurveyMetadata);
                if (error)
                    return "inThreadSurveyMetadata." + error;
            }
            if (message.botThreadInfo != null && message.hasOwnProperty("botThreadInfo")) {
                var error = $root.AICommon.AIThreadInfo.verify(message.botThreadInfo);
                if (error)
                    return "botThreadInfo." + error;
            }
            if (message.internalMetadata != null && message.hasOwnProperty("internalMetadata"))
                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.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 (options.defaults) {
                object.avatarMetadata = null;
                object.personaId = "";
                object.pluginMetadata = null;
                object.suggestedPromptMetadata = null;
                object.invokerJid = "";
                object.sessionMetadata = null;
                object.memuMetadata = null;
                object.timezone = "";
                object.reminderMetadata = null;
                object.modelMetadata = null;
                object.messageDisclaimerText = "";
                object.progressIndicatorMetadata = null;
                object.capabilityMetadata = null;
                object.imagineMetadata = null;
                object.memoryMetadata = null;
                object.renderingMetadata = null;
                object.botMetricsMetadata = null;
                object.botLinkedAccountsMetadata = null;
                object.richResponseSourcesMetadata = null;
                if (options.bytes === String)
                    object.aiConversationContext = "";
                else {
                    object.aiConversationContext = [];
                    if (options.bytes !== Array)
                        object.aiConversationContext = $util.newBuffer(object.aiConversationContext);
                }
                object.botPromotionMessageMetadata = null;
                object.botModeSelectionMetadata = null;
                object.botQuotaMetadata = null;
                object.botAgeCollectionMetadata = null;
                object.conversationStarterPromptId = "";
                object.botResponseId = "";
                object.verificationMetadata = null;
                object.unifiedResponseMutation = null;
                object.botMessageOriginMetadata = null;
                object.inThreadSurveyMetadata = null;
                object.botThreadInfo = null;
                if (options.bytes === String)
                    object.internalMetadata = "";
                else {
                    object.internalMetadata = [];
                    if (options.bytes !== Array)
                        object.internalMetadata = $util.newBuffer(object.internalMetadata);
                }
            }
            if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata"))
                object.avatarMetadata = $root.AICommon.BotAvatarMetadata.toObject(message.avatarMetadata, options);
            if (message.personaId != null && message.hasOwnProperty("personaId"))
                object.personaId = message.personaId;
            if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata"))
                object.pluginMetadata = $root.AICommon.BotPluginMetadata.toObject(message.pluginMetadata, options);
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata"))
                object.suggestedPromptMetadata = $root.AICommon.BotSuggestedPromptMetadata.toObject(message.suggestedPromptMetadata, options);
            if (message.invokerJid != null && message.hasOwnProperty("invokerJid"))
                object.invokerJid = message.invokerJid;
            if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata"))
                object.sessionMetadata = $root.AICommon.BotSessionMetadata.toObject(message.sessionMetadata, options);
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata"))
                object.memuMetadata = $root.AICommon.BotMemuMetadata.toObject(message.memuMetadata, options);
            if (message.timezone != null && message.hasOwnProperty("timezone"))
                object.timezone = message.timezone;
            if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata"))
                object.reminderMetadata = $root.AICommon.BotReminderMetadata.toObject(message.reminderMetadata, options);
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata"))
                object.modelMetadata = $root.AICommon.BotModelMetadata.toObject(message.modelMetadata, options);
            if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText"))
                object.messageDisclaimerText = message.messageDisclaimerText;
            if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata"))
                object.progressIndicatorMetadata = $root.AICommon.BotProgressIndicatorMetadata.toObject(message.progressIndicatorMetadata, options);
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata"))
                object.capabilityMetadata = $root.AICommon.BotCapabilityMetadata.toObject(message.capabilityMetadata, options);
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata"))
                object.imagineMetadata = $root.AICommon.BotImagineMetadata.toObject(message.imagineMetadata, options);
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata"))
                object.memoryMetadata = $root.AICommon.BotMemoryMetadata.toObject(message.memoryMetadata, options);
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata"))
                object.renderingMetadata = $root.AICommon.BotRenderingMetadata.toObject(message.renderingMetadata, options);
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata"))
                object.botMetricsMetadata = $root.AICommon.BotMetricsMetadata.toObject(message.botMetricsMetadata, options);
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata"))
                object.botLinkedAccountsMetadata = $root.AICommon.BotLinkedAccountsMetadata.toObject(message.botLinkedAccountsMetadata, options);
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata"))
                object.richResponseSourcesMetadata = $root.AICommon.BotSourcesMetadata.toObject(message.richResponseSourcesMetadata, options);
            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 (message.botPromotionMessageMetadata != null && message.hasOwnProperty("botPromotionMessageMetadata"))
                object.botPromotionMessageMetadata = $root.AICommon.BotPromotionMessageMetadata.toObject(message.botPromotionMessageMetadata, options);
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata"))
                object.botModeSelectionMetadata = $root.AICommon.BotModeSelectionMetadata.toObject(message.botModeSelectionMetadata, options);
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata"))
                object.botQuotaMetadata = $root.AICommon.BotQuotaMetadata.toObject(message.botQuotaMetadata, options);
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata"))
                object.botAgeCollectionMetadata = $root.AICommon.BotAgeCollectionMetadata.toObject(message.botAgeCollectionMetadata, options);
            if (message.conversationStarterPromptId != null && message.hasOwnProperty("conversationStarterPromptId"))
                object.conversationStarterPromptId = message.conversationStarterPromptId;
            if (message.botResponseId != null && message.hasOwnProperty("botResponseId"))
                object.botResponseId = message.botResponseId;
            if (message.verificationMetadata != null && message.hasOwnProperty("verificationMetadata"))
                object.verificationMetadata = $root.AICommon.BotSignatureVerificationMetadata.toObject(message.verificationMetadata, options);
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation"))
                object.unifiedResponseMutation = $root.AICommon.BotUnifiedResponseMutation.toObject(message.unifiedResponseMutation, options);
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata"))
                object.botMessageOriginMetadata = $root.AICommon.BotMessageOriginMetadata.toObject(message.botMessageOriginMetadata, options);
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata"))
                object.inThreadSurveyMetadata = $root.AICommon.InThreadSurveyMetadata.toObject(message.inThreadSurveyMetadata, options);
            if (message.botThreadInfo != null && message.hasOwnProperty("botThreadInfo"))
                object.botThreadInfo = $root.AICommon.AIThreadInfo.toObject(message.botThreadInfo, options);
            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;
            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;

        /**
         * 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";
            if (message.serverInfo != null && message.hasOwnProperty("serverInfo")) {
                var error = $root.AICommon.AIThreadInfo.AIThreadServerInfo.verify(message.serverInfo);
                if (error)
                    return "serverInfo." + error;
            }
            if (message.clientInfo != null && message.hasOwnProperty("clientInfo")) {
                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 (options.defaults) {
                object.serverInfo = null;
                object.clientInfo = null;
            }
            if (message.serverInfo != null && message.hasOwnProperty("serverInfo"))
                object.serverInfo = $root.AICommon.AIThreadInfo.AIThreadServerInfo.toObject(message.serverInfo, options);
            if (message.clientInfo != null && message.hasOwnProperty("clientInfo"))
                object.clientInfo = $root.AICommon.AIThreadInfo.AIThreadClientInfo.toObject(message.clientInfo, options);
            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} type
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @instance
             */
            AIThreadClientInfo.prototype.type = 0;

            /**
             * 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";
                if (message.type != null && message.hasOwnProperty("type"))
                    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 (options.defaults)
                    object.type = options.enums === String ? "UNKNOWN" : 0;
                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;
                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} title
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @instance
             */
            AIThreadServerInfo.prototype.title = "";

            /**
             * 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";
                if (message.title != null && message.hasOwnProperty("title"))
                    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 (options.defaults)
                    object.title = "";
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.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;

        /**
         * 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";
            if (message.sbsMetadata != null && message.hasOwnProperty("sbsMetadata")) {
                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 (options.defaults)
                object.sbsMetadata = null;
            if (message.sbsMetadata != null && message.hasOwnProperty("sbsMetadata"))
                object.sbsMetadata = $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.toObject(message.sbsMetadata, options);
            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} id
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            MediaDetailsMetadata.prototype.id = "";

            /**
             * 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;

            /**
             * 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";
                if (message.id != null && message.hasOwnProperty("id"))
                    if (!$util.isString(message.id))
                        return "id: string expected";
                if (message.highResMedia != null && message.hasOwnProperty("highResMedia")) {
                    var error = $root.AICommon.BotMediaMetadata.verify(message.highResMedia);
                    if (error)
                        return "highResMedia." + error;
                }
                if (message.previewMedia != null && message.hasOwnProperty("previewMedia")) {
                    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 (options.defaults) {
                    object.id = "";
                    object.highResMedia = null;
                    object.previewMedia = null;
                }
                if (message.id != null && message.hasOwnProperty("id"))
                    object.id = message.id;
                if (message.highResMedia != null && message.hasOwnProperty("highResMedia"))
                    object.highResMedia = $root.AICommon.BotMediaMetadata.toObject(message.highResMedia, options);
                if (message.previewMedia != null && message.hasOwnProperty("previewMedia"))
                    object.previewMedia = $root.AICommon.BotMediaMetadata.toObject(message.previewMedia, options);
                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
             */

            /**
             * 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} primaryResponseId
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            SideBySideMetadata.prototype.primaryResponseId = "";

            /**
             * 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);
                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;
                        }
                    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";
                if (message.primaryResponseId != null && message.hasOwnProperty("primaryResponseId"))
                    if (!$util.isString(message.primaryResponseId))
                        return "primaryResponseId: string 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);
                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 (options.defaults)
                    object.primaryResponseId = "";
                if (message.primaryResponseId != null && message.hasOwnProperty("primaryResponseId"))
                    object.primaryResponseId = message.primaryResponseId;
                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} type
         * @memberof AICommon.BotMessageOrigin
         * @instance
         */
        BotMessageOrigin.prototype.type = 0;

        /**
         * 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";
            if (message.type != null && message.hasOwnProperty("type"))
                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 (options.defaults)
                object.type = options.enums === String ? "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED" : 0;
            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;
            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
         */

        /**
         * 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} tessaSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaSessionId = "";

        /**
         * InThreadSurveyMetadata simonSessionId.
         * @member {string} simonSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSessionId = "";

        /**
         * InThreadSurveyMetadata simonSurveyId.
         * @member {string} simonSurveyId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSurveyId = "";

        /**
         * InThreadSurveyMetadata tessaRootId.
         * @member {string} tessaRootId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaRootId = "";

        /**
         * InThreadSurveyMetadata requestId.
         * @member {string} requestId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.requestId = "";

        /**
         * InThreadSurveyMetadata tessaEvent.
         * @member {string} tessaEvent
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaEvent = "";

        /**
         * InThreadSurveyMetadata invitationHeaderText.
         * @member {string} invitationHeaderText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationHeaderText = "";

        /**
         * InThreadSurveyMetadata invitationBodyText.
         * @member {string} invitationBodyText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationBodyText = "";

        /**
         * InThreadSurveyMetadata invitationCtaText.
         * @member {string} invitationCtaText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaText = "";

        /**
         * InThreadSurveyMetadata invitationCtaUrl.
         * @member {string} invitationCtaUrl
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaUrl = "";

        /**
         * InThreadSurveyMetadata surveyTitle.
         * @member {string} surveyTitle
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyTitle = "";

        /**
         * InThreadSurveyMetadata questions.
         * @member {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion>} questions
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.questions = $util.emptyArray;

        /**
         * InThreadSurveyMetadata surveyContinueButtonText.
         * @member {string} surveyContinueButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyContinueButtonText = "";

        /**
         * InThreadSurveyMetadata surveySubmitButtonText.
         * @member {string} surveySubmitButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveySubmitButtonText = "";

        /**
         * InThreadSurveyMetadata privacyStatementFull.
         * @member {string} privacyStatementFull
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.privacyStatementFull = "";

        /**
         * InThreadSurveyMetadata privacyStatementParts.
         * @member {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart>} privacyStatementParts
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.privacyStatementParts = $util.emptyArray;

        /**
         * InThreadSurveyMetadata feedbackToastText.
         * @member {string} feedbackToastText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.feedbackToastText = "";

        /**
         * 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);
            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;
                    }
                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";
            if (message.tessaSessionId != null && message.hasOwnProperty("tessaSessionId"))
                if (!$util.isString(message.tessaSessionId))
                    return "tessaSessionId: string expected";
            if (message.simonSessionId != null && message.hasOwnProperty("simonSessionId"))
                if (!$util.isString(message.simonSessionId))
                    return "simonSessionId: string expected";
            if (message.simonSurveyId != null && message.hasOwnProperty("simonSurveyId"))
                if (!$util.isString(message.simonSurveyId))
                    return "simonSurveyId: string expected";
            if (message.tessaRootId != null && message.hasOwnProperty("tessaRootId"))
                if (!$util.isString(message.tessaRootId))
                    return "tessaRootId: string expected";
            if (message.requestId != null && message.hasOwnProperty("requestId"))
                if (!$util.isString(message.requestId))
                    return "requestId: string expected";
            if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent"))
                if (!$util.isString(message.tessaEvent))
                    return "tessaEvent: string expected";
            if (message.invitationHeaderText != null && message.hasOwnProperty("invitationHeaderText"))
                if (!$util.isString(message.invitationHeaderText))
                    return "invitationHeaderText: string expected";
            if (message.invitationBodyText != null && message.hasOwnProperty("invitationBodyText"))
                if (!$util.isString(message.invitationBodyText))
                    return "invitationBodyText: string expected";
            if (message.invitationCtaText != null && message.hasOwnProperty("invitationCtaText"))
                if (!$util.isString(message.invitationCtaText))
                    return "invitationCtaText: string expected";
            if (message.invitationCtaUrl != null && message.hasOwnProperty("invitationCtaUrl"))
                if (!$util.isString(message.invitationCtaUrl))
                    return "invitationCtaUrl: string expected";
            if (message.surveyTitle != null && message.hasOwnProperty("surveyTitle"))
                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"))
                if (!$util.isString(message.surveyContinueButtonText))
                    return "surveyContinueButtonText: string expected";
            if (message.surveySubmitButtonText != null && message.hasOwnProperty("surveySubmitButtonText"))
                if (!$util.isString(message.surveySubmitButtonText))
                    return "surveySubmitButtonText: string expected";
            if (message.privacyStatementFull != null && message.hasOwnProperty("privacyStatementFull"))
                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"))
                if (!$util.isString(message.feedbackToastText))
                    return "feedbackToastText: string 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);
            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 (options.defaults) {
                object.tessaSessionId = "";
                object.simonSessionId = "";
                object.simonSurveyId = "";
                object.tessaRootId = "";
                object.requestId = "";
                object.tessaEvent = "";
                object.invitationHeaderText = "";
                object.invitationBodyText = "";
                object.invitationCtaText = "";
                object.invitationCtaUrl = "";
                object.surveyTitle = "";
                object.surveyContinueButtonText = "";
                object.surveySubmitButtonText = "";
                object.privacyStatementFull = "";
                object.feedbackToastText = "";
            }
            if (message.tessaSessionId != null && message.hasOwnProperty("tessaSessionId"))
                object.tessaSessionId = message.tessaSessionId;
            if (message.simonSessionId != null && message.hasOwnProperty("simonSessionId"))
                object.simonSessionId = message.simonSessionId;
            if (message.simonSurveyId != null && message.hasOwnProperty("simonSurveyId"))
                object.simonSurveyId = message.simonSurveyId;
            if (message.tessaRootId != null && message.hasOwnProperty("tessaRootId"))
                object.tessaRootId = message.tessaRootId;
            if (message.requestId != null && message.hasOwnProperty("requestId"))
                object.requestId = message.requestId;
            if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent"))
                object.tessaEvent = message.tessaEvent;
            if (message.invitationHeaderText != null && message.hasOwnProperty("invitationHeaderText"))
                object.invitationHeaderText = message.invitationHeaderText;
            if (message.invitationBodyText != null && message.hasOwnProperty("invitationBodyText"))
                object.invitationBodyText = message.invitationBodyText;
            if (message.invitationCtaText != null && message.hasOwnProperty("invitationCtaText"))
                object.invitationCtaText = message.invitationCtaText;
            if (message.invitationCtaUrl != null && message.hasOwnProperty("invitationCtaUrl"))
                object.invitationCtaUrl = message.invitationCtaUrl;
            if (message.surveyTitle != null && message.hasOwnProperty("surveyTitle"))
                object.surveyTitle = message.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 (message.surveySubmitButtonText != null && message.hasOwnProperty("surveySubmitButtonText"))
                object.surveySubmitButtonText = message.surveySubmitButtonText;
            if (message.privacyStatementFull != null && message.hasOwnProperty("privacyStatementFull"))
                object.privacyStatementFull = message.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;
            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} stringValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.stringValue = "";

            /**
             * InThreadSurveyOption numericValue.
             * @member {number} numericValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.numericValue = 0;

            /**
             * InThreadSurveyOption textTranslated.
             * @member {string} textTranslated
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.textTranslated = "";

            /**
             * 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";
                if (message.stringValue != null && message.hasOwnProperty("stringValue"))
                    if (!$util.isString(message.stringValue))
                        return "stringValue: string expected";
                if (message.numericValue != null && message.hasOwnProperty("numericValue"))
                    if (!$util.isInteger(message.numericValue))
                        return "numericValue: integer expected";
                if (message.textTranslated != null && message.hasOwnProperty("textTranslated"))
                    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 (options.defaults) {
                    object.stringValue = "";
                    object.numericValue = 0;
                    object.textTranslated = "";
                }
                if (message.stringValue != null && message.hasOwnProperty("stringValue"))
                    object.stringValue = message.stringValue;
                if (message.numericValue != null && message.hasOwnProperty("numericValue"))
                    object.numericValue = message.numericValue;
                if (message.textTranslated != null && message.hasOwnProperty("textTranslated"))
                    object.textTranslated = message.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} text
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.text = "";

            /**
             * InThreadSurveyPrivacyStatementPart url.
             * @member {string} url
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.url = "";

            /**
             * 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";
                if (message.text != null && message.hasOwnProperty("text"))
                    if (!$util.isString(message.text))
                        return "text: string expected";
                if (message.url != null && message.hasOwnProperty("url"))
                    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 (options.defaults) {
                    object.text = "";
                    object.url = "";
                }
                if (message.text != null && message.hasOwnProperty("text"))
                    object.text = message.text;
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.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} questionText
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionText = "";

            /**
             * InThreadSurveyQuestion questionId.
             * @member {string} questionId
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionId = "";

            /**
             * InThreadSurveyQuestion questionOptions.
             * @member {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyOption>} questionOptions
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionOptions = $util.emptyArray;

            /**
             * 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";
                if (message.questionText != null && message.hasOwnProperty("questionText"))
                    if (!$util.isString(message.questionText))
                        return "questionText: string expected";
                if (message.questionId != null && message.hasOwnProperty("questionId"))
                    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 (options.defaults) {
                    object.questionText = "";
                    object.questionId = "";
                }
                if (message.questionText != null && message.hasOwnProperty("questionText"))
                    object.questionText = message.questionText;
                if (message.questionId != null && message.hasOwnProperty("questionId"))
                    object.questionId = message.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} provider
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.provider = 0;

            /**
             * BotSourceItem thumbnailCdnUrl.
             * @member {string} thumbnailCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.thumbnailCdnUrl = "";

            /**
             * BotSourceItem sourceProviderUrl.
             * @member {string} sourceProviderUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceProviderUrl = "";

            /**
             * BotSourceItem sourceQuery.
             * @member {string} sourceQuery
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceQuery = "";

            /**
             * BotSourceItem faviconCdnUrl.
             * @member {string} faviconCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.faviconCdnUrl = "";

            /**
             * BotSourceItem citationNumber.
             * @member {number} citationNumber
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.citationNumber = 0;

            /**
             * BotSourceItem sourceTitle.
             * @member {string} sourceTitle
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceTitle = "";

            /**
             * 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";
                if (message.provider != null && message.hasOwnProperty("provider"))
                    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"))
                    if (!$util.isString(message.thumbnailCdnUrl))
                        return "thumbnailCdnUrl: string expected";
                if (message.sourceProviderUrl != null && message.hasOwnProperty("sourceProviderUrl"))
                    if (!$util.isString(message.sourceProviderUrl))
                        return "sourceProviderUrl: string expected";
                if (message.sourceQuery != null && message.hasOwnProperty("sourceQuery"))
                    if (!$util.isString(message.sourceQuery))
                        return "sourceQuery: string expected";
                if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl"))
                    if (!$util.isString(message.faviconCdnUrl))
                        return "faviconCdnUrl: string expected";
                if (message.citationNumber != null && message.hasOwnProperty("citationNumber"))
                    if (!$util.isInteger(message.citationNumber))
                        return "citationNumber: integer expected";
                if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle"))
                    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 (options.defaults) {
                    object.provider = options.enums === String ? "UNKNOWN" : 0;
                    object.thumbnailCdnUrl = "";
                    object.sourceProviderUrl = "";
                    object.sourceQuery = "";
                    object.faviconCdnUrl = "";
                    object.citationNumber = 0;
                    object.sourceTitle = "";
                }
                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 (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl"))
                    object.thumbnailCdnUrl = message.thumbnailCdnUrl;
                if (message.sourceProviderUrl != null && message.hasOwnProperty("sourceProviderUrl"))
                    object.sourceProviderUrl = message.sourceProviderUrl;
                if (message.sourceQuery != null && message.hasOwnProperty("sourceQuery"))
                    object.sourceQuery = message.sourceQuery;
                if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl"))
                    object.faviconCdnUrl = message.faviconCdnUrl;
                if (message.citationNumber != null && message.hasOwnProperty("citationNumber"))
                    object.citationNumber = message.citationNumber;
                if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle"))
                    object.sourceTitle = message.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} ageCollectionEligible
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.ageCollectionEligible = false;

        /**
         * BotAgeCollectionMetadata shouldTriggerAgeCollectionOnClient.
         * @member {boolean} shouldTriggerAgeCollectionOnClient
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.shouldTriggerAgeCollectionOnClient = false;

        /**
         * BotAgeCollectionMetadata ageCollectionType.
         * @member {AICommon.BotAgeCollectionMetadata.AgeCollectionType} ageCollectionType
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.ageCollectionType = 0;

        /**
         * 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";
            if (message.ageCollectionEligible != null && message.hasOwnProperty("ageCollectionEligible"))
                if (typeof message.ageCollectionEligible !== "boolean")
                    return "ageCollectionEligible: boolean expected";
            if (message.shouldTriggerAgeCollectionOnClient != null && message.hasOwnProperty("shouldTriggerAgeCollectionOnClient"))
                if (typeof message.shouldTriggerAgeCollectionOnClient !== "boolean")
                    return "shouldTriggerAgeCollectionOnClient: boolean expected";
            if (message.ageCollectionType != null && message.hasOwnProperty("ageCollectionType"))
                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 (options.defaults) {
                object.ageCollectionEligible = false;
                object.shouldTriggerAgeCollectionOnClient = false;
                object.ageCollectionType = options.enums === String ? "O18_BINARY" : 0;
            }
            if (message.ageCollectionEligible != null && message.hasOwnProperty("ageCollectionEligible"))
                object.ageCollectionEligible = message.ageCollectionEligible;
            if (message.shouldTriggerAgeCollectionOnClient != null && message.hasOwnProperty("shouldTriggerAgeCollectionOnClient"))
                object.shouldTriggerAgeCollectionOnClient = message.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;
            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} imagineType
         * @memberof AICommon.BotImagineMetadata
         * @instance
         */
        BotImagineMetadata.prototype.imagineType = 0;

        /**
         * 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";
            if (message.imagineType != null && message.hasOwnProperty("imagineType"))
                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 (options.defaults)
                object.imagineType = options.enums === String ? "UNKNOWN" : 0;
            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;
            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} featureType
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.featureType = 0;

            /**
             * BotFeatureQuotaMetadata remainingQuota.
             * @member {number} remainingQuota
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.remainingQuota = 0;

            /**
             * BotFeatureQuotaMetadata expirationTimestamp.
             * @member {number|Long} expirationTimestamp
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.expirationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * 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";
                if (message.featureType != null && message.hasOwnProperty("featureType"))
                    switch (message.featureType) {
                    default:
                        return "featureType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                if (message.remainingQuota != null && message.hasOwnProperty("remainingQuota"))
                    if (!$util.isInteger(message.remainingQuota))
                        return "remainingQuota: integer expected";
                if (message.expirationTimestamp != null && message.hasOwnProperty("expirationTimestamp"))
                    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 (options.defaults) {
                    object.featureType = options.enums === String ? "UNKNOWN_FEATURE" : 0;
                    object.remainingQuota = 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.expirationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.expirationTimestamp = options.longs === String ? "0" : 0;
                }
                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 (message.remainingQuota != null && message.hasOwnProperty("remainingQuota"))
                    object.remainingQuota = message.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;
                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)
                for (var i = 0; i < message.mode.length; ++i)
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode[i]);
            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)
                for (var i = 0; i < message.capabilities.length; ++i)
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.capabilities[i]);
            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:
                        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;
                    }
            }
            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
         */
        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;
            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} progressDescription
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         */
        BotProgressIndicatorMetadata.prototype.progressDescription = "";

        /**
         * BotProgressIndicatorMetadata stepsMetadata.
         * @member {Array.<AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata>} stepsMetadata
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         */
        BotProgressIndicatorMetadata.prototype.stepsMetadata = $util.emptyArray;

        /**
         * 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";
            if (message.progressDescription != null && message.hasOwnProperty("progressDescription"))
                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 (options.defaults)
                object.progressDescription = "";
            if (message.progressDescription != null && message.hasOwnProperty("progressDescription"))
                object.progressDescription = message.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} statusTitle
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusTitle = "";

            /**
             * BotPlanningStepMetadata statusBody.
             * @member {string} statusBody
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusBody = "";

            /**
             * 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} status
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.status = 0;

            /**
             * BotPlanningStepMetadata isReasoning.
             * @member {boolean} isReasoning
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isReasoning = false;

            /**
             * BotPlanningStepMetadata isEnhancedSearch.
             * @member {boolean} isEnhancedSearch
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isEnhancedSearch = false;

            /**
             * BotPlanningStepMetadata sections.
             * @member {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata>} sections
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.sections = $util.emptyArray;

            /**
             * 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";
                if (message.statusTitle != null && message.hasOwnProperty("statusTitle"))
                    if (!$util.isString(message.statusTitle))
                        return "statusTitle: string expected";
                if (message.statusBody != null && message.hasOwnProperty("statusBody"))
                    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"))
                    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"))
                    if (typeof message.isReasoning !== "boolean")
                        return "isReasoning: boolean expected";
                if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch"))
                    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 (options.defaults) {
                    object.statusTitle = "";
                    object.statusBody = "";
                    object.status = options.enums === String ? "UNKNOWN" : 0;
                    object.isReasoning = false;
                    object.isEnhancedSearch = false;
                }
                if (message.statusTitle != null && message.hasOwnProperty("statusTitle"))
                    object.statusTitle = message.statusTitle;
                if (message.statusBody != null && message.hasOwnProperty("statusBody"))
                    object.statusBody = message.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 (message.isReasoning != null && message.hasOwnProperty("isReasoning"))
                    object.isReasoning = message.isReasoning;
                if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch"))
                    object.isEnhancedSearch = message.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} title
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.title = "";

                /**
                 * BotPlanningSearchSourceMetadata provider.
                 * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider} provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.provider = 0;

                /**
                 * BotPlanningSearchSourceMetadata sourceUrl.
                 * @member {string} sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.sourceUrl = "";

                /**
                 * BotPlanningSearchSourceMetadata favIconUrl.
                 * @member {string} favIconUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.favIconUrl = "";

                /**
                 * 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";
                    if (message.title != null && message.hasOwnProperty("title"))
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    if (message.provider != null && message.hasOwnProperty("provider"))
                        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"))
                        if (!$util.isString(message.sourceUrl))
                            return "sourceUrl: string expected";
                    if (message.favIconUrl != null && message.hasOwnProperty("favIconUrl"))
                        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 (options.defaults) {
                        object.title = "";
                        object.provider = options.enums === String ? "UNKNOWN_PROVIDER" : 0;
                        object.sourceUrl = "";
                        object.favIconUrl = "";
                    }
                    if (message.title != null && message.hasOwnProperty("title"))
                        object.title = message.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 (message.sourceUrl != null && message.hasOwnProperty("sourceUrl"))
                        object.sourceUrl = message.sourceUrl;
                    if (message.favIconUrl != null && message.hasOwnProperty("favIconUrl"))
                        object.favIconUrl = message.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} sourceTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceTitle = "";

                /**
                 * BotPlanningSearchSourcesMetadata provider.
                 * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider} provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.provider = 0;

                /**
                 * BotPlanningSearchSourcesMetadata sourceUrl.
                 * @member {string} sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceUrl = "";

                /**
                 * 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";
                    if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle"))
                        if (!$util.isString(message.sourceTitle))
                            return "sourceTitle: string expected";
                    if (message.provider != null && message.hasOwnProperty("provider"))
                        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"))
                        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 (options.defaults) {
                        object.sourceTitle = "";
                        object.provider = options.enums === String ? "UNKNOWN" : 0;
                        object.sourceUrl = "";
                    }
                    if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle"))
                        object.sourceTitle = message.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 (message.sourceUrl != null && message.hasOwnProperty("sourceUrl"))
                        object.sourceUrl = message.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} sectionTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionTitle = "";

                /**
                 * BotPlanningStepSectionMetadata sectionBody.
                 * @member {string} sectionBody
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionBody = "";

                /**
                 * BotPlanningStepSectionMetadata sourcesMetadata.
                 * @member {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata>} sourcesMetadata
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sourcesMetadata = $util.emptyArray;

                /**
                 * 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";
                    if (message.sectionTitle != null && message.hasOwnProperty("sectionTitle"))
                        if (!$util.isString(message.sectionTitle))
                            return "sectionTitle: string expected";
                    if (message.sectionBody != null && message.hasOwnProperty("sectionBody"))
                        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 (options.defaults) {
                        object.sectionTitle = "";
                        object.sectionBody = "";
                    }
                    if (message.sectionTitle != null && message.hasOwnProperty("sectionTitle"))
                        object.sectionTitle = message.sectionTitle;
                    if (message.sectionBody != null && message.hasOwnProperty("sectionBody"))
                        object.sectionBody = message.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
         */

        /**
         * 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} modelType
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.modelType = 0;

        /**
         * BotModelMetadata premiumModelStatus.
         * @member {AICommon.BotModelMetadata.PremiumModelStatus} premiumModelStatus
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.premiumModelStatus = 0;

        /**
         * 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);
            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;
                    }
                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";
            if (message.modelType != null && message.hasOwnProperty("modelType"))
                switch (message.modelType) {
                default:
                    return "modelType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus"))
                switch (message.premiumModelStatus) {
                default:
                    return "premiumModelStatus: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            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;
            }
            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 (options.defaults) {
                object.modelType = options.enums === String ? "UNKNOWN_TYPE" : 0;
                object.premiumModelStatus = options.enums === String ? "UNKNOWN_STATUS" : 0;
            }
            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 (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;
            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} action
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.action = 1;

        /**
         * BotReminderMetadata name.
         * @member {string} name
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.name = "";

        /**
         * BotReminderMetadata nextTriggerTimestamp.
         * @member {number|Long} nextTriggerTimestamp
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.nextTriggerTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * BotReminderMetadata frequency.
         * @member {AICommon.BotReminderMetadata.ReminderFrequency} frequency
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.frequency = 1;

        /**
         * 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";
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                var error = $root.Protocol.MessageKey.verify(message.requestMessageKey);
                if (error)
                    return "requestMessageKey." + error;
            }
            if (message.action != null && message.hasOwnProperty("action"))
                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"))
                if (!$util.isString(message.name))
                    return "name: string expected";
            if (message.nextTriggerTimestamp != null && message.hasOwnProperty("nextTriggerTimestamp"))
                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"))
                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 (options.defaults) {
                object.requestMessageKey = null;
                object.action = options.enums === String ? "NOTIFY" : 1;
                object.name = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.nextTriggerTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.nextTriggerTimestamp = options.longs === String ? "0" : 0;
                object.frequency = options.enums === String ? "ONCE" : 1;
            }
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey"))
                object.requestMessageKey = $root.Protocol.MessageKey.toObject(message.requestMessageKey, options);
            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 (message.name != null && message.hasOwnProperty("name"))
                object.name = message.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 (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;
            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} fileSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileSha256 = "";

        /**
         * BotMediaMetadata mediaKey.
         * @member {string} mediaKey
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mediaKey = "";

        /**
         * BotMediaMetadata fileEncSha256.
         * @member {string} fileEncSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileEncSha256 = "";

        /**
         * BotMediaMetadata directPath.
         * @member {string} directPath
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.directPath = "";

        /**
         * BotMediaMetadata mediaKeyTimestamp.
         * @member {number|Long} mediaKeyTimestamp
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * BotMediaMetadata mimetype.
         * @member {string} mimetype
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mimetype = "";

        /**
         * BotMediaMetadata orientationType.
         * @member {AICommon.BotMediaMetadata.OrientationType} orientationType
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.orientationType = 1;

        /**
         * 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";
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                if (!$util.isString(message.fileSha256))
                    return "fileSha256: string expected";
            if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                if (!$util.isString(message.mediaKey))
                    return "mediaKey: string expected";
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                if (!$util.isString(message.fileEncSha256))
                    return "fileEncSha256: string expected";
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp"))
                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"))
                if (!$util.isString(message.mimetype))
                    return "mimetype: string expected";
            if (message.orientationType != null && message.hasOwnProperty("orientationType"))
                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 (options.defaults) {
                object.fileSha256 = "";
                object.mediaKey = "";
                object.fileEncSha256 = "";
                object.directPath = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.mediaKeyTimestamp = options.longs === String ? "0" : 0;
                object.mimetype = "";
                object.orientationType = options.enums === String ? "CENTER" : 1;
            }
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256"))
                object.fileSha256 = message.fileSha256;
            if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                object.mediaKey = message.mediaKey;
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                object.fileEncSha256 = message.fileEncSha256;
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                object.directPath = message.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 (message.mimetype != null && message.hasOwnProperty("mimetype"))
                object.mimetype = message.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;
            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} sessionId
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionId = "";

        /**
         * BotSessionMetadata sessionSource.
         * @member {AICommon.BotSessionSource} sessionSource
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionSource = 0;

        /**
         * 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";
            if (message.sessionId != null && message.hasOwnProperty("sessionId"))
                if (!$util.isString(message.sessionId))
                    return "sessionId: string expected";
            if (message.sessionSource != null && message.hasOwnProperty("sessionSource"))
                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 (options.defaults) {
                object.sessionId = "";
                object.sessionSource = options.enums === String ? "NONE" : 0;
            }
            if (message.sessionId != null && message.hasOwnProperty("sessionId"))
                object.sessionId = message.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;
            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} destinationId
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationId = "";

        /**
         * BotMetricsMetadata destinationEntryPoint.
         * @member {AICommon.BotMetricsEntryPoint} destinationEntryPoint
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationEntryPoint = 0;

        /**
         * BotMetricsMetadata threadOrigin.
         * @member {AICommon.BotMetricsThreadEntryPoint} threadOrigin
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.threadOrigin = 1;

        /**
         * 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";
            if (message.destinationId != null && message.hasOwnProperty("destinationId"))
                if (!$util.isString(message.destinationId))
                    return "destinationId: string expected";
            if (message.destinationEntryPoint != null && message.hasOwnProperty("destinationEntryPoint"))
                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:
                    break;
                }
            if (message.threadOrigin != null && message.hasOwnProperty("threadOrigin"))
                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;
            }
            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 (options.defaults) {
                object.destinationId = "";
                object.destinationEntryPoint = options.enums === String ? "UNDEFINED_ENTRY_POINT" : 0;
                object.threadOrigin = options.enums === String ? "AI_TAB_THREAD" : 1;
            }
            if (message.destinationId != null && message.hasOwnProperty("destinationId"))
                object.destinationId = message.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 (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;
            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} value
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             */
            Keyword.prototype.value = "";

            /**
             * Keyword associatedPrompts.
             * @member {Array.<string>} associatedPrompts
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             */
            Keyword.prototype.associatedPrompts = $util.emptyArray;

            /**
             * 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";
                if (message.value != null && message.hasOwnProperty("value"))
                    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 (options.defaults)
                    object.value = "";
                if (message.value != null && message.hasOwnProperty("value"))
                    object.value = message.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} promotionType
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.promotionType = 0;

        /**
         * BotPromotionMessageMetadata buttonTitle.
         * @member {string} buttonTitle
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.buttonTitle = "";

        /**
         * 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";
            if (message.promotionType != null && message.hasOwnProperty("promotionType"))
                switch (message.promotionType) {
                default:
                    return "promotionType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle"))
                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 (options.defaults) {
                object.promotionType = options.enums === String ? "UNKNOWN_TYPE" : 0;
                object.buttonTitle = "";
            }
            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 (message.buttonTitle != null && message.hasOwnProperty("buttonTitle"))
                object.buttonTitle = message.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} version
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.version = 0;

        /**
         * BotSignatureVerificationUseCaseProof useCase.
         * @member {AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase} useCase
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.useCase = 0;

        /**
         * BotSignatureVerificationUseCaseProof signature.
         * @member {Uint8Array} signature
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.signature = $util.newBuffer([]);

        /**
         * BotSignatureVerificationUseCaseProof certificateChain.
         * @member {Array.<Uint8Array>} certificateChain
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.certificateChain = $util.emptyArray;

        /**
         * 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";
            if (message.version != null && message.hasOwnProperty("version"))
                if (!$util.isInteger(message.version))
                    return "version: integer expected";
            if (message.useCase != null && message.hasOwnProperty("useCase"))
                switch (message.useCase) {
                default:
                    return "useCase: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.signature != null && message.hasOwnProperty("signature"))
                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 (options.defaults) {
                object.version = 0;
                object.useCase = options.enums === String ? "UNSPECIFIED" : 0;
                if (options.bytes === String)
                    object.signature = "";
                else {
                    object.signature = [];
                    if (options.bytes !== Array)
                        object.signature = $util.newBuffer(object.signature);
                }
            }
            if (message.version != null && message.hasOwnProperty("version"))
                object.version = message.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 (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 (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} fact
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.fact = "";

        /**
         * BotMemoryFact factId.
         * @member {string} factId
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.factId = "";

        /**
         * 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";
            if (message.fact != null && message.hasOwnProperty("fact"))
                if (!$util.isString(message.fact))
                    return "fact: string expected";
            if (message.factId != null && message.hasOwnProperty("factId"))
                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 (options.defaults) {
                object.fact = "";
                object.factId = "";
            }
            if (message.fact != null && message.hasOwnProperty("fact"))
                object.fact = message.fact;
            if (message.factId != null && message.hasOwnProperty("factId"))
                object.factId = message.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} disclaimer
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.disclaimer = "";

        /**
         * 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";
            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"))
                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 (options.defaults)
                object.disclaimer = "";
            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;
            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} type
         * @memberof AICommon.BotLinkedAccount
         * @instance
         */
        BotLinkedAccount.prototype.type = 0;

        /**
         * 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";
            if (message.type != null && message.hasOwnProperty("type"))
                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 (options.defaults)
                object.type = options.enums === String ? "BOT_LINKED_ACCOUNT_TYPE_1P" : 0;
            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;
            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} acAuthTokens
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.acAuthTokens = $util.newBuffer([]);

        /**
         * BotLinkedAccountsMetadata acErrorCode.
         * @member {number} acErrorCode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.acErrorCode = 0;

        /**
         * 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";
            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"))
                if (!(message.acAuthTokens && typeof message.acAuthTokens.length === "number" || $util.isString(message.acAuthTokens)))
                    return "acAuthTokens: buffer expected";
            if (message.acErrorCode != null && message.hasOwnProperty("acErrorCode"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.acAuthTokens = "";
                else {
                    object.acAuthTokens = [];
                    if (options.bytes !== Array)
                        object.acAuthTokens = $util.newBuffer(object.acAuthTokens);
                }
                object.acErrorCode = 0;
            }
            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 (message.acErrorCode != null && message.hasOwnProperty("acErrorCode"))
                object.acErrorCode = message.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} prompt
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.prompt = "";

        /**
         * BotPromptSuggestion promptId.
         * @member {string} promptId
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.promptId = "";

        /**
         * 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";
            if (message.prompt != null && message.hasOwnProperty("prompt"))
                if (!$util.isString(message.prompt))
                    return "prompt: string expected";
            if (message.promptId != null && message.hasOwnProperty("promptId"))
                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 (options.defaults) {
                object.prompt = "";
                object.promptId = "";
            }
            if (message.prompt != null && message.hasOwnProperty("prompt"))
                object.prompt = message.prompt;
            if (message.promptId != null && message.hasOwnProperty("promptId"))
                object.promptId = message.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} selectedPromptIndex
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptIndex = 0;

        /**
         * BotSuggestedPromptMetadata promptSuggestions.
         * @member {AICommon.IBotPromptSuggestions|null|undefined} promptSuggestions
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.promptSuggestions = null;

        /**
         * BotSuggestedPromptMetadata selectedPromptId.
         * @member {string} selectedPromptId
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptId = "";

        /**
         * 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";
            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"))
                if (!$util.isInteger(message.selectedPromptIndex))
                    return "selectedPromptIndex: integer expected";
            if (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions")) {
                var error = $root.AICommon.BotPromptSuggestions.verify(message.promptSuggestions);
                if (error)
                    return "promptSuggestions." + error;
            }
            if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId"))
                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 (options.defaults) {
                object.selectedPromptIndex = 0;
                object.promptSuggestions = null;
                object.selectedPromptId = "";
            }
            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 (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions"))
                object.promptSuggestions = $root.AICommon.BotPromptSuggestions.toObject(message.promptSuggestions, options);
            if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId"))
                object.selectedPromptId = message.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} provider
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.provider = 0;

        /**
         * BotPluginMetadata pluginType.
         * @member {AICommon.BotPluginMetadata.PluginType} pluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.pluginType = 0;

        /**
         * BotPluginMetadata thumbnailCdnUrl.
         * @member {string} thumbnailCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.thumbnailCdnUrl = "";

        /**
         * BotPluginMetadata profilePhotoCdnUrl.
         * @member {string} profilePhotoCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.profilePhotoCdnUrl = "";

        /**
         * BotPluginMetadata searchProviderUrl.
         * @member {string} searchProviderUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchProviderUrl = "";

        /**
         * BotPluginMetadata referenceIndex.
         * @member {number} referenceIndex
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.referenceIndex = 0;

        /**
         * BotPluginMetadata expectedLinksCount.
         * @member {number} expectedLinksCount
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.expectedLinksCount = 0;

        /**
         * BotPluginMetadata searchQuery.
         * @member {string} searchQuery
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchQuery = "";

        /**
         * BotPluginMetadata parentPluginMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} parentPluginMessageKey
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.parentPluginMessageKey = null;

        /**
         * BotPluginMetadata deprecatedField.
         * @member {AICommon.BotPluginMetadata.PluginType} deprecatedField
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.deprecatedField = 0;

        /**
         * BotPluginMetadata parentPluginType.
         * @member {AICommon.BotPluginMetadata.PluginType} parentPluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.parentPluginType = 0;

        /**
         * BotPluginMetadata faviconCdnUrl.
         * @member {string} faviconCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.faviconCdnUrl = "";

        /**
         * 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";
            if (message.provider != null && message.hasOwnProperty("provider"))
                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"))
                switch (message.pluginType) {
                default:
                    return "pluginType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl"))
                if (!$util.isString(message.thumbnailCdnUrl))
                    return "thumbnailCdnUrl: string expected";
            if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl"))
                if (!$util.isString(message.profilePhotoCdnUrl))
                    return "profilePhotoCdnUrl: string expected";
            if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl"))
                if (!$util.isString(message.searchProviderUrl))
                    return "searchProviderUrl: string expected";
            if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex"))
                if (!$util.isInteger(message.referenceIndex))
                    return "referenceIndex: integer expected";
            if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount"))
                if (!$util.isInteger(message.expectedLinksCount))
                    return "expectedLinksCount: integer expected";
            if (message.searchQuery != null && message.hasOwnProperty("searchQuery"))
                if (!$util.isString(message.searchQuery))
                    return "searchQuery: string expected";
            if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey")) {
                var error = $root.Protocol.MessageKey.verify(message.parentPluginMessageKey);
                if (error)
                    return "parentPluginMessageKey." + error;
            }
            if (message.deprecatedField != null && message.hasOwnProperty("deprecatedField"))
                switch (message.deprecatedField) {
                default:
                    return "deprecatedField: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType"))
                switch (message.parentPluginType) {
                default:
                    return "parentPluginType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl"))
                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 (options.defaults) {
                object.provider = options.enums === String ? "UNKNOWN" : 0;
                object.pluginType = options.enums === String ? "UNKNOWN_PLUGIN" : 0;
                object.thumbnailCdnUrl = "";
                object.profilePhotoCdnUrl = "";
                object.searchProviderUrl = "";
                object.referenceIndex = 0;
                object.expectedLinksCount = 0;
                object.searchQuery = "";
                object.parentPluginMessageKey = null;
                object.deprecatedField = options.enums === String ? "UNKNOWN_PLUGIN" : 0;
                object.parentPluginType = options.enums === String ? "UNKNOWN_PLUGIN" : 0;
                object.faviconCdnUrl = "";
            }
            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 (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 (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl"))
                object.thumbnailCdnUrl = message.thumbnailCdnUrl;
            if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl"))
                object.profilePhotoCdnUrl = message.profilePhotoCdnUrl;
            if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl"))
                object.searchProviderUrl = message.searchProviderUrl;
            if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex"))
                object.referenceIndex = message.referenceIndex;
            if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount"))
                object.expectedLinksCount = message.expectedLinksCount;
            if (message.searchQuery != null && message.hasOwnProperty("searchQuery"))
                object.searchQuery = message.searchQuery;
            if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey"))
                object.parentPluginMessageKey = $root.Protocol.MessageKey.toObject(message.parentPluginMessageKey, options);
            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 (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 (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl"))
                object.faviconCdnUrl = message.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} sentiment
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.sentiment = 0;

        /**
         * BotAvatarMetadata behaviorGraph.
         * @member {string} behaviorGraph
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.behaviorGraph = "";

        /**
         * BotAvatarMetadata action.
         * @member {number} action
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.action = 0;

        /**
         * BotAvatarMetadata intensity.
         * @member {number} intensity
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.intensity = 0;

        /**
         * BotAvatarMetadata wordCount.
         * @member {number} wordCount
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.wordCount = 0;

        /**
         * 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";
            if (message.sentiment != null && message.hasOwnProperty("sentiment"))
                if (!$util.isInteger(message.sentiment))
                    return "sentiment: integer expected";
            if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph"))
                if (!$util.isString(message.behaviorGraph))
                    return "behaviorGraph: string expected";
            if (message.action != null && message.hasOwnProperty("action"))
                if (!$util.isInteger(message.action))
                    return "action: integer expected";
            if (message.intensity != null && message.hasOwnProperty("intensity"))
                if (!$util.isInteger(message.intensity))
                    return "intensity: integer expected";
            if (message.wordCount != null && message.hasOwnProperty("wordCount"))
                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 (options.defaults) {
                object.sentiment = 0;
                object.behaviorGraph = "";
                object.action = 0;
                object.intensity = 0;
                object.wordCount = 0;
            }
            if (message.sentiment != null && message.hasOwnProperty("sentiment"))
                object.sentiment = message.sentiment;
            if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph"))
                object.behaviorGraph = message.behaviorGraph;
            if (message.action != null && message.hasOwnProperty("action"))
                object.action = message.action;
            if (message.intensity != null && message.hasOwnProperty("intensity"))
                object.intensity = message.intensity;
            if (message.wordCount != null && message.hasOwnProperty("wordCount"))
                object.wordCount = message.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;
    })();

    /**
     * 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
     */
    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;
        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} type
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.type = 0;

        /**
         * StatusAttribution actionUrl.
         * @member {string} actionUrl
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.actionUrl = "";

        /**
         * 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 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"))
                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"))
                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 (options.defaults) {
                object.type = options.enums === String ? "UNKNOWN" : 0;
                object.actionUrl = "";
            }
            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 (message.actionUrl != null && message.hasOwnProperty("actionUrl"))
                object.actionUrl = message.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} source
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @instance
             */
            AiCreatedAttribution.prototype.source = 0;

            /**
             * 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";
                if (message.source != null && message.hasOwnProperty("source"))
                    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 (options.defaults)
                    object.source = options.enums === String ? "UNKNOWN" : 0;
                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;
                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} actionUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.actionUrl = "";

            /**
             * ExternalShare source.
             * @member {StatusAttributions.StatusAttribution.ExternalShare.Source} source
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.source = 0;

            /**
             * ExternalShare duration.
             * @member {number} duration
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.duration = 0;

            /**
             * ExternalShare actionFallbackUrl.
             * @member {string} actionFallbackUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.actionFallbackUrl = "";

            /**
             * 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";
                if (message.actionUrl != null && message.hasOwnProperty("actionUrl"))
                    if (!$util.isString(message.actionUrl))
                        return "actionUrl: string expected";
                if (message.source != null && message.hasOwnProperty("source"))
                    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:
                        break;
                    }
                if (message.duration != null && message.hasOwnProperty("duration"))
                    if (!$util.isInteger(message.duration))
                        return "duration: integer expected";
                if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl"))
                    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;
                }
                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 (options.defaults) {
                    object.actionUrl = "";
                    object.source = options.enums === String ? "UNKNOWN" : 0;
                    object.duration = 0;
                    object.actionFallbackUrl = "";
                }
                if (message.actionUrl != null && message.hasOwnProperty("actionUrl"))
                    object.actionUrl = message.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 (message.duration != null && message.hasOwnProperty("duration"))
                    object.duration = message.duration;
                if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl"))
                    object.actionFallbackUrl = message.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
             */
            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;
                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} authorJid
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @instance
             */
            GroupStatus.prototype.authorJid = "";

            /**
             * 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";
                if (message.authorJid != null && message.hasOwnProperty("authorJid"))
                    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 (options.defaults)
                    object.authorJid = "";
                if (message.authorJid != null && message.hasOwnProperty("authorJid"))
                    object.authorJid = message.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} authorName
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.authorName = "";

            /**
             * Music songId.
             * @member {string} songId
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.songId = "";

            /**
             * Music title.
             * @member {string} title
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.title = "";

            /**
             * Music author.
             * @member {string} author
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.author = "";

            /**
             * Music artistAttribution.
             * @member {string} artistAttribution
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.artistAttribution = "";

            /**
             * Music isExplicit.
             * @member {boolean} isExplicit
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.isExplicit = false;

            /**
             * 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";
                if (message.authorName != null && message.hasOwnProperty("authorName"))
                    if (!$util.isString(message.authorName))
                        return "authorName: string expected";
                if (message.songId != null && message.hasOwnProperty("songId"))
                    if (!$util.isString(message.songId))
                        return "songId: string expected";
                if (message.title != null && message.hasOwnProperty("title"))
                    if (!$util.isString(message.title))
                        return "title: string expected";
                if (message.author != null && message.hasOwnProperty("author"))
                    if (!$util.isString(message.author))
                        return "author: string expected";
                if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution"))
                    if (!$util.isString(message.artistAttribution))
                        return "artistAttribution: string expected";
                if (message.isExplicit != null && message.hasOwnProperty("isExplicit"))
                    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 (options.defaults) {
                    object.authorName = "";
                    object.songId = "";
                    object.title = "";
                    object.author = "";
                    object.artistAttribution = "";
                    object.isExplicit = false;
                }
                if (message.authorName != null && message.hasOwnProperty("authorName"))
                    object.authorName = message.authorName;
                if (message.songId != null && message.hasOwnProperty("songId"))
                    object.songId = message.songId;
                if (message.title != null && message.hasOwnProperty("title"))
                    object.title = message.title;
                if (message.author != null && message.hasOwnProperty("author"))
                    object.author = message.author;
                if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution"))
                    object.artistAttribution = message.artistAttribution;
                if (message.isExplicit != null && message.hasOwnProperty("isExplicit"))
                    object.isExplicit = message.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} source
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @instance
             */
            RLAttribution.prototype.source = 0;

            /**
             * 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";
                if (message.source != null && message.hasOwnProperty("source"))
                    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 (options.defaults)
                    object.source = options.enums === String ? "UNKNOWN" : 0;
                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;
                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} source
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            StatusReshare.prototype.source = 0;

            /**
             * StatusReshare metadata.
             * @member {StatusAttributions.StatusAttribution.StatusReshare.IMetadata|null|undefined} metadata
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            StatusReshare.prototype.metadata = null;

            /**
             * 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";
                if (message.source != null && message.hasOwnProperty("source"))
                    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")) {
                    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 (options.defaults) {
                    object.source = options.enums === String ? "UNKNOWN" : 0;
                    object.metadata = null;
                }
                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 (message.metadata != null && message.hasOwnProperty("metadata"))
                    object.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.toObject(message.metadata, options);
                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} duration
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.duration = 0;

                /**
                 * Metadata channelJid.
                 * @member {string} channelJid
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.channelJid = "";

                /**
                 * Metadata channelMessageId.
                 * @member {number} channelMessageId
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.channelMessageId = 0;

                /**
                 * Metadata hasMultipleReshares.
                 * @member {boolean} hasMultipleReshares
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.hasMultipleReshares = false;

                /**
                 * 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";
                    if (message.duration != null && message.hasOwnProperty("duration"))
                        if (!$util.isInteger(message.duration))
                            return "duration: integer expected";
                    if (message.channelJid != null && message.hasOwnProperty("channelJid"))
                        if (!$util.isString(message.channelJid))
                            return "channelJid: string expected";
                    if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId"))
                        if (!$util.isInteger(message.channelMessageId))
                            return "channelMessageId: integer expected";
                    if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares"))
                        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 (options.defaults) {
                        object.duration = 0;
                        object.channelJid = "";
                        object.channelMessageId = 0;
                        object.hasMultipleReshares = false;
                    }
                    if (message.duration != null && message.hasOwnProperty("duration"))
                        object.duration = message.duration;
                    if (message.channelJid != null && message.hasOwnProperty("channelJid"))
                        object.channelJid = message.channelJid;
                    if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId"))
                        object.channelMessageId = message.channelMessageId;
                    if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares"))
                        object.hasMultipleReshares = message.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} details
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        ADVSignedDeviceIdentityHMAC.prototype.details = $util.newBuffer([]);

        /**
         * ADVSignedDeviceIdentityHMAC hmac.
         * @member {Uint8Array} hmac
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        ADVSignedDeviceIdentityHMAC.prototype.hmac = $util.newBuffer([]);

        /**
         * ADVSignedDeviceIdentityHMAC accountType.
         * @member {Adv.ADVEncryptionType} accountType
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        ADVSignedDeviceIdentityHMAC.prototype.accountType = 0;

        /**
         * 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";
            if (message.details != null && message.hasOwnProperty("details"))
                if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
                    return "details: buffer expected";
            if (message.hmac != null && message.hasOwnProperty("hmac"))
                if (!(message.hmac && typeof message.hmac.length === "number" || $util.isString(message.hmac)))
                    return "hmac: buffer expected";
            if (message.accountType != null && message.hasOwnProperty("accountType"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.details = "";
                else {
                    object.details = [];
                    if (options.bytes !== Array)
                        object.details = $util.newBuffer(object.details);
                }
                if (options.bytes === String)
                    object.hmac = "";
                else {
                    object.hmac = [];
                    if (options.bytes !== Array)
                        object.hmac = $util.newBuffer(object.hmac);
                }
                object.accountType = options.enums === String ? "E2EE" : 0;
            }
            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 (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 (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;
            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} details
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.details = $util.newBuffer([]);

        /**
         * ADVSignedDeviceIdentity accountSignatureKey.
         * @member {Uint8Array} accountSignatureKey
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.accountSignatureKey = $util.newBuffer([]);

        /**
         * ADVSignedDeviceIdentity accountSignature.
         * @member {Uint8Array} accountSignature
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.accountSignature = $util.newBuffer([]);

        /**
         * ADVSignedDeviceIdentity deviceSignature.
         * @member {Uint8Array} deviceSignature
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.deviceSignature = $util.newBuffer([]);

        /**
         * 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";
            if (message.details != null && message.hasOwnProperty("details"))
                if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
                    return "details: buffer expected";
            if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey"))
                if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey)))
                    return "accountSignatureKey: buffer expected";
            if (message.accountSignature != null && message.hasOwnProperty("accountSignature"))
                if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature)))
                    return "accountSignature: buffer expected";
            if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.details = "";
                else {
                    object.details = [];
                    if (options.bytes !== Array)
                        object.details = $util.newBuffer(object.details);
                }
                if (options.bytes === String)
                    object.accountSignatureKey = "";
                else {
                    object.accountSignatureKey = [];
                    if (options.bytes !== Array)
                        object.accountSignatureKey = $util.newBuffer(object.accountSignatureKey);
                }
                if (options.bytes === String)
                    object.accountSignature = "";
                else {
                    object.accountSignature = [];
                    if (options.bytes !== Array)
                        object.accountSignature = $util.newBuffer(object.accountSignature);
                }
                if (options.bytes === String)
                    object.deviceSignature = "";
                else {
                    object.deviceSignature = [];
                    if (options.bytes !== Array)
                        object.deviceSignature = $util.newBuffer(object.deviceSignature);
                }
            }
            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 (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 (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 (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;
            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} rawId
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.rawId = 0;

        /**
         * ADVDeviceIdentity timestamp.
         * @member {number|Long} timestamp
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * ADVDeviceIdentity keyIndex.
         * @member {number} keyIndex
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.keyIndex = 0;

        /**
         * ADVDeviceIdentity accountType.
         * @member {Adv.ADVEncryptionType} accountType
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.accountType = 0;

        /**
         * ADVDeviceIdentity deviceType.
         * @member {Adv.ADVEncryptionType} deviceType
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.deviceType = 0;

        /**
         * 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";
            if (message.rawId != null && message.hasOwnProperty("rawId"))
                if (!$util.isInteger(message.rawId))
                    return "rawId: integer expected";
            if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                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"))
                if (!$util.isInteger(message.keyIndex))
                    return "keyIndex: integer expected";
            if (message.accountType != null && message.hasOwnProperty("accountType"))
                switch (message.accountType) {
                default:
                    return "accountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.deviceType != null && message.hasOwnProperty("deviceType"))
                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 (options.defaults) {
                object.rawId = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timestamp = options.longs === String ? "0" : 0;
                object.keyIndex = 0;
                object.accountType = options.enums === String ? "E2EE" : 0;
                object.deviceType = options.enums === String ? "E2EE" : 0;
            }
            if (message.rawId != null && message.hasOwnProperty("rawId"))
                object.rawId = message.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 (message.keyIndex != null && message.hasOwnProperty("keyIndex"))
                object.keyIndex = message.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 (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;
            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} details
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        ADVSignedKeyIndexList.prototype.details = $util.newBuffer([]);

        /**
         * ADVSignedKeyIndexList accountSignature.
         * @member {Uint8Array} accountSignature
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        ADVSignedKeyIndexList.prototype.accountSignature = $util.newBuffer([]);

        /**
         * ADVSignedKeyIndexList accountSignatureKey.
         * @member {Uint8Array} accountSignatureKey
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        ADVSignedKeyIndexList.prototype.accountSignatureKey = $util.newBuffer([]);

        /**
         * 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";
            if (message.details != null && message.hasOwnProperty("details"))
                if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
                    return "details: buffer expected";
            if (message.accountSignature != null && message.hasOwnProperty("accountSignature"))
                if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature)))
                    return "accountSignature: buffer expected";
            if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.details = "";
                else {
                    object.details = [];
                    if (options.bytes !== Array)
                        object.details = $util.newBuffer(object.details);
                }
                if (options.bytes === String)
                    object.accountSignature = "";
                else {
                    object.accountSignature = [];
                    if (options.bytes !== Array)
                        object.accountSignature = $util.newBuffer(object.accountSignature);
                }
                if (options.bytes === String)
                    object.accountSignatureKey = "";
                else {
                    object.accountSignatureKey = [];
                    if (options.bytes !== Array)
                        object.accountSignatureKey = $util.newBuffer(object.accountSignatureKey);
                }
            }
            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 (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 (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;
            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} rawId
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.rawId = 0;

        /**
         * ADVKeyIndexList timestamp.
         * @member {number|Long} timestamp
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * ADVKeyIndexList currentIndex.
         * @member {number} currentIndex
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.currentIndex = 0;

        /**
         * ADVKeyIndexList validIndexes.
         * @member {Array.<number>} validIndexes
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.validIndexes = $util.emptyArray;

        /**
         * ADVKeyIndexList accountType.
         * @member {Adv.ADVEncryptionType} accountType
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.accountType = 0;

        /**
         * 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";
            if (message.rawId != null && message.hasOwnProperty("rawId"))
                if (!$util.isInteger(message.rawId))
                    return "rawId: integer expected";
            if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                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"))
                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"))
                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 (options.defaults) {
                object.rawId = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timestamp = options.longs === String ? "0" : 0;
                object.currentIndex = 0;
                object.accountType = options.enums === String ? "E2EE" : 0;
            }
            if (message.rawId != null && message.hasOwnProperty("rawId"))
                object.rawId = message.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 (message.currentIndex != null && message.hasOwnProperty("currentIndex"))
                object.currentIndex = message.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;
            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
         */

        /**
         * 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} isChatDbLidMigrated
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        ClientPairingProps.prototype.isChatDbLidMigrated = false;

        /**
         * ClientPairingProps isSyncdPureLidSession.
         * @member {boolean} isSyncdPureLidSession
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        ClientPairingProps.prototype.isSyncdPureLidSession = false;

        /**
         * ClientPairingProps isSyncdSnapshotRecoveryEnabled.
         * @member {boolean} isSyncdSnapshotRecoveryEnabled
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        ClientPairingProps.prototype.isSyncdSnapshotRecoveryEnabled = false;

        /**
         * 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);
            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;
                    }
                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";
            if (message.isChatDbLidMigrated != null && message.hasOwnProperty("isChatDbLidMigrated"))
                if (typeof message.isChatDbLidMigrated !== "boolean")
                    return "isChatDbLidMigrated: boolean expected";
            if (message.isSyncdPureLidSession != null && message.hasOwnProperty("isSyncdPureLidSession"))
                if (typeof message.isSyncdPureLidSession !== "boolean")
                    return "isSyncdPureLidSession: boolean expected";
            if (message.isSyncdSnapshotRecoveryEnabled != null && message.hasOwnProperty("isSyncdSnapshotRecoveryEnabled"))
                if (typeof message.isSyncdSnapshotRecoveryEnabled !== "boolean")
                    return "isSyncdSnapshotRecoveryEnabled: 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);
            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 (options.defaults) {
                object.isChatDbLidMigrated = false;
                object.isSyncdPureLidSession = false;
                object.isSyncdSnapshotRecoveryEnabled = false;
            }
            if (message.isChatDbLidMigrated != null && message.hasOwnProperty("isChatDbLidMigrated"))
                object.isChatDbLidMigrated = message.isChatDbLidMigrated;
            if (message.isSyncdPureLidSession != null && message.hasOwnProperty("isSyncdPureLidSession"))
                object.isSyncdPureLidSession = message.isSyncdPureLidSession;
            if (message.isSyncdSnapshotRecoveryEnabled != null && message.hasOwnProperty("isSyncdSnapshotRecoveryEnabled"))
                object.isSyncdSnapshotRecoveryEnabled = message.isSyncdSnapshotRecoveryEnabled;
            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} encryptedPayload
         * @memberof CompanionReg.EncryptedPairingRequest
         * @instance
         */
        EncryptedPairingRequest.prototype.encryptedPayload = $util.newBuffer([]);

        /**
         * EncryptedPairingRequest iv.
         * @member {Uint8Array} iv
         * @memberof CompanionReg.EncryptedPairingRequest
         * @instance
         */
        EncryptedPairingRequest.prototype.iv = $util.newBuffer([]);

        /**
         * 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";
            if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload"))
                if (!(message.encryptedPayload && typeof message.encryptedPayload.length === "number" || $util.isString(message.encryptedPayload)))
                    return "encryptedPayload: buffer expected";
            if (message.iv != null && message.hasOwnProperty("iv"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.encryptedPayload = "";
                else {
                    object.encryptedPayload = [];
                    if (options.bytes !== Array)
                        object.encryptedPayload = $util.newBuffer(object.encryptedPayload);
                }
                if (options.bytes === String)
                    object.iv = "";
                else {
                    object.iv = [];
                    if (options.bytes !== Array)
                        object.iv = $util.newBuffer(object.iv);
                }
            }
            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 (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;
            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} companionPublicKey
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        PairingRequest.prototype.companionPublicKey = $util.newBuffer([]);

        /**
         * PairingRequest companionIdentityKey.
         * @member {Uint8Array} companionIdentityKey
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        PairingRequest.prototype.companionIdentityKey = $util.newBuffer([]);

        /**
         * PairingRequest advSecret.
         * @member {Uint8Array} advSecret
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        PairingRequest.prototype.advSecret = $util.newBuffer([]);

        /**
         * 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";
            if (message.companionPublicKey != null && message.hasOwnProperty("companionPublicKey"))
                if (!(message.companionPublicKey && typeof message.companionPublicKey.length === "number" || $util.isString(message.companionPublicKey)))
                    return "companionPublicKey: buffer expected";
            if (message.companionIdentityKey != null && message.hasOwnProperty("companionIdentityKey"))
                if (!(message.companionIdentityKey && typeof message.companionIdentityKey.length === "number" || $util.isString(message.companionIdentityKey)))
                    return "companionIdentityKey: buffer expected";
            if (message.advSecret != null && message.hasOwnProperty("advSecret"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.companionPublicKey = "";
                else {
                    object.companionPublicKey = [];
                    if (options.bytes !== Array)
                        object.companionPublicKey = $util.newBuffer(object.companionPublicKey);
                }
                if (options.bytes === String)
                    object.companionIdentityKey = "";
                else {
                    object.companionIdentityKey = [];
                    if (options.bytes !== Array)
                        object.companionIdentityKey = $util.newBuffer(object.companionIdentityKey);
                }
                if (options.bytes === String)
                    object.advSecret = "";
                else {
                    object.advSecret = [];
                    if (options.bytes !== Array)
                        object.advSecret = $util.newBuffer(object.advSecret);
                }
            }
            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 (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 (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;
            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} publicKey
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @instance
         */
        PrimaryEphemeralIdentity.prototype.publicKey = $util.newBuffer([]);

        /**
         * PrimaryEphemeralIdentity nonce.
         * @member {Uint8Array} nonce
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @instance
         */
        PrimaryEphemeralIdentity.prototype.nonce = $util.newBuffer([]);

        /**
         * 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";
            if (message.publicKey != null && message.hasOwnProperty("publicKey"))
                if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
                    return "publicKey: buffer expected";
            if (message.nonce != null && message.hasOwnProperty("nonce"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.publicKey = "";
                else {
                    object.publicKey = [];
                    if (options.bytes !== Array)
                        object.publicKey = $util.newBuffer(object.publicKey);
                }
                if (options.bytes === String)
                    object.nonce = "";
                else {
                    object.nonce = [];
                    if (options.bytes !== Array)
                        object.nonce = $util.newBuffer(object.nonce);
                }
            }
            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 (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;
            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} companionEphemeralIdentity
         * @memberof CompanionReg.ProloguePayload
         * @instance
         */
        ProloguePayload.prototype.companionEphemeralIdentity = $util.newBuffer([]);

        /**
         * ProloguePayload commitment.
         * @member {CompanionReg.ICompanionCommitment|null|undefined} commitment
         * @memberof CompanionReg.ProloguePayload
         * @instance
         */
        ProloguePayload.prototype.commitment = null;

        /**
         * 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";
            if (message.companionEphemeralIdentity != null && message.hasOwnProperty("companionEphemeralIdentity"))
                if (!(message.companionEphemeralIdentity && typeof message.companionEphemeralIdentity.length === "number" || $util.isString(message.companionEphemeralIdentity)))
                    return "companionEphemeralIdentity: buffer expected";
            if (message.commitment != null && message.hasOwnProperty("commitment")) {
                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 (options.defaults) {
                if (options.bytes === String)
                    object.companionEphemeralIdentity = "";
                else {
                    object.companionEphemeralIdentity = [];
                    if (options.bytes !== Array)
                        object.companionEphemeralIdentity = $util.newBuffer(object.companionEphemeralIdentity);
                }
                object.commitment = null;
            }
            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 (message.commitment != null && message.hasOwnProperty("commitment"))
                object.commitment = $root.CompanionReg.CompanionCommitment.toObject(message.commitment, options);
            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} hash
         * @memberof CompanionReg.CompanionCommitment
         * @instance
         */
        CompanionCommitment.prototype.hash = $util.newBuffer([]);

        /**
         * 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";
            if (message.hash != null && message.hasOwnProperty("hash"))
                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 (options.defaults)
                if (options.bytes === String)
                    object.hash = "";
                else {
                    object.hash = [];
                    if (options.bytes !== Array)
                        object.hash = $util.newBuffer(object.hash);
                }
            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;
            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} publicKey
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        CompanionEphemeralIdentity.prototype.publicKey = $util.newBuffer([]);

        /**
         * CompanionEphemeralIdentity deviceType.
         * @member {CompanionReg.DeviceProps.PlatformType} deviceType
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        CompanionEphemeralIdentity.prototype.deviceType = 0;

        /**
         * CompanionEphemeralIdentity ref.
         * @member {string} ref
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        CompanionEphemeralIdentity.prototype.ref = "";

        /**
         * 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";
            if (message.publicKey != null && message.hasOwnProperty("publicKey"))
                if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
                    return "publicKey: buffer expected";
            if (message.deviceType != null && message.hasOwnProperty("deviceType"))
                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"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.publicKey = "";
                else {
                    object.publicKey = [];
                    if (options.bytes !== Array)
                        object.publicKey = $util.newBuffer(object.publicKey);
                }
                object.deviceType = options.enums === String ? "UNKNOWN" : 0;
                object.ref = "";
            }
            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 (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 (message.ref != null && message.hasOwnProperty("ref"))
                object.ref = message.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} os
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.os = "";

        /**
         * DeviceProps version.
         * @member {CompanionReg.DeviceProps.IAppVersion|null|undefined} version
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.version = null;

        /**
         * DeviceProps platformType.
         * @member {CompanionReg.DeviceProps.PlatformType} platformType
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.platformType = 0;

        /**
         * DeviceProps requireFullSync.
         * @member {boolean} requireFullSync
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.requireFullSync = false;

        /**
         * DeviceProps historySyncConfig.
         * @member {CompanionReg.DeviceProps.IHistorySyncConfig|null|undefined} historySyncConfig
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.historySyncConfig = null;

        /**
         * 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";
            if (message.os != null && message.hasOwnProperty("os"))
                if (!$util.isString(message.os))
                    return "os: string expected";
            if (message.version != null && message.hasOwnProperty("version")) {
                var error = $root.CompanionReg.DeviceProps.AppVersion.verify(message.version);
                if (error)
                    return "version." + error;
            }
            if (message.platformType != null && message.hasOwnProperty("platformType"))
                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"))
                if (typeof message.requireFullSync !== "boolean")
                    return "requireFullSync: boolean expected";
            if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) {
                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 (options.defaults) {
                object.os = "";
                object.version = null;
                object.platformType = options.enums === String ? "UNKNOWN" : 0;
                object.requireFullSync = false;
                object.historySyncConfig = null;
            }
            if (message.os != null && message.hasOwnProperty("os"))
                object.os = message.os;
            if (message.version != null && message.hasOwnProperty("version"))
                object.version = $root.CompanionReg.DeviceProps.AppVersion.toObject(message.version, options);
            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 (message.requireFullSync != null && message.hasOwnProperty("requireFullSync"))
                object.requireFullSync = message.requireFullSync;
            if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig"))
                object.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options);
            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} primary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.primary = 0;

            /**
             * AppVersion secondary.
             * @member {number} secondary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.secondary = 0;

            /**
             * AppVersion tertiary.
             * @member {number} tertiary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.tertiary = 0;

            /**
             * AppVersion quaternary.
             * @member {number} quaternary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.quaternary = 0;

            /**
             * AppVersion quinary.
             * @member {number} quinary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.quinary = 0;

            /**
             * 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";
                if (message.primary != null && message.hasOwnProperty("primary"))
                    if (!$util.isInteger(message.primary))
                        return "primary: integer expected";
                if (message.secondary != null && message.hasOwnProperty("secondary"))
                    if (!$util.isInteger(message.secondary))
                        return "secondary: integer expected";
                if (message.tertiary != null && message.hasOwnProperty("tertiary"))
                    if (!$util.isInteger(message.tertiary))
                        return "tertiary: integer expected";
                if (message.quaternary != null && message.hasOwnProperty("quaternary"))
                    if (!$util.isInteger(message.quaternary))
                        return "quaternary: integer expected";
                if (message.quinary != null && message.hasOwnProperty("quinary"))
                    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 (options.defaults) {
                    object.primary = 0;
                    object.secondary = 0;
                    object.tertiary = 0;
                    object.quaternary = 0;
                    object.quinary = 0;
                }
                if (message.primary != null && message.hasOwnProperty("primary"))
                    object.primary = message.primary;
                if (message.secondary != null && message.hasOwnProperty("secondary"))
                    object.secondary = message.secondary;
                if (message.tertiary != null && message.hasOwnProperty("tertiary"))
                    object.tertiary = message.tertiary;
                if (message.quaternary != null && message.hasOwnProperty("quaternary"))
                    object.quaternary = message.quaternary;
                if (message.quinary != null && message.hasOwnProperty("quinary"))
                    object.quinary = message.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
             */

            /**
             * 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} fullSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.fullSyncDaysLimit = 0;

            /**
             * HistorySyncConfig fullSyncSizeMbLimit.
             * @member {number} fullSyncSizeMbLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.fullSyncSizeMbLimit = 0;

            /**
             * HistorySyncConfig storageQuotaMb.
             * @member {number} storageQuotaMb
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.storageQuotaMb = 0;

            /**
             * HistorySyncConfig inlineInitialPayloadInE2EeMsg.
             * @member {boolean} inlineInitialPayloadInE2EeMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = false;

            /**
             * HistorySyncConfig recentSyncDaysLimit.
             * @member {number} recentSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.recentSyncDaysLimit = 0;

            /**
             * HistorySyncConfig supportCallLogHistory.
             * @member {boolean} supportCallLogHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportCallLogHistory = false;

            /**
             * HistorySyncConfig supportBotUserAgentChatHistory.
             * @member {boolean} supportBotUserAgentChatHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportBotUserAgentChatHistory = false;

            /**
             * HistorySyncConfig supportCagReactionsAndPolls.
             * @member {boolean} supportCagReactionsAndPolls
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportCagReactionsAndPolls = false;

            /**
             * HistorySyncConfig supportBizHostedMsg.
             * @member {boolean} supportBizHostedMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportBizHostedMsg = false;

            /**
             * HistorySyncConfig supportRecentSyncChunkMessageCountTuning.
             * @member {boolean} supportRecentSyncChunkMessageCountTuning
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportRecentSyncChunkMessageCountTuning = false;

            /**
             * HistorySyncConfig supportHostedGroupMsg.
             * @member {boolean} supportHostedGroupMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportHostedGroupMsg = false;

            /**
             * HistorySyncConfig supportFbidBotChatHistory.
             * @member {boolean} supportFbidBotChatHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportFbidBotChatHistory = false;

            /**
             * HistorySyncConfig supportAddOnHistorySyncMigration.
             * @member {boolean} supportAddOnHistorySyncMigration
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportAddOnHistorySyncMigration = false;

            /**
             * HistorySyncConfig supportMessageAssociation.
             * @member {boolean} supportMessageAssociation
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportMessageAssociation = false;

            /**
             * HistorySyncConfig supportGroupHistory.
             * @member {boolean} supportGroupHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportGroupHistory = false;

            /**
             * HistorySyncConfig onDemandReady.
             * @member {boolean} onDemandReady
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.onDemandReady = false;

            /**
             * HistorySyncConfig supportGuestChat.
             * @member {boolean} supportGuestChat
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportGuestChat = false;

            /**
             * 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);
                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;
                        }
                    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";
                if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit"))
                    if (!$util.isInteger(message.fullSyncDaysLimit))
                        return "fullSyncDaysLimit: integer expected";
                if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit"))
                    if (!$util.isInteger(message.fullSyncSizeMbLimit))
                        return "fullSyncSizeMbLimit: integer expected";
                if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb"))
                    if (!$util.isInteger(message.storageQuotaMb))
                        return "storageQuotaMb: integer expected";
                if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg"))
                    if (typeof message.inlineInitialPayloadInE2EeMsg !== "boolean")
                        return "inlineInitialPayloadInE2EeMsg: boolean expected";
                if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit"))
                    if (!$util.isInteger(message.recentSyncDaysLimit))
                        return "recentSyncDaysLimit: integer expected";
                if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory"))
                    if (typeof message.supportCallLogHistory !== "boolean")
                        return "supportCallLogHistory: boolean expected";
                if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory"))
                    if (typeof message.supportBotUserAgentChatHistory !== "boolean")
                        return "supportBotUserAgentChatHistory: boolean expected";
                if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls"))
                    if (typeof message.supportCagReactionsAndPolls !== "boolean")
                        return "supportCagReactionsAndPolls: boolean expected";
                if (message.supportBizHostedMsg != null && message.hasOwnProperty("supportBizHostedMsg"))
                    if (typeof message.supportBizHostedMsg !== "boolean")
                        return "supportBizHostedMsg: boolean expected";
                if (message.supportRecentSyncChunkMessageCountTuning != null && message.hasOwnProperty("supportRecentSyncChunkMessageCountTuning"))
                    if (typeof message.supportRecentSyncChunkMessageCountTuning !== "boolean")
                        return "supportRecentSyncChunkMessageCountTuning: boolean expected";
                if (message.supportHostedGroupMsg != null && message.hasOwnProperty("supportHostedGroupMsg"))
                    if (typeof message.supportHostedGroupMsg !== "boolean")
                        return "supportHostedGroupMsg: boolean expected";
                if (message.supportFbidBotChatHistory != null && message.hasOwnProperty("supportFbidBotChatHistory"))
                    if (typeof message.supportFbidBotChatHistory !== "boolean")
                        return "supportFbidBotChatHistory: boolean expected";
                if (message.supportAddOnHistorySyncMigration != null && message.hasOwnProperty("supportAddOnHistorySyncMigration"))
                    if (typeof message.supportAddOnHistorySyncMigration !== "boolean")
                        return "supportAddOnHistorySyncMigration: boolean expected";
                if (message.supportMessageAssociation != null && message.hasOwnProperty("supportMessageAssociation"))
                    if (typeof message.supportMessageAssociation !== "boolean")
                        return "supportMessageAssociation: boolean expected";
                if (message.supportGroupHistory != null && message.hasOwnProperty("supportGroupHistory"))
                    if (typeof message.supportGroupHistory !== "boolean")
                        return "supportGroupHistory: boolean expected";
                if (message.onDemandReady != null && message.hasOwnProperty("onDemandReady"))
                    if (typeof message.onDemandReady !== "boolean")
                        return "onDemandReady: boolean expected";
                if (message.supportGuestChat != null && message.hasOwnProperty("supportGuestChat"))
                    if (typeof message.supportGuestChat !== "boolean")
                        return "supportGuestChat: boolean 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);
                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 (options.defaults) {
                    object.fullSyncDaysLimit = 0;
                    object.fullSyncSizeMbLimit = 0;
                    object.storageQuotaMb = 0;
                    object.inlineInitialPayloadInE2EeMsg = false;
                    object.recentSyncDaysLimit = 0;
                    object.supportCallLogHistory = false;
                    object.supportBotUserAgentChatHistory = false;
                    object.supportCagReactionsAndPolls = false;
                    object.supportBizHostedMsg = false;
                    object.supportRecentSyncChunkMessageCountTuning = false;
                    object.supportHostedGroupMsg = false;
                    object.supportFbidBotChatHistory = false;
                    object.supportAddOnHistorySyncMigration = false;
                    object.supportMessageAssociation = false;
                    object.supportGroupHistory = false;
                    object.onDemandReady = false;
                    object.supportGuestChat = false;
                }
                if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit"))
                    object.fullSyncDaysLimit = message.fullSyncDaysLimit;
                if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit"))
                    object.fullSyncSizeMbLimit = message.fullSyncSizeMbLimit;
                if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb"))
                    object.storageQuotaMb = message.storageQuotaMb;
                if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg"))
                    object.inlineInitialPayloadInE2EeMsg = message.inlineInitialPayloadInE2EeMsg;
                if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit"))
                    object.recentSyncDaysLimit = message.recentSyncDaysLimit;
                if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory"))
                    object.supportCallLogHistory = message.supportCallLogHistory;
                if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory"))
                    object.supportBotUserAgentChatHistory = message.supportBotUserAgentChatHistory;
                if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls"))
                    object.supportCagReactionsAndPolls = message.supportCagReactionsAndPolls;
                if (message.supportBizHostedMsg != null && message.hasOwnProperty("supportBizHostedMsg"))
                    object.supportBizHostedMsg = message.supportBizHostedMsg;
                if (message.supportRecentSyncChunkMessageCountTuning != null && message.hasOwnProperty("supportRecentSyncChunkMessageCountTuning"))
                    object.supportRecentSyncChunkMessageCountTuning = message.supportRecentSyncChunkMessageCountTuning;
                if (message.supportHostedGroupMsg != null && message.hasOwnProperty("supportHostedGroupMsg"))
                    object.supportHostedGroupMsg = message.supportHostedGroupMsg;
                if (message.supportFbidBotChatHistory != null && message.hasOwnProperty("supportFbidBotChatHistory"))
                    object.supportFbidBotChatHistory = message.supportFbidBotChatHistory;
                if (message.supportAddOnHistorySyncMigration != null && message.hasOwnProperty("supportAddOnHistorySyncMigration"))
                    object.supportAddOnHistorySyncMigration = message.supportAddOnHistorySyncMigration;
                if (message.supportMessageAssociation != null && message.hasOwnProperty("supportMessageAssociation"))
                    object.supportMessageAssociation = message.supportMessageAssociation;
                if (message.supportGroupHistory != null && message.hasOwnProperty("supportGroupHistory"))
                    object.supportGroupHistory = message.supportGroupHistory;
                if (message.onDemandReady != null && message.hasOwnProperty("onDemandReady"))
                    object.onDemandReady = message.onDemandReady;
                if (message.supportGuestChat != null && message.hasOwnProperty("supportGuestChat"))
                    object.supportGuestChat = message.supportGuestChat;
                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} stanzaId
         * @memberof MmsRetry.ServerErrorReceipt
         * @instance
         */
        ServerErrorReceipt.prototype.stanzaId = "";

        /**
         * 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";
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                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 (options.defaults)
                object.stanzaId = "";
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                object.stanzaId = message.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} stanzaId
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.stanzaId = "";

        /**
         * MediaRetryNotification directPath.
         * @member {string} directPath
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.directPath = "";

        /**
         * MediaRetryNotification result.
         * @member {MmsRetry.MediaRetryNotification.ResultType} result
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.result = 0;

        /**
         * MediaRetryNotification messageSecret.
         * @member {Uint8Array} messageSecret
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.messageSecret = $util.newBuffer([]);

        /**
         * 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";
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                if (!$util.isString(message.stanzaId))
                    return "stanzaId: string expected";
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            if (message.result != null && message.hasOwnProperty("result"))
                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"))
                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 (options.defaults) {
                object.stanzaId = "";
                object.directPath = "";
                object.result = options.enums === String ? "GENERAL_ERROR" : 0;
                if (options.bytes === String)
                    object.messageSecret = "";
                else {
                    object.messageSecret = [];
                    if (options.bytes !== Array)
                        object.messageSecret = $util.newBuffer(object.messageSecret);
                }
            }
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId"))
                object.stanzaId = message.stanzaId;
            if (message.directPath != null && message.hasOwnProperty("directPath"))
                object.directPath = message.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 (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;
            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;
})();

$root.Web = (function() {

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

    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} processState
         * @memberof Web.GroupHistoryBundleInfo
         * @instance
         */
        GroupHistoryBundleInfo.prototype.processState = 0;

        /**
         * 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";
            if (message.deprecatedMessageHistoryBundle != null && message.hasOwnProperty("deprecatedMessageHistoryBundle")) {
                var error = $root.E2E.Message.MessageHistoryBundle.verify(message.deprecatedMessageHistoryBundle);
                if (error)
                    return "deprecatedMessageHistoryBundle." + error;
            }
            if (message.processState != null && message.hasOwnProperty("processState"))
                switch (message.processState) {
                default:
                    return "processState: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    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;
            }
            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 (options.defaults) {
                object.deprecatedMessageHistoryBundle = null;
                object.processState = options.enums === String ? "NOT_INJECTED" : 0;
            }
            if (message.deprecatedMessageHistoryBundle != null && message.hasOwnProperty("deprecatedMessageHistoryBundle"))
                object.deprecatedMessageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.toObject(message.deprecatedMessageHistoryBundle, options);
            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;
            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
         */
        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;
            return values;
        })();

        return GroupHistoryBundleInfo;
    })();

    Web.GroupHistoryIndividualMessageInfo = (function() {

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

        /**
         * 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;

        /**
         * 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();
            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;
                    }
                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";
            if (message.bundleMessageKey != null && message.hasOwnProperty("bundleMessageKey")) {
                var error = $root.Protocol.MessageKey.verify(message.bundleMessageKey);
                if (error)
                    return "bundleMessageKey." + error;
            }
            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);
            }
            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 (options.defaults)
                object.bundleMessageKey = null;
            if (message.bundleMessageKey != null && message.hasOwnProperty("bundleMessageKey"))
                object.bundleMessageKey = $root.Protocol.MessageKey.toObject(message.bundleMessageKey, options);
            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} title Citation title
         * @property {string} subtitle Citation subtitle
         * @property {string} cmsId Citation cmsId
         * @property {string} 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} title
         * @memberof Web.Citation
         * @instance
         */
        Citation.prototype.title = "";

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

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

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

        /**
         * 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();
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
            writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle);
            writer.uint32(/* id 3, wireType 2 =*/26).string(message.cmsId);
            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;
                }
            }
            if (!message.hasOwnProperty("title"))
                throw $util.ProtocolError("missing required 'title'", { instance: message });
            if (!message.hasOwnProperty("subtitle"))
                throw $util.ProtocolError("missing required 'subtitle'", { instance: message });
            if (!message.hasOwnProperty("cmsId"))
                throw $util.ProtocolError("missing required 'cmsId'", { instance: message });
            if (!message.hasOwnProperty("imageUrl"))
                throw $util.ProtocolError("missing required 'imageUrl'", { instance: message });
            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";
            if (!$util.isString(message.title))
                return "title: string expected";
            if (!$util.isString(message.subtitle))
                return "subtitle: string expected";
            if (!$util.isString(message.cmsId))
                return "cmsId: string expected";
            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 (options.defaults) {
                object.title = "";
                object.subtitle = "";
                object.cmsId = "";
                object.imageUrl = "";
            }
            if (message.title != null && message.hasOwnProperty("title"))
                object.title = message.title;
            if (message.subtitle != null && message.hasOwnProperty("subtitle"))
                object.subtitle = message.subtitle;
            if (message.cmsId != null && message.hasOwnProperty("cmsId"))
                object.cmsId = message.cmsId;
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl"))
                object.imageUrl = message.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;

        /**
         * 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";
            if (message.quotedStatus != null && message.hasOwnProperty("quotedStatus")) {
                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 (options.defaults)
                object.quotedStatus = null;
            if (message.quotedStatus != null && message.hasOwnProperty("quotedStatus"))
                object.quotedStatus = $root.E2E.Message.toObject(message.quotedStatus, options);
            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} messageAddOnType
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.messageAddOnType = 0;

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

        /**
         * MessageAddOn senderTimestampMs.
         * @member {number|Long} senderTimestampMs
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * MessageAddOn serverTimestampMs.
         * @member {number|Long} serverTimestampMs
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

        /**
         * 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;

        /**
         * 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";
            if (message.messageAddOnType != null && message.hasOwnProperty("messageAddOnType"))
                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")) {
                var error = $root.E2E.Message.verify(message.messageAddOn);
                if (error)
                    return "messageAddOn." + error;
            }
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs"))
                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"))
                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"))
                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")) {
                var error = $root.Web.MessageAddOnContextInfo.verify(message.addOnContextInfo);
                if (error)
                    return "addOnContextInfo." + error;
            }
            if (message.messageAddOnKey != null && message.hasOwnProperty("messageAddOnKey")) {
                var error = $root.Protocol.MessageKey.verify(message.messageAddOnKey);
                if (error)
                    return "messageAddOnKey." + error;
            }
            if (message.legacyMessage != null && message.hasOwnProperty("legacyMessage")) {
                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 (options.defaults) {
                object.messageAddOnType = options.enums === String ? "UNDEFINED" : 0;
                object.messageAddOn = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.senderTimestampMs = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.serverTimestampMs = options.longs === String ? "0" : 0;
                object.status = options.enums === String ? "ERROR" : 0;
                object.addOnContextInfo = null;
                object.messageAddOnKey = null;
                object.legacyMessage = null;
            }
            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 (message.messageAddOn != null && message.hasOwnProperty("messageAddOn"))
                object.messageAddOn = $root.E2E.Message.toObject(message.messageAddOn, options);
            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 (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 (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 (message.addOnContextInfo != null && message.hasOwnProperty("addOnContextInfo"))
                object.addOnContextInfo = $root.Web.MessageAddOnContextInfo.toObject(message.addOnContextInfo, options);
            if (message.messageAddOnKey != null && message.hasOwnProperty("messageAddOnKey"))
                object.messageAddOnKey = $root.Protocol.MessageKey.toObject(message.messageAddOnKey, options);
            if (message.legacyMessage != null && message.hasOwnProperty("legacyMessage"))
                object.legacyMessage = $root.Web.LegacyMessage.toObject(message.legacyMessage, options);
            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;

        /**
         * 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";
            if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) {
                var error = $root.E2E.Message.EventResponseMessage.verify(message.eventResponseMessage);
                if (error)
                    return "eventResponseMessage." + error;
            }
            if (message.pollVote != null && message.hasOwnProperty("pollVote")) {
                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 (options.defaults) {
                object.eventResponseMessage = null;
                object.pollVote = null;
            }
            if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage"))
                object.eventResponseMessage = $root.E2E.Message.EventResponseMessage.toObject(message.eventResponseMessage, options);
            if (message.pollVote != null && message.hasOwnProperty("pollVote"))
                object.pollVote = $root.E2E.Message.PollVoteMessage.toObject(message.pollVote, options);
            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} timestampMs
         * @memberof Web.EventResponse
         * @instance
         */
        EventResponse.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

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

        /**
         * 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";
            if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) {
                var error = $root.Protocol.MessageKey.verify(message.eventResponseMessageKey);
                if (error)
                    return "eventResponseMessageKey." + error;
            }
            if (message.timestampMs != null && message.hasOwnProperty("timestampMs"))
                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")) {
                var error = $root.E2E.Message.EventResponseMessage.verify(message.eventResponseMessage);
                if (error)
                    return "eventResponseMessage." + error;
            }
            if (message.unread != null && message.hasOwnProperty("unread"))
                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 (options.defaults) {
                object.eventResponseMessageKey = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.timestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timestampMs = options.longs === String ? "0" : 0;
                object.eventResponseMessage = null;
                object.unread = false;
            }
            if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey"))
                object.eventResponseMessageKey = $root.Protocol.MessageKey.toObject(message.eventResponseMessageKey, options);
            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 (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage"))
                object.eventResponseMessage = $root.E2E.Message.EventResponseMessage.toObject(message.eventResponseMessage, options);
            if (message.unread != null && message.hasOwnProperty("unread"))
                object.unread = message.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} serverCampaignId
         * @memberof Web.PremiumMessageInfo
         * @instance
         */
        PremiumMessageInfo.prototype.serverCampaignId = "";

        /**
         * 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";
            if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId"))
                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 (options.defaults)
                object.serverCampaignId = "";
            if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId"))
                object.serverCampaignId = message.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} messageAddOnDurationInSecs
         * @memberof Web.MessageAddOnContextInfo
         * @instance
         */
        MessageAddOnContextInfo.prototype.messageAddOnDurationInSecs = 0;

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

        /**
         * 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";
            if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs"))
                if (!$util.isInteger(message.messageAddOnDurationInSecs))
                    return "messageAddOnDurationInSecs: integer expected";
            if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType"))
                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 (options.defaults) {
                object.messageAddOnDurationInSecs = 0;
                object.messageAddOnExpiryType = options.enums === String ? "STATIC" : 1;
            }
            if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs"))
                object.messageAddOnDurationInSecs = message.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;
            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} type
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.type = 0;

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

        /**
         * PinInChat senderTimestampMs.
         * @member {number|Long} senderTimestampMs
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * PinInChat serverTimestampMs.
         * @member {number|Long} serverTimestampMs
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

        /**
         * 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";
            if (message.type != null && message.hasOwnProperty("type"))
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.key != null && message.hasOwnProperty("key")) {
                var error = $root.Protocol.MessageKey.verify(message.key);
                if (error)
                    return "key." + error;
            }
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs"))
                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"))
                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")) {
                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 (options.defaults) {
                object.type = options.enums === String ? "UNKNOWN_TYPE" : 0;
                object.key = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.senderTimestampMs = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.serverTimestampMs = options.longs === String ? "0" : 0;
                object.messageAddOnContextInfo = null;
            }
            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 (message.key != null && message.hasOwnProperty("key"))
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
            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 (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 (message.messageAddOnContextInfo != null && message.hasOwnProperty("messageAddOnContextInfo"))
                object.messageAddOnContextInfo = $root.Web.MessageAddOnContextInfo.toObject(message.messageAddOnContextInfo, options);
            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} keepType
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.keepType = 0;

        /**
         * KeepInChat serverTimestamp.
         * @member {number|Long} serverTimestamp
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

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

        /**
         * KeepInChat clientTimestampMs.
         * @member {number|Long} clientTimestampMs
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.clientTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * KeepInChat serverTimestampMs.
         * @member {number|Long} serverTimestampMs
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * 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";
            if (message.keepType != null && message.hasOwnProperty("keepType"))
                switch (message.keepType) {
                default:
                    return "keepType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp"))
                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")) {
                var error = $root.Protocol.MessageKey.verify(message.key);
                if (error)
                    return "key." + error;
            }
            if (message.deviceJid != null && message.hasOwnProperty("deviceJid"))
                if (!$util.isString(message.deviceJid))
                    return "deviceJid: string expected";
            if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs"))
                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"))
                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 (options.defaults) {
                object.keepType = options.enums === String ? "UNKNOWN" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.serverTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.serverTimestamp = options.longs === String ? "0" : 0;
                object.key = null;
                object.deviceJid = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.clientTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.clientTimestampMs = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.serverTimestampMs = options.longs === String ? "0" : 0;
            }
            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 (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 (message.key != null && message.hasOwnProperty("key"))
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
            if (message.deviceJid != null && message.hasOwnProperty("deviceJid"))
                object.deviceJid = message.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 (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;
            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} isStale
         * @memberof Web.EventAdditionalMetadata
         * @instance
         */
        EventAdditionalMetadata.prototype.isStale = false;

        /**
         * 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";
            if (message.isStale != null && message.hasOwnProperty("isStale"))
                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 (options.defaults)
                object.isStale = false;
            if (message.isStale != null && message.hasOwnProperty("isStale"))
                object.isStale = message.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} isGalaxyFlowCompleted
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @instance
         */
        InteractiveMessageAdditionalMetadata.prototype.isGalaxyFlowCompleted = false;

        /**
         * 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";
            if (message.isGalaxyFlowCompleted != null && message.hasOwnProperty("isGalaxyFlowCompleted"))
                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 (options.defaults)
                object.isGalaxyFlowCompleted = false;
            if (message.isGalaxyFlowCompleted != null && message.hasOwnProperty("isGalaxyFlowCompleted"))
                object.isGalaxyFlowCompleted = message.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} pollInvalidated
         * @memberof Web.PollAdditionalMetadata
         * @instance
         */
        PollAdditionalMetadata.prototype.pollInvalidated = false;

        /**
         * 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";
            if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated"))
                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 (options.defaults)
                object.pollInvalidated = false;
            if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated"))
                object.pollInvalidated = message.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} senderTimestampMs
         * @memberof Web.PollUpdate
         * @instance
         */
        PollUpdate.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * PollUpdate serverTimestampMs.
         * @member {number|Long} serverTimestampMs
         * @memberof Web.PollUpdate
         * @instance
         */
        PollUpdate.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

        /**
         * 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";
            if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) {
                var error = $root.Protocol.MessageKey.verify(message.pollUpdateMessageKey);
                if (error)
                    return "pollUpdateMessageKey." + error;
            }
            if (message.vote != null && message.hasOwnProperty("vote")) {
                var error = $root.E2E.Message.PollVoteMessage.verify(message.vote);
                if (error)
                    return "vote." + error;
            }
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs"))
                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"))
                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"))
                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 (options.defaults) {
                object.pollUpdateMessageKey = null;
                object.vote = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.senderTimestampMs = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.serverTimestampMs = options.longs === String ? "0" : 0;
                object.unread = false;
            }
            if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey"))
                object.pollUpdateMessageKey = $root.Protocol.MessageKey.toObject(message.pollUpdateMessageKey, options);
            if (message.vote != null && message.hasOwnProperty("vote"))
                object.vote = $root.E2E.Message.PollVoteMessage.toObject(message.vote, options);
            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 (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 (message.unread != null && message.hasOwnProperty("unread"))
                object.unread = message.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} text
         * @memberof Web.Reaction
         * @instance
         */
        Reaction.prototype.text = "";

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

        /**
         * Reaction senderTimestampMs.
         * @member {number|Long} senderTimestampMs
         * @memberof Web.Reaction
         * @instance
         */
        Reaction.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

        /**
         * 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";
            if (message.key != null && message.hasOwnProperty("key")) {
                var error = $root.Protocol.MessageKey.verify(message.key);
                if (error)
                    return "key." + error;
            }
            if (message.text != null && message.hasOwnProperty("text"))
                if (!$util.isString(message.text))
                    return "text: string expected";
            if (message.groupingKey != null && message.hasOwnProperty("groupingKey"))
                if (!$util.isString(message.groupingKey))
                    return "groupingKey: string expected";
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs"))
                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"))
                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 (options.defaults) {
                object.key = null;
                object.text = "";
                object.groupingKey = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.senderTimestampMs = options.longs === String ? "0" : 0;
                object.unread = false;
            }
            if (message.key != null && message.hasOwnProperty("key"))
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
            if (message.text != null && message.hasOwnProperty("text"))
                object.text = message.text;
            if (message.groupingKey != null && message.hasOwnProperty("groupingKey"))
                object.groupingKey = message.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 (message.unread != null && message.hasOwnProperty("unread"))
                object.unread = message.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} 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} userJid
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.userJid = "";

        /**
         * UserReceipt receiptTimestamp.
         * @member {number|Long} receiptTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.receiptTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * UserReceipt readTimestamp.
         * @member {number|Long} readTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.readTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * UserReceipt playedTimestamp.
         * @member {number|Long} playedTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.playedTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * 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;

        /**
         * 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();
            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;
                }
            }
            if (!message.hasOwnProperty("userJid"))
                throw $util.ProtocolError("missing required 'userJid'", { instance: message });
            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";
            if (!$util.isString(message.userJid))
                return "userJid: string expected";
            if (message.receiptTimestamp != null && message.hasOwnProperty("receiptTimestamp"))
                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"))
                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"))
                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 (options.defaults) {
                object.userJid = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.receiptTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.receiptTimestamp = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.readTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.readTimestamp = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.playedTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.playedTimestamp = options.longs === String ? "0" : 0;
            }
            if (message.userJid != null && message.hasOwnProperty("userJid"))
                object.userJid = message.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 (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 (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 (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} 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} campaignId
         * @memberof Web.StatusPSA
         * @instance
         */
        StatusPSA.prototype.campaignId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * StatusPSA campaignExpirationTimestamp.
         * @member {number|Long} campaignExpirationTimestamp
         * @memberof Web.StatusPSA
         * @instance
         */
        StatusPSA.prototype.campaignExpirationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * 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();
            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;
                }
            }
            if (!message.hasOwnProperty("campaignId"))
                throw $util.ProtocolError("missing required 'campaignId'", { instance: message });
            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";
            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"))
                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 (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.campaignId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.campaignId = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.campaignExpirationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.campaignExpirationTimestamp = options.longs === String ? "0" : 0;
            }
            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 (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;
            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} oldPhoto
         * @memberof Web.PhotoChange
         * @instance
         */
        PhotoChange.prototype.oldPhoto = $util.newBuffer([]);

        /**
         * PhotoChange newPhoto.
         * @member {Uint8Array} newPhoto
         * @memberof Web.PhotoChange
         * @instance
         */
        PhotoChange.prototype.newPhoto = $util.newBuffer([]);

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

        /**
         * 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";
            if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto"))
                if (!(message.oldPhoto && typeof message.oldPhoto.length === "number" || $util.isString(message.oldPhoto)))
                    return "oldPhoto: buffer expected";
            if (message.newPhoto != null && message.hasOwnProperty("newPhoto"))
                if (!(message.newPhoto && typeof message.newPhoto.length === "number" || $util.isString(message.newPhoto)))
                    return "newPhoto: buffer expected";
            if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId"))
                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 (options.defaults) {
                if (options.bytes === String)
                    object.oldPhoto = "";
                else {
                    object.oldPhoto = [];
                    if (options.bytes !== Array)
                        object.oldPhoto = $util.newBuffer(object.oldPhoto);
                }
                if (options.bytes === String)
                    object.newPhoto = "";
                else {
                    object.newPhoto = [];
                    if (options.bytes !== Array)
                        object.newPhoto = $util.newBuffer(object.newPhoto);
                }
                object.newPhotoId = 0;
            }
            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 (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 (message.newPhotoId != null && message.hasOwnProperty("newPhotoId"))
                object.newPhotoId = message.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} localPath
         * @memberof Web.MediaData
         * @instance
         */
        MediaData.prototype.localPath = "";

        /**
         * 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";
            if (message.localPath != null && message.hasOwnProperty("localPath"))
                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 (options.defaults)
                object.localPath = "";
            if (message.localPath != null && message.hasOwnProperty("localPath"))
                object.localPath = message.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} reportingTag
         * @memberof Web.ReportingTokenInfo
         * @instance
         */
        ReportingTokenInfo.prototype.reportingTag = $util.newBuffer([]);

        /**
         * 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";
            if (message.reportingTag != null && message.hasOwnProperty("reportingTag"))
                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 (options.defaults)
                if (options.bytes === String)
                    object.reportingTag = "";
                else {
                    object.reportingTag = [];
                    if (options.bytes !== Array)
                        object.reportingTag = $util.newBuffer(object.reportingTag);
                }
            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;
            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} labelsDisplay
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.labelsDisplay = 0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        /**
         * 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";
            if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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"))
                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 (options.defaults) {
                object.labelsDisplay = options.enums === String ? "NOT_STARTED" : 0;
                object.voipIndividualOutgoing = options.enums === String ? "NOT_STARTED" : 0;
                object.groupsV3 = options.enums === String ? "NOT_STARTED" : 0;
                object.groupsV3Create = options.enums === String ? "NOT_STARTED" : 0;
                object.changeNumberV2 = options.enums === String ? "NOT_STARTED" : 0;
                object.queryStatusV3Thumbnail = options.enums === String ? "NOT_STARTED" : 0;
                object.liveLocations = options.enums === String ? "NOT_STARTED" : 0;
                object.queryVname = options.enums === String ? "NOT_STARTED" : 0;
                object.voipIndividualIncoming = options.enums === String ? "NOT_STARTED" : 0;
                object.quickRepliesQuery = options.enums === String ? "NOT_STARTED" : 0;
                object.payments = options.enums === String ? "NOT_STARTED" : 0;
                object.stickerPackQuery = options.enums === String ? "NOT_STARTED" : 0;
                object.liveLocationsFinal = options.enums === String ? "NOT_STARTED" : 0;
                object.labelsEdit = options.enums === String ? "NOT_STARTED" : 0;
                object.mediaUpload = options.enums === String ? "NOT_STARTED" : 0;
                object.mediaUploadRichQuickReplies = options.enums === String ? "NOT_STARTED" : 0;
                object.vnameV2 = options.enums === String ? "NOT_STARTED" : 0;
                object.videoPlaybackUrl = options.enums === String ? "NOT_STARTED" : 0;
                object.statusRanking = options.enums === String ? "NOT_STARTED" : 0;
                object.voipIndividualVideo = options.enums === String ? "NOT_STARTED" : 0;
                object.thirdPartyStickers = options.enums === String ? "NOT_STARTED" : 0;
                object.frequentlyForwardedSetting = options.enums === String ? "NOT_STARTED" : 0;
                object.groupsV4JoinPermission = options.enums === String ? "NOT_STARTED" : 0;
                object.recentStickers = options.enums === String ? "NOT_STARTED" : 0;
                object.catalog = options.enums === String ? "NOT_STARTED" : 0;
                object.starredStickers = options.enums === String ? "NOT_STARTED" : 0;
                object.voipGroupCall = options.enums === String ? "NOT_STARTED" : 0;
                object.templateMessage = options.enums === String ? "NOT_STARTED" : 0;
                object.templateMessageInteractivity = options.enums === String ? "NOT_STARTED" : 0;
                object.ephemeralMessages = options.enums === String ? "NOT_STARTED" : 0;
                object.e2ENotificationSync = options.enums === String ? "NOT_STARTED" : 0;
                object.recentStickersV2 = options.enums === String ? "NOT_STARTED" : 0;
                object.recentStickersV3 = options.enums === String ? "NOT_STARTED" : 0;
                object.userNotice = options.enums === String ? "NOT_STARTED" : 0;
                object.support = options.enums === String ? "NOT_STARTED" : 0;
                object.groupUiiCleanup = options.enums === String ? "NOT_STARTED" : 0;
                object.groupDogfoodingInternalOnly = options.enums === String ? "NOT_STARTED" : 0;
                object.settingsSync = options.enums === String ? "NOT_STARTED" : 0;
                object.archiveV2 = options.enums === String ? "NOT_STARTED" : 0;
                object.ephemeralAllowGroupMembers = options.enums === String ? "NOT_STARTED" : 0;
                object.ephemeral24HDuration = options.enums === String ? "NOT_STARTED" : 0;
                object.mdForceUpgrade = options.enums === String ? "NOT_STARTED" : 0;
                object.disappearingMode = options.enums === String ? "NOT_STARTED" : 0;
                object.externalMdOptInAvailable = options.enums === String ? "NOT_STARTED" : 0;
                object.noDeleteMessageTimeLimit = options.enums === String ? "NOT_STARTED" : 0;
            }
            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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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;
            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} messageTimestamp
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        NotificationMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

        /**
         * 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";
            if (message.key != null && message.hasOwnProperty("key")) {
                var error = $root.Protocol.MessageKey.verify(message.key);
                if (error)
                    return "key." + error;
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                var error = $root.E2E.Message.verify(message.message);
                if (error)
                    return "message." + error;
            }
            if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp"))
                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"))
                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 (options.defaults) {
                object.key = null;
                object.message = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.messageTimestamp = options.longs === String ? "0" : 0;
                object.participant = "";
            }
            if (message.key != null && message.hasOwnProperty("key"))
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
            if (message.message != null && message.hasOwnProperty("message"))
                object.message = $root.E2E.Message.toObject(message.message, options);
            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 (message.participant != null && message.hasOwnProperty("participant"))
                object.participant = message.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} timestamp
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        WebNotificationsInfo.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

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

        /**
         * 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";
            if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                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"))
                if (!$util.isInteger(message.unreadChats))
                    return "unreadChats: integer expected";
            if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount"))
                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 (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timestamp = options.longs === String ? "0" : 0;
                object.unreadChats = 0;
                object.notifyMessageCount = 0;
            }
            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 (message.unreadChats != null && message.hasOwnProperty("unreadChats"))
                object.unreadChats = message.unreadChats;
            if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount"))
                object.notifyMessageCount = message.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} currencyDeprecated
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.currencyDeprecated = 0;

        /**
         * PaymentInfo amount1000.
         * @member {number|Long} amount1000
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

        /**
         * PaymentInfo transactionTimestamp.
         * @member {number|Long} transactionTimestamp
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.transactionTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

        /**
         * PaymentInfo expiryTimestamp.
         * @member {number|Long} expiryTimestamp
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

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

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

        /**
         * 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;

        /**
         * 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";
            if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated"))
                switch (message.currencyDeprecated) {
                default:
                    return "currencyDeprecated: enum value expected";
                case 0:
                case 1:
                    break;
                }
            if (message.amount1000 != null && message.hasOwnProperty("amount1000"))
                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"))
                if (!$util.isString(message.receiverJid))
                    return "receiverJid: string expected";
            if (message.status != null && message.hasOwnProperty("status"))
                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"))
                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")) {
                var error = $root.Protocol.MessageKey.verify(message.requestMessageKey);
                if (error)
                    return "requestMessageKey." + error;
            }
            if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp"))
                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"))
                if (typeof message.futureproofed !== "boolean")
                    return "futureproofed: boolean expected";
            if (message.currency != null && message.hasOwnProperty("currency"))
                if (!$util.isString(message.currency))
                    return "currency: string expected";
            if (message.txnStatus != null && message.hasOwnProperty("txnStatus"))
                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"))
                if (typeof message.useNoviFiatFormat !== "boolean")
                    return "useNoviFiatFormat: boolean expected";
            if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) {
                var error = $root.E2E.Money.verify(message.primaryAmount);
                if (error)
                    return "primaryAmount." + error;
            }
            if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) {
                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 (options.defaults) {
                object.currencyDeprecated = options.enums === String ? "UNKNOWN_CURRENCY" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.amount1000 = options.longs === String ? "0" : 0;
                object.receiverJid = "";
                object.status = options.enums === String ? "UNKNOWN_STATUS" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.transactionTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.transactionTimestamp = options.longs === String ? "0" : 0;
                object.requestMessageKey = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.expiryTimestamp = options.longs === String ? "0" : 0;
                object.futureproofed = false;
                object.currency = "";
                object.txnStatus = options.enums === String ? "UNKNOWN" : 0;
                object.useNoviFiatFormat = false;
                object.primaryAmount = null;
                object.exchangeAmount = null;
            }
            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 (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 (message.receiverJid != null && message.hasOwnProperty("receiverJid"))
                object.receiverJid = message.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 (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 (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey"))
                object.requestMessageKey = $root.Protocol.MessageKey.toObject(message.requestMessageKey, options);
            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 (message.futureproofed != null && message.hasOwnProperty("futureproofed"))
                object.futureproofed = message.futureproofed;
            if (message.currency != null && message.hasOwnProperty("currency"))
                object.currency = message.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 (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat"))
                object.useNoviFiatFormat = message.useNoviFiatFormat;
            if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount"))
                object.primaryAmount = $root.E2E.Money.toObject(message.primaryAmount, options);
            if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount"))
                object.exchangeAmount = $root.E2E.Money.toObject(message.exchangeAmount, options);
            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} replyCount
         * @memberof Web.CommentMetadata
         * @instance
         */
        CommentMetadata.prototype.replyCount = 0;

        /**
         * 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";
            if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) {
                var error = $root.Protocol.MessageKey.verify(message.commentParentKey);
                if (error)
                    return "commentParentKey." + error;
            }
            if (message.replyCount != null && message.hasOwnProperty("replyCount"))
                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 (options.defaults) {
                object.commentParentKey = null;
                object.replyCount = 0;
            }
            if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey"))
                object.commentParentKey = $root.Protocol.MessageKey.toObject(message.commentParentKey, options);
            if (message.replyCount != null && message.hasOwnProperty("replyCount"))
                object.replyCount = message.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} 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
         */

        /**
         * 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} 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} messageTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

        /**
         * WebMessageInfo messageC2STimestamp.
         * @member {number|Long} messageC2STimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageC2STimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

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

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

        /**
         * WebMessageInfo mediaCiphertextSha256.
         * @member {Uint8Array} mediaCiphertextSha256
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.mediaCiphertextSha256 = $util.newBuffer([]);

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

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

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

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

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

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

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

        /**
         * 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} ephemeralStartTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.ephemeralStartTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

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

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

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

        /**
         * 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} futureproofData
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.futureproofData = $util.newBuffer([]);

        /**
         * 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} agentId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.agentId = "";

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

        /**
         * WebMessageInfo messageSecret.
         * @member {Uint8Array} messageSecret
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageSecret = $util.newBuffer([]);

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

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

        /**
         * WebMessageInfo revokeMessageTimestamp.
         * @member {number|Long} revokeMessageTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.revokeMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * 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} is1PBizBotMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.is1PBizBotMessage = false;

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

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

        /**
         * 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} newsletterServerId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.newsletterServerId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

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

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

        /**
         * 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} isSupportAiMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.isSupportAiMessage = false;

        /**
         * 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} botTargetId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.botTargetId = "";

        /**
         * 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;

        /**
         * 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();
            $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();
            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;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            if (!message.hasOwnProperty("key"))
                throw $util.ProtocolError("missing required 'key'", { instance: message });
            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 error = $root.Protocol.MessageKey.verify(message.key);
                if (error)
                    return "key." + error;
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                var error = $root.E2E.Message.verify(message.message);
                if (error)
                    return "message." + error;
            }
            if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp"))
                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"))
                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"))
                if (!$util.isString(message.participant))
                    return "participant: string expected";
            if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp"))
                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"))
                if (typeof message.ignore !== "boolean")
                    return "ignore: boolean expected";
            if (message.starred != null && message.hasOwnProperty("starred"))
                if (typeof message.starred !== "boolean")
                    return "starred: boolean expected";
            if (message.broadcast != null && message.hasOwnProperty("broadcast"))
                if (typeof message.broadcast !== "boolean")
                    return "broadcast: boolean expected";
            if (message.pushName != null && message.hasOwnProperty("pushName"))
                if (!$util.isString(message.pushName))
                    return "pushName: string expected";
            if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256"))
                if (!(message.mediaCiphertextSha256 && typeof message.mediaCiphertextSha256.length === "number" || $util.isString(message.mediaCiphertextSha256)))
                    return "mediaCiphertextSha256: buffer expected";
            if (message.multicast != null && message.hasOwnProperty("multicast"))
                if (typeof message.multicast !== "boolean")
                    return "multicast: boolean expected";
            if (message.urlText != null && message.hasOwnProperty("urlText"))
                if (typeof message.urlText !== "boolean")
                    return "urlText: boolean expected";
            if (message.urlNumber != null && message.hasOwnProperty("urlNumber"))
                if (typeof message.urlNumber !== "boolean")
                    return "urlNumber: boolean expected";
            if (message.messageStubType != null && message.hasOwnProperty("messageStubType"))
                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:
                    break;
                }
            if (message.clearMedia != null && message.hasOwnProperty("clearMedia"))
                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"))
                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")) {
                var error = $root.Web.PaymentInfo.verify(message.paymentInfo);
                if (error)
                    return "paymentInfo." + error;
            }
            if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) {
                var error = $root.E2E.Message.LiveLocationMessage.verify(message.finalLiveLocation);
                if (error)
                    return "finalLiveLocation." + error;
            }
            if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) {
                var error = $root.Web.PaymentInfo.verify(message.quotedPaymentInfo);
                if (error)
                    return "quotedPaymentInfo." + error;
            }
            if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp"))
                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"))
                if (!$util.isInteger(message.ephemeralDuration))
                    return "ephemeralDuration: integer expected";
            if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn"))
                if (typeof message.ephemeralOffToOn !== "boolean")
                    return "ephemeralOffToOn: boolean expected";
            if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync"))
                if (typeof message.ephemeralOutOfSync !== "boolean")
                    return "ephemeralOutOfSync: boolean expected";
            if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus"))
                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"))
                if (!$util.isString(message.verifiedBizName))
                    return "verifiedBizName: string expected";
            if (message.mediaData != null && message.hasOwnProperty("mediaData")) {
                var error = $root.E2E.PaymentBackground.MediaData.verify(message.mediaData);
                if (error)
                    return "mediaData." + error;
            }
            if (message.photoChange != null && message.hasOwnProperty("photoChange")) {
                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")) {
                var error = $root.E2E.PaymentBackground.MediaData.verify(message.quotedStickerData);
                if (error)
                    return "quotedStickerData." + error;
            }
            if (message.futureproofData != null && message.hasOwnProperty("futureproofData"))
                if (!(message.futureproofData && typeof message.futureproofData.length === "number" || $util.isString(message.futureproofData)))
                    return "futureproofData: buffer expected";
            if (message.statusPsa != null && message.hasOwnProperty("statusPsa")) {
                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")) {
                var error = $root.Web.PollAdditionalMetadata.verify(message.pollAdditionalMetadata);
                if (error)
                    return "pollAdditionalMetadata." + error;
            }
            if (message.agentId != null && message.hasOwnProperty("agentId"))
                if (!$util.isString(message.agentId))
                    return "agentId: string expected";
            if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed"))
                if (typeof message.statusAlreadyViewed !== "boolean")
                    return "statusAlreadyViewed: boolean expected";
            if (message.messageSecret != null && message.hasOwnProperty("messageSecret"))
                if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret)))
                    return "messageSecret: buffer expected";
            if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) {
                var error = $root.Web.KeepInChat.verify(message.keepInChat);
                if (error)
                    return "keepInChat." + error;
            }
            if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString"))
                if (!$util.isString(message.originalSelfAuthorUserJidString))
                    return "originalSelfAuthorUserJidString: string expected";
            if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp"))
                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")) {
                var error = $root.Web.PinInChat.verify(message.pinInChat);
                if (error)
                    return "pinInChat." + error;
            }
            if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) {
                var error = $root.Web.PremiumMessageInfo.verify(message.premiumMessageInfo);
                if (error)
                    return "premiumMessageInfo." + error;
            }
            if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage"))
                if (typeof message.is1PBizBotMessage !== "boolean")
                    return "is1PBizBotMessage: boolean expected";
            if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage"))
                if (typeof message.isGroupHistoryMessage !== "boolean")
                    return "isGroupHistoryMessage: boolean expected";
            if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid"))
                if (!$util.isString(message.botMessageInvokerJid))
                    return "botMessageInvokerJid: string expected";
            if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) {
                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")) {
                var error = $root.Web.ReportingTokenInfo.verify(message.reportingTokenInfo);
                if (error)
                    return "reportingTokenInfo." + error;
            }
            if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId"))
                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")) {
                var error = $root.Web.EventAdditionalMetadata.verify(message.eventAdditionalMetadata);
                if (error)
                    return "eventAdditionalMetadata." + error;
            }
            if (message.isMentionedInStatus != null && message.hasOwnProperty("isMentionedInStatus"))
                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")) {
                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")) {
                var error = $root.Web.StatusMentionMessage.verify(message.statusMentionMessageInfo);
                if (error)
                    return "statusMentionMessageInfo." + error;
            }
            if (message.isSupportAiMessage != null && message.hasOwnProperty("isSupportAiMessage"))
                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"))
                if (!$util.isString(message.botTargetId))
                    return "botTargetId: string expected";
            if (message.groupHistoryIndividualMessageInfo != null && message.hasOwnProperty("groupHistoryIndividualMessageInfo")) {
                var error = $root.Web.GroupHistoryIndividualMessageInfo.verify(message.groupHistoryIndividualMessageInfo);
                if (error)
                    return "groupHistoryIndividualMessageInfo." + error;
            }
            if (message.groupHistoryBundleInfo != null && message.hasOwnProperty("groupHistoryBundleInfo")) {
                var error = $root.Web.GroupHistoryBundleInfo.verify(message.groupHistoryBundleInfo);
                if (error)
                    return "groupHistoryBundleInfo." + error;
            }
            if (message.interactiveMessageAdditionalMetadata != null && message.hasOwnProperty("interactiveMessageAdditionalMetadata")) {
                var error = $root.Web.InteractiveMessageAdditionalMetadata.verify(message.interactiveMessageAdditionalMetadata);
                if (error)
                    return "interactiveMessageAdditionalMetadata." + 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;
            }
            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);
            }
            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 (options.defaults) {
                object.key = null;
                object.message = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.messageTimestamp = options.longs === String ? "0" : 0;
                object.status = options.enums === String ? "ERROR" : 0;
                object.participant = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.messageC2STimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.messageC2STimestamp = options.longs === String ? "0" : 0;
                object.ignore = false;
                object.starred = false;
                object.broadcast = false;
                object.pushName = "";
                if (options.bytes === String)
                    object.mediaCiphertextSha256 = "";
                else {
                    object.mediaCiphertextSha256 = [];
                    if (options.bytes !== Array)
                        object.mediaCiphertextSha256 = $util.newBuffer(object.mediaCiphertextSha256);
                }
                object.multicast = false;
                object.urlText = false;
                object.urlNumber = false;
                object.messageStubType = options.enums === String ? "UNKNOWN" : 0;
                object.clearMedia = false;
                object.duration = 0;
                object.paymentInfo = null;
                object.finalLiveLocation = null;
                object.quotedPaymentInfo = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.ephemeralStartTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.ephemeralStartTimestamp = options.longs === String ? "0" : 0;
                object.ephemeralDuration = 0;
                object.ephemeralOffToOn = false;
                object.ephemeralOutOfSync = false;
                object.bizPrivacyStatus = options.enums === String ? "E2EE" : 0;
                object.verifiedBizName = "";
                object.mediaData = null;
                object.photoChange = null;
                object.quotedStickerData = null;
                if (options.bytes === String)
                    object.futureproofData = "";
                else {
                    object.futureproofData = [];
                    if (options.bytes !== Array)
                        object.futureproofData = $util.newBuffer(object.futureproofData);
                }
                object.statusPsa = null;
                object.pollAdditionalMetadata = null;
                object.agentId = "";
                object.statusAlreadyViewed = false;
                if (options.bytes === String)
                    object.messageSecret = "";
                else {
                    object.messageSecret = [];
                    if (options.bytes !== Array)
                        object.messageSecret = $util.newBuffer(object.messageSecret);
                }
                object.keepInChat = null;
                object.originalSelfAuthorUserJidString = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.revokeMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.revokeMessageTimestamp = options.longs === String ? "0" : 0;
                object.pinInChat = null;
                object.premiumMessageInfo = null;
                object.is1PBizBotMessage = false;
                object.isGroupHistoryMessage = false;
                object.botMessageInvokerJid = "";
                object.commentMetadata = null;
                object.reportingTokenInfo = null;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.newsletterServerId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.newsletterServerId = options.longs === String ? "0" : 0;
                object.eventAdditionalMetadata = null;
                object.isMentionedInStatus = false;
                object.targetMessageId = null;
                object.statusMentionMessageInfo = null;
                object.isSupportAiMessage = false;
                object.botTargetId = "";
                object.groupHistoryIndividualMessageInfo = null;
                object.groupHistoryBundleInfo = null;
                object.interactiveMessageAdditionalMetadata = null;
            }
            if (message.key != null && message.hasOwnProperty("key"))
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
            if (message.message != null && message.hasOwnProperty("message"))
                object.message = $root.E2E.Message.toObject(message.message, options);
            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 (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 (message.participant != null && message.hasOwnProperty("participant"))
                object.participant = message.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 (message.ignore != null && message.hasOwnProperty("ignore"))
                object.ignore = message.ignore;
            if (message.starred != null && message.hasOwnProperty("starred"))
                object.starred = message.starred;
            if (message.broadcast != null && message.hasOwnProperty("broadcast"))
                object.broadcast = message.broadcast;
            if (message.pushName != null && message.hasOwnProperty("pushName"))
                object.pushName = message.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 (message.multicast != null && message.hasOwnProperty("multicast"))
                object.multicast = message.multicast;
            if (message.urlText != null && message.hasOwnProperty("urlText"))
                object.urlText = message.urlText;
            if (message.urlNumber != null && message.hasOwnProperty("urlNumber"))
                object.urlNumber = message.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 (message.clearMedia != null && message.hasOwnProperty("clearMedia"))
                object.clearMedia = message.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 (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 (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation"))
                object.finalLiveLocation = $root.E2E.Message.LiveLocationMessage.toObject(message.finalLiveLocation, options);
            if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo"))
                object.quotedPaymentInfo = $root.Web.PaymentInfo.toObject(message.quotedPaymentInfo, options);
            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 (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration"))
                object.ephemeralDuration = message.ephemeralDuration;
            if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn"))
                object.ephemeralOffToOn = message.ephemeralOffToOn;
            if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync"))
                object.ephemeralOutOfSync = message.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 (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName"))
                object.verifiedBizName = message.verifiedBizName;
            if (message.mediaData != null && message.hasOwnProperty("mediaData"))
                object.mediaData = $root.E2E.PaymentBackground.MediaData.toObject(message.mediaData, options);
            if (message.photoChange != null && message.hasOwnProperty("photoChange"))
                object.photoChange = $root.Web.PhotoChange.toObject(message.photoChange, options);
            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 (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 (message.statusPsa != null && message.hasOwnProperty("statusPsa"))
                object.statusPsa = $root.Web.StatusPSA.toObject(message.statusPsa, options);
            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 (message.agentId != null && message.hasOwnProperty("agentId"))
                object.agentId = message.agentId;
            if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed"))
                object.statusAlreadyViewed = message.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 (message.keepInChat != null && message.hasOwnProperty("keepInChat"))
                object.keepInChat = $root.Web.KeepInChat.toObject(message.keepInChat, options);
            if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString"))
                object.originalSelfAuthorUserJidString = message.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 (message.pinInChat != null && message.hasOwnProperty("pinInChat"))
                object.pinInChat = $root.Web.PinInChat.toObject(message.pinInChat, options);
            if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo"))
                object.premiumMessageInfo = $root.Web.PremiumMessageInfo.toObject(message.premiumMessageInfo, options);
            if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage"))
                object.is1PBizBotMessage = message.is1PBizBotMessage;
            if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage"))
                object.isGroupHistoryMessage = message.isGroupHistoryMessage;
            if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid"))
                object.botMessageInvokerJid = message.botMessageInvokerJid;
            if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata"))
                object.commentMetadata = $root.Web.CommentMetadata.toObject(message.commentMetadata, options);
            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 (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 (message.eventAdditionalMetadata != null && message.hasOwnProperty("eventAdditionalMetadata"))
                object.eventAdditionalMetadata = $root.Web.EventAdditionalMetadata.toObject(message.eventAdditionalMetadata, options);
            if (message.isMentionedInStatus != null && message.hasOwnProperty("isMentionedInStatus"))
                object.isMentionedInStatus = message.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 (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 (message.isSupportAiMessage != null && message.hasOwnProperty("isSupportAiMessage"))
                object.isSupportAiMessage = message.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 (message.groupHistoryIndividualMessageInfo != null && message.hasOwnProperty("groupHistoryIndividualMessageInfo"))
                object.groupHistoryIndividualMessageInfo = $root.Web.GroupHistoryIndividualMessageInfo.toObject(message.groupHistoryIndividualMessageInfo, options);
            if (message.groupHistoryBundleInfo != null && message.hasOwnProperty("groupHistoryBundleInfo"))
                object.groupHistoryBundleInfo = $root.Web.GroupHistoryBundleInfo.toObject(message.groupHistoryBundleInfo, options);
            if (message.interactiveMessageAdditionalMetadata != null && message.hasOwnProperty("interactiveMessageAdditionalMetadata"))
                object.interactiveMessageAdditionalMetadata = $root.Web.InteractiveMessageAdditionalMetadata.toObject(message.interactiveMessageAdditionalMetadata, options);
            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
         */
        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;
            return values;
        })();

        return WebMessageInfo;
    })();

    return Web;
})();

$root.SyncAction = (function() {

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

    SyncAction.PatchDebugData = (function() {

        /**
         * Properties of a PatchDebugData.
         * @memberof SyncAction
         * @interface IPatchDebugData
         * @property {Uint8Array|null} [currentLthash] PatchDebugData currentLthash
         * @property {Uint8Array|null} [newLthash] PatchDebugData newLthash
         * @property {Uint8Array|null} [patchVersion] PatchDebugData patchVersion
         * @property {Uint8Array|null} [collectionName] PatchDebugData collectionName
         * @property {Uint8Array|null} [firstFourBytesFromAHashOfSnapshotMacKey] PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey
         * @property {Uint8Array|null} [newLthashSubtract] PatchDebugData newLthashSubtract
         * @property {number|null} [numberAdd] PatchDebugData numberAdd
         * @property {number|null} [numberRemove] PatchDebugData numberRemove
         * @property {number|null} [numberOverride] PatchDebugData numberOverride
         * @property {SyncAction.PatchDebugData.Platform|null} [senderPlatform] PatchDebugData senderPlatform
         * @property {boolean|null} [isSenderPrimary] PatchDebugData isSenderPrimary
         */

        /**
         * Constructs a new PatchDebugData.
         * @memberof SyncAction
         * @classdesc Represents a PatchDebugData.
         * @implements IPatchDebugData
         * @constructor
         * @param {SyncAction.IPatchDebugData=} [properties] Properties to set
         */
        function PatchDebugData(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * PatchDebugData currentLthash.
         * @member {Uint8Array} currentLthash
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.currentLthash = $util.newBuffer([]);

        /**
         * PatchDebugData newLthash.
         * @member {Uint8Array} newLthash
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.newLthash = $util.newBuffer([]);

        /**
         * PatchDebugData patchVersion.
         * @member {Uint8Array} patchVersion
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.patchVersion = $util.newBuffer([]);

        /**
         * PatchDebugData collectionName.
         * @member {Uint8Array} collectionName
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.collectionName = $util.newBuffer([]);

        /**
         * PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey.
         * @member {Uint8Array} firstFourBytesFromAHashOfSnapshotMacKey
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer([]);

        /**
         * PatchDebugData newLthashSubtract.
         * @member {Uint8Array} newLthashSubtract
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.newLthashSubtract = $util.newBuffer([]);

        /**
         * PatchDebugData numberAdd.
         * @member {number} numberAdd
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.numberAdd = 0;

        /**
         * PatchDebugData numberRemove.
         * @member {number} numberRemove
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.numberRemove = 0;

        /**
         * PatchDebugData numberOverride.
         * @member {number} numberOverride
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.numberOverride = 0;

        /**
         * PatchDebugData senderPlatform.
         * @member {SyncAction.PatchDebugData.Platform} senderPlatform
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.senderPlatform = 0;

        /**
         * PatchDebugData isSenderPrimary.
         * @member {boolean} isSenderPrimary
         * @memberof SyncAction.PatchDebugData
         * @instance
         */
        PatchDebugData.prototype.isSenderPrimary = false;

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

        /**
         * Encodes the specified PatchDebugData message. Does not implicitly {@link SyncAction.PatchDebugData.verify|verify} messages.
         * @function encode
         * @memberof SyncAction.PatchDebugData
         * @static
         * @param {SyncAction.IPatchDebugData} message PatchDebugData message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PatchDebugData.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.currentLthash != null && Object.hasOwnProperty.call(message, "currentLthash"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.currentLthash);
            if (message.newLthash != null && Object.hasOwnProperty.call(message, "newLthash"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.newLthash);
            if (message.patchVersion != null && Object.hasOwnProperty.call(message, "patchVersion"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.patchVersion);
            if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.collectionName);
            if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && Object.hasOwnProperty.call(message, "firstFourBytesFromAHashOfSnapshotMacKey"))
                writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.firstFourBytesFromAHashOfSnapshotMacKey);
            if (message.newLthashSubtract != null && Object.hasOwnProperty.call(message, "newLthashSubtract"))
                writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.newLthashSubtract);
            if (message.numberAdd != null && Object.hasOwnProperty.call(message, "numberAdd"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.numberAdd);
            if (message.numberRemove != null && Object.hasOwnProperty.call(message, "numberRemove"))
                writer.uint32(/* id 8, wireType 0 =*/64).int32(message.numberRemove);
            if (message.numberOverride != null && Object.hasOwnProperty.call(message, "numberOverride"))
                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.numberOverride);
            if (message.senderPlatform != null && Object.hasOwnProperty.call(message, "senderPlatform"))
                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.senderPlatform);
            if (message.isSenderPrimary != null && Object.hasOwnProperty.call(message, "isSenderPrimary"))
                writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isSenderPrimary);
            return writer;
        };

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

        /**
         * Decodes a PatchDebugData message from the specified reader or buffer.
         * @function decode
         * @memberof SyncAction.PatchDebugData
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {SyncAction.PatchDebugData} PatchDebugData
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PatchDebugData.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.PatchDebugData();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.currentLthash = reader.bytes();
                        break;
                    }
                case 2: {
                        message.newLthash = reader.bytes();
                        break;
                    }
                case 3: {
                        message.patchVersion = reader.bytes();
                        break;
                    }
                case 4: {
                        message.collectionName = reader.bytes();
                        break;
                    }
                case 5: {
                        message.firstFourBytesFromAHashOfSnapshotMacKey = reader.bytes();
                        break;
                    }
                case 6: {
                        message.newLthashSubtract = reader.bytes();
                        break;
                    }
                case 7: {
                        message.numberAdd = reader.int32();
                        break;
                    }
                case 8: {
                        message.numberRemove = reader.int32();
                        break;
                    }
                case 9: {
                        message.numberOverride = reader.int32();
                        break;
                    }
                case 10: {
                        message.senderPlatform = reader.int32();
                        break;
                    }
                case 11: {
                        message.isSenderPrimary = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a PatchDebugData message.
         * @function verify
         * @memberof SyncAction.PatchDebugData
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PatchDebugData.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.currentLthash != null && message.hasOwnProperty("currentLthash"))
                if (!(message.currentLthash && typeof message.currentLthash.length === "number" || $util.isString(message.currentLthash)))
                    return "currentLthash: buffer expected";
            if (message.newLthash != null && message.hasOwnProperty("newLthash"))
                if (!(message.newLthash && typeof message.newLthash.length === "number" || $util.isString(message.newLthash)))
                    return "newLthash: buffer expected";
            if (message.patchVersion != null && message.hasOwnProperty("patchVersion"))
                if (!(message.patchVersion && typeof message.patchVersion.length === "number" || $util.isString(message.patchVersion)))
                    return "patchVersion: buffer expected";
            if (message.collectionName != null && message.hasOwnProperty("collectionName"))
                if (!(message.collectionName && typeof message.collectionName.length === "number" || $util.isString(message.collectionName)))
                    return "collectionName: buffer expected";
            if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey"))
                if (!(message.firstFourBytesFromAHashOfSnapshotMacKey && typeof message.firstFourBytesFromAHashOfSnapshotMacKey.length === "number" || $util.isString(message.firstFourBytesFromAHashOfSnapshotMacKey)))
                    return "firstFourBytesFromAHashOfSnapshotMacKey: buffer expected";
            if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract"))
                if (!(message.newLthashSubtract && typeof message.newLthashSubtract.length === "number" || $util.isString(message.newLthashSubtract)))
                    return "newLthashSubtract: buffer expected";
            if (message.numberAdd != null && message.hasOwnProperty("numberAdd"))
                if (!$util.isInteger(message.numberAdd))
                    return "numberAdd: integer expected";
            if (message.numberRemove != null && message.hasOwnProperty("numberRemove"))
                if (!$util.isInteger(message.numberRemove))
                    return "numberRemove: integer expected";
            if (message.numberOverride != null && message.hasOwnProperty("numberOverride"))
                if (!$util.isInteger(message.numberOverride))
                    return "numberOverride: integer expected";
            if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform"))
                switch (message.senderPlatform) {
                default:
                    return "senderPlatform: 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.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary"))
                if (typeof message.isSenderPrimary !== "boolean")
                    return "isSenderPrimary: boolean expected";
            return null;
        };

        /**
         * Creates a PatchDebugData message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof SyncAction.PatchDebugData
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {SyncAction.PatchDebugData} PatchDebugData
         */
        PatchDebugData.fromObject = function fromObject(object) {
            if (object instanceof $root.SyncAction.PatchDebugData)
                return object;
            var message = new $root.SyncAction.PatchDebugData();
            if (object.currentLthash != null)
                if (typeof object.currentLthash === "string")
                    $util.base64.decode(object.currentLthash, message.currentLthash = $util.newBuffer($util.base64.length(object.currentLthash)), 0);
                else if (object.currentLthash.length >= 0)
                    message.currentLthash = object.currentLthash;
            if (object.newLthash != null)
                if (typeof object.newLthash === "string")
                    $util.base64.decode(object.newLthash, message.newLthash = $util.newBuffer($util.base64.length(object.newLthash)), 0);
                else if (object.newLthash.length >= 0)
                    message.newLthash = object.newLthash;
            if (object.patchVersion != null)
                if (typeof object.patchVersion === "string")
                    $util.base64.decode(object.patchVersion, message.patchVersion = $util.newBuffer($util.base64.length(object.patchVersion)), 0);
                else if (object.patchVersion.length >= 0)
                    message.patchVersion = object.patchVersion;
            if (object.collectionName != null)
                if (typeof object.collectionName === "string")
                    $util.base64.decode(object.collectionName, message.collectionName = $util.newBuffer($util.base64.length(object.collectionName)), 0);
                else if (object.collectionName.length >= 0)
                    message.collectionName = object.collectionName;
            if (object.firstFourBytesFromAHashOfSnapshotMacKey != null)
                if (typeof object.firstFourBytesFromAHashOfSnapshotMacKey === "string")
                    $util.base64.decode(object.firstFourBytesFromAHashOfSnapshotMacKey, message.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer($util.base64.length(object.firstFourBytesFromAHashOfSnapshotMacKey)), 0);
                else if (object.firstFourBytesFromAHashOfSnapshotMacKey.length >= 0)
                    message.firstFourBytesFromAHashOfSnapshotMacKey = object.firstFourBytesFromAHashOfSnapshotMacKey;
            if (object.newLthashSubtract != null)
                if (typeof object.newLthashSubtract === "string")
                    $util.base64.decode(object.newLthashSubtract, message.newLthashSubtract = $util.newBuffer($util.base64.length(object.newLthashSubtract)), 0);
                else if (object.newLthashSubtract.length >= 0)
                    message.newLthashSubtract = object.newLthashSubtract;
            if (object.numberAdd != null)
                message.numberAdd = object.numberAdd | 0;
            if (object.numberRemove != null)
                message.numberRemove = object.numberRemove | 0;
            if (object.numberOverride != null)
                message.numberOverride = object.numberOverride | 0;
            switch (object.senderPlatform) {
            default:
                if (typeof object.senderPlatform === "number") {
                    message.senderPlatform = object.senderPlatform;
                    break;
                }
                break;
            case "ANDROID":
            case 0:
                message.senderPlatform = 0;
                break;
            case "SMBA":
            case 1:
                message.senderPlatform = 1;
                break;
            case "IPHONE":
            case 2:
                message.senderPlatform = 2;
                break;
            case "SMBI":
            case 3:
                message.senderPlatform = 3;
                break;
            case "WEB":
            case 4:
                message.senderPlatform = 4;
                break;
            case "UWP":
            case 5:
                message.senderPlatform = 5;
                break;
            case "DARWIN":
            case 6:
                message.senderPlatform = 6;
                break;
            case "IPAD":
            case 7:
                message.senderPlatform = 7;
                break;
            case "WEAROS":
            case 8:
                message.senderPlatform = 8;
                break;
            case "WASG":
            case 9:
                message.senderPlatform = 9;
                break;
            case "WEARM":
            case 10:
                message.senderPlatform = 10;
                break;
            case "CAPI":
            case 11:
                message.senderPlatform = 11;
                break;
            }
            if (object.isSenderPrimary != null)
                message.isSenderPrimary = Boolean(object.isSenderPrimary);
            return message;
        };

        /**
         * Creates a plain object from a PatchDebugData message. Also converts values to other types if specified.
         * @function toObject
         * @memberof SyncAction.PatchDebugData
         * @static
         * @param {SyncAction.PatchDebugData} message PatchDebugData
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PatchDebugData.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if (options.bytes === String)
                    object.currentLthash = "";
                else {
                    object.currentLthash = [];
                    if (options.bytes !== Array)
                        object.currentLthash = $util.newBuffer(object.currentLthash);
                }
                if (options.bytes === String)
                    object.newLthash = "";
                else {
                    object.newLthash = [];
                    if (options.bytes !== Array)
                        object.newLthash = $util.newBuffer(object.newLthash);
                }
                if (options.bytes === String)
                    object.patchVersion = "";
                else {
                    object.patchVersion = [];
                    if (options.bytes !== Array)
                        object.patchVersion = $util.newBuffer(object.patchVersion);
                }
                if (options.bytes === String)
                    object.collectionName = "";
                else {
                    object.collectionName = [];
                    if (options.bytes !== Array)
                        object.collectionName = $util.newBuffer(object.collectionName);
                }
                if (options.bytes === String)
                    object.firstFourBytesFromAHashOfSnapshotMacKey = "";
                else {
                    object.firstFourBytesFromAHashOfSnapshotMacKey = [];
                    if (options.bytes !== Array)
                        object.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer(object.firstFourBytesFromAHashOfSnapshotMacKey);
                }
                if (options.bytes === String)
                    object.newLthashSubtract = "";
                else {
                    object.newLthashSubtract = [];
                    if (options.bytes !== Array)
                        object.newLthashSubtract = $util.newBuffer(object.newLthashSubtract);
                }
                object.numberAdd = 0;
                object.numberRemove = 0;
                object.numberOverride = 0;
                object.senderPlatform = options.enums === String ? "ANDROID" : 0;
                object.isSenderPrimary = false;
            }
            if (message.currentLthash != null && message.hasOwnProperty("currentLthash"))
                object.currentLthash = options.bytes === String ? $util.base64.encode(message.currentLthash, 0, message.currentLthash.length) : options.bytes === Array ? Array.prototype.slice.call(message.currentLthash) : message.currentLthash;
            if (message.newLthash != null && message.hasOwnProperty("newLthash"))
                object.newLthash = options.bytes === String ? $util.base64.encode(message.newLthash, 0, message.newLthash.length) : options.bytes === Array ? Array.prototype.slice.call(message.newLthash) : message.newLthash;
            if (message.patchVersion != null && message.hasOwnProperty("patchVersion"))
                object.patchVersion = options.bytes === String ? $util.base64.encode(message.patchVersion, 0, message.patchVersion.length) : options.bytes === Array ? Array.prototype.slice.call(message.patchVersion) : message.patchVersion;
            if (message.collectionName != null && message.hasOwnProperty("collectionName"))
                object.collectionName = options.bytes === String ? $util.base64.encode(message.collectionName, 0, message.collectionName.length) : options.bytes === Array ? Array.prototype.slice.call(message.collectionName) : message.collectionName;
            if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey"))
                object.firstFourBytesFromAHashOfSnapshotMacKey = options.bytes === String ? $util.base64.encode(message.firstFourBytesFromAHashOfSnapshotMacKey, 0, message.firstFourBytesFromAHashOfSnapshotMacKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstFourBytesFromAHashOfSnapshotMacKey) : message.firstFourBytesFromAHashOfSnapshotMacKey;
            if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract"))
                object.newLthashSubtract = options.bytes === String ? $util.base64.encode(message.newLthashSubtract, 0, message.newLthashSubtract.length) : options.bytes === Array ? Array.prototype.slice.call(message.newLthashSubtract) : message.newLthashSubtract;
            if (message.numberAdd != null && message.hasOwnProperty("numberAdd"))
                object.numberAdd = message.numberAdd;
            if (message.numberRemove != null && message.hasOwnProperty("numberRemove"))
                object.numberRemove = message.numberRemove;
            if (message.numberOverride != null && message.hasOwnProperty("numberOverride"))
                object.numberOverride = message.numberOverride;
            if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform"))
                object.senderPlatform = options.enums === String ? $root.SyncAction.PatchDebugData.Platform[message.senderPlatform] === undefined ? message.senderPlatform : $root.SyncAction.PatchDebugData.Platform[message.senderPlatform] : message.senderPlatform;
            if (message.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary"))
                object.isSenderPrimary = message.isSenderPrimary;
            return object;
        };

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

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

        /**
         * Platform enum.
         * @name SyncAction.PatchDebugData.Platform
         * @enum {number}
         * @property {number} ANDROID=0 ANDROID value
         * @property {number} SMBA=1 SMBA value
         * @property {number} IPHONE=2 IPHONE value
         * @property {number} SMBI=3 SMBI value
         * @property {number} WEB=4 WEB value
         * @property {number} UWP=5 UWP value
         * @property {number} DARWIN=6 DARWIN value
         * @property {number} IPAD=7 IPAD value
         * @property {number} WEAROS=8 WEAROS value
         * @property {number} WASG=9 WASG value
         * @property {number} WEARM=10 WEARM value
         * @property {number} CAPI=11 CAPI value
         */
        PatchDebugData.Platform = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "ANDROID"] = 0;
            values[valuesById[1] = "SMBA"] = 1;
            values[valuesById[2] = "IPHONE"] = 2;
            values[valuesById[3] = "SMBI"] = 3;
            values[valuesById[4] = "WEB"] = 4;
            values[valuesById[5] = "UWP"] = 5;
            values[valuesById[6] = "DARWIN"] = 6;
            values[valuesById[7] = "IPAD"] = 7;
            values[valuesById[8] = "WEAROS"] = 8;
            values[valuesById[9] = "WASG"] = 9;
            values[valuesById[10] = "WEARM"] = 10;
            values[valuesById[11] = "CAPI"] = 11;
            return values;
        })();

        return PatchDebugData;
    })();

    SyncAction.SyncActionData = (function() {

        /**
         * Properties of a SyncActionData.
         * @memberof SyncAction
         * @interface ISyncActionData
         * @property {Uint8Array|null} [index] SyncActionData index
         * @property {SyncAction.ISyncActionValue|null} [value] SyncActionData value
         * @property {Uint8Array|null} [padding] SyncActionData padding
         * @property {number|null} [version] SyncActionData version
         */

        /**
         * Constructs a new SyncActionData.
         * @memberof SyncAction
         * @classdesc Represents a SyncActionData.
         * @implements ISyncActionData
         * @constructor
         * @param {SyncAction.ISyncActionData=} [properties] Properties to set
         */
        function SyncActionData(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SyncActionData index.
         * @member {Uint8Array} index
         * @memberof SyncAction.SyncActionData
         * @instance
         */
        SyncActionData.prototype.index = $util.newBuffer([]);

        /**
         * SyncActionData value.
         * @member {SyncAction.ISyncActionValue|null|undefined} value
         * @memberof SyncAction.SyncActionData
         * @instance
         */
        SyncActionData.prototype.value = null;

        /**
         * SyncActionData padding.
         * @member {Uint8Array} padding
         * @memberof SyncAction.SyncActionData
         * @instance
         */
        SyncActionData.prototype.padding = $util.newBuffer([]);

        /**
         * SyncActionData version.
         * @member {number} version
         * @memberof SyncAction.SyncActionData
         * @instance
         */
        SyncActionData.prototype.version = 0;

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

        /**
         * Encodes the specified SyncActionData message. Does not implicitly {@link SyncAction.SyncActionData.verify|verify} messages.
         * @function encode
         * @memberof SyncAction.SyncActionData
         * @static
         * @param {SyncAction.ISyncActionData} message SyncActionData message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SyncActionData.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.index != null && Object.hasOwnProperty.call(message, "index"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.index);
            if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                $root.SyncAction.SyncActionValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.padding != null && Object.hasOwnProperty.call(message, "padding"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.padding);
            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version);
            return writer;
        };

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

        /**
         * Decodes a SyncActionData message from the specified reader or buffer.
         * @function decode
         * @memberof SyncAction.SyncActionData
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {SyncAction.SyncActionData} SyncActionData
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SyncActionData.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionData();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.index = reader.bytes();
                        break;
                    }
                case 2: {
                        message.value = $root.SyncAction.SyncActionValue.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.padding = reader.bytes();
                        break;
                    }
                case 4: {
                        message.version = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a SyncActionData message.
         * @function verify
         * @memberof SyncAction.SyncActionData
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SyncActionData.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.index != null && message.hasOwnProperty("index"))
                if (!(message.index && typeof message.index.length === "number" || $util.isString(message.index)))
                    return "index: buffer expected";
            if (message.value != null && message.hasOwnProperty("value")) {
                var error = $root.SyncAction.SyncActionValue.verify(message.value);
                if (error)
                    return "value." + error;
            }
            if (message.padding != null && message.hasOwnProperty("padding"))
                if (!(message.padding && typeof message.padding.length === "number" || $util.isString(message.padding)))
                    return "padding: buffer expected";
            if (message.version != null && message.hasOwnProperty("version"))
                if (!$util.isInteger(message.version))
                    return "version: integer expected";
            return null;
        };

        /**
         * Creates a SyncActionData message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof SyncAction.SyncActionData
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {SyncAction.SyncActionData} SyncActionData
         */
        SyncActionData.fromObject = function fromObject(object) {
            if (object instanceof $root.SyncAction.SyncActionData)
                return object;
            var message = new $root.SyncAction.SyncActionData();
            if (object.index != null)
                if (typeof object.index === "string")
                    $util.base64.decode(object.index, message.index = $util.newBuffer($util.base64.length(object.index)), 0);
                else if (object.index.length >= 0)
                    message.index = object.index;
            if (object.value != null) {
                if (typeof object.value !== "object")
                    throw TypeError(".SyncAction.SyncActionData.value: object expected");
                message.value = $root.SyncAction.SyncActionValue.fromObject(object.value);
            }
            if (object.padding != null)
                if (typeof object.padding === "string")
                    $util.base64.decode(object.padding, message.padding = $util.newBuffer($util.base64.length(object.padding)), 0);
                else if (object.padding.length >= 0)
                    message.padding = object.padding;
            if (object.version != null)
                message.version = object.version | 0;
            return message;
        };

        /**
         * Creates a plain object from a SyncActionData message. Also converts values to other types if specified.
         * @function toObject
         * @memberof SyncAction.SyncActionData
         * @static
         * @param {SyncAction.SyncActionData} message SyncActionData
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SyncActionData.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if (options.bytes === String)
                    object.index = "";
                else {
                    object.index = [];
                    if (options.bytes !== Array)
                        object.index = $util.newBuffer(object.index);
                }
                object.value = null;
                if (options.bytes === String)
                    object.padding = "";
                else {
                    object.padding = [];
                    if (options.bytes !== Array)
                        object.padding = $util.newBuffer(object.padding);
                }
                object.version = 0;
            }
            if (message.index != null && message.hasOwnProperty("index"))
                object.index = options.bytes === String ? $util.base64.encode(message.index, 0, message.index.length) : options.bytes === Array ? Array.prototype.slice.call(message.index) : message.index;
            if (message.value != null && message.hasOwnProperty("value"))
                object.value = $root.SyncAction.SyncActionValue.toObject(message.value, options);
            if (message.padding != null && message.hasOwnProperty("padding"))
                object.padding = options.bytes === String ? $util.base64.encode(message.padding, 0, message.padding.length) : options.bytes === Array ? Array.prototype.slice.call(message.padding) : message.padding;
            if (message.version != null && message.hasOwnProperty("version"))
                object.version = message.version;
            return object;
        };

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

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

        return SyncActionData;
    })();

    SyncAction.SyncActionValue = (function() {

        /**
         * Properties of a SyncActionValue.
         * @memberof SyncAction
         * @interface ISyncActionValue
         * @property {number|Long|null} [timestamp] SyncActionValue timestamp
         * @property {SyncAction.SyncActionValue.IStarAction|null} [starAction] SyncActionValue starAction
         * @property {SyncAction.SyncActionValue.IContactAction|null} [contactAction] SyncActionValue contactAction
         * @property {SyncAction.SyncActionValue.IMuteAction|null} [muteAction] SyncActionValue muteAction
         * @property {SyncAction.SyncActionValue.IPinAction|null} [pinAction] SyncActionValue pinAction
         * @property {SyncAction.SyncActionValue.ISecurityNotificationSetting|null} [securityNotificationSetting] SyncActionValue securityNotificationSetting
         * @property {SyncAction.SyncActionValue.IPushNameSetting|null} [pushNameSetting] SyncActionValue pushNameSetting
         * @property {SyncAction.SyncActionValue.IQuickReplyAction|null} [quickReplyAction] SyncActionValue quickReplyAction
         * @property {SyncAction.SyncActionValue.IRecentEmojiWeightsAction|null} [recentEmojiWeightsAction] SyncActionValue recentEmojiWeightsAction
         * @property {SyncAction.SyncActionValue.ILabelEditAction|null} [labelEditAction] SyncActionValue labelEditAction
         * @property {SyncAction.SyncActionValue.ILabelAssociationAction|null} [labelAssociationAction] SyncActionValue labelAssociationAction
         * @property {SyncAction.SyncActionValue.ILocaleSetting|null} [localeSetting] SyncActionValue localeSetting
         * @property {SyncAction.SyncActionValue.IArchiveChatAction|null} [archiveChatAction] SyncActionValue archiveChatAction
         * @property {SyncAction.SyncActionValue.IDeleteMessageForMeAction|null} [deleteMessageForMeAction] SyncActionValue deleteMessageForMeAction
         * @property {SyncAction.SyncActionValue.IKeyExpiration|null} [keyExpiration] SyncActionValue keyExpiration
         * @property {SyncAction.SyncActionValue.IMarkChatAsReadAction|null} [markChatAsReadAction] SyncActionValue markChatAsReadAction
         * @property {SyncAction.SyncActionValue.IClearChatAction|null} [clearChatAction] SyncActionValue clearChatAction
         * @property {SyncAction.SyncActionValue.IDeleteChatAction|null} [deleteChatAction] SyncActionValue deleteChatAction
         * @property {SyncAction.SyncActionValue.IUnarchiveChatsSetting|null} [unarchiveChatsSetting] SyncActionValue unarchiveChatsSetting
         * @property {SyncAction.SyncActionValue.IPrimaryFeature|null} [primaryFeature] SyncActionValue primaryFeature
         * @property {SyncAction.SyncActionValue.IAndroidUnsupportedActions|null} [androidUnsupportedActions] SyncActionValue androidUnsupportedActions
         * @property {SyncAction.SyncActionValue.IAgentAction|null} [agentAction] SyncActionValue agentAction
         * @property {SyncAction.SyncActionValue.ISubscriptionAction|null} [subscriptionAction] SyncActionValue subscriptionAction
         * @property {SyncAction.SyncActionValue.IUserStatusMuteAction|null} [userStatusMuteAction] SyncActionValue userStatusMuteAction
         * @property {SyncAction.SyncActionValue.ITimeFormatAction|null} [timeFormatAction] SyncActionValue timeFormatAction
         * @property {SyncAction.SyncActionValue.INuxAction|null} [nuxAction] SyncActionValue nuxAction
         * @property {SyncAction.SyncActionValue.IPrimaryVersionAction|null} [primaryVersionAction] SyncActionValue primaryVersionAction
         * @property {SyncAction.SyncActionValue.IStickerAction|null} [stickerAction] SyncActionValue stickerAction
         * @property {SyncAction.SyncActionValue.IRemoveRecentStickerAction|null} [removeRecentStickerAction] SyncActionValue removeRecentStickerAction
         * @property {SyncAction.SyncActionValue.IChatAssignmentAction|null} [chatAssignment] SyncActionValue chatAssignment
         * @property {SyncAction.SyncActionValue.IChatAssignmentOpenedStatusAction|null} [chatAssignmentOpenedStatus] SyncActionValue chatAssignmentOpenedStatus
         * @property {SyncAction.SyncActionValue.IPnForLidChatAction|null} [pnForLidChatAction] SyncActionValue pnForLidChatAction
         * @property {SyncAction.SyncActionValue.IMarketingMessageAction|null} [marketingMessageAction] SyncActionValue marketingMessageAction
         * @property {SyncAction.SyncActionValue.IMarketingMessageBroadcastAction|null} [marketingMessageBroadcastAction] SyncActionValue marketingMessageBroadcastAction
         * @property {SyncAction.SyncActionValue.IExternalWebBetaAction|null} [externalWebBetaAction] SyncActionValue externalWebBetaAction
         * @property {SyncAction.SyncActionValue.IPrivacySettingRelayAllCalls|null} [privacySettingRelayAllCalls] SyncActionValue privacySettingRelayAllCalls
         * @property {SyncAction.SyncActionValue.ICallLogAction|null} [callLogAction] SyncActionValue callLogAction
         * @property {SyncAction.SyncActionValue.IStatusPrivacyAction|null} [statusPrivacy] SyncActionValue statusPrivacy
         * @property {SyncAction.SyncActionValue.IBotWelcomeRequestAction|null} [botWelcomeRequestAction] SyncActionValue botWelcomeRequestAction
         * @property {SyncAction.SyncActionValue.IDeleteIndividualCallLogAction|null} [deleteIndividualCallLog] SyncActionValue deleteIndividualCallLog
         * @property {SyncAction.SyncActionValue.ILabelReorderingAction|null} [labelReorderingAction] SyncActionValue labelReorderingAction
         * @property {SyncAction.SyncActionValue.IPaymentInfoAction|null} [paymentInfoAction] SyncActionValue paymentInfoAction
         * @property {SyncAction.SyncActionValue.ICustomPaymentMethodsAction|null} [customPaymentMethodsAction] SyncActionValue customPaymentMethodsAction
         * @property {SyncAction.SyncActionValue.ILockChatAction|null} [lockChatAction] SyncActionValue lockChatAction
         * @property {ChatLockSettings.IChatLockSettings|null} [chatLockSettings] SyncActionValue chatLockSettings
         * @property {SyncAction.SyncActionValue.IWamoUserIdentifierAction|null} [wamoUserIdentifierAction] SyncActionValue wamoUserIdentifierAction
         * @property {SyncAction.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction|null} [privacySettingDisableLinkPreviewsAction] SyncActionValue privacySettingDisableLinkPreviewsAction
         * @property {DeviceCapabilities.IDeviceCapabilities|null} [deviceCapabilities] SyncActionValue deviceCapabilities
         * @property {SyncAction.SyncActionValue.INoteEditAction|null} [noteEditAction] SyncActionValue noteEditAction
         * @property {SyncAction.SyncActionValue.IFavoritesAction|null} [favoritesAction] SyncActionValue favoritesAction
         * @property {SyncAction.SyncActionValue.IMerchantPaymentPartnerAction|null} [merchantPaymentPartnerAction] SyncActionValue merchantPaymentPartnerAction
         * @property {SyncAction.SyncActionValue.IWaffleAccountLinkStateAction|null} [waffleAccountLinkStateAction] SyncActionValue waffleAccountLinkStateAction
         * @property {SyncAction.SyncActionValue.IUsernameChatStartModeAction|null} [usernameChatStartMode] SyncActionValue usernameChatStartMode
         * @property {SyncAction.SyncActionValue.INotificationActivitySettingAction|null} [notificationActivitySettingAction] SyncActionValue notificationActivitySettingAction
         * @property {SyncAction.SyncActionValue.ILidContactAction|null} [lidContactAction] SyncActionValue lidContactAction
         * @property {SyncAction.SyncActionValue.ICtwaPerCustomerDataSharingAction|null} [ctwaPerCustomerDataSharingAction] SyncActionValue ctwaPerCustomerDataSharingAction
         * @property {SyncAction.SyncActionValue.IPaymentTosAction|null} [paymentTosAction] SyncActionValue paymentTosAction
         * @property {SyncAction.SyncActionValue.IPrivacySettingChannelsPersonalisedRecommendationAction|null} [privacySettingChannelsPersonalisedRecommendationAction] SyncActionValue privacySettingChannelsPersonalisedRecommendationAction
         * @property {SyncAction.SyncActionValue.IBusinessBroadcastAssociationAction|null} [businessBroadcastAssociationAction] SyncActionValue businessBroadcastAssociationAction
         * @property {SyncAction.SyncActionValue.IDetectedOutcomesStatusAction|null} [detectedOutcomesStatusAction] SyncActionValue detectedOutcomesStatusAction
         * @property {SyncAction.SyncActionValue.IMaibaAIFeaturesControlAction|null} [maibaAiFeaturesControlAction] SyncActionValue maibaAiFeaturesControlAction
         * @property {SyncAction.SyncActionValue.IBusinessBroadcastListAction|null} [businessBroadcastListAction] SyncActionValue businessBroadcastListAction
         * @property {SyncAction.SyncActionValue.IMusicUserIdAction|null} [musicUserIdAction] SyncActionValue musicUserIdAction
         * @property {SyncAction.SyncActionValue.IStatusPostOptInNotificationPreferencesAction|null} [statusPostOptInNotificationPreferencesAction] SyncActionValue statusPostOptInNotificationPreferencesAction
         * @property {SyncAction.SyncActionValue.IAvatarUpdatedAction|null} [avatarUpdatedAction] SyncActionValue avatarUpdatedAction
         * @property {SyncAction.SyncActionValue.IGalaxyFlowAction|null} [galaxyFlowAction] SyncActionValue galaxyFlowAction
         */

        /**
         * Constructs a new SyncActionValue.
         * @memberof SyncAction
         * @classdesc Represents a SyncActionValue.
         * @implements ISyncActionValue
         * @constructor
         * @param {SyncAction.ISyncActionValue=} [properties] Properties to set
         */
        function SyncActionValue(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SyncActionValue timestamp.
         * @member {number|Long} timestamp
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * SyncActionValue starAction.
         * @member {SyncAction.SyncActionValue.IStarAction|null|undefined} starAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.starAction = null;

        /**
         * SyncActionValue contactAction.
         * @member {SyncAction.SyncActionValue.IContactAction|null|undefined} contactAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.contactAction = null;

        /**
         * SyncActionValue muteAction.
         * @member {SyncAction.SyncActionValue.IMuteAction|null|undefined} muteAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.muteAction = null;

        /**
         * SyncActionValue pinAction.
         * @member {SyncAction.SyncActionValue.IPinAction|null|undefined} pinAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.pinAction = null;

        /**
         * SyncActionValue securityNotificationSetting.
         * @member {SyncAction.SyncActionValue.ISecurityNotificationSetting|null|undefined} securityNotificationSetting
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.securityNotificationSetting = null;

        /**
         * SyncActionValue pushNameSetting.
         * @member {SyncAction.SyncActionValue.IPushNameSetting|null|undefined} pushNameSetting
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.pushNameSetting = null;

        /**
         * SyncActionValue quickReplyAction.
         * @member {SyncAction.SyncActionValue.IQuickReplyAction|null|undefined} quickReplyAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.quickReplyAction = null;

        /**
         * SyncActionValue recentEmojiWeightsAction.
         * @member {SyncAction.SyncActionValue.IRecentEmojiWeightsAction|null|undefined} recentEmojiWeightsAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.recentEmojiWeightsAction = null;

        /**
         * SyncActionValue labelEditAction.
         * @member {SyncAction.SyncActionValue.ILabelEditAction|null|undefined} labelEditAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.labelEditAction = null;

        /**
         * SyncActionValue labelAssociationAction.
         * @member {SyncAction.SyncActionValue.ILabelAssociationAction|null|undefined} labelAssociationAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.labelAssociationAction = null;

        /**
         * SyncActionValue localeSetting.
         * @member {SyncAction.SyncActionValue.ILocaleSetting|null|undefined} localeSetting
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.localeSetting = null;

        /**
         * SyncActionValue archiveChatAction.
         * @member {SyncAction.SyncActionValue.IArchiveChatAction|null|undefined} archiveChatAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.archiveChatAction = null;

        /**
         * SyncActionValue deleteMessageForMeAction.
         * @member {SyncAction.SyncActionValue.IDeleteMessageForMeAction|null|undefined} deleteMessageForMeAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.deleteMessageForMeAction = null;

        /**
         * SyncActionValue keyExpiration.
         * @member {SyncAction.SyncActionValue.IKeyExpiration|null|undefined} keyExpiration
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.keyExpiration = null;

        /**
         * SyncActionValue markChatAsReadAction.
         * @member {SyncAction.SyncActionValue.IMarkChatAsReadAction|null|undefined} markChatAsReadAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.markChatAsReadAction = null;

        /**
         * SyncActionValue clearChatAction.
         * @member {SyncAction.SyncActionValue.IClearChatAction|null|undefined} clearChatAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.clearChatAction = null;

        /**
         * SyncActionValue deleteChatAction.
         * @member {SyncAction.SyncActionValue.IDeleteChatAction|null|undefined} deleteChatAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.deleteChatAction = null;

        /**
         * SyncActionValue unarchiveChatsSetting.
         * @member {SyncAction.SyncActionValue.IUnarchiveChatsSetting|null|undefined} unarchiveChatsSetting
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.unarchiveChatsSetting = null;

        /**
         * SyncActionValue primaryFeature.
         * @member {SyncAction.SyncActionValue.IPrimaryFeature|null|undefined} primaryFeature
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.primaryFeature = null;

        /**
         * SyncActionValue androidUnsupportedActions.
         * @member {SyncAction.SyncActionValue.IAndroidUnsupportedActions|null|undefined} androidUnsupportedActions
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.androidUnsupportedActions = null;

        /**
         * SyncActionValue agentAction.
         * @member {SyncAction.SyncActionValue.IAgentAction|null|undefined} agentAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.agentAction = null;

        /**
         * SyncActionValue subscriptionAction.
         * @member {SyncAction.SyncActionValue.ISubscriptionAction|null|undefined} subscriptionAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.subscriptionAction = null;

        /**
         * SyncActionValue userStatusMuteAction.
         * @member {SyncAction.SyncActionValue.IUserStatusMuteAction|null|undefined} userStatusMuteAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.userStatusMuteAction = null;

        /**
         * SyncActionValue timeFormatAction.
         * @member {SyncAction.SyncActionValue.ITimeFormatAction|null|undefined} timeFormatAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.timeFormatAction = null;

        /**
         * SyncActionValue nuxAction.
         * @member {SyncAction.SyncActionValue.INuxAction|null|undefined} nuxAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.nuxAction = null;

        /**
         * SyncActionValue primaryVersionAction.
         * @member {SyncAction.SyncActionValue.IPrimaryVersionAction|null|undefined} primaryVersionAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.primaryVersionAction = null;

        /**
         * SyncActionValue stickerAction.
         * @member {SyncAction.SyncActionValue.IStickerAction|null|undefined} stickerAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.stickerAction = null;

        /**
         * SyncActionValue removeRecentStickerAction.
         * @member {SyncAction.SyncActionValue.IRemoveRecentStickerAction|null|undefined} removeRecentStickerAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.removeRecentStickerAction = null;

        /**
         * SyncActionValue chatAssignment.
         * @member {SyncAction.SyncActionValue.IChatAssignmentAction|null|undefined} chatAssignment
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.chatAssignment = null;

        /**
         * SyncActionValue chatAssignmentOpenedStatus.
         * @member {SyncAction.SyncActionValue.IChatAssignmentOpenedStatusAction|null|undefined} chatAssignmentOpenedStatus
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.chatAssignmentOpenedStatus = null;

        /**
         * SyncActionValue pnForLidChatAction.
         * @member {SyncAction.SyncActionValue.IPnForLidChatAction|null|undefined} pnForLidChatAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.pnForLidChatAction = null;

        /**
         * SyncActionValue marketingMessageAction.
         * @member {SyncAction.SyncActionValue.IMarketingMessageAction|null|undefined} marketingMessageAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.marketingMessageAction = null;

        /**
         * SyncActionValue marketingMessageBroadcastAction.
         * @member {SyncAction.SyncActionValue.IMarketingMessageBroadcastAction|null|undefined} marketingMessageBroadcastAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.marketingMessageBroadcastAction = null;

        /**
         * SyncActionValue externalWebBetaAction.
         * @member {SyncAction.SyncActionValue.IExternalWebBetaAction|null|undefined} externalWebBetaAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.externalWebBetaAction = null;

        /**
         * SyncActionValue privacySettingRelayAllCalls.
         * @member {SyncAction.SyncActionValue.IPrivacySettingRelayAllCalls|null|undefined} privacySettingRelayAllCalls
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.privacySettingRelayAllCalls = null;

        /**
         * SyncActionValue callLogAction.
         * @member {SyncAction.SyncActionValue.ICallLogAction|null|undefined} callLogAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.callLogAction = null;

        /**
         * SyncActionValue statusPrivacy.
         * @member {SyncAction.SyncActionValue.IStatusPrivacyAction|null|undefined} statusPrivacy
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.statusPrivacy = null;

        /**
         * SyncActionValue botWelcomeRequestAction.
         * @member {SyncAction.SyncActionValue.IBotWelcomeRequestAction|null|undefined} botWelcomeRequestAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.botWelcomeRequestAction = null;

        /**
         * SyncActionValue deleteIndividualCallLog.
         * @member {SyncAction.SyncActionValue.IDeleteIndividualCallLogAction|null|undefined} deleteIndividualCallLog
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.deleteIndividualCallLog = null;

        /**
         * SyncActionValue labelReorderingAction.
         * @member {SyncAction.SyncActionValue.ILabelReorderingAction|null|undefined} labelReorderingAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.labelReorderingAction = null;

        /**
         * SyncActionValue paymentInfoAction.
         * @member {SyncAction.SyncActionValue.IPaymentInfoAction|null|undefined} paymentInfoAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.paymentInfoAction = null;

        /**
         * SyncActionValue customPaymentMethodsAction.
         * @member {SyncAction.SyncActionValue.ICustomPaymentMethodsAction|null|undefined} customPaymentMethodsAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.customPaymentMethodsAction = null;

        /**
         * SyncActionValue lockChatAction.
         * @member {SyncAction.SyncActionValue.ILockChatAction|null|undefined} lockChatAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.lockChatAction = null;

        /**
         * SyncActionValue chatLockSettings.
         * @member {ChatLockSettings.IChatLockSettings|null|undefined} chatLockSettings
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.chatLockSettings = null;

        /**
         * SyncActionValue wamoUserIdentifierAction.
         * @member {SyncAction.SyncActionValue.IWamoUserIdentifierAction|null|undefined} wamoUserIdentifierAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.wamoUserIdentifierAction = null;

        /**
         * SyncActionValue privacySettingDisableLinkPreviewsAction.
         * @member {SyncAction.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction|null|undefined} privacySettingDisableLinkPreviewsAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.privacySettingDisableLinkPreviewsAction = null;

        /**
         * SyncActionValue deviceCapabilities.
         * @member {DeviceCapabilities.IDeviceCapabilities|null|undefined} deviceCapabilities
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.deviceCapabilities = null;

        /**
         * SyncActionValue noteEditAction.
         * @member {SyncAction.SyncActionValue.INoteEditAction|null|undefined} noteEditAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.noteEditAction = null;

        /**
         * SyncActionValue favoritesAction.
         * @member {SyncAction.SyncActionValue.IFavoritesAction|null|undefined} favoritesAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.favoritesAction = null;

        /**
         * SyncActionValue merchantPaymentPartnerAction.
         * @member {SyncAction.SyncActionValue.IMerchantPaymentPartnerAction|null|undefined} merchantPaymentPartnerAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.merchantPaymentPartnerAction = null;

        /**
         * SyncActionValue waffleAccountLinkStateAction.
         * @member {SyncAction.SyncActionValue.IWaffleAccountLinkStateAction|null|undefined} waffleAccountLinkStateAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.waffleAccountLinkStateAction = null;

        /**
         * SyncActionValue usernameChatStartMode.
         * @member {SyncAction.SyncActionValue.IUsernameChatStartModeAction|null|undefined} usernameChatStartMode
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.usernameChatStartMode = null;

        /**
         * SyncActionValue notificationActivitySettingAction.
         * @member {SyncAction.SyncActionValue.INotificationActivitySettingAction|null|undefined} notificationActivitySettingAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.notificationActivitySettingAction = null;

        /**
         * SyncActionValue lidContactAction.
         * @member {SyncAction.SyncActionValue.ILidContactAction|null|undefined} lidContactAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.lidContactAction = null;

        /**
         * SyncActionValue ctwaPerCustomerDataSharingAction.
         * @member {SyncAction.SyncActionValue.ICtwaPerCustomerDataSharingAction|null|undefined} ctwaPerCustomerDataSharingAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.ctwaPerCustomerDataSharingAction = null;

        /**
         * SyncActionValue paymentTosAction.
         * @member {SyncAction.SyncActionValue.IPaymentTosAction|null|undefined} paymentTosAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.paymentTosAction = null;

        /**
         * SyncActionValue privacySettingChannelsPersonalisedRecommendationAction.
         * @member {SyncAction.SyncActionValue.IPrivacySettingChannelsPersonalisedRecommendationAction|null|undefined} privacySettingChannelsPersonalisedRecommendationAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.privacySettingChannelsPersonalisedRecommendationAction = null;

        /**
         * SyncActionValue businessBroadcastAssociationAction.
         * @member {SyncAction.SyncActionValue.IBusinessBroadcastAssociationAction|null|undefined} businessBroadcastAssociationAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.businessBroadcastAssociationAction = null;

        /**
         * SyncActionValue detectedOutcomesStatusAction.
         * @member {SyncAction.SyncActionValue.IDetectedOutcomesStatusAction|null|undefined} detectedOutcomesStatusAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.detectedOutcomesStatusAction = null;

        /**
         * SyncActionValue maibaAiFeaturesControlAction.
         * @member {SyncAction.SyncActionValue.IMaibaAIFeaturesControlAction|null|undefined} maibaAiFeaturesControlAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.maibaAiFeaturesControlAction = null;

        /**
         * SyncActionValue businessBroadcastListAction.
         * @member {SyncAction.SyncActionValue.IBusinessBroadcastListAction|null|undefined} businessBroadcastListAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.businessBroadcastListAction = null;

        /**
         * SyncActionValue musicUserIdAction.
         * @member {SyncAction.SyncActionValue.IMusicUserIdAction|null|undefined} musicUserIdAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.musicUserIdAction = null;

        /**
         * SyncActionValue statusPostOptInNotificationPreferencesAction.
         * @member {SyncAction.SyncActionValue.IStatusPostOptInNotificationPreferencesAction|null|undefined} statusPostOptInNotificationPreferencesAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.statusPostOptInNotificationPreferencesAction = null;

        /**
         * SyncActionValue avatarUpdatedAction.
         * @member {SyncAction.SyncActionValue.IAvatarUpdatedAction|null|undefined} avatarUpdatedAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.avatarUpdatedAction = null;

        /**
         * SyncActionValue galaxyFlowAction.
         * @member {SyncAction.SyncActionValue.IGalaxyFlowAction|null|undefined} galaxyFlowAction
         * @memberof SyncAction.SyncActionValue
         * @instance
         */
        SyncActionValue.prototype.galaxyFlowAction = null;

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

        /**
         * Encodes the specified SyncActionValue message. Does not implicitly {@link SyncAction.SyncActionValue.verify|verify} messages.
         * @function encode
         * @memberof SyncAction.SyncActionValue
         * @static
         * @param {SyncAction.ISyncActionValue} message SyncActionValue message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SyncActionValue.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);
            if (message.starAction != null && Object.hasOwnProperty.call(message, "starAction"))
                $root.SyncAction.SyncActionValue.StarAction.encode(message.starAction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.contactAction != null && Object.hasOwnProperty.call(message, "contactAction"))
                $root.SyncAction.SyncActionValue.ContactAction.encode(message.contactAction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.muteAction != null && Object.hasOwnProperty.call(message, "muteAction"))
                $root.SyncAction.SyncActionValue.MuteAction.encode(message.muteAction, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.pinAction != null && Object.hasOwnProperty.call(message, "pinAction"))
                $root.SyncAction.SyncActionValue.PinAction.encode(message.pinAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.securityNotificationSetting != null && Object.hasOwnProperty.call(message, "securityNotificationSetting"))
                $root.SyncAction.SyncActionValue.SecurityNotificationSetting.encode(message.securityNotificationSetting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.pushNameSetting != null && Object.hasOwnProperty.call(message, "pushNameSetting"))
                $root.SyncAction.SyncActionValue.PushNameSetting.encode(message.pushNameSetting, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.quickReplyAction != null && Object.hasOwnProperty.call(message, "quickReplyAction"))
                $root.SyncAction.SyncActionValue.QuickReplyAction.encode(message.quickReplyAction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            if (message.recentEmojiWeightsAction != null && Object.hasOwnProperty.call(message, "recentEmojiWeightsAction"))
                $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction.encode(message.recentEmojiWeightsAction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
            if (message.labelEditAction != null && Object.hasOwnProperty.call(message, "labelEditAction"))
                $root.SyncAction.SyncActionValue.LabelEditAction.encode(message.labelEditAction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.labelAssociationAction != null && Object.hasOwnProperty.call(message, "labelAssociationAction"))
                $root.SyncAction.SyncActionValue.LabelAssociationAction.encode(message.labelAssociationAction, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.localeSetting != null && Object.hasOwnProperty.call(message, "localeSetting"))
                $root.SyncAction.SyncActionValue.LocaleSetting.encode(message.localeSetting, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.archiveChatAction != null && Object.hasOwnProperty.call(message, "archiveChatAction"))
                $root.SyncAction.SyncActionValue.ArchiveChatAction.encode(message.archiveChatAction, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
            if (message.deleteMessageForMeAction != null && Object.hasOwnProperty.call(message, "deleteMessageForMeAction"))
                $root.SyncAction.SyncActionValue.DeleteMessageForMeAction.encode(message.deleteMessageForMeAction, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
            if (message.keyExpiration != null && Object.hasOwnProperty.call(message, "keyExpiration"))
                $root.SyncAction.SyncActionValue.KeyExpiration.encode(message.keyExpiration, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
            if (message.markChatAsReadAction != null && Object.hasOwnProperty.call(message, "markChatAsReadAction"))
                $root.SyncAction.SyncActionValue.MarkChatAsReadAction.encode(message.markChatAsReadAction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
            if (message.clearChatAction != null && Object.hasOwnProperty.call(message, "clearChatAction"))
                $root.SyncAction.SyncActionValue.ClearChatAction.encode(message.clearChatAction, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
            if (message.deleteChatAction != null && Object.hasOwnProperty.call(message, "deleteChatAction"))
                $root.SyncAction.SyncActionValue.DeleteChatAction.encode(message.deleteChatAction, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
            if (message.unarchiveChatsSetting != null && Object.hasOwnProperty.call(message, "unarchiveChatsSetting"))
                $root.SyncAction.SyncActionValue.UnarchiveChatsSetting.encode(message.unarchiveChatsSetting, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
            if (message.primaryFeature != null && Object.hasOwnProperty.call(message, "primaryFeature"))
                $root.SyncAction.SyncActionValue.PrimaryFeature.encode(message.primaryFeature, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
            if (message.androidUnsupportedActions != null && Object.hasOwnProperty.call(message, "androidUnsupportedActions"))
                $root.SyncAction.SyncActionValue.AndroidUnsupportedActions.encode(message.androidUnsupportedActions, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
            if (message.agentAction != null && Object.hasOwnProperty.call(message, "agentAction"))
                $root.SyncAction.SyncActionValue.AgentAction.encode(message.agentAction, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
            if (message.subscriptionAction != null && Object.hasOwnProperty.call(message, "subscriptionAction"))
                $root.SyncAction.SyncActionValue.SubscriptionAction.encode(message.subscriptionAction, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
            if (message.userStatusMuteAction != null && Object.hasOwnProperty.call(message, "userStatusMuteAction"))
                $root.SyncAction.SyncActionValue.UserStatusMuteAction.encode(message.userStatusMuteAction, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
            if (message.timeFormatAction != null && Object.hasOwnProperty.call(message, "timeFormatAction"))
                $root.SyncAction.SyncActionValue.TimeFormatAction.encode(message.timeFormatAction, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
            if (message.nuxAction != null && Object.hasOwnProperty.call(message, "nuxAction"))
                $root.SyncAction.SyncActionValue.NuxAction.encode(message.nuxAction, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim();
            if (message.primaryVersionAction != null && Object.hasOwnProperty.call(message, "primaryVersionAction"))
                $root.SyncAction.SyncActionValue.PrimaryVersionAction.encode(message.primaryVersionAction, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim();
            if (message.stickerAction != null && Object.hasOwnProperty.call(message, "stickerAction"))
                $root.SyncAction.SyncActionValue.StickerAction.encode(message.stickerAction, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim();
            if (message.removeRecentStickerAction != null && Object.hasOwnProperty.call(message, "removeRecentStickerAction"))
                $root.SyncAction.SyncActionValue.RemoveRecentStickerAction.encode(message.removeRecentStickerAction, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim();
            if (message.chatAssignment != null && Object.hasOwnProperty.call(message, "chatAssignment"))
                $root.SyncAction.SyncActionValue.ChatAssignmentAction.encode(message.chatAssignment, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim();
            if (message.chatAssignmentOpenedStatus != null && Object.hasOwnProperty.call(message, "chatAssignmentOpenedStatus"))
                $root.SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction.encode(message.chatAssignmentOpenedStatus, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim();
            if (message.pnForLidChatAction != null && Object.hasOwnProperty.call(message, "pnForLidChatAction"))
                $root.SyncAction.SyncActionValue.PnForLidChatAction.encode(message.pnForLidChatAction, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim();
            if (message.marketingMessageAction != null && Object.hasOwnProperty.call(message, "marketingMessageAction"))
                $root.SyncAction.SyncActionValue.MarketingMessageAction.encode(message.marketingMessageAction, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
            if (message.marketingMessageBroadcastAction != null && Object.hasOwnProperty.call(message, "marketingMessageBroadcastAction"))
                $root.SyncAction.SyncActionValue.MarketingMessageBroadcastAction.encode(message.marketingMessageBroadcastAction, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
            if (message.externalWebBetaAction != null && Object.hasOwnProperty.call(message, "externalWebBetaAction"))
                $root.SyncAction.SyncActionValue.ExternalWebBetaAction.encode(message.externalWebBetaAction, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim();
            if (message.privacySettingRelayAllCalls != null && Object.hasOwnProperty.call(message, "privacySettingRelayAllCalls"))
                $root.SyncAction.SyncActionValue.PrivacySettingRelayAllCalls.encode(message.privacySettingRelayAllCalls, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim();
            if (message.callLogAction != null && Object.hasOwnProperty.call(message, "callLogAction"))
                $root.SyncAction.SyncActionValue.CallLogAction.encode(message.callLogAction, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim();
            if (message.statusPrivacy != null && Object.hasOwnProperty.call(message, "statusPrivacy"))
                $root.SyncAction.SyncActionValue.StatusPrivacyAction.encode(message.statusPrivacy, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim();
            if (message.botWelcomeRequestAction != null && Object.hasOwnProperty.call(message, "botWelcomeRequestAction"))
                $root.SyncAction.SyncActionValue.BotWelcomeRequestAction.encode(message.botWelcomeRequestAction, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim();
            if (message.deleteIndividualCallLog != null && Object.hasOwnProperty.call(message, "deleteIndividualCallLog"))
                $root.SyncAction.SyncActionValue.DeleteIndividualCallLogAction.encode(message.deleteIndividualCallLog, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim();
            if (message.labelReorderingAction != null && Object.hasOwnProperty.call(message, "labelReorderingAction"))
                $root.SyncAction.SyncActionValue.LabelReorderingAction.encode(message.labelReorderingAction, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim();
            if (message.paymentInfoAction != null && Object.hasOwnProperty.call(message, "paymentInfoAction"))
                $root.SyncAction.SyncActionValue.PaymentInfoAction.encode(message.paymentInfoAction, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim();
            if (message.customPaymentMethodsAction != null && Object.hasOwnProperty.call(message, "customPaymentMethodsAction"))
                $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction.encode(message.customPaymentMethodsAction, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim();
            if (message.lockChatAction != null && Object.hasOwnProperty.call(message, "lockChatAction"))
                $root.SyncAction.SyncActionValue.LockChatAction.encode(message.lockChatAction, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
            if (message.chatLockSettings != null && Object.hasOwnProperty.call(message, "chatLockSettings"))
                $root.ChatLockSettings.ChatLockSettings.encode(message.chatLockSettings, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim();
            if (message.wamoUserIdentifierAction != null && Object.hasOwnProperty.call(message, "wamoUserIdentifierAction"))
                $root.SyncAction.SyncActionValue.WamoUserIdentifierAction.encode(message.wamoUserIdentifierAction, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim();
            if (message.privacySettingDisableLinkPreviewsAction != null && Object.hasOwnProperty.call(message, "privacySettingDisableLinkPreviewsAction"))
                $root.SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.encode(message.privacySettingDisableLinkPreviewsAction, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim();
            if (message.deviceCapabilities != null && Object.hasOwnProperty.call(message, "deviceCapabilities"))
                $root.DeviceCapabilities.DeviceCapabilities.encode(message.deviceCapabilities, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim();
            if (message.noteEditAction != null && Object.hasOwnProperty.call(message, "noteEditAction"))
                $root.SyncAction.SyncActionValue.NoteEditAction.encode(message.noteEditAction, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim();
            if (message.favoritesAction != null && Object.hasOwnProperty.call(message, "favoritesAction"))
                $root.SyncAction.SyncActionValue.FavoritesAction.encode(message.favoritesAction, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim();
            if (message.merchantPaymentPartnerAction != null && Object.hasOwnProperty.call(message, "merchantPaymentPartnerAction"))
                $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction.encode(message.merchantPaymentPartnerAction, writer.uint32(/* id 57, wireType 2 =*/458).fork()).ldelim();
            if (message.waffleAccountLinkStateAction != null && Object.hasOwnProperty.call(message, "waffleAccountLinkStateAction"))
                $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction.encode(message.waffleAccountLinkStateAction, writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim();
            if (message.usernameChatStartMode != null && Object.hasOwnProperty.call(message, "usernameChatStartMode"))
                $root.SyncAction.SyncActionValue.UsernameChatStartModeAction.encode(message.usernameChatStartMode, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim();
            if (message.notificationActivitySettingAction != null && Object.hasOwnProperty.call(message, "notificationActivitySettingAction"))
                $root.SyncAction.SyncActionValue.NotificationActivitySettingAction.encode(message.notificationActivitySettingAction, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim();
            if (message.lidContactAction != null && Object.hasOwnProperty.call(message, "lidContactAction"))
                $root.SyncAction.SyncActionValue.LidContactAction.encode(message.lidContactAction, writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim();
            if (message.ctwaPerCustomerDataSharingAction != null && Object.hasOwnProperty.call(message, "ctwaPerCustomerDataSharingAction"))
                $root.SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction.encode(message.ctwaPerCustomerDataSharingAction, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim();
            if (message.paymentTosAction != null && Object.hasOwnProperty.call(message, "paymentTosAction"))
                $root.SyncAction.SyncActionValue.PaymentTosAction.encode(message.paymentTosAction, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim();
            if (message.privacySettingChannelsPersonalisedRecommendationAction != null && Object.hasOwnProperty.call(message, "privacySettingChannelsPersonalisedRecommendationAction"))
                $root.SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction.encode(message.privacySettingChannelsPersonalisedRecommendationAction, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim();
            if (message.businessBroadcastAssociationAction != null && Object.hasOwnProperty.call(message, "businessBroadcastAssociationAction"))
                $root.SyncAction.SyncActionValue.BusinessBroadcastAssociationAction.encode(message.businessBroadcastAssociationAction, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim();
            if (message.detectedOutcomesStatusAction != null && Object.hasOwnProperty.call(message, "detectedOutcomesStatusAction"))
                $root.SyncAction.SyncActionValue.DetectedOutcomesStatusAction.encode(message.detectedOutcomesStatusAction, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim();
            if (message.maibaAiFeaturesControlAction != null && Object.hasOwnProperty.call(message, "maibaAiFeaturesControlAction"))
                $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.encode(message.maibaAiFeaturesControlAction, writer.uint32(/* id 68, wireType 2 =*/546).fork()).ldelim();
            if (message.businessBroadcastListAction != null && Object.hasOwnProperty.call(message, "businessBroadcastListAction"))
                $root.SyncAction.SyncActionValue.BusinessBroadcastListAction.encode(message.businessBroadcastListAction, writer.uint32(/* id 69, wireType 2 =*/554).fork()).ldelim();
            if (message.musicUserIdAction != null && Object.hasOwnProperty.call(message, "musicUserIdAction"))
                $root.SyncAction.SyncActionValue.MusicUserIdAction.encode(message.musicUserIdAction, writer.uint32(/* id 70, wireType 2 =*/562).fork()).ldelim();
            if (message.statusPostOptInNotificationPreferencesAction != null && Object.hasOwnProperty.call(message, "statusPostOptInNotificationPreferencesAction"))
                $root.SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction.encode(message.statusPostOptInNotificationPreferencesAction, writer.uint32(/* id 71, wireType 2 =*/570).fork()).ldelim();
            if (message.avatarUpdatedAction != null && Object.hasOwnProperty.call(message, "avatarUpdatedAction"))
                $root.SyncAction.SyncActionValue.AvatarUpdatedAction.encode(message.avatarUpdatedAction, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim();
            if (message.galaxyFlowAction != null && Object.hasOwnProperty.call(message, "galaxyFlowAction"))
                $root.SyncAction.SyncActionValue.GalaxyFlowAction.encode(message.galaxyFlowAction, writer.uint32(/* id 73, wireType 2 =*/586).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a SyncActionValue message from the specified reader or buffer.
         * @function decode
         * @memberof SyncAction.SyncActionValue
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {SyncAction.SyncActionValue} SyncActionValue
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SyncActionValue.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.timestamp = reader.int64();
                        break;
                    }
                case 2: {
                        message.starAction = $root.SyncAction.SyncActionValue.StarAction.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.contactAction = $root.SyncAction.SyncActionValue.ContactAction.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.muteAction = $root.SyncAction.SyncActionValue.MuteAction.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.pinAction = $root.SyncAction.SyncActionValue.PinAction.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.securityNotificationSetting = $root.SyncAction.SyncActionValue.SecurityNotificationSetting.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.pushNameSetting = $root.SyncAction.SyncActionValue.PushNameSetting.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.quickReplyAction = $root.SyncAction.SyncActionValue.QuickReplyAction.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.recentEmojiWeightsAction = $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction.decode(reader, reader.uint32());
                        break;
                    }
                case 14: {
                        message.labelEditAction = $root.SyncAction.SyncActionValue.LabelEditAction.decode(reader, reader.uint32());
                        break;
                    }
                case 15: {
                        message.labelAssociationAction = $root.SyncAction.SyncActionValue.LabelAssociationAction.decode(reader, reader.uint32());
                        break;
                    }
                case 16: {
                        message.localeSetting = $root.SyncAction.SyncActionValue.LocaleSetting.decode(reader, reader.uint32());
                        break;
                    }
                case 17: {
                        message.archiveChatAction = $root.SyncAction.SyncActionValue.ArchiveChatAction.decode(reader, reader.uint32());
                        break;
                    }
                case 18: {
                        message.deleteMessageForMeAction = $root.SyncAction.SyncActionValue.DeleteMessageForMeAction.decode(reader, reader.uint32());
                        break;
                    }
                case 19: {
                        message.keyExpiration = $root.SyncAction.SyncActionValue.KeyExpiration.decode(reader, reader.uint32());
                        break;
                    }
                case 20: {
                        message.markChatAsReadAction = $root.SyncAction.SyncActionValue.MarkChatAsReadAction.decode(reader, reader.uint32());
                        break;
                    }
                case 21: {
                        message.clearChatAction = $root.SyncAction.SyncActionValue.ClearChatAction.decode(reader, reader.uint32());
                        break;
                    }
                case 22: {
                        message.deleteChatAction = $root.SyncAction.SyncActionValue.DeleteChatAction.decode(reader, reader.uint32());
                        break;
                    }
                case 23: {
                        message.unarchiveChatsSetting = $root.SyncAction.SyncActionValue.UnarchiveChatsSetting.decode(reader, reader.uint32());
                        break;
                    }
                case 24: {
                        message.primaryFeature = $root.SyncAction.SyncActionValue.PrimaryFeature.decode(reader, reader.uint32());
                        break;
                    }
                case 26: {
                        message.androidUnsupportedActions = $root.SyncAction.SyncActionValue.AndroidUnsupportedActions.decode(reader, reader.uint32());
                        break;
                    }
                case 27: {
                        message.agentAction = $root.SyncAction.SyncActionValue.AgentAction.decode(reader, reader.uint32());
                        break;
                    }
                case 28: {
                        message.subscriptionAction = $root.SyncAction.SyncActionValue.SubscriptionAction.decode(reader, reader.uint32());
                        break;
                    }
                case 29: {
                        message.userStatusMuteAction = $root.SyncAction.SyncActionValue.UserStatusMuteAction.decode(reader, reader.uint32());
                        break;
                    }
                case 30: {
                        message.timeFormatAction = $root.SyncAction.SyncActionValue.TimeFormatAction.decode(reader, reader.uint32());
                        break;
                    }
                case 31: {
                        message.nuxAction = $root.SyncAction.SyncActionValue.NuxAction.decode(reader, reader.uint32());
                        break;
                    }
                case 32: {
                        message.primaryVersionAction = $root.SyncAction.SyncActionValue.PrimaryVersionAction.decode(reader, reader.uint32());
                        break;
                    }
                case 33: {
                        message.stickerAction = $root.SyncAction.SyncActionValue.StickerAction.decode(reader, reader.uint32());
                        break;
                    }
                case 34: {
                        message.removeRecentStickerAction = $root.SyncAction.SyncActionValue.RemoveRecentStickerAction.decode(reader, reader.uint32());
                        break;
                    }
                case 35: {
                        message.chatAssignment = $root.SyncAction.SyncActionValue.ChatAssignmentAction.decode(reader, reader.uint32());
                        break;
                    }
                case 36: {
                        message.chatAssignmentOpenedStatus = $root.SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction.decode(reader, reader.uint32());
                        break;
                    }
                case 37: {
                        message.pnForLidChatAction = $root.SyncAction.SyncActionValue.PnForLidChatAction.decode(reader, reader.uint32());
                        break;
                    }
                case 38: {
                        message.marketingMessageAction = $root.SyncAction.SyncActionValue.MarketingMessageAction.decode(reader, reader.uint32());
                        break;
                    }
                case 39: {
                        message.marketingMessageBroadcastAction = $root.SyncAction.SyncActionValue.MarketingMessageBroadcastAction.decode(reader, reader.uint32());
                        break;
                    }
                case 40: {
                        message.externalWebBetaAction = $root.SyncAction.SyncActionValue.ExternalWebBetaAction.decode(reader, reader.uint32());
                        break;
                    }
                case 41: {
                        message.privacySettingRelayAllCalls = $root.SyncAction.SyncActionValue.PrivacySettingRelayAllCalls.decode(reader, reader.uint32());
                        break;
                    }
                case 42: {
                        message.callLogAction = $root.SyncAction.SyncActionValue.CallLogAction.decode(reader, reader.uint32());
                        break;
                    }
                case 44: {
                        message.statusPrivacy = $root.SyncAction.SyncActionValue.StatusPrivacyAction.decode(reader, reader.uint32());
                        break;
                    }
                case 45: {
                        message.botWelcomeRequestAction = $root.SyncAction.SyncActionValue.BotWelcomeRequestAction.decode(reader, reader.uint32());
                        break;
                    }
                case 46: {
                        message.deleteIndividualCallLog = $root.SyncAction.SyncActionValue.DeleteIndividualCallLogAction.decode(reader, reader.uint32());
                        break;
                    }
                case 47: {
                        message.labelReorderingAction = $root.SyncAction.SyncActionValue.LabelReorderingAction.decode(reader, reader.uint32());
                        break;
                    }
                case 48: {
                        message.paymentInfoAction = $root.SyncAction.SyncActionValue.PaymentInfoAction.decode(reader, reader.uint32());
                        break;
                    }
                case 49: {
                        message.customPaymentMethodsAction = $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction.decode(reader, reader.uint32());
                        break;
                    }
                case 50: {
                        message.lockChatAction = $root.SyncAction.SyncActionValue.LockChatAction.decode(reader, reader.uint32());
                        break;
                    }
                case 51: {
                        message.chatLockSettings = $root.ChatLockSettings.ChatLockSettings.decode(reader, reader.uint32());
                        break;
                    }
                case 52: {
                        message.wamoUserIdentifierAction = $root.SyncAction.SyncActionValue.WamoUserIdentifierAction.decode(reader, reader.uint32());
                        break;
                    }
                case 53: {
                        message.privacySettingDisableLinkPreviewsAction = $root.SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.decode(reader, reader.uint32());
                        break;
                    }
                case 54: {
                        message.deviceCapabilities = $root.DeviceCapabilities.DeviceCapabilities.decode(reader, reader.uint32());
                        break;
                    }
                case 55: {
                        message.noteEditAction = $root.SyncAction.SyncActionValue.NoteEditAction.decode(reader, reader.uint32());
                        break;
                    }
                case 56: {
                        message.favoritesAction = $root.SyncAction.SyncActionValue.FavoritesAction.decode(reader, reader.uint32());
                        break;
                    }
                case 57: {
                        message.merchantPaymentPartnerAction = $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction.decode(reader, reader.uint32());
                        break;
                    }
                case 58: {
                        message.waffleAccountLinkStateAction = $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction.decode(reader, reader.uint32());
                        break;
                    }
                case 59: {
                        message.usernameChatStartMode = $root.SyncAction.SyncActionValue.UsernameChatStartModeAction.decode(reader, reader.uint32());
                        break;
                    }
                case 60: {
                        message.notificationActivitySettingAction = $root.SyncAction.SyncActionValue.NotificationActivitySettingAction.decode(reader, reader.uint32());
                        break;
                    }
                case 61: {
                        message.lidContactAction = $root.SyncAction.SyncActionValue.LidContactAction.decode(reader, reader.uint32());
                        break;
                    }
                case 62: {
                        message.ctwaPerCustomerDataSharingAction = $root.SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction.decode(reader, reader.uint32());
                        break;
                    }
                case 63: {
                        message.paymentTosAction = $root.SyncAction.SyncActionValue.PaymentTosAction.decode(reader, reader.uint32());
                        break;
                    }
                case 64: {
                        message.privacySettingChannelsPersonalisedRecommendationAction = $root.SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction.decode(reader, reader.uint32());
                        break;
                    }
                case 65: {
                        message.businessBroadcastAssociationAction = $root.SyncAction.SyncActionValue.BusinessBroadcastAssociationAction.decode(reader, reader.uint32());
                        break;
                    }
                case 66: {
                        message.detectedOutcomesStatusAction = $root.SyncAction.SyncActionValue.DetectedOutcomesStatusAction.decode(reader, reader.uint32());
                        break;
                    }
                case 68: {
                        message.maibaAiFeaturesControlAction = $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.decode(reader, reader.uint32());
                        break;
                    }
                case 69: {
                        message.businessBroadcastListAction = $root.SyncAction.SyncActionValue.BusinessBroadcastListAction.decode(reader, reader.uint32());
                        break;
                    }
                case 70: {
                        message.musicUserIdAction = $root.SyncAction.SyncActionValue.MusicUserIdAction.decode(reader, reader.uint32());
                        break;
                    }
                case 71: {
                        message.statusPostOptInNotificationPreferencesAction = $root.SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction.decode(reader, reader.uint32());
                        break;
                    }
                case 72: {
                        message.avatarUpdatedAction = $root.SyncAction.SyncActionValue.AvatarUpdatedAction.decode(reader, reader.uint32());
                        break;
                    }
                case 73: {
                        message.galaxyFlowAction = $root.SyncAction.SyncActionValue.GalaxyFlowAction.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a SyncActionValue message.
         * @function verify
         * @memberof SyncAction.SyncActionValue
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SyncActionValue.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                    return "timestamp: integer|Long expected";
            if (message.starAction != null && message.hasOwnProperty("starAction")) {
                var error = $root.SyncAction.SyncActionValue.StarAction.verify(message.starAction);
                if (error)
                    return "starAction." + error;
            }
            if (message.contactAction != null && message.hasOwnProperty("contactAction")) {
                var error = $root.SyncAction.SyncActionValue.ContactAction.verify(message.contactAction);
                if (error)
                    return "contactAction." + error;
            }
            if (message.muteAction != null && message.hasOwnProperty("muteAction")) {
                var error = $root.SyncAction.SyncActionValue.MuteAction.verify(message.muteAction);
                if (error)
                    return "muteAction." + error;
            }
            if (message.pinAction != null && message.hasOwnProperty("pinAction")) {
                var error = $root.SyncAction.SyncActionValue.PinAction.verify(message.pinAction);
                if (error)
                    return "pinAction." + error;
            }
            if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) {
                var error = $root.SyncAction.SyncActionValue.SecurityNotificationSetting.verify(message.securityNotificationSetting);
                if (error)
                    return "securityNotificationSetting." + error;
            }
            if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) {
                var error = $root.SyncAction.SyncActionValue.PushNameSetting.verify(message.pushNameSetting);
                if (error)
                    return "pushNameSetting." + error;
            }
            if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) {
                var error = $root.SyncAction.SyncActionValue.QuickReplyAction.verify(message.quickReplyAction);
                if (error)
                    return "quickReplyAction." + error;
            }
            if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) {
                var error = $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction.verify(message.recentEmojiWeightsAction);
                if (error)
                    return "recentEmojiWeightsAction." + error;
            }
            if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) {
                var error = $root.SyncAction.SyncActionValue.LabelEditAction.verify(message.labelEditAction);
                if (error)
                    return "labelEditAction." + error;
            }
            if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) {
                var error = $root.SyncAction.SyncActionValue.LabelAssociationAction.verify(message.labelAssociationAction);
                if (error)
                    return "labelAssociationAction." + error;
            }
            if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) {
                var error = $root.SyncAction.SyncActionValue.LocaleSetting.verify(message.localeSetting);
                if (error)
                    return "localeSetting." + error;
            }
            if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) {
                var error = $root.SyncAction.SyncActionValue.ArchiveChatAction.verify(message.archiveChatAction);
                if (error)
                    return "archiveChatAction." + error;
            }
            if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) {
                var error = $root.SyncAction.SyncActionValue.DeleteMessageForMeAction.verify(message.deleteMessageForMeAction);
                if (error)
                    return "deleteMessageForMeAction." + error;
            }
            if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) {
                var error = $root.SyncAction.SyncActionValue.KeyExpiration.verify(message.keyExpiration);
                if (error)
                    return "keyExpiration." + error;
            }
            if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) {
                var error = $root.SyncAction.SyncActionValue.MarkChatAsReadAction.verify(message.markChatAsReadAction);
                if (error)
                    return "markChatAsReadAction." + error;
            }
            if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) {
                var error = $root.SyncAction.SyncActionValue.ClearChatAction.verify(message.clearChatAction);
                if (error)
                    return "clearChatAction." + error;
            }
            if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) {
                var error = $root.SyncAction.SyncActionValue.DeleteChatAction.verify(message.deleteChatAction);
                if (error)
                    return "deleteChatAction." + error;
            }
            if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) {
                var error = $root.SyncAction.SyncActionValue.UnarchiveChatsSetting.verify(message.unarchiveChatsSetting);
                if (error)
                    return "unarchiveChatsSetting." + error;
            }
            if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) {
                var error = $root.SyncAction.SyncActionValue.PrimaryFeature.verify(message.primaryFeature);
                if (error)
                    return "primaryFeature." + error;
            }
            if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) {
                var error = $root.SyncAction.SyncActionValue.AndroidUnsupportedActions.verify(message.androidUnsupportedActions);
                if (error)
                    return "androidUnsupportedActions." + error;
            }
            if (message.agentAction != null && message.hasOwnProperty("agentAction")) {
                var error = $root.SyncAction.SyncActionValue.AgentAction.verify(message.agentAction);
                if (error)
                    return "agentAction." + error;
            }
            if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) {
                var error = $root.SyncAction.SyncActionValue.SubscriptionAction.verify(message.subscriptionAction);
                if (error)
                    return "subscriptionAction." + error;
            }
            if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) {
                var error = $root.SyncAction.SyncActionValue.UserStatusMuteAction.verify(message.userStatusMuteAction);
                if (error)
                    return "userStatusMuteAction." + error;
            }
            if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) {
                var error = $root.SyncAction.SyncActionValue.TimeFormatAction.verify(message.timeFormatAction);
                if (error)
                    return "timeFormatAction." + error;
            }
            if (message.nuxAction != null && message.hasOwnProperty("nuxAction")) {
                var error = $root.SyncAction.SyncActionValue.NuxAction.verify(message.nuxAction);
                if (error)
                    return "nuxAction." + error;
            }
            if (message.primaryVersionAction != null && message.hasOwnProperty("primaryVersionAction")) {
                var error = $root.SyncAction.SyncActionValue.PrimaryVersionAction.verify(message.primaryVersionAction);
                if (error)
                    return "primaryVersionAction." + error;
            }
            if (message.stickerAction != null && message.hasOwnProperty("stickerAction")) {
                var error = $root.SyncAction.SyncActionValue.StickerAction.verify(message.stickerAction);
                if (error)
                    return "stickerAction." + error;
            }
            if (message.removeRecentStickerAction != null && message.hasOwnProperty("removeRecentStickerAction")) {
                var error = $root.SyncAction.SyncActionValue.RemoveRecentStickerAction.verify(message.removeRecentStickerAction);
                if (error)
                    return "removeRecentStickerAction." + error;
            }
            if (message.chatAssignment != null && message.hasOwnProperty("chatAssignment")) {
                var error = $root.SyncAction.SyncActionValue.ChatAssignmentAction.verify(message.chatAssignment);
                if (error)
                    return "chatAssignment." + error;
            }
            if (message.chatAssignmentOpenedStatus != null && message.hasOwnProperty("chatAssignmentOpenedStatus")) {
                var error = $root.SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction.verify(message.chatAssignmentOpenedStatus);
                if (error)
                    return "chatAssignmentOpenedStatus." + error;
            }
            if (message.pnForLidChatAction != null && message.hasOwnProperty("pnForLidChatAction")) {
                var error = $root.SyncAction.SyncActionValue.PnForLidChatAction.verify(message.pnForLidChatAction);
                if (error)
                    return "pnForLidChatAction." + error;
            }
            if (message.marketingMessageAction != null && message.hasOwnProperty("marketingMessageAction")) {
                var error = $root.SyncAction.SyncActionValue.MarketingMessageAction.verify(message.marketingMessageAction);
                if (error)
                    return "marketingMessageAction." + error;
            }
            if (message.marketingMessageBroadcastAction != null && message.hasOwnProperty("marketingMessageBroadcastAction")) {
                var error = $root.SyncAction.SyncActionValue.MarketingMessageBroadcastAction.verify(message.marketingMessageBroadcastAction);
                if (error)
                    return "marketingMessageBroadcastAction." + error;
            }
            if (message.externalWebBetaAction != null && message.hasOwnProperty("externalWebBetaAction")) {
                var error = $root.SyncAction.SyncActionValue.ExternalWebBetaAction.verify(message.externalWebBetaAction);
                if (error)
                    return "externalWebBetaAction." + error;
            }
            if (message.privacySettingRelayAllCalls != null && message.hasOwnProperty("privacySettingRelayAllCalls")) {
                var error = $root.SyncAction.SyncActionValue.PrivacySettingRelayAllCalls.verify(message.privacySettingRelayAllCalls);
                if (error)
                    return "privacySettingRelayAllCalls." + error;
            }
            if (message.callLogAction != null && message.hasOwnProperty("callLogAction")) {
                var error = $root.SyncAction.SyncActionValue.CallLogAction.verify(message.callLogAction);
                if (error)
                    return "callLogAction." + error;
            }
            if (message.statusPrivacy != null && message.hasOwnProperty("statusPrivacy")) {
                var error = $root.SyncAction.SyncActionValue.StatusPrivacyAction.verify(message.statusPrivacy);
                if (error)
                    return "statusPrivacy." + error;
            }
            if (message.botWelcomeRequestAction != null && message.hasOwnProperty("botWelcomeRequestAction")) {
                var error = $root.SyncAction.SyncActionValue.BotWelcomeRequestAction.verify(message.botWelcomeRequestAction);
                if (error)
                    return "botWelcomeRequestAction." + error;
            }
            if (message.deleteIndividualCallLog != null && message.hasOwnProperty("deleteIndividualCallLog")) {
                var error = $root.SyncAction.SyncActionValue.DeleteIndividualCallLogAction.verify(message.deleteIndividualCallLog);
                if (error)
                    return "deleteIndividualCallLog." + error;
            }
            if (message.labelReorderingAction != null && message.hasOwnProperty("labelReorderingAction")) {
                var error = $root.SyncAction.SyncActionValue.LabelReorderingAction.verify(message.labelReorderingAction);
                if (error)
                    return "labelReorderingAction." + error;
            }
            if (message.paymentInfoAction != null && message.hasOwnProperty("paymentInfoAction")) {
                var error = $root.SyncAction.SyncActionValue.PaymentInfoAction.verify(message.paymentInfoAction);
                if (error)
                    return "paymentInfoAction." + error;
            }
            if (message.customPaymentMethodsAction != null && message.hasOwnProperty("customPaymentMethodsAction")) {
                var error = $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction.verify(message.customPaymentMethodsAction);
                if (error)
                    return "customPaymentMethodsAction." + error;
            }
            if (message.lockChatAction != null && message.hasOwnProperty("lockChatAction")) {
                var error = $root.SyncAction.SyncActionValue.LockChatAction.verify(message.lockChatAction);
                if (error)
                    return "lockChatAction." + error;
            }
            if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings")) {
                var error = $root.ChatLockSettings.ChatLockSettings.verify(message.chatLockSettings);
                if (error)
                    return "chatLockSettings." + error;
            }
            if (message.wamoUserIdentifierAction != null && message.hasOwnProperty("wamoUserIdentifierAction")) {
                var error = $root.SyncAction.SyncActionValue.WamoUserIdentifierAction.verify(message.wamoUserIdentifierAction);
                if (error)
                    return "wamoUserIdentifierAction." + error;
            }
            if (message.privacySettingDisableLinkPreviewsAction != null && message.hasOwnProperty("privacySettingDisableLinkPreviewsAction")) {
                var error = $root.SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.verify(message.privacySettingDisableLinkPreviewsAction);
                if (error)
                    return "privacySettingDisableLinkPreviewsAction." + error;
            }
            if (message.deviceCapabilities != null && message.hasOwnProperty("deviceCapabilities")) {
                var error = $root.DeviceCapabilities.DeviceCapabilities.verify(message.deviceCapabilities);
                if (error)
                    return "deviceCapabilities." + error;
            }
            if (message.noteEditAction != null && message.hasOwnProperty("noteEditAction")) {
                var error = $root.SyncAction.SyncActionValue.NoteEditAction.verify(message.noteEditAction);
                if (error)
                    return "noteEditAction." + error;
            }
            if (message.favoritesAction != null && message.hasOwnProperty("favoritesAction")) {
                var error = $root.SyncAction.SyncActionValue.FavoritesAction.verify(message.favoritesAction);
                if (error)
                    return "favoritesAction." + error;
            }
            if (message.merchantPaymentPartnerAction != null && message.hasOwnProperty("merchantPaymentPartnerAction")) {
                var error = $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction.verify(message.merchantPaymentPartnerAction);
                if (error)
                    return "merchantPaymentPartnerAction." + error;
            }
            if (message.waffleAccountLinkStateAction != null && message.hasOwnProperty("waffleAccountLinkStateAction")) {
                var error = $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction.verify(message.waffleAccountLinkStateAction);
                if (error)
                    return "waffleAccountLinkStateAction." + error;
            }
            if (message.usernameChatStartMode != null && message.hasOwnProperty("usernameChatStartMode")) {
                var error = $root.SyncAction.SyncActionValue.UsernameChatStartModeAction.verify(message.usernameChatStartMode);
                if (error)
                    return "usernameChatStartMode." + error;
            }
            if (message.notificationActivitySettingAction != null && message.hasOwnProperty("notificationActivitySettingAction")) {
                var error = $root.SyncAction.SyncActionValue.NotificationActivitySettingAction.verify(message.notificationActivitySettingAction);
                if (error)
                    return "notificationActivitySettingAction." + error;
            }
            if (message.lidContactAction != null && message.hasOwnProperty("lidContactAction")) {
                var error = $root.SyncAction.SyncActionValue.LidContactAction.verify(message.lidContactAction);
                if (error)
                    return "lidContactAction." + error;
            }
            if (message.ctwaPerCustomerDataSharingAction != null && message.hasOwnProperty("ctwaPerCustomerDataSharingAction")) {
                var error = $root.SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction.verify(message.ctwaPerCustomerDataSharingAction);
                if (error)
                    return "ctwaPerCustomerDataSharingAction." + error;
            }
            if (message.paymentTosAction != null && message.hasOwnProperty("paymentTosAction")) {
                var error = $root.SyncAction.SyncActionValue.PaymentTosAction.verify(message.paymentTosAction);
                if (error)
                    return "paymentTosAction." + error;
            }
            if (message.privacySettingChannelsPersonalisedRecommendationAction != null && message.hasOwnProperty("privacySettingChannelsPersonalisedRecommendationAction")) {
                var error = $root.SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction.verify(message.privacySettingChannelsPersonalisedRecommendationAction);
                if (error)
                    return "privacySettingChannelsPersonalisedRecommendationAction." + error;
            }
            if (message.businessBroadcastAssociationAction != null && message.hasOwnProperty("businessBroadcastAssociationAction")) {
                var error = $root.SyncAction.SyncActionValue.BusinessBroadcastAssociationAction.verify(message.businessBroadcastAssociationAction);
                if (error)
                    return "businessBroadcastAssociationAction." + error;
            }
            if (message.detectedOutcomesStatusAction != null && message.hasOwnProperty("detectedOutcomesStatusAction")) {
                var error = $root.SyncAction.SyncActionValue.DetectedOutcomesStatusAction.verify(message.detectedOutcomesStatusAction);
                if (error)
                    return "detectedOutcomesStatusAction." + error;
            }
            if (message.maibaAiFeaturesControlAction != null && message.hasOwnProperty("maibaAiFeaturesControlAction")) {
                var error = $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.verify(message.maibaAiFeaturesControlAction);
                if (error)
                    return "maibaAiFeaturesControlAction." + error;
            }
            if (message.businessBroadcastListAction != null && message.hasOwnProperty("businessBroadcastListAction")) {
                var error = $root.SyncAction.SyncActionValue.BusinessBroadcastListAction.verify(message.businessBroadcastListAction);
                if (error)
                    return "businessBroadcastListAction." + error;
            }
            if (message.musicUserIdAction != null && message.hasOwnProperty("musicUserIdAction")) {
                var error = $root.SyncAction.SyncActionValue.MusicUserIdAction.verify(message.musicUserIdAction);
                if (error)
                    return "musicUserIdAction." + error;
            }
            if (message.statusPostOptInNotificationPreferencesAction != null && message.hasOwnProperty("statusPostOptInNotificationPreferencesAction")) {
                var error = $root.SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction.verify(message.statusPostOptInNotificationPreferencesAction);
                if (error)
                    return "statusPostOptInNotificationPreferencesAction." + error;
            }
            if (message.avatarUpdatedAction != null && message.hasOwnProperty("avatarUpdatedAction")) {
                var error = $root.SyncAction.SyncActionValue.AvatarUpdatedAction.verify(message.avatarUpdatedAction);
                if (error)
                    return "avatarUpdatedAction." + error;
            }
            if (message.galaxyFlowAction != null && message.hasOwnProperty("galaxyFlowAction")) {
                var error = $root.SyncAction.SyncActionValue.GalaxyFlowAction.verify(message.galaxyFlowAction);
                if (error)
                    return "galaxyFlowAction." + error;
            }
            return null;
        };

        /**
         * Creates a SyncActionValue message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof SyncAction.SyncActionValue
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {SyncAction.SyncActionValue} SyncActionValue
         */
        SyncActionValue.fromObject = function fromObject(object) {
            if (object instanceof $root.SyncAction.SyncActionValue)
                return object;
            var message = new $root.SyncAction.SyncActionValue();
            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();
            if (object.starAction != null) {
                if (typeof object.starAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.starAction: object expected");
                message.starAction = $root.SyncAction.SyncActionValue.StarAction.fromObject(object.starAction);
            }
            if (object.contactAction != null) {
                if (typeof object.contactAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.contactAction: object expected");
                message.contactAction = $root.SyncAction.SyncActionValue.ContactAction.fromObject(object.contactAction);
            }
            if (object.muteAction != null) {
                if (typeof object.muteAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.muteAction: object expected");
                message.muteAction = $root.SyncAction.SyncActionValue.MuteAction.fromObject(object.muteAction);
            }
            if (object.pinAction != null) {
                if (typeof object.pinAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.pinAction: object expected");
                message.pinAction = $root.SyncAction.SyncActionValue.PinAction.fromObject(object.pinAction);
            }
            if (object.securityNotificationSetting != null) {
                if (typeof object.securityNotificationSetting !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.securityNotificationSetting: object expected");
                message.securityNotificationSetting = $root.SyncAction.SyncActionValue.SecurityNotificationSetting.fromObject(object.securityNotificationSetting);
            }
            if (object.pushNameSetting != null) {
                if (typeof object.pushNameSetting !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.pushNameSetting: object expected");
                message.pushNameSetting = $root.SyncAction.SyncActionValue.PushNameSetting.fromObject(object.pushNameSetting);
            }
            if (object.quickReplyAction != null) {
                if (typeof object.quickReplyAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.quickReplyAction: object expected");
                message.quickReplyAction = $root.SyncAction.SyncActionValue.QuickReplyAction.fromObject(object.quickReplyAction);
            }
            if (object.recentEmojiWeightsAction != null) {
                if (typeof object.recentEmojiWeightsAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.recentEmojiWeightsAction: object expected");
                message.recentEmojiWeightsAction = $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction.fromObject(object.recentEmojiWeightsAction);
            }
            if (object.labelEditAction != null) {
                if (typeof object.labelEditAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.labelEditAction: object expected");
                message.labelEditAction = $root.SyncAction.SyncActionValue.LabelEditAction.fromObject(object.labelEditAction);
            }
            if (object.labelAssociationAction != null) {
                if (typeof object.labelAssociationAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.labelAssociationAction: object expected");
                message.labelAssociationAction = $root.SyncAction.SyncActionValue.LabelAssociationAction.fromObject(object.labelAssociationAction);
            }
            if (object.localeSetting != null) {
                if (typeof object.localeSetting !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.localeSetting: object expected");
                message.localeSetting = $root.SyncAction.SyncActionValue.LocaleSetting.fromObject(object.localeSetting);
            }
            if (object.archiveChatAction != null) {
                if (typeof object.archiveChatAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.archiveChatAction: object expected");
                message.archiveChatAction = $root.SyncAction.SyncActionValue.ArchiveChatAction.fromObject(object.archiveChatAction);
            }
            if (object.deleteMessageForMeAction != null) {
                if (typeof object.deleteMessageForMeAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.deleteMessageForMeAction: object expected");
                message.deleteMessageForMeAction = $root.SyncAction.SyncActionValue.DeleteMessageForMeAction.fromObject(object.deleteMessageForMeAction);
            }
            if (object.keyExpiration != null) {
                if (typeof object.keyExpiration !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.keyExpiration: object expected");
                message.keyExpiration = $root.SyncAction.SyncActionValue.KeyExpiration.fromObject(object.keyExpiration);
            }
            if (object.markChatAsReadAction != null) {
                if (typeof object.markChatAsReadAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.markChatAsReadAction: object expected");
                message.markChatAsReadAction = $root.SyncAction.SyncActionValue.MarkChatAsReadAction.fromObject(object.markChatAsReadAction);
            }
            if (object.clearChatAction != null) {
                if (typeof object.clearChatAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.clearChatAction: object expected");
                message.clearChatAction = $root.SyncAction.SyncActionValue.ClearChatAction.fromObject(object.clearChatAction);
            }
            if (object.deleteChatAction != null) {
                if (typeof object.deleteChatAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.deleteChatAction: object expected");
                message.deleteChatAction = $root.SyncAction.SyncActionValue.DeleteChatAction.fromObject(object.deleteChatAction);
            }
            if (object.unarchiveChatsSetting != null) {
                if (typeof object.unarchiveChatsSetting !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.unarchiveChatsSetting: object expected");
                message.unarchiveChatsSetting = $root.SyncAction.SyncActionValue.UnarchiveChatsSetting.fromObject(object.unarchiveChatsSetting);
            }
            if (object.primaryFeature != null) {
                if (typeof object.primaryFeature !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.primaryFeature: object expected");
                message.primaryFeature = $root.SyncAction.SyncActionValue.PrimaryFeature.fromObject(object.primaryFeature);
            }
            if (object.androidUnsupportedActions != null) {
                if (typeof object.androidUnsupportedActions !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.androidUnsupportedActions: object expected");
                message.androidUnsupportedActions = $root.SyncAction.SyncActionValue.AndroidUnsupportedActions.fromObject(object.androidUnsupportedActions);
            }
            if (object.agentAction != null) {
                if (typeof object.agentAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.agentAction: object expected");
                message.agentAction = $root.SyncAction.SyncActionValue.AgentAction.fromObject(object.agentAction);
            }
            if (object.subscriptionAction != null) {
                if (typeof object.subscriptionAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.subscriptionAction: object expected");
                message.subscriptionAction = $root.SyncAction.SyncActionValue.SubscriptionAction.fromObject(object.subscriptionAction);
            }
            if (object.userStatusMuteAction != null) {
                if (typeof object.userStatusMuteAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.userStatusMuteAction: object expected");
                message.userStatusMuteAction = $root.SyncAction.SyncActionValue.UserStatusMuteAction.fromObject(object.userStatusMuteAction);
            }
            if (object.timeFormatAction != null) {
                if (typeof object.timeFormatAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.timeFormatAction: object expected");
                message.timeFormatAction = $root.SyncAction.SyncActionValue.TimeFormatAction.fromObject(object.timeFormatAction);
            }
            if (object.nuxAction != null) {
                if (typeof object.nuxAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.nuxAction: object expected");
                message.nuxAction = $root.SyncAction.SyncActionValue.NuxAction.fromObject(object.nuxAction);
            }
            if (object.primaryVersionAction != null) {
                if (typeof object.primaryVersionAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.primaryVersionAction: object expected");
                message.primaryVersionAction = $root.SyncAction.SyncActionValue.PrimaryVersionAction.fromObject(object.primaryVersionAction);
            }
            if (object.stickerAction != null) {
                if (typeof object.stickerAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.stickerAction: object expected");
                message.stickerAction = $root.SyncAction.SyncActionValue.StickerAction.fromObject(object.stickerAction);
            }
            if (object.removeRecentStickerAction != null) {
                if (typeof object.removeRecentStickerAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.removeRecentStickerAction: object expected");
                message.removeRecentStickerAction = $root.SyncAction.SyncActionValue.RemoveRecentStickerAction.fromObject(object.removeRecentStickerAction);
            }
            if (object.chatAssignment != null) {
                if (typeof object.chatAssignment !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.chatAssignment: object expected");
                message.chatAssignment = $root.SyncAction.SyncActionValue.ChatAssignmentAction.fromObject(object.chatAssignment);
            }
            if (object.chatAssignmentOpenedStatus != null) {
                if (typeof object.chatAssignmentOpenedStatus !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.chatAssignmentOpenedStatus: object expected");
                message.chatAssignmentOpenedStatus = $root.SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction.fromObject(object.chatAssignmentOpenedStatus);
            }
            if (object.pnForLidChatAction != null) {
                if (typeof object.pnForLidChatAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.pnForLidChatAction: object expected");
                message.pnForLidChatAction = $root.SyncAction.SyncActionValue.PnForLidChatAction.fromObject(object.pnForLidChatAction);
            }
            if (object.marketingMessageAction != null) {
                if (typeof object.marketingMessageAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.marketingMessageAction: object expected");
                message.marketingMessageAction = $root.SyncAction.SyncActionValue.MarketingMessageAction.fromObject(object.marketingMessageAction);
            }
            if (object.marketingMessageBroadcastAction != null) {
                if (typeof object.marketingMessageBroadcastAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.marketingMessageBroadcastAction: object expected");
                message.marketingMessageBroadcastAction = $root.SyncAction.SyncActionValue.MarketingMessageBroadcastAction.fromObject(object.marketingMessageBroadcastAction);
            }
            if (object.externalWebBetaAction != null) {
                if (typeof object.externalWebBetaAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.externalWebBetaAction: object expected");
                message.externalWebBetaAction = $root.SyncAction.SyncActionValue.ExternalWebBetaAction.fromObject(object.externalWebBetaAction);
            }
            if (object.privacySettingRelayAllCalls != null) {
                if (typeof object.privacySettingRelayAllCalls !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.privacySettingRelayAllCalls: object expected");
                message.privacySettingRelayAllCalls = $root.SyncAction.SyncActionValue.PrivacySettingRelayAllCalls.fromObject(object.privacySettingRelayAllCalls);
            }
            if (object.callLogAction != null) {
                if (typeof object.callLogAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.callLogAction: object expected");
                message.callLogAction = $root.SyncAction.SyncActionValue.CallLogAction.fromObject(object.callLogAction);
            }
            if (object.statusPrivacy != null) {
                if (typeof object.statusPrivacy !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.statusPrivacy: object expected");
                message.statusPrivacy = $root.SyncAction.SyncActionValue.StatusPrivacyAction.fromObject(object.statusPrivacy);
            }
            if (object.botWelcomeRequestAction != null) {
                if (typeof object.botWelcomeRequestAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.botWelcomeRequestAction: object expected");
                message.botWelcomeRequestAction = $root.SyncAction.SyncActionValue.BotWelcomeRequestAction.fromObject(object.botWelcomeRequestAction);
            }
            if (object.deleteIndividualCallLog != null) {
                if (typeof object.deleteIndividualCallLog !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.deleteIndividualCallLog: object expected");
                message.deleteIndividualCallLog = $root.SyncAction.SyncActionValue.DeleteIndividualCallLogAction.fromObject(object.deleteIndividualCallLog);
            }
            if (object.labelReorderingAction != null) {
                if (typeof object.labelReorderingAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.labelReorderingAction: object expected");
                message.labelReorderingAction = $root.SyncAction.SyncActionValue.LabelReorderingAction.fromObject(object.labelReorderingAction);
            }
            if (object.paymentInfoAction != null) {
                if (typeof object.paymentInfoAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.paymentInfoAction: object expected");
                message.paymentInfoAction = $root.SyncAction.SyncActionValue.PaymentInfoAction.fromObject(object.paymentInfoAction);
            }
            if (object.customPaymentMethodsAction != null) {
                if (typeof object.customPaymentMethodsAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.customPaymentMethodsAction: object expected");
                message.customPaymentMethodsAction = $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction.fromObject(object.customPaymentMethodsAction);
            }
            if (object.lockChatAction != null) {
                if (typeof object.lockChatAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.lockChatAction: object expected");
                message.lockChatAction = $root.SyncAction.SyncActionValue.LockChatAction.fromObject(object.lockChatAction);
            }
            if (object.chatLockSettings != null) {
                if (typeof object.chatLockSettings !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.chatLockSettings: object expected");
                message.chatLockSettings = $root.ChatLockSettings.ChatLockSettings.fromObject(object.chatLockSettings);
            }
            if (object.wamoUserIdentifierAction != null) {
                if (typeof object.wamoUserIdentifierAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.wamoUserIdentifierAction: object expected");
                message.wamoUserIdentifierAction = $root.SyncAction.SyncActionValue.WamoUserIdentifierAction.fromObject(object.wamoUserIdentifierAction);
            }
            if (object.privacySettingDisableLinkPreviewsAction != null) {
                if (typeof object.privacySettingDisableLinkPreviewsAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.privacySettingDisableLinkPreviewsAction: object expected");
                message.privacySettingDisableLinkPreviewsAction = $root.SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.fromObject(object.privacySettingDisableLinkPreviewsAction);
            }
            if (object.deviceCapabilities != null) {
                if (typeof object.deviceCapabilities !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.deviceCapabilities: object expected");
                message.deviceCapabilities = $root.DeviceCapabilities.DeviceCapabilities.fromObject(object.deviceCapabilities);
            }
            if (object.noteEditAction != null) {
                if (typeof object.noteEditAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.noteEditAction: object expected");
                message.noteEditAction = $root.SyncAction.SyncActionValue.NoteEditAction.fromObject(object.noteEditAction);
            }
            if (object.favoritesAction != null) {
                if (typeof object.favoritesAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.favoritesAction: object expected");
                message.favoritesAction = $root.SyncAction.SyncActionValue.FavoritesAction.fromObject(object.favoritesAction);
            }
            if (object.merchantPaymentPartnerAction != null) {
                if (typeof object.merchantPaymentPartnerAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.merchantPaymentPartnerAction: object expected");
                message.merchantPaymentPartnerAction = $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction.fromObject(object.merchantPaymentPartnerAction);
            }
            if (object.waffleAccountLinkStateAction != null) {
                if (typeof object.waffleAccountLinkStateAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.waffleAccountLinkStateAction: object expected");
                message.waffleAccountLinkStateAction = $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction.fromObject(object.waffleAccountLinkStateAction);
            }
            if (object.usernameChatStartMode != null) {
                if (typeof object.usernameChatStartMode !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.usernameChatStartMode: object expected");
                message.usernameChatStartMode = $root.SyncAction.SyncActionValue.UsernameChatStartModeAction.fromObject(object.usernameChatStartMode);
            }
            if (object.notificationActivitySettingAction != null) {
                if (typeof object.notificationActivitySettingAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.notificationActivitySettingAction: object expected");
                message.notificationActivitySettingAction = $root.SyncAction.SyncActionValue.NotificationActivitySettingAction.fromObject(object.notificationActivitySettingAction);
            }
            if (object.lidContactAction != null) {
                if (typeof object.lidContactAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.lidContactAction: object expected");
                message.lidContactAction = $root.SyncAction.SyncActionValue.LidContactAction.fromObject(object.lidContactAction);
            }
            if (object.ctwaPerCustomerDataSharingAction != null) {
                if (typeof object.ctwaPerCustomerDataSharingAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.ctwaPerCustomerDataSharingAction: object expected");
                message.ctwaPerCustomerDataSharingAction = $root.SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction.fromObject(object.ctwaPerCustomerDataSharingAction);
            }
            if (object.paymentTosAction != null) {
                if (typeof object.paymentTosAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.paymentTosAction: object expected");
                message.paymentTosAction = $root.SyncAction.SyncActionValue.PaymentTosAction.fromObject(object.paymentTosAction);
            }
            if (object.privacySettingChannelsPersonalisedRecommendationAction != null) {
                if (typeof object.privacySettingChannelsPersonalisedRecommendationAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.privacySettingChannelsPersonalisedRecommendationAction: object expected");
                message.privacySettingChannelsPersonalisedRecommendationAction = $root.SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction.fromObject(object.privacySettingChannelsPersonalisedRecommendationAction);
            }
            if (object.businessBroadcastAssociationAction != null) {
                if (typeof object.businessBroadcastAssociationAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.businessBroadcastAssociationAction: object expected");
                message.businessBroadcastAssociationAction = $root.SyncAction.SyncActionValue.BusinessBroadcastAssociationAction.fromObject(object.businessBroadcastAssociationAction);
            }
            if (object.detectedOutcomesStatusAction != null) {
                if (typeof object.detectedOutcomesStatusAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.detectedOutcomesStatusAction: object expected");
                message.detectedOutcomesStatusAction = $root.SyncAction.SyncActionValue.DetectedOutcomesStatusAction.fromObject(object.detectedOutcomesStatusAction);
            }
            if (object.maibaAiFeaturesControlAction != null) {
                if (typeof object.maibaAiFeaturesControlAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.maibaAiFeaturesControlAction: object expected");
                message.maibaAiFeaturesControlAction = $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.fromObject(object.maibaAiFeaturesControlAction);
            }
            if (object.businessBroadcastListAction != null) {
                if (typeof object.businessBroadcastListAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.businessBroadcastListAction: object expected");
                message.businessBroadcastListAction = $root.SyncAction.SyncActionValue.BusinessBroadcastListAction.fromObject(object.businessBroadcastListAction);
            }
            if (object.musicUserIdAction != null) {
                if (typeof object.musicUserIdAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.musicUserIdAction: object expected");
                message.musicUserIdAction = $root.SyncAction.SyncActionValue.MusicUserIdAction.fromObject(object.musicUserIdAction);
            }
            if (object.statusPostOptInNotificationPreferencesAction != null) {
                if (typeof object.statusPostOptInNotificationPreferencesAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.statusPostOptInNotificationPreferencesAction: object expected");
                message.statusPostOptInNotificationPreferencesAction = $root.SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction.fromObject(object.statusPostOptInNotificationPreferencesAction);
            }
            if (object.avatarUpdatedAction != null) {
                if (typeof object.avatarUpdatedAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.avatarUpdatedAction: object expected");
                message.avatarUpdatedAction = $root.SyncAction.SyncActionValue.AvatarUpdatedAction.fromObject(object.avatarUpdatedAction);
            }
            if (object.galaxyFlowAction != null) {
                if (typeof object.galaxyFlowAction !== "object")
                    throw TypeError(".SyncAction.SyncActionValue.galaxyFlowAction: object expected");
                message.galaxyFlowAction = $root.SyncAction.SyncActionValue.GalaxyFlowAction.fromObject(object.galaxyFlowAction);
            }
            return message;
        };

        /**
         * Creates a plain object from a SyncActionValue message. Also converts values to other types if specified.
         * @function toObject
         * @memberof SyncAction.SyncActionValue
         * @static
         * @param {SyncAction.SyncActionValue} message SyncActionValue
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SyncActionValue.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timestamp = options.longs === String ? "0" : 0;
                object.starAction = null;
                object.contactAction = null;
                object.muteAction = null;
                object.pinAction = null;
                object.securityNotificationSetting = null;
                object.pushNameSetting = null;
                object.quickReplyAction = null;
                object.recentEmojiWeightsAction = null;
                object.labelEditAction = null;
                object.labelAssociationAction = null;
                object.localeSetting = null;
                object.archiveChatAction = null;
                object.deleteMessageForMeAction = null;
                object.keyExpiration = null;
                object.markChatAsReadAction = null;
                object.clearChatAction = null;
                object.deleteChatAction = null;
                object.unarchiveChatsSetting = null;
                object.primaryFeature = null;
                object.androidUnsupportedActions = null;
                object.agentAction = null;
                object.subscriptionAction = null;
                object.userStatusMuteAction = null;
                object.timeFormatAction = null;
                object.nuxAction = null;
                object.primaryVersionAction = null;
                object.stickerAction = null;
                object.removeRecentStickerAction = null;
                object.chatAssignment = null;
                object.chatAssignmentOpenedStatus = null;
                object.pnForLidChatAction = null;
                object.marketingMessageAction = null;
                object.marketingMessageBroadcastAction = null;
                object.externalWebBetaAction = null;
                object.privacySettingRelayAllCalls = null;
                object.callLogAction = null;
                object.statusPrivacy = null;
                object.botWelcomeRequestAction = null;
                object.deleteIndividualCallLog = null;
                object.labelReorderingAction = null;
                object.paymentInfoAction = null;
                object.customPaymentMethodsAction = null;
                object.lockChatAction = null;
                object.chatLockSettings = null;
                object.wamoUserIdentifierAction = null;
                object.privacySettingDisableLinkPreviewsAction = null;
                object.deviceCapabilities = null;
                object.noteEditAction = null;
                object.favoritesAction = null;
                object.merchantPaymentPartnerAction = null;
                object.waffleAccountLinkStateAction = null;
                object.usernameChatStartMode = null;
                object.notificationActivitySettingAction = null;
                object.lidContactAction = null;
                object.ctwaPerCustomerDataSharingAction = null;
                object.paymentTosAction = null;
                object.privacySettingChannelsPersonalisedRecommendationAction = null;
                object.businessBroadcastAssociationAction = null;
                object.detectedOutcomesStatusAction = null;
                object.maibaAiFeaturesControlAction = null;
                object.businessBroadcastListAction = null;
                object.musicUserIdAction = null;
                object.statusPostOptInNotificationPreferencesAction = null;
                object.avatarUpdatedAction = null;
                object.galaxyFlowAction = null;
            }
            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 (message.starAction != null && message.hasOwnProperty("starAction"))
                object.starAction = $root.SyncAction.SyncActionValue.StarAction.toObject(message.starAction, options);
            if (message.contactAction != null && message.hasOwnProperty("contactAction"))
                object.contactAction = $root.SyncAction.SyncActionValue.ContactAction.toObject(message.contactAction, options);
            if (message.muteAction != null && message.hasOwnProperty("muteAction"))
                object.muteAction = $root.SyncAction.SyncActionValue.MuteAction.toObject(message.muteAction, options);
            if (message.pinAction != null && message.hasOwnProperty("pinAction"))
                object.pinAction = $root.SyncAction.SyncActionValue.PinAction.toObject(message.pinAction, options);
            if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting"))
                object.securityNotificationSetting = $root.SyncAction.SyncActionValue.SecurityNotificationSetting.toObject(message.securityNotificationSetting, options);
            if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting"))
                object.pushNameSetting = $root.SyncAction.SyncActionValue.PushNameSetting.toObject(message.pushNameSetting, options);
            if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction"))
                object.quickReplyAction = $root.SyncAction.SyncActionValue.QuickReplyAction.toObject(message.quickReplyAction, options);
            if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction"))
                object.recentEmojiWeightsAction = $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction.toObject(message.recentEmojiWeightsAction, options);
            if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction"))
                object.labelEditAction = $root.SyncAction.SyncActionValue.LabelEditAction.toObject(message.labelEditAction, options);
            if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction"))
                object.labelAssociationAction = $root.SyncAction.SyncActionValue.LabelAssociationAction.toObject(message.labelAssociationAction, options);
            if (message.localeSetting != null && message.hasOwnProperty("localeSetting"))
                object.localeSetting = $root.SyncAction.SyncActionValue.LocaleSetting.toObject(message.localeSetting, options);
            if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction"))
                object.archiveChatAction = $root.SyncAction.SyncActionValue.ArchiveChatAction.toObject(message.archiveChatAction, options);
            if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction"))
                object.deleteMessageForMeAction = $root.SyncAction.SyncActionValue.DeleteMessageForMeAction.toObject(message.deleteMessageForMeAction, options);
            if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration"))
                object.keyExpiration = $root.SyncAction.SyncActionValue.KeyExpiration.toObject(message.keyExpiration, options);
            if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction"))
                object.markChatAsReadAction = $root.SyncAction.SyncActionValue.MarkChatAsReadAction.toObject(message.markChatAsReadAction, options);
            if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction"))
                object.clearChatAction = $root.SyncAction.SyncActionValue.ClearChatAction.toObject(message.clearChatAction, options);
            if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction"))
                object.deleteChatAction = $root.SyncAction.SyncActionValue.DeleteChatAction.toObject(message.deleteChatAction, options);
            if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting"))
                object.unarchiveChatsSetting = $root.SyncAction.SyncActionValue.UnarchiveChatsSetting.toObject(message.unarchiveChatsSetting, options);
            if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature"))
                object.primaryFeature = $root.SyncAction.SyncActionValue.PrimaryFeature.toObject(message.primaryFeature, options);
            if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions"))
                object.androidUnsupportedActions = $root.SyncAction.SyncActionValue.AndroidUnsupportedActions.toObject(message.androidUnsupportedActions, options);
            if (message.agentAction != null && message.hasOwnProperty("agentAction"))
                object.agentAction = $root.SyncAction.SyncActionValue.AgentAction.toObject(message.agentAction, options);
            if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction"))
                object.subscriptionAction = $root.SyncAction.SyncActionValue.SubscriptionAction.toObject(message.subscriptionAction, options);
            if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction"))
                object.userStatusMuteAction = $root.SyncAction.SyncActionValue.UserStatusMuteAction.toObject(message.userStatusMuteAction, options);
            if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction"))
                object.timeFormatAction = $root.SyncAction.SyncActionValue.TimeFormatAction.toObject(message.timeFormatAction, options);
            if (message.nuxAction != null && message.hasOwnProperty("nuxAction"))
                object.nuxAction = $root.SyncAction.SyncActionValue.NuxAction.toObject(message.nuxAction, options);
            if (message.primaryVersionAction != null && message.hasOwnProperty("primaryVersionAction"))
                object.primaryVersionAction = $root.SyncAction.SyncActionValue.PrimaryVersionAction.toObject(message.primaryVersionAction, options);
            if (message.stickerAction != null && message.hasOwnProperty("stickerAction"))
                object.stickerAction = $root.SyncAction.SyncActionValue.StickerAction.toObject(message.stickerAction, options);
            if (message.removeRecentStickerAction != null && message.hasOwnProperty("removeRecentStickerAction"))
                object.removeRecentStickerAction = $root.SyncAction.SyncActionValue.RemoveRecentStickerAction.toObject(message.removeRecentStickerAction, options);
            if (message.chatAssignment != null && message.hasOwnProperty("chatAssignment"))
                object.chatAssignment = $root.SyncAction.SyncActionValue.ChatAssignmentAction.toObject(message.chatAssignment, options);
            if (message.chatAssignmentOpenedStatus != null && message.hasOwnProperty("chatAssignmentOpenedStatus"))
                object.chatAssignmentOpenedStatus = $root.SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction.toObject(message.chatAssignmentOpenedStatus, options);
            if (message.pnForLidChatAction != null && message.hasOwnProperty("pnForLidChatAction"))
                object.pnForLidChatAction = $root.SyncAction.SyncActionValue.PnForLidChatAction.toObject(message.pnForLidChatAction, options);
            if (message.marketingMessageAction != null && message.hasOwnProperty("marketingMessageAction"))
                object.marketingMessageAction = $root.SyncAction.SyncActionValue.MarketingMessageAction.toObject(message.marketingMessageAction, options);
            if (message.marketingMessageBroadcastAction != null && message.hasOwnProperty("marketingMessageBroadcastAction"))
                object.marketingMessageBroadcastAction = $root.SyncAction.SyncActionValue.MarketingMessageBroadcastAction.toObject(message.marketingMessageBroadcastAction, options);
            if (message.externalWebBetaAction != null && message.hasOwnProperty("externalWebBetaAction"))
                object.externalWebBetaAction = $root.SyncAction.SyncActionValue.ExternalWebBetaAction.toObject(message.externalWebBetaAction, options);
            if (message.privacySettingRelayAllCalls != null && message.hasOwnProperty("privacySettingRelayAllCalls"))
                object.privacySettingRelayAllCalls = $root.SyncAction.SyncActionValue.PrivacySettingRelayAllCalls.toObject(message.privacySettingRelayAllCalls, options);
            if (message.callLogAction != null && message.hasOwnProperty("callLogAction"))
                object.callLogAction = $root.SyncAction.SyncActionValue.CallLogAction.toObject(message.callLogAction, options);
            if (message.statusPrivacy != null && message.hasOwnProperty("statusPrivacy"))
                object.statusPrivacy = $root.SyncAction.SyncActionValue.StatusPrivacyAction.toObject(message.statusPrivacy, options);
            if (message.botWelcomeRequestAction != null && message.hasOwnProperty("botWelcomeRequestAction"))
                object.botWelcomeRequestAction = $root.SyncAction.SyncActionValue.BotWelcomeRequestAction.toObject(message.botWelcomeRequestAction, options);
            if (message.deleteIndividualCallLog != null && message.hasOwnProperty("deleteIndividualCallLog"))
                object.deleteIndividualCallLog = $root.SyncAction.SyncActionValue.DeleteIndividualCallLogAction.toObject(message.deleteIndividualCallLog, options);
            if (message.labelReorderingAction != null && message.hasOwnProperty("labelReorderingAction"))
                object.labelReorderingAction = $root.SyncAction.SyncActionValue.LabelReorderingAction.toObject(message.labelReorderingAction, options);
            if (message.paymentInfoAction != null && message.hasOwnProperty("paymentInfoAction"))
                object.paymentInfoAction = $root.SyncAction.SyncActionValue.PaymentInfoAction.toObject(message.paymentInfoAction, options);
            if (message.customPaymentMethodsAction != null && message.hasOwnProperty("customPaymentMethodsAction"))
                object.customPaymentMethodsAction = $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction.toObject(message.customPaymentMethodsAction, options);
            if (message.lockChatAction != null && message.hasOwnProperty("lockChatAction"))
                object.lockChatAction = $root.SyncAction.SyncActionValue.LockChatAction.toObject(message.lockChatAction, options);
            if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings"))
                object.chatLockSettings = $root.ChatLockSettings.ChatLockSettings.toObject(message.chatLockSettings, options);
            if (message.wamoUserIdentifierAction != null && message.hasOwnProperty("wamoUserIdentifierAction"))
                object.wamoUserIdentifierAction = $root.SyncAction.SyncActionValue.WamoUserIdentifierAction.toObject(message.wamoUserIdentifierAction, options);
            if (message.privacySettingDisableLinkPreviewsAction != null && message.hasOwnProperty("privacySettingDisableLinkPreviewsAction"))
                object.privacySettingDisableLinkPreviewsAction = $root.SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.toObject(message.privacySettingDisableLinkPreviewsAction, options);
            if (message.deviceCapabilities != null && message.hasOwnProperty("deviceCapabilities"))
                object.deviceCapabilities = $root.DeviceCapabilities.DeviceCapabilities.toObject(message.deviceCapabilities, options);
            if (message.noteEditAction != null && message.hasOwnProperty("noteEditAction"))
                object.noteEditAction = $root.SyncAction.SyncActionValue.NoteEditAction.toObject(message.noteEditAction, options);
            if (message.favoritesAction != null && message.hasOwnProperty("favoritesAction"))
                object.favoritesAction = $root.SyncAction.SyncActionValue.FavoritesAction.toObject(message.favoritesAction, options);
            if (message.merchantPaymentPartnerAction != null && message.hasOwnProperty("merchantPaymentPartnerAction"))
                object.merchantPaymentPartnerAction = $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction.toObject(message.merchantPaymentPartnerAction, options);
            if (message.waffleAccountLinkStateAction != null && message.hasOwnProperty("waffleAccountLinkStateAction"))
                object.waffleAccountLinkStateAction = $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction.toObject(message.waffleAccountLinkStateAction, options);
            if (message.usernameChatStartMode != null && message.hasOwnProperty("usernameChatStartMode"))
                object.usernameChatStartMode = $root.SyncAction.SyncActionValue.UsernameChatStartModeAction.toObject(message.usernameChatStartMode, options);
            if (message.notificationActivitySettingAction != null && message.hasOwnProperty("notificationActivitySettingAction"))
                object.notificationActivitySettingAction = $root.SyncAction.SyncActionValue.NotificationActivitySettingAction.toObject(message.notificationActivitySettingAction, options);
            if (message.lidContactAction != null && message.hasOwnProperty("lidContactAction"))
                object.lidContactAction = $root.SyncAction.SyncActionValue.LidContactAction.toObject(message.lidContactAction, options);
            if (message.ctwaPerCustomerDataSharingAction != null && message.hasOwnProperty("ctwaPerCustomerDataSharingAction"))
                object.ctwaPerCustomerDataSharingAction = $root.SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction.toObject(message.ctwaPerCustomerDataSharingAction, options);
            if (message.paymentTosAction != null && message.hasOwnProperty("paymentTosAction"))
                object.paymentTosAction = $root.SyncAction.SyncActionValue.PaymentTosAction.toObject(message.paymentTosAction, options);
            if (message.privacySettingChannelsPersonalisedRecommendationAction != null && message.hasOwnProperty("privacySettingChannelsPersonalisedRecommendationAction"))
                object.privacySettingChannelsPersonalisedRecommendationAction = $root.SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction.toObject(message.privacySettingChannelsPersonalisedRecommendationAction, options);
            if (message.businessBroadcastAssociationAction != null && message.hasOwnProperty("businessBroadcastAssociationAction"))
                object.businessBroadcastAssociationAction = $root.SyncAction.SyncActionValue.BusinessBroadcastAssociationAction.toObject(message.businessBroadcastAssociationAction, options);
            if (message.detectedOutcomesStatusAction != null && message.hasOwnProperty("detectedOutcomesStatusAction"))
                object.detectedOutcomesStatusAction = $root.SyncAction.SyncActionValue.DetectedOutcomesStatusAction.toObject(message.detectedOutcomesStatusAction, options);
            if (message.maibaAiFeaturesControlAction != null && message.hasOwnProperty("maibaAiFeaturesControlAction"))
                object.maibaAiFeaturesControlAction = $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.toObject(message.maibaAiFeaturesControlAction, options);
            if (message.businessBroadcastListAction != null && message.hasOwnProperty("businessBroadcastListAction"))
                object.businessBroadcastListAction = $root.SyncAction.SyncActionValue.BusinessBroadcastListAction.toObject(message.businessBroadcastListAction, options);
            if (message.musicUserIdAction != null && message.hasOwnProperty("musicUserIdAction"))
                object.musicUserIdAction = $root.SyncAction.SyncActionValue.MusicUserIdAction.toObject(message.musicUserIdAction, options);
            if (message.statusPostOptInNotificationPreferencesAction != null && message.hasOwnProperty("statusPostOptInNotificationPreferencesAction"))
                object.statusPostOptInNotificationPreferencesAction = $root.SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction.toObject(message.statusPostOptInNotificationPreferencesAction, options);
            if (message.avatarUpdatedAction != null && message.hasOwnProperty("avatarUpdatedAction"))
                object.avatarUpdatedAction = $root.SyncAction.SyncActionValue.AvatarUpdatedAction.toObject(message.avatarUpdatedAction, options);
            if (message.galaxyFlowAction != null && message.hasOwnProperty("galaxyFlowAction"))
                object.galaxyFlowAction = $root.SyncAction.SyncActionValue.GalaxyFlowAction.toObject(message.galaxyFlowAction, options);
            return object;
        };

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

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

        SyncActionValue.AgentAction = (function() {

            /**
             * Properties of an AgentAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IAgentAction
             * @property {string|null} [name] AgentAction name
             * @property {number|null} [deviceID] AgentAction deviceID
             * @property {boolean|null} [isDeleted] AgentAction isDeleted
             */

            /**
             * Constructs a new AgentAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents an AgentAction.
             * @implements IAgentAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IAgentAction=} [properties] Properties to set
             */
            function AgentAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * AgentAction name.
             * @member {string} name
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @instance
             */
            AgentAction.prototype.name = "";

            /**
             * AgentAction deviceID.
             * @member {number} deviceID
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @instance
             */
            AgentAction.prototype.deviceID = 0;

            /**
             * AgentAction isDeleted.
             * @member {boolean} isDeleted
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @instance
             */
            AgentAction.prototype.isDeleted = false;

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

            /**
             * Encodes the specified AgentAction message. Does not implicitly {@link SyncAction.SyncActionValue.AgentAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @static
             * @param {SyncAction.SyncActionValue.IAgentAction} message AgentAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AgentAction.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.deviceID != null && Object.hasOwnProperty.call(message, "deviceID"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceID);
                if (message.isDeleted != null && Object.hasOwnProperty.call(message, "isDeleted"))
                    writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isDeleted);
                return writer;
            };

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

            /**
             * Decodes an AgentAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.AgentAction} AgentAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AgentAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.AgentAction();
                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.deviceID = reader.int32();
                            break;
                        }
                    case 3: {
                            message.isDeleted = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies an AgentAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AgentAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.name != null && message.hasOwnProperty("name"))
                    if (!$util.isString(message.name))
                        return "name: string expected";
                if (message.deviceID != null && message.hasOwnProperty("deviceID"))
                    if (!$util.isInteger(message.deviceID))
                        return "deviceID: integer expected";
                if (message.isDeleted != null && message.hasOwnProperty("isDeleted"))
                    if (typeof message.isDeleted !== "boolean")
                        return "isDeleted: boolean expected";
                return null;
            };

            /**
             * Creates an AgentAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.AgentAction} AgentAction
             */
            AgentAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.AgentAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.AgentAction();
                if (object.name != null)
                    message.name = String(object.name);
                if (object.deviceID != null)
                    message.deviceID = object.deviceID | 0;
                if (object.isDeleted != null)
                    message.isDeleted = Boolean(object.isDeleted);
                return message;
            };

            /**
             * Creates a plain object from an AgentAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.AgentAction
             * @static
             * @param {SyncAction.SyncActionValue.AgentAction} message AgentAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AgentAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.name = "";
                    object.deviceID = 0;
                    object.isDeleted = false;
                }
                if (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.name;
                if (message.deviceID != null && message.hasOwnProperty("deviceID"))
                    object.deviceID = message.deviceID;
                if (message.isDeleted != null && message.hasOwnProperty("isDeleted"))
                    object.isDeleted = message.isDeleted;
                return object;
            };

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

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

            return AgentAction;
        })();

        SyncActionValue.AndroidUnsupportedActions = (function() {

            /**
             * Properties of an AndroidUnsupportedActions.
             * @memberof SyncAction.SyncActionValue
             * @interface IAndroidUnsupportedActions
             * @property {boolean|null} [allowed] AndroidUnsupportedActions allowed
             */

            /**
             * Constructs a new AndroidUnsupportedActions.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents an AndroidUnsupportedActions.
             * @implements IAndroidUnsupportedActions
             * @constructor
             * @param {SyncAction.SyncActionValue.IAndroidUnsupportedActions=} [properties] Properties to set
             */
            function AndroidUnsupportedActions(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * AndroidUnsupportedActions allowed.
             * @member {boolean} allowed
             * @memberof SyncAction.SyncActionValue.AndroidUnsupportedActions
             * @instance
             */
            AndroidUnsupportedActions.prototype.allowed = false;

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

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

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

            /**
             * Decodes an AndroidUnsupportedActions message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.AndroidUnsupportedActions
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.AndroidUnsupportedActions} AndroidUnsupportedActions
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidUnsupportedActions.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.AndroidUnsupportedActions();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.allowed = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return AndroidUnsupportedActions;
        })();

        SyncActionValue.ArchiveChatAction = (function() {

            /**
             * Properties of an ArchiveChatAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IArchiveChatAction
             * @property {boolean|null} [archived] ArchiveChatAction archived
             * @property {SyncAction.SyncActionValue.ISyncActionMessageRange|null} [messageRange] ArchiveChatAction messageRange
             */

            /**
             * Constructs a new ArchiveChatAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents an ArchiveChatAction.
             * @implements IArchiveChatAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IArchiveChatAction=} [properties] Properties to set
             */
            function ArchiveChatAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ArchiveChatAction archived.
             * @member {boolean} archived
             * @memberof SyncAction.SyncActionValue.ArchiveChatAction
             * @instance
             */
            ArchiveChatAction.prototype.archived = false;

            /**
             * ArchiveChatAction messageRange.
             * @member {SyncAction.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange
             * @memberof SyncAction.SyncActionValue.ArchiveChatAction
             * @instance
             */
            ArchiveChatAction.prototype.messageRange = null;

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

            /**
             * Encodes the specified ArchiveChatAction message. Does not implicitly {@link SyncAction.SyncActionValue.ArchiveChatAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.ArchiveChatAction
             * @static
             * @param {SyncAction.SyncActionValue.IArchiveChatAction} message ArchiveChatAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ArchiveChatAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.archived != null && Object.hasOwnProperty.call(message, "archived"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.archived);
                if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange"))
                    $root.SyncAction.SyncActionValue.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes an ArchiveChatAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.ArchiveChatAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.ArchiveChatAction} ArchiveChatAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ArchiveChatAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.ArchiveChatAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.archived = reader.bool();
                            break;
                        }
                    case 2: {
                            message.messageRange = $root.SyncAction.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies an ArchiveChatAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.ArchiveChatAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ArchiveChatAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.archived != null && message.hasOwnProperty("archived"))
                    if (typeof message.archived !== "boolean")
                        return "archived: boolean expected";
                if (message.messageRange != null && message.hasOwnProperty("messageRange")) {
                    var error = $root.SyncAction.SyncActionValue.SyncActionMessageRange.verify(message.messageRange);
                    if (error)
                        return "messageRange." + error;
                }
                return null;
            };

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

            /**
             * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.ArchiveChatAction
             * @static
             * @param {SyncAction.SyncActionValue.ArchiveChatAction} message ArchiveChatAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ArchiveChatAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.archived = false;
                    object.messageRange = null;
                }
                if (message.archived != null && message.hasOwnProperty("archived"))
                    object.archived = message.archived;
                if (message.messageRange != null && message.hasOwnProperty("messageRange"))
                    object.messageRange = $root.SyncAction.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options);
                return object;
            };

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

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

            return ArchiveChatAction;
        })();

        SyncActionValue.AvatarUpdatedAction = (function() {

            /**
             * Properties of an AvatarUpdatedAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IAvatarUpdatedAction
             * @property {SyncAction.SyncActionValue.AvatarUpdatedAction.AvatarEventType|null} [eventType] AvatarUpdatedAction eventType
             * @property {Array.<SyncAction.SyncActionValue.IStickerAction>|null} [recentAvatarStickers] AvatarUpdatedAction recentAvatarStickers
             */

            /**
             * Constructs a new AvatarUpdatedAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents an AvatarUpdatedAction.
             * @implements IAvatarUpdatedAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IAvatarUpdatedAction=} [properties] Properties to set
             */
            function AvatarUpdatedAction(properties) {
                this.recentAvatarStickers = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * AvatarUpdatedAction eventType.
             * @member {SyncAction.SyncActionValue.AvatarUpdatedAction.AvatarEventType} eventType
             * @memberof SyncAction.SyncActionValue.AvatarUpdatedAction
             * @instance
             */
            AvatarUpdatedAction.prototype.eventType = 0;

            /**
             * AvatarUpdatedAction recentAvatarStickers.
             * @member {Array.<SyncAction.SyncActionValue.IStickerAction>} recentAvatarStickers
             * @memberof SyncAction.SyncActionValue.AvatarUpdatedAction
             * @instance
             */
            AvatarUpdatedAction.prototype.recentAvatarStickers = $util.emptyArray;

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

            /**
             * Encodes the specified AvatarUpdatedAction message. Does not implicitly {@link SyncAction.SyncActionValue.AvatarUpdatedAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.AvatarUpdatedAction
             * @static
             * @param {SyncAction.SyncActionValue.IAvatarUpdatedAction} message AvatarUpdatedAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AvatarUpdatedAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eventType);
                if (message.recentAvatarStickers != null && message.recentAvatarStickers.length)
                    for (var i = 0; i < message.recentAvatarStickers.length; ++i)
                        $root.SyncAction.SyncActionValue.StickerAction.encode(message.recentAvatarStickers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes an AvatarUpdatedAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.AvatarUpdatedAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.AvatarUpdatedAction} AvatarUpdatedAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AvatarUpdatedAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.AvatarUpdatedAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.eventType = reader.int32();
                            break;
                        }
                    case 2: {
                            if (!(message.recentAvatarStickers && message.recentAvatarStickers.length))
                                message.recentAvatarStickers = [];
                            message.recentAvatarStickers.push($root.SyncAction.SyncActionValue.StickerAction.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies an AvatarUpdatedAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.AvatarUpdatedAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AvatarUpdatedAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.eventType != null && message.hasOwnProperty("eventType"))
                    switch (message.eventType) {
                    default:
                        return "eventType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.recentAvatarStickers != null && message.hasOwnProperty("recentAvatarStickers")) {
                    if (!Array.isArray(message.recentAvatarStickers))
                        return "recentAvatarStickers: array expected";
                    for (var i = 0; i < message.recentAvatarStickers.length; ++i) {
                        var error = $root.SyncAction.SyncActionValue.StickerAction.verify(message.recentAvatarStickers[i]);
                        if (error)
                            return "recentAvatarStickers." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an AvatarUpdatedAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.AvatarUpdatedAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.AvatarUpdatedAction} AvatarUpdatedAction
             */
            AvatarUpdatedAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.AvatarUpdatedAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.AvatarUpdatedAction();
                switch (object.eventType) {
                default:
                    if (typeof object.eventType === "number") {
                        message.eventType = object.eventType;
                        break;
                    }
                    break;
                case "UPDATED":
                case 0:
                    message.eventType = 0;
                    break;
                case "CREATED":
                case 1:
                    message.eventType = 1;
                    break;
                case "DELETED":
                case 2:
                    message.eventType = 2;
                    break;
                }
                if (object.recentAvatarStickers) {
                    if (!Array.isArray(object.recentAvatarStickers))
                        throw TypeError(".SyncAction.SyncActionValue.AvatarUpdatedAction.recentAvatarStickers: array expected");
                    message.recentAvatarStickers = [];
                    for (var i = 0; i < object.recentAvatarStickers.length; ++i) {
                        if (typeof object.recentAvatarStickers[i] !== "object")
                            throw TypeError(".SyncAction.SyncActionValue.AvatarUpdatedAction.recentAvatarStickers: object expected");
                        message.recentAvatarStickers[i] = $root.SyncAction.SyncActionValue.StickerAction.fromObject(object.recentAvatarStickers[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from an AvatarUpdatedAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.AvatarUpdatedAction
             * @static
             * @param {SyncAction.SyncActionValue.AvatarUpdatedAction} message AvatarUpdatedAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AvatarUpdatedAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.recentAvatarStickers = [];
                if (options.defaults)
                    object.eventType = options.enums === String ? "UPDATED" : 0;
                if (message.eventType != null && message.hasOwnProperty("eventType"))
                    object.eventType = options.enums === String ? $root.SyncAction.SyncActionValue.AvatarUpdatedAction.AvatarEventType[message.eventType] === undefined ? message.eventType : $root.SyncAction.SyncActionValue.AvatarUpdatedAction.AvatarEventType[message.eventType] : message.eventType;
                if (message.recentAvatarStickers && message.recentAvatarStickers.length) {
                    object.recentAvatarStickers = [];
                    for (var j = 0; j < message.recentAvatarStickers.length; ++j)
                        object.recentAvatarStickers[j] = $root.SyncAction.SyncActionValue.StickerAction.toObject(message.recentAvatarStickers[j], options);
                }
                return object;
            };

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

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

            /**
             * AvatarEventType enum.
             * @name SyncAction.SyncActionValue.AvatarUpdatedAction.AvatarEventType
             * @enum {number}
             * @property {number} UPDATED=0 UPDATED value
             * @property {number} CREATED=1 CREATED value
             * @property {number} DELETED=2 DELETED value
             */
            AvatarUpdatedAction.AvatarEventType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UPDATED"] = 0;
                values[valuesById[1] = "CREATED"] = 1;
                values[valuesById[2] = "DELETED"] = 2;
                return values;
            })();

            return AvatarUpdatedAction;
        })();

        SyncActionValue.BotWelcomeRequestAction = (function() {

            /**
             * Properties of a BotWelcomeRequestAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IBotWelcomeRequestAction
             * @property {boolean|null} [isSent] BotWelcomeRequestAction isSent
             */

            /**
             * Constructs a new BotWelcomeRequestAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a BotWelcomeRequestAction.
             * @implements IBotWelcomeRequestAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IBotWelcomeRequestAction=} [properties] Properties to set
             */
            function BotWelcomeRequestAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * BotWelcomeRequestAction isSent.
             * @member {boolean} isSent
             * @memberof SyncAction.SyncActionValue.BotWelcomeRequestAction
             * @instance
             */
            BotWelcomeRequestAction.prototype.isSent = false;

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

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

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

            /**
             * Decodes a BotWelcomeRequestAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.BotWelcomeRequestAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.BotWelcomeRequestAction} BotWelcomeRequestAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BotWelcomeRequestAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.BotWelcomeRequestAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isSent = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return BotWelcomeRequestAction;
        })();

        SyncActionValue.BroadcastListParticipant = (function() {

            /**
             * Properties of a BroadcastListParticipant.
             * @memberof SyncAction.SyncActionValue
             * @interface IBroadcastListParticipant
             * @property {string} lidJid BroadcastListParticipant lidJid
             * @property {string|null} [pnJid] BroadcastListParticipant pnJid
             */

            /**
             * Constructs a new BroadcastListParticipant.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a BroadcastListParticipant.
             * @implements IBroadcastListParticipant
             * @constructor
             * @param {SyncAction.SyncActionValue.IBroadcastListParticipant=} [properties] Properties to set
             */
            function BroadcastListParticipant(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * BroadcastListParticipant lidJid.
             * @member {string} lidJid
             * @memberof SyncAction.SyncActionValue.BroadcastListParticipant
             * @instance
             */
            BroadcastListParticipant.prototype.lidJid = "";

            /**
             * BroadcastListParticipant pnJid.
             * @member {string} pnJid
             * @memberof SyncAction.SyncActionValue.BroadcastListParticipant
             * @instance
             */
            BroadcastListParticipant.prototype.pnJid = "";

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

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

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

            /**
             * Decodes a BroadcastListParticipant message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.BroadcastListParticipant
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.BroadcastListParticipant} BroadcastListParticipant
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BroadcastListParticipant.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.BroadcastListParticipant();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.lidJid = reader.string();
                            break;
                        }
                    case 2: {
                            message.pnJid = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                if (!message.hasOwnProperty("lidJid"))
                    throw $util.ProtocolError("missing required 'lidJid'", { instance: message });
                return message;
            };

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

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

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

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

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

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

            return BroadcastListParticipant;
        })();

        SyncActionValue.BusinessBroadcastAssociationAction = (function() {

            /**
             * Properties of a BusinessBroadcastAssociationAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IBusinessBroadcastAssociationAction
             * @property {boolean|null} [deleted] BusinessBroadcastAssociationAction deleted
             */

            /**
             * Constructs a new BusinessBroadcastAssociationAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a BusinessBroadcastAssociationAction.
             * @implements IBusinessBroadcastAssociationAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IBusinessBroadcastAssociationAction=} [properties] Properties to set
             */
            function BusinessBroadcastAssociationAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * BusinessBroadcastAssociationAction deleted.
             * @member {boolean} deleted
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastAssociationAction
             * @instance
             */
            BusinessBroadcastAssociationAction.prototype.deleted = false;

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

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

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

            /**
             * Decodes a BusinessBroadcastAssociationAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastAssociationAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.BusinessBroadcastAssociationAction} BusinessBroadcastAssociationAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BusinessBroadcastAssociationAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.BusinessBroadcastAssociationAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.deleted = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return BusinessBroadcastAssociationAction;
        })();

        SyncActionValue.BusinessBroadcastListAction = (function() {

            /**
             * Properties of a BusinessBroadcastListAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IBusinessBroadcastListAction
             * @property {boolean|null} [deleted] BusinessBroadcastListAction deleted
             * @property {Array.<SyncAction.SyncActionValue.IBroadcastListParticipant>|null} [participants] BusinessBroadcastListAction participants
             * @property {string|null} [listName] BusinessBroadcastListAction listName
             */

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

            /**
             * BusinessBroadcastListAction deleted.
             * @member {boolean} deleted
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @instance
             */
            BusinessBroadcastListAction.prototype.deleted = false;

            /**
             * BusinessBroadcastListAction participants.
             * @member {Array.<SyncAction.SyncActionValue.IBroadcastListParticipant>} participants
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @instance
             */
            BusinessBroadcastListAction.prototype.participants = $util.emptyArray;

            /**
             * BusinessBroadcastListAction listName.
             * @member {string} listName
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @instance
             */
            BusinessBroadcastListAction.prototype.listName = "";

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

            /**
             * Encodes the specified BusinessBroadcastListAction message. Does not implicitly {@link SyncAction.SyncActionValue.BusinessBroadcastListAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @static
             * @param {SyncAction.SyncActionValue.IBusinessBroadcastListAction} message BusinessBroadcastListAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BusinessBroadcastListAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deleted);
                if (message.participants != null && message.participants.length)
                    for (var i = 0; i < message.participants.length; ++i)
                        $root.SyncAction.SyncActionValue.BroadcastListParticipant.encode(message.participants[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.listName != null && Object.hasOwnProperty.call(message, "listName"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.listName);
                return writer;
            };

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

            /**
             * Decodes a BusinessBroadcastListAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.BusinessBroadcastListAction} BusinessBroadcastListAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BusinessBroadcastListAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.BusinessBroadcastListAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.deleted = reader.bool();
                            break;
                        }
                    case 2: {
                            if (!(message.participants && message.participants.length))
                                message.participants = [];
                            message.participants.push($root.SyncAction.SyncActionValue.BroadcastListParticipant.decode(reader, reader.uint32()));
                            break;
                        }
                    case 3: {
                            message.listName = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a BusinessBroadcastListAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BusinessBroadcastListAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    if (typeof message.deleted !== "boolean")
                        return "deleted: boolean expected";
                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.SyncAction.SyncActionValue.BroadcastListParticipant.verify(message.participants[i]);
                        if (error)
                            return "participants." + error;
                    }
                }
                if (message.listName != null && message.hasOwnProperty("listName"))
                    if (!$util.isString(message.listName))
                        return "listName: string expected";
                return null;
            };

            /**
             * Creates a BusinessBroadcastListAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.BusinessBroadcastListAction} BusinessBroadcastListAction
             */
            BusinessBroadcastListAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.BusinessBroadcastListAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.BusinessBroadcastListAction();
                if (object.deleted != null)
                    message.deleted = Boolean(object.deleted);
                if (object.participants) {
                    if (!Array.isArray(object.participants))
                        throw TypeError(".SyncAction.SyncActionValue.BusinessBroadcastListAction.participants: array expected");
                    message.participants = [];
                    for (var i = 0; i < object.participants.length; ++i) {
                        if (typeof object.participants[i] !== "object")
                            throw TypeError(".SyncAction.SyncActionValue.BusinessBroadcastListAction.participants: object expected");
                        message.participants[i] = $root.SyncAction.SyncActionValue.BroadcastListParticipant.fromObject(object.participants[i]);
                    }
                }
                if (object.listName != null)
                    message.listName = String(object.listName);
                return message;
            };

            /**
             * Creates a plain object from a BusinessBroadcastListAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.BusinessBroadcastListAction
             * @static
             * @param {SyncAction.SyncActionValue.BusinessBroadcastListAction} message BusinessBroadcastListAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BusinessBroadcastListAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.participants = [];
                if (options.defaults) {
                    object.deleted = false;
                    object.listName = "";
                }
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    object.deleted = message.deleted;
                if (message.participants && message.participants.length) {
                    object.participants = [];
                    for (var j = 0; j < message.participants.length; ++j)
                        object.participants[j] = $root.SyncAction.SyncActionValue.BroadcastListParticipant.toObject(message.participants[j], options);
                }
                if (message.listName != null && message.hasOwnProperty("listName"))
                    object.listName = message.listName;
                return object;
            };

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

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

            return BusinessBroadcastListAction;
        })();

        SyncActionValue.CallLogAction = (function() {

            /**
             * Properties of a CallLogAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ICallLogAction
             * @property {SyncAction.ICallLogRecord|null} [callLogRecord] CallLogAction callLogRecord
             */

            /**
             * Constructs a new CallLogAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a CallLogAction.
             * @implements ICallLogAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ICallLogAction=} [properties] Properties to set
             */
            function CallLogAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * CallLogAction callLogRecord.
             * @member {SyncAction.ICallLogRecord|null|undefined} callLogRecord
             * @memberof SyncAction.SyncActionValue.CallLogAction
             * @instance
             */
            CallLogAction.prototype.callLogRecord = null;

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

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

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

            /**
             * Decodes a CallLogAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.CallLogAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.CallLogAction} CallLogAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CallLogAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.CallLogAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.callLogRecord = $root.SyncAction.CallLogRecord.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a CallLogAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.CallLogAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CallLogAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.callLogRecord != null && message.hasOwnProperty("callLogRecord")) {
                    var error = $root.SyncAction.CallLogRecord.verify(message.callLogRecord);
                    if (error)
                        return "callLogRecord." + error;
                }
                return null;
            };

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

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

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

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

            return CallLogAction;
        })();

        SyncActionValue.ChatAssignmentAction = (function() {

            /**
             * Properties of a ChatAssignmentAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IChatAssignmentAction
             * @property {string|null} [deviceAgentID] ChatAssignmentAction deviceAgentID
             */

            /**
             * Constructs a new ChatAssignmentAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a ChatAssignmentAction.
             * @implements IChatAssignmentAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IChatAssignmentAction=} [properties] Properties to set
             */
            function ChatAssignmentAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ChatAssignmentAction deviceAgentID.
             * @member {string} deviceAgentID
             * @memberof SyncAction.SyncActionValue.ChatAssignmentAction
             * @instance
             */
            ChatAssignmentAction.prototype.deviceAgentID = "";

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

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

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

            /**
             * Decodes a ChatAssignmentAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.ChatAssignmentAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.ChatAssignmentAction} ChatAssignmentAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChatAssignmentAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.ChatAssignmentAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.deviceAgentID = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return ChatAssignmentAction;
        })();

        SyncActionValue.ChatAssignmentOpenedStatusAction = (function() {

            /**
             * Properties of a ChatAssignmentOpenedStatusAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IChatAssignmentOpenedStatusAction
             * @property {boolean|null} [chatOpened] ChatAssignmentOpenedStatusAction chatOpened
             */

            /**
             * Constructs a new ChatAssignmentOpenedStatusAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a ChatAssignmentOpenedStatusAction.
             * @implements IChatAssignmentOpenedStatusAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IChatAssignmentOpenedStatusAction=} [properties] Properties to set
             */
            function ChatAssignmentOpenedStatusAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ChatAssignmentOpenedStatusAction chatOpened.
             * @member {boolean} chatOpened
             * @memberof SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction
             * @instance
             */
            ChatAssignmentOpenedStatusAction.prototype.chatOpened = false;

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

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

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

            /**
             * Decodes a ChatAssignmentOpenedStatusAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction} ChatAssignmentOpenedStatusAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChatAssignmentOpenedStatusAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.ChatAssignmentOpenedStatusAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.chatOpened = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return ChatAssignmentOpenedStatusAction;
        })();

        SyncActionValue.ClearChatAction = (function() {

            /**
             * Properties of a ClearChatAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IClearChatAction
             * @property {SyncAction.SyncActionValue.ISyncActionMessageRange|null} [messageRange] ClearChatAction messageRange
             */

            /**
             * Constructs a new ClearChatAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a ClearChatAction.
             * @implements IClearChatAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IClearChatAction=} [properties] Properties to set
             */
            function ClearChatAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ClearChatAction messageRange.
             * @member {SyncAction.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange
             * @memberof SyncAction.SyncActionValue.ClearChatAction
             * @instance
             */
            ClearChatAction.prototype.messageRange = null;

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

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

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

            /**
             * Decodes a ClearChatAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.ClearChatAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.ClearChatAction} ClearChatAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClearChatAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.ClearChatAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.messageRange = $root.SyncAction.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a ClearChatAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.ClearChatAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClearChatAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.messageRange != null && message.hasOwnProperty("messageRange")) {
                    var error = $root.SyncAction.SyncActionValue.SyncActionMessageRange.verify(message.messageRange);
                    if (error)
                        return "messageRange." + error;
                }
                return null;
            };

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

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

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

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

            return ClearChatAction;
        })();

        SyncActionValue.ContactAction = (function() {

            /**
             * Properties of a ContactAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IContactAction
             * @property {string|null} [fullName] ContactAction fullName
             * @property {string|null} [firstName] ContactAction firstName
             * @property {string|null} [lidJid] ContactAction lidJid
             * @property {boolean|null} [saveOnPrimaryAddressbook] ContactAction saveOnPrimaryAddressbook
             * @property {string|null} [pnJid] ContactAction pnJid
             * @property {string|null} [username] ContactAction username
             */

            /**
             * Constructs a new ContactAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a ContactAction.
             * @implements IContactAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IContactAction=} [properties] Properties to set
             */
            function ContactAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ContactAction fullName.
             * @member {string} fullName
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @instance
             */
            ContactAction.prototype.fullName = "";

            /**
             * ContactAction firstName.
             * @member {string} firstName
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @instance
             */
            ContactAction.prototype.firstName = "";

            /**
             * ContactAction lidJid.
             * @member {string} lidJid
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @instance
             */
            ContactAction.prototype.lidJid = "";

            /**
             * ContactAction saveOnPrimaryAddressbook.
             * @member {boolean} saveOnPrimaryAddressbook
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @instance
             */
            ContactAction.prototype.saveOnPrimaryAddressbook = false;

            /**
             * ContactAction pnJid.
             * @member {string} pnJid
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @instance
             */
            ContactAction.prototype.pnJid = "";

            /**
             * ContactAction username.
             * @member {string} username
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @instance
             */
            ContactAction.prototype.username = "";

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

            /**
             * Encodes the specified ContactAction message. Does not implicitly {@link SyncAction.SyncActionValue.ContactAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @static
             * @param {SyncAction.SyncActionValue.IContactAction} message ContactAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ContactAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullName);
                if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.firstName);
                if (message.lidJid != null && Object.hasOwnProperty.call(message, "lidJid"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.lidJid);
                if (message.saveOnPrimaryAddressbook != null && Object.hasOwnProperty.call(message, "saveOnPrimaryAddressbook"))
                    writer.uint32(/* id 4, wireType 0 =*/32).bool(message.saveOnPrimaryAddressbook);
                if (message.pnJid != null && Object.hasOwnProperty.call(message, "pnJid"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.pnJid);
                if (message.username != null && Object.hasOwnProperty.call(message, "username"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.username);
                return writer;
            };

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

            /**
             * Decodes a ContactAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.ContactAction} ContactAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ContactAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.ContactAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.fullName = reader.string();
                            break;
                        }
                    case 2: {
                            message.firstName = reader.string();
                            break;
                        }
                    case 3: {
                            message.lidJid = reader.string();
                            break;
                        }
                    case 4: {
                            message.saveOnPrimaryAddressbook = reader.bool();
                            break;
                        }
                    case 5: {
                            message.pnJid = reader.string();
                            break;
                        }
                    case 6: {
                            message.username = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a ContactAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ContactAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.fullName != null && message.hasOwnProperty("fullName"))
                    if (!$util.isString(message.fullName))
                        return "fullName: string expected";
                if (message.firstName != null && message.hasOwnProperty("firstName"))
                    if (!$util.isString(message.firstName))
                        return "firstName: string expected";
                if (message.lidJid != null && message.hasOwnProperty("lidJid"))
                    if (!$util.isString(message.lidJid))
                        return "lidJid: string expected";
                if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook"))
                    if (typeof message.saveOnPrimaryAddressbook !== "boolean")
                        return "saveOnPrimaryAddressbook: boolean expected";
                if (message.pnJid != null && message.hasOwnProperty("pnJid"))
                    if (!$util.isString(message.pnJid))
                        return "pnJid: string expected";
                if (message.username != null && message.hasOwnProperty("username"))
                    if (!$util.isString(message.username))
                        return "username: string expected";
                return null;
            };

            /**
             * Creates a ContactAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.ContactAction} ContactAction
             */
            ContactAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.ContactAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.ContactAction();
                if (object.fullName != null)
                    message.fullName = String(object.fullName);
                if (object.firstName != null)
                    message.firstName = String(object.firstName);
                if (object.lidJid != null)
                    message.lidJid = String(object.lidJid);
                if (object.saveOnPrimaryAddressbook != null)
                    message.saveOnPrimaryAddressbook = Boolean(object.saveOnPrimaryAddressbook);
                if (object.pnJid != null)
                    message.pnJid = String(object.pnJid);
                if (object.username != null)
                    message.username = String(object.username);
                return message;
            };

            /**
             * Creates a plain object from a ContactAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.ContactAction
             * @static
             * @param {SyncAction.SyncActionValue.ContactAction} message ContactAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ContactAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.fullName = "";
                    object.firstName = "";
                    object.lidJid = "";
                    object.saveOnPrimaryAddressbook = false;
                    object.pnJid = "";
                    object.username = "";
                }
                if (message.fullName != null && message.hasOwnProperty("fullName"))
                    object.fullName = message.fullName;
                if (message.firstName != null && message.hasOwnProperty("firstName"))
                    object.firstName = message.firstName;
                if (message.lidJid != null && message.hasOwnProperty("lidJid"))
                    object.lidJid = message.lidJid;
                if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook"))
                    object.saveOnPrimaryAddressbook = message.saveOnPrimaryAddressbook;
                if (message.pnJid != null && message.hasOwnProperty("pnJid"))
                    object.pnJid = message.pnJid;
                if (message.username != null && message.hasOwnProperty("username"))
                    object.username = message.username;
                return object;
            };

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

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

            return ContactAction;
        })();

        SyncActionValue.CtwaPerCustomerDataSharingAction = (function() {

            /**
             * Properties of a CtwaPerCustomerDataSharingAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ICtwaPerCustomerDataSharingAction
             * @property {boolean|null} [isCtwaPerCustomerDataSharingEnabled] CtwaPerCustomerDataSharingAction isCtwaPerCustomerDataSharingEnabled
             */

            /**
             * Constructs a new CtwaPerCustomerDataSharingAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a CtwaPerCustomerDataSharingAction.
             * @implements ICtwaPerCustomerDataSharingAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ICtwaPerCustomerDataSharingAction=} [properties] Properties to set
             */
            function CtwaPerCustomerDataSharingAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * CtwaPerCustomerDataSharingAction isCtwaPerCustomerDataSharingEnabled.
             * @member {boolean} isCtwaPerCustomerDataSharingEnabled
             * @memberof SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction
             * @instance
             */
            CtwaPerCustomerDataSharingAction.prototype.isCtwaPerCustomerDataSharingEnabled = false;

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

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

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

            /**
             * Decodes a CtwaPerCustomerDataSharingAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction} CtwaPerCustomerDataSharingAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CtwaPerCustomerDataSharingAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.CtwaPerCustomerDataSharingAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isCtwaPerCustomerDataSharingEnabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return CtwaPerCustomerDataSharingAction;
        })();

        SyncActionValue.CustomPaymentMethod = (function() {

            /**
             * Properties of a CustomPaymentMethod.
             * @memberof SyncAction.SyncActionValue
             * @interface ICustomPaymentMethod
             * @property {string} credentialId CustomPaymentMethod credentialId
             * @property {string} country CustomPaymentMethod country
             * @property {string} type CustomPaymentMethod type
             * @property {Array.<SyncAction.SyncActionValue.ICustomPaymentMethodMetadata>|null} [metadata] CustomPaymentMethod metadata
             */

            /**
             * Constructs a new CustomPaymentMethod.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a CustomPaymentMethod.
             * @implements ICustomPaymentMethod
             * @constructor
             * @param {SyncAction.SyncActionValue.ICustomPaymentMethod=} [properties] Properties to set
             */
            function CustomPaymentMethod(properties) {
                this.metadata = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * CustomPaymentMethod credentialId.
             * @member {string} credentialId
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @instance
             */
            CustomPaymentMethod.prototype.credentialId = "";

            /**
             * CustomPaymentMethod country.
             * @member {string} country
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @instance
             */
            CustomPaymentMethod.prototype.country = "";

            /**
             * CustomPaymentMethod type.
             * @member {string} type
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @instance
             */
            CustomPaymentMethod.prototype.type = "";

            /**
             * CustomPaymentMethod metadata.
             * @member {Array.<SyncAction.SyncActionValue.ICustomPaymentMethodMetadata>} metadata
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @instance
             */
            CustomPaymentMethod.prototype.metadata = $util.emptyArray;

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

            /**
             * Encodes the specified CustomPaymentMethod message. Does not implicitly {@link SyncAction.SyncActionValue.CustomPaymentMethod.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @static
             * @param {SyncAction.SyncActionValue.ICustomPaymentMethod} message CustomPaymentMethod message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CustomPaymentMethod.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.credentialId);
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.country);
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.type);
                if (message.metadata != null && message.metadata.length)
                    for (var i = 0; i < message.metadata.length; ++i)
                        $root.SyncAction.SyncActionValue.CustomPaymentMethodMetadata.encode(message.metadata[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes a CustomPaymentMethod message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.CustomPaymentMethod} CustomPaymentMethod
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CustomPaymentMethod.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.CustomPaymentMethod();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.credentialId = reader.string();
                            break;
                        }
                    case 2: {
                            message.country = reader.string();
                            break;
                        }
                    case 3: {
                            message.type = reader.string();
                            break;
                        }
                    case 4: {
                            if (!(message.metadata && message.metadata.length))
                                message.metadata = [];
                            message.metadata.push($root.SyncAction.SyncActionValue.CustomPaymentMethodMetadata.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                if (!message.hasOwnProperty("credentialId"))
                    throw $util.ProtocolError("missing required 'credentialId'", { instance: message });
                if (!message.hasOwnProperty("country"))
                    throw $util.ProtocolError("missing required 'country'", { instance: message });
                if (!message.hasOwnProperty("type"))
                    throw $util.ProtocolError("missing required 'type'", { instance: message });
                return message;
            };

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

            /**
             * Verifies a CustomPaymentMethod message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CustomPaymentMethod.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (!$util.isString(message.credentialId))
                    return "credentialId: string expected";
                if (!$util.isString(message.country))
                    return "country: string expected";
                if (!$util.isString(message.type))
                    return "type: string expected";
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    if (!Array.isArray(message.metadata))
                        return "metadata: array expected";
                    for (var i = 0; i < message.metadata.length; ++i) {
                        var error = $root.SyncAction.SyncActionValue.CustomPaymentMethodMetadata.verify(message.metadata[i]);
                        if (error)
                            return "metadata." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a CustomPaymentMethod message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.CustomPaymentMethod} CustomPaymentMethod
             */
            CustomPaymentMethod.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.CustomPaymentMethod)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.CustomPaymentMethod();
                if (object.credentialId != null)
                    message.credentialId = String(object.credentialId);
                if (object.country != null)
                    message.country = String(object.country);
                if (object.type != null)
                    message.type = String(object.type);
                if (object.metadata) {
                    if (!Array.isArray(object.metadata))
                        throw TypeError(".SyncAction.SyncActionValue.CustomPaymentMethod.metadata: array expected");
                    message.metadata = [];
                    for (var i = 0; i < object.metadata.length; ++i) {
                        if (typeof object.metadata[i] !== "object")
                            throw TypeError(".SyncAction.SyncActionValue.CustomPaymentMethod.metadata: object expected");
                        message.metadata[i] = $root.SyncAction.SyncActionValue.CustomPaymentMethodMetadata.fromObject(object.metadata[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a CustomPaymentMethod message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethod
             * @static
             * @param {SyncAction.SyncActionValue.CustomPaymentMethod} message CustomPaymentMethod
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CustomPaymentMethod.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.metadata = [];
                if (options.defaults) {
                    object.credentialId = "";
                    object.country = "";
                    object.type = "";
                }
                if (message.credentialId != null && message.hasOwnProperty("credentialId"))
                    object.credentialId = message.credentialId;
                if (message.country != null && message.hasOwnProperty("country"))
                    object.country = message.country;
                if (message.type != null && message.hasOwnProperty("type"))
                    object.type = message.type;
                if (message.metadata && message.metadata.length) {
                    object.metadata = [];
                    for (var j = 0; j < message.metadata.length; ++j)
                        object.metadata[j] = $root.SyncAction.SyncActionValue.CustomPaymentMethodMetadata.toObject(message.metadata[j], options);
                }
                return object;
            };

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

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

            return CustomPaymentMethod;
        })();

        SyncActionValue.CustomPaymentMethodMetadata = (function() {

            /**
             * Properties of a CustomPaymentMethodMetadata.
             * @memberof SyncAction.SyncActionValue
             * @interface ICustomPaymentMethodMetadata
             * @property {string} key CustomPaymentMethodMetadata key
             * @property {string} value CustomPaymentMethodMetadata value
             */

            /**
             * Constructs a new CustomPaymentMethodMetadata.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a CustomPaymentMethodMetadata.
             * @implements ICustomPaymentMethodMetadata
             * @constructor
             * @param {SyncAction.SyncActionValue.ICustomPaymentMethodMetadata=} [properties] Properties to set
             */
            function CustomPaymentMethodMetadata(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * CustomPaymentMethodMetadata key.
             * @member {string} key
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodMetadata
             * @instance
             */
            CustomPaymentMethodMetadata.prototype.key = "";

            /**
             * CustomPaymentMethodMetadata value.
             * @member {string} value
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodMetadata
             * @instance
             */
            CustomPaymentMethodMetadata.prototype.value = "";

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

            /**
             * Encodes the specified CustomPaymentMethodMetadata message. Does not implicitly {@link SyncAction.SyncActionValue.CustomPaymentMethodMetadata.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodMetadata
             * @static
             * @param {SyncAction.SyncActionValue.ICustomPaymentMethodMetadata} message CustomPaymentMethodMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CustomPaymentMethodMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                return writer;
            };

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

            /**
             * Decodes a CustomPaymentMethodMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.CustomPaymentMethodMetadata} CustomPaymentMethodMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CustomPaymentMethodMetadata.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.CustomPaymentMethodMetadata();
                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.value = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                if (!message.hasOwnProperty("key"))
                    throw $util.ProtocolError("missing required 'key'", { instance: message });
                if (!message.hasOwnProperty("value"))
                    throw $util.ProtocolError("missing required 'value'", { instance: message });
                return message;
            };

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

            /**
             * Verifies a CustomPaymentMethodMetadata message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CustomPaymentMethodMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (!$util.isString(message.key))
                    return "key: string expected";
                if (!$util.isString(message.value))
                    return "value: string expected";
                return null;
            };

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

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

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

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

            return CustomPaymentMethodMetadata;
        })();

        SyncActionValue.CustomPaymentMethodsAction = (function() {

            /**
             * Properties of a CustomPaymentMethodsAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ICustomPaymentMethodsAction
             * @property {Array.<SyncAction.SyncActionValue.ICustomPaymentMethod>|null} [customPaymentMethods] CustomPaymentMethodsAction customPaymentMethods
             */

            /**
             * Constructs a new CustomPaymentMethodsAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a CustomPaymentMethodsAction.
             * @implements ICustomPaymentMethodsAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ICustomPaymentMethodsAction=} [properties] Properties to set
             */
            function CustomPaymentMethodsAction(properties) {
                this.customPaymentMethods = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * CustomPaymentMethodsAction customPaymentMethods.
             * @member {Array.<SyncAction.SyncActionValue.ICustomPaymentMethod>} customPaymentMethods
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodsAction
             * @instance
             */
            CustomPaymentMethodsAction.prototype.customPaymentMethods = $util.emptyArray;

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

            /**
             * Encodes the specified CustomPaymentMethodsAction message. Does not implicitly {@link SyncAction.SyncActionValue.CustomPaymentMethodsAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodsAction
             * @static
             * @param {SyncAction.SyncActionValue.ICustomPaymentMethodsAction} message CustomPaymentMethodsAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CustomPaymentMethodsAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.customPaymentMethods != null && message.customPaymentMethods.length)
                    for (var i = 0; i < message.customPaymentMethods.length; ++i)
                        $root.SyncAction.SyncActionValue.CustomPaymentMethod.encode(message.customPaymentMethods[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes a CustomPaymentMethodsAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodsAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.CustomPaymentMethodsAction} CustomPaymentMethodsAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CustomPaymentMethodsAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.customPaymentMethods && message.customPaymentMethods.length))
                                message.customPaymentMethods = [];
                            message.customPaymentMethods.push($root.SyncAction.SyncActionValue.CustomPaymentMethod.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a CustomPaymentMethodsAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodsAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CustomPaymentMethodsAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.customPaymentMethods != null && message.hasOwnProperty("customPaymentMethods")) {
                    if (!Array.isArray(message.customPaymentMethods))
                        return "customPaymentMethods: array expected";
                    for (var i = 0; i < message.customPaymentMethods.length; ++i) {
                        var error = $root.SyncAction.SyncActionValue.CustomPaymentMethod.verify(message.customPaymentMethods[i]);
                        if (error)
                            return "customPaymentMethods." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a CustomPaymentMethodsAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodsAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.CustomPaymentMethodsAction} CustomPaymentMethodsAction
             */
            CustomPaymentMethodsAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.CustomPaymentMethodsAction();
                if (object.customPaymentMethods) {
                    if (!Array.isArray(object.customPaymentMethods))
                        throw TypeError(".SyncAction.SyncActionValue.CustomPaymentMethodsAction.customPaymentMethods: array expected");
                    message.customPaymentMethods = [];
                    for (var i = 0; i < object.customPaymentMethods.length; ++i) {
                        if (typeof object.customPaymentMethods[i] !== "object")
                            throw TypeError(".SyncAction.SyncActionValue.CustomPaymentMethodsAction.customPaymentMethods: object expected");
                        message.customPaymentMethods[i] = $root.SyncAction.SyncActionValue.CustomPaymentMethod.fromObject(object.customPaymentMethods[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a CustomPaymentMethodsAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.CustomPaymentMethodsAction
             * @static
             * @param {SyncAction.SyncActionValue.CustomPaymentMethodsAction} message CustomPaymentMethodsAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CustomPaymentMethodsAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.customPaymentMethods = [];
                if (message.customPaymentMethods && message.customPaymentMethods.length) {
                    object.customPaymentMethods = [];
                    for (var j = 0; j < message.customPaymentMethods.length; ++j)
                        object.customPaymentMethods[j] = $root.SyncAction.SyncActionValue.CustomPaymentMethod.toObject(message.customPaymentMethods[j], options);
                }
                return object;
            };

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

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

            return CustomPaymentMethodsAction;
        })();

        SyncActionValue.DeleteChatAction = (function() {

            /**
             * Properties of a DeleteChatAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IDeleteChatAction
             * @property {SyncAction.SyncActionValue.ISyncActionMessageRange|null} [messageRange] DeleteChatAction messageRange
             */

            /**
             * Constructs a new DeleteChatAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a DeleteChatAction.
             * @implements IDeleteChatAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IDeleteChatAction=} [properties] Properties to set
             */
            function DeleteChatAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * DeleteChatAction messageRange.
             * @member {SyncAction.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange
             * @memberof SyncAction.SyncActionValue.DeleteChatAction
             * @instance
             */
            DeleteChatAction.prototype.messageRange = null;

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

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

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

            /**
             * Decodes a DeleteChatAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.DeleteChatAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.DeleteChatAction} DeleteChatAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeleteChatAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.DeleteChatAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.messageRange = $root.SyncAction.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a DeleteChatAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.DeleteChatAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DeleteChatAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.messageRange != null && message.hasOwnProperty("messageRange")) {
                    var error = $root.SyncAction.SyncActionValue.SyncActionMessageRange.verify(message.messageRange);
                    if (error)
                        return "messageRange." + error;
                }
                return null;
            };

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

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

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

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

            return DeleteChatAction;
        })();

        SyncActionValue.DeleteIndividualCallLogAction = (function() {

            /**
             * Properties of a DeleteIndividualCallLogAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IDeleteIndividualCallLogAction
             * @property {string|null} [peerJid] DeleteIndividualCallLogAction peerJid
             * @property {boolean|null} [isIncoming] DeleteIndividualCallLogAction isIncoming
             */

            /**
             * Constructs a new DeleteIndividualCallLogAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a DeleteIndividualCallLogAction.
             * @implements IDeleteIndividualCallLogAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IDeleteIndividualCallLogAction=} [properties] Properties to set
             */
            function DeleteIndividualCallLogAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * DeleteIndividualCallLogAction peerJid.
             * @member {string} peerJid
             * @memberof SyncAction.SyncActionValue.DeleteIndividualCallLogAction
             * @instance
             */
            DeleteIndividualCallLogAction.prototype.peerJid = "";

            /**
             * DeleteIndividualCallLogAction isIncoming.
             * @member {boolean} isIncoming
             * @memberof SyncAction.SyncActionValue.DeleteIndividualCallLogAction
             * @instance
             */
            DeleteIndividualCallLogAction.prototype.isIncoming = false;

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

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

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

            /**
             * Decodes a DeleteIndividualCallLogAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.DeleteIndividualCallLogAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.DeleteIndividualCallLogAction} DeleteIndividualCallLogAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeleteIndividualCallLogAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.DeleteIndividualCallLogAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.peerJid = reader.string();
                            break;
                        }
                    case 2: {
                            message.isIncoming = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a DeleteIndividualCallLogAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.DeleteIndividualCallLogAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DeleteIndividualCallLogAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.peerJid != null && message.hasOwnProperty("peerJid"))
                    if (!$util.isString(message.peerJid))
                        return "peerJid: string expected";
                if (message.isIncoming != null && message.hasOwnProperty("isIncoming"))
                    if (typeof message.isIncoming !== "boolean")
                        return "isIncoming: boolean expected";
                return null;
            };

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

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

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

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

            return DeleteIndividualCallLogAction;
        })();

        SyncActionValue.DeleteMessageForMeAction = (function() {

            /**
             * Properties of a DeleteMessageForMeAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IDeleteMessageForMeAction
             * @property {boolean|null} [deleteMedia] DeleteMessageForMeAction deleteMedia
             * @property {number|Long|null} [messageTimestamp] DeleteMessageForMeAction messageTimestamp
             */

            /**
             * Constructs a new DeleteMessageForMeAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a DeleteMessageForMeAction.
             * @implements IDeleteMessageForMeAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IDeleteMessageForMeAction=} [properties] Properties to set
             */
            function DeleteMessageForMeAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * DeleteMessageForMeAction deleteMedia.
             * @member {boolean} deleteMedia
             * @memberof SyncAction.SyncActionValue.DeleteMessageForMeAction
             * @instance
             */
            DeleteMessageForMeAction.prototype.deleteMedia = false;

            /**
             * DeleteMessageForMeAction messageTimestamp.
             * @member {number|Long} messageTimestamp
             * @memberof SyncAction.SyncActionValue.DeleteMessageForMeAction
             * @instance
             */
            DeleteMessageForMeAction.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

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

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

            /**
             * Decodes a DeleteMessageForMeAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.DeleteMessageForMeAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.DeleteMessageForMeAction} DeleteMessageForMeAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeleteMessageForMeAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.DeleteMessageForMeAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.deleteMedia = reader.bool();
                            break;
                        }
                    case 2: {
                            message.messageTimestamp = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a DeleteMessageForMeAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.DeleteMessageForMeAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DeleteMessageForMeAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia"))
                    if (typeof message.deleteMedia !== "boolean")
                        return "deleteMedia: boolean expected";
                if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp"))
                    if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high)))
                        return "messageTimestamp: integer|Long expected";
                return null;
            };

            /**
             * Creates a DeleteMessageForMeAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.DeleteMessageForMeAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.DeleteMessageForMeAction} DeleteMessageForMeAction
             */
            DeleteMessageForMeAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.DeleteMessageForMeAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.DeleteMessageForMeAction();
                if (object.deleteMedia != null)
                    message.deleteMedia = Boolean(object.deleteMedia);
                if (object.messageTimestamp != null)
                    if ($util.Long)
                        (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = false;
                    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();
                return message;
            };

            /**
             * Creates a plain object from a DeleteMessageForMeAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.DeleteMessageForMeAction
             * @static
             * @param {SyncAction.SyncActionValue.DeleteMessageForMeAction} message DeleteMessageForMeAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DeleteMessageForMeAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.deleteMedia = false;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.messageTimestamp = options.longs === String ? "0" : 0;
                }
                if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia"))
                    object.deleteMedia = message.deleteMedia;
                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() : message.messageTimestamp;
                return object;
            };

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

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

            return DeleteMessageForMeAction;
        })();

        SyncActionValue.DetectedOutcomesStatusAction = (function() {

            /**
             * Properties of a DetectedOutcomesStatusAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IDetectedOutcomesStatusAction
             * @property {boolean|null} [isEnabled] DetectedOutcomesStatusAction isEnabled
             */

            /**
             * Constructs a new DetectedOutcomesStatusAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a DetectedOutcomesStatusAction.
             * @implements IDetectedOutcomesStatusAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IDetectedOutcomesStatusAction=} [properties] Properties to set
             */
            function DetectedOutcomesStatusAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * DetectedOutcomesStatusAction isEnabled.
             * @member {boolean} isEnabled
             * @memberof SyncAction.SyncActionValue.DetectedOutcomesStatusAction
             * @instance
             */
            DetectedOutcomesStatusAction.prototype.isEnabled = false;

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

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

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

            /**
             * Decodes a DetectedOutcomesStatusAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.DetectedOutcomesStatusAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.DetectedOutcomesStatusAction} DetectedOutcomesStatusAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DetectedOutcomesStatusAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.DetectedOutcomesStatusAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isEnabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return DetectedOutcomesStatusAction;
        })();

        SyncActionValue.ExternalWebBetaAction = (function() {

            /**
             * Properties of an ExternalWebBetaAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IExternalWebBetaAction
             * @property {boolean|null} [isOptIn] ExternalWebBetaAction isOptIn
             */

            /**
             * Constructs a new ExternalWebBetaAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents an ExternalWebBetaAction.
             * @implements IExternalWebBetaAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IExternalWebBetaAction=} [properties] Properties to set
             */
            function ExternalWebBetaAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ExternalWebBetaAction isOptIn.
             * @member {boolean} isOptIn
             * @memberof SyncAction.SyncActionValue.ExternalWebBetaAction
             * @instance
             */
            ExternalWebBetaAction.prototype.isOptIn = false;

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

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

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

            /**
             * Decodes an ExternalWebBetaAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.ExternalWebBetaAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.ExternalWebBetaAction} ExternalWebBetaAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExternalWebBetaAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.ExternalWebBetaAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isOptIn = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return ExternalWebBetaAction;
        })();

        SyncActionValue.FavoritesAction = (function() {

            /**
             * Properties of a FavoritesAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IFavoritesAction
             * @property {Array.<SyncAction.SyncActionValue.FavoritesAction.IFavorite>|null} [favorites] FavoritesAction favorites
             */

            /**
             * Constructs a new FavoritesAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a FavoritesAction.
             * @implements IFavoritesAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IFavoritesAction=} [properties] Properties to set
             */
            function FavoritesAction(properties) {
                this.favorites = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * FavoritesAction favorites.
             * @member {Array.<SyncAction.SyncActionValue.FavoritesAction.IFavorite>} favorites
             * @memberof SyncAction.SyncActionValue.FavoritesAction
             * @instance
             */
            FavoritesAction.prototype.favorites = $util.emptyArray;

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

            /**
             * Encodes the specified FavoritesAction message. Does not implicitly {@link SyncAction.SyncActionValue.FavoritesAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.FavoritesAction
             * @static
             * @param {SyncAction.SyncActionValue.IFavoritesAction} message FavoritesAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FavoritesAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.favorites != null && message.favorites.length)
                    for (var i = 0; i < message.favorites.length; ++i)
                        $root.SyncAction.SyncActionValue.FavoritesAction.Favorite.encode(message.favorites[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes a FavoritesAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.FavoritesAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.FavoritesAction} FavoritesAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FavoritesAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.FavoritesAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.favorites && message.favorites.length))
                                message.favorites = [];
                            message.favorites.push($root.SyncAction.SyncActionValue.FavoritesAction.Favorite.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a FavoritesAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.FavoritesAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FavoritesAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.favorites != null && message.hasOwnProperty("favorites")) {
                    if (!Array.isArray(message.favorites))
                        return "favorites: array expected";
                    for (var i = 0; i < message.favorites.length; ++i) {
                        var error = $root.SyncAction.SyncActionValue.FavoritesAction.Favorite.verify(message.favorites[i]);
                        if (error)
                            return "favorites." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a FavoritesAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.FavoritesAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.FavoritesAction} FavoritesAction
             */
            FavoritesAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.FavoritesAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.FavoritesAction();
                if (object.favorites) {
                    if (!Array.isArray(object.favorites))
                        throw TypeError(".SyncAction.SyncActionValue.FavoritesAction.favorites: array expected");
                    message.favorites = [];
                    for (var i = 0; i < object.favorites.length; ++i) {
                        if (typeof object.favorites[i] !== "object")
                            throw TypeError(".SyncAction.SyncActionValue.FavoritesAction.favorites: object expected");
                        message.favorites[i] = $root.SyncAction.SyncActionValue.FavoritesAction.Favorite.fromObject(object.favorites[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a FavoritesAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.FavoritesAction
             * @static
             * @param {SyncAction.SyncActionValue.FavoritesAction} message FavoritesAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FavoritesAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.favorites = [];
                if (message.favorites && message.favorites.length) {
                    object.favorites = [];
                    for (var j = 0; j < message.favorites.length; ++j)
                        object.favorites[j] = $root.SyncAction.SyncActionValue.FavoritesAction.Favorite.toObject(message.favorites[j], options);
                }
                return object;
            };

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

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

            FavoritesAction.Favorite = (function() {

                /**
                 * Properties of a Favorite.
                 * @memberof SyncAction.SyncActionValue.FavoritesAction
                 * @interface IFavorite
                 * @property {string|null} [id] Favorite id
                 */

                /**
                 * Constructs a new Favorite.
                 * @memberof SyncAction.SyncActionValue.FavoritesAction
                 * @classdesc Represents a Favorite.
                 * @implements IFavorite
                 * @constructor
                 * @param {SyncAction.SyncActionValue.FavoritesAction.IFavorite=} [properties] Properties to set
                 */
                function Favorite(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }

                /**
                 * Favorite id.
                 * @member {string} id
                 * @memberof SyncAction.SyncActionValue.FavoritesAction.Favorite
                 * @instance
                 */
                Favorite.prototype.id = "";

                /**
                 * Creates a new Favorite instance using the specified properties.
                 * @function create
                 * @memberof SyncAction.SyncActionValue.FavoritesAction.Favorite
                 * @static
                 * @param {SyncAction.SyncActionValue.FavoritesAction.IFavorite=} [properties] Properties to set
                 * @returns {SyncAction.SyncActionValue.FavoritesAction.Favorite} Favorite instance
                 */
                Favorite.create = function create(properties) {
                    return new Favorite(properties);
                };

                /**
                 * Encodes the specified Favorite message. Does not implicitly {@link SyncAction.SyncActionValue.FavoritesAction.Favorite.verify|verify} messages.
                 * @function encode
                 * @memberof SyncAction.SyncActionValue.FavoritesAction.Favorite
                 * @static
                 * @param {SyncAction.SyncActionValue.FavoritesAction.IFavorite} message Favorite message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Favorite.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);
                    return writer;
                };

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

                /**
                 * Decodes a Favorite message from the specified reader or buffer.
                 * @function decode
                 * @memberof SyncAction.SyncActionValue.FavoritesAction.Favorite
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {SyncAction.SyncActionValue.FavoritesAction.Favorite} Favorite
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Favorite.decode = function decode(reader, length, error) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.FavoritesAction.Favorite();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.id = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

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

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

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

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

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

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

                return Favorite;
            })();

            return FavoritesAction;
        })();

        SyncActionValue.GalaxyFlowAction = (function() {

            /**
             * Properties of a GalaxyFlowAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IGalaxyFlowAction
             * @property {SyncAction.SyncActionValue.GalaxyFlowAction.GalaxyFlowActionType} type GalaxyFlowAction type
             */

            /**
             * Constructs a new GalaxyFlowAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a GalaxyFlowAction.
             * @implements IGalaxyFlowAction
             * @constructor
             * @param {SyncAction.SyncActionValue.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 {SyncAction.SyncActionValue.GalaxyFlowAction.GalaxyFlowActionType} type
             * @memberof SyncAction.SyncActionValue.GalaxyFlowAction
             * @instance
             */
            GalaxyFlowAction.prototype.type = 1;

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

            /**
             * Encodes the specified GalaxyFlowAction message. Does not implicitly {@link SyncAction.SyncActionValue.GalaxyFlowAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.GalaxyFlowAction
             * @static
             * @param {SyncAction.SyncActionValue.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();
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                return writer;
            };

            /**
             * Encodes the specified GalaxyFlowAction message, length delimited. Does not implicitly {@link SyncAction.SyncActionValue.GalaxyFlowAction.verify|verify} messages.
             * @function encodeDelimited
             * @memberof SyncAction.SyncActionValue.GalaxyFlowAction
             * @static
             * @param {SyncAction.SyncActionValue.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 SyncAction.SyncActionValue.GalaxyFlowAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.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.SyncAction.SyncActionValue.GalaxyFlowAction();
                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;
                    }
                }
                if (!message.hasOwnProperty("type"))
                    throw $util.ProtocolError("missing required 'type'", { instance: message });
                return message;
            };

            /**
             * Decodes a GalaxyFlowAction message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof SyncAction.SyncActionValue.GalaxyFlowAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {SyncAction.SyncActionValue.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 SyncAction.SyncActionValue.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";
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 1:
                    break;
                }
                return null;
            };

            /**
             * Creates a GalaxyFlowAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.GalaxyFlowAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.GalaxyFlowAction} GalaxyFlowAction
             */
            GalaxyFlowAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.GalaxyFlowAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.GalaxyFlowAction();
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "LAUNCH":
                case 1:
                    message.type = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a GalaxyFlowAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.GalaxyFlowAction
             * @static
             * @param {SyncAction.SyncActionValue.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 (options.defaults)
                    object.type = options.enums === String ? "LAUNCH" : 1;
                if (message.type != null && message.hasOwnProperty("type"))
                    object.type = options.enums === String ? $root.SyncAction.SyncActionValue.GalaxyFlowAction.GalaxyFlowActionType[message.type] === undefined ? message.type : $root.SyncAction.SyncActionValue.GalaxyFlowAction.GalaxyFlowActionType[message.type] : message.type;
                return object;
            };

            /**
             * Converts this GalaxyFlowAction to JSON.
             * @function toJSON
             * @memberof SyncAction.SyncActionValue.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 SyncAction.SyncActionValue.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 + "/SyncAction.SyncActionValue.GalaxyFlowAction";
            };

            /**
             * GalaxyFlowActionType enum.
             * @name SyncAction.SyncActionValue.GalaxyFlowAction.GalaxyFlowActionType
             * @enum {number}
             * @property {number} LAUNCH=1 LAUNCH value
             */
            GalaxyFlowAction.GalaxyFlowActionType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "LAUNCH"] = 1;
                return values;
            })();

            return GalaxyFlowAction;
        })();

        SyncActionValue.KeyExpiration = (function() {

            /**
             * Properties of a KeyExpiration.
             * @memberof SyncAction.SyncActionValue
             * @interface IKeyExpiration
             * @property {number|null} [expiredKeyEpoch] KeyExpiration expiredKeyEpoch
             */

            /**
             * Constructs a new KeyExpiration.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a KeyExpiration.
             * @implements IKeyExpiration
             * @constructor
             * @param {SyncAction.SyncActionValue.IKeyExpiration=} [properties] Properties to set
             */
            function KeyExpiration(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * KeyExpiration expiredKeyEpoch.
             * @member {number} expiredKeyEpoch
             * @memberof SyncAction.SyncActionValue.KeyExpiration
             * @instance
             */
            KeyExpiration.prototype.expiredKeyEpoch = 0;

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

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

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

            /**
             * Decodes a KeyExpiration message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.KeyExpiration
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.KeyExpiration} KeyExpiration
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KeyExpiration.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.KeyExpiration();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.expiredKeyEpoch = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a KeyExpiration message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.KeyExpiration
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KeyExpiration.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch"))
                    if (!$util.isInteger(message.expiredKeyEpoch))
                        return "expiredKeyEpoch: integer expected";
                return null;
            };

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

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

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

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

            return KeyExpiration;
        })();

        SyncActionValue.LabelAssociationAction = (function() {

            /**
             * Properties of a LabelAssociationAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ILabelAssociationAction
             * @property {boolean|null} [labeled] LabelAssociationAction labeled
             */

            /**
             * Constructs a new LabelAssociationAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a LabelAssociationAction.
             * @implements ILabelAssociationAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ILabelAssociationAction=} [properties] Properties to set
             */
            function LabelAssociationAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LabelAssociationAction labeled.
             * @member {boolean} labeled
             * @memberof SyncAction.SyncActionValue.LabelAssociationAction
             * @instance
             */
            LabelAssociationAction.prototype.labeled = false;

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

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

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

            /**
             * Decodes a LabelAssociationAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.LabelAssociationAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.LabelAssociationAction} LabelAssociationAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LabelAssociationAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.LabelAssociationAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.labeled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return LabelAssociationAction;
        })();

        SyncActionValue.LabelEditAction = (function() {

            /**
             * Properties of a LabelEditAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ILabelEditAction
             * @property {string|null} [name] LabelEditAction name
             * @property {number|null} [color] LabelEditAction color
             * @property {number|null} [predefinedId] LabelEditAction predefinedId
             * @property {boolean|null} [deleted] LabelEditAction deleted
             * @property {number|null} [orderIndex] LabelEditAction orderIndex
             * @property {boolean|null} [isActive] LabelEditAction isActive
             * @property {SyncAction.SyncActionValue.LabelEditAction.ListType|null} [type] LabelEditAction type
             * @property {boolean|null} [isImmutable] LabelEditAction isImmutable
             */

            /**
             * Constructs a new LabelEditAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a LabelEditAction.
             * @implements ILabelEditAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ILabelEditAction=} [properties] Properties to set
             */
            function LabelEditAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LabelEditAction name.
             * @member {string} name
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.name = "";

            /**
             * LabelEditAction color.
             * @member {number} color
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.color = 0;

            /**
             * LabelEditAction predefinedId.
             * @member {number} predefinedId
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.predefinedId = 0;

            /**
             * LabelEditAction deleted.
             * @member {boolean} deleted
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.deleted = false;

            /**
             * LabelEditAction orderIndex.
             * @member {number} orderIndex
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.orderIndex = 0;

            /**
             * LabelEditAction isActive.
             * @member {boolean} isActive
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.isActive = false;

            /**
             * LabelEditAction type.
             * @member {SyncAction.SyncActionValue.LabelEditAction.ListType} type
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.type = 0;

            /**
             * LabelEditAction isImmutable.
             * @member {boolean} isImmutable
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @instance
             */
            LabelEditAction.prototype.isImmutable = false;

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

            /**
             * Encodes the specified LabelEditAction message. Does not implicitly {@link SyncAction.SyncActionValue.LabelEditAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @static
             * @param {SyncAction.SyncActionValue.ILabelEditAction} message LabelEditAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LabelEditAction.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.color != null && Object.hasOwnProperty.call(message, "color"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.color);
                if (message.predefinedId != null && Object.hasOwnProperty.call(message, "predefinedId"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.predefinedId);
                if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted"))
                    writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleted);
                if (message.orderIndex != null && Object.hasOwnProperty.call(message, "orderIndex"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int32(message.orderIndex);
                if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isActive);
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type);
                if (message.isImmutable != null && Object.hasOwnProperty.call(message, "isImmutable"))
                    writer.uint32(/* id 8, wireType 0 =*/64).bool(message.isImmutable);
                return writer;
            };

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

            /**
             * Decodes a LabelEditAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.LabelEditAction} LabelEditAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LabelEditAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.LabelEditAction();
                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.color = reader.int32();
                            break;
                        }
                    case 3: {
                            message.predefinedId = reader.int32();
                            break;
                        }
                    case 4: {
                            message.deleted = reader.bool();
                            break;
                        }
                    case 5: {
                            message.orderIndex = reader.int32();
                            break;
                        }
                    case 6: {
                            message.isActive = reader.bool();
                            break;
                        }
                    case 7: {
                            message.type = reader.int32();
                            break;
                        }
                    case 8: {
                            message.isImmutable = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a LabelEditAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LabelEditAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.name != null && message.hasOwnProperty("name"))
                    if (!$util.isString(message.name))
                        return "name: string expected";
                if (message.color != null && message.hasOwnProperty("color"))
                    if (!$util.isInteger(message.color))
                        return "color: integer expected";
                if (message.predefinedId != null && message.hasOwnProperty("predefinedId"))
                    if (!$util.isInteger(message.predefinedId))
                        return "predefinedId: integer expected";
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    if (typeof message.deleted !== "boolean")
                        return "deleted: boolean expected";
                if (message.orderIndex != null && message.hasOwnProperty("orderIndex"))
                    if (!$util.isInteger(message.orderIndex))
                        return "orderIndex: integer expected";
                if (message.isActive != null && message.hasOwnProperty("isActive"))
                    if (typeof message.isActive !== "boolean")
                        return "isActive: boolean expected";
                if (message.type != null && message.hasOwnProperty("type"))
                    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:
                        break;
                    }
                if (message.isImmutable != null && message.hasOwnProperty("isImmutable"))
                    if (typeof message.isImmutable !== "boolean")
                        return "isImmutable: boolean expected";
                return null;
            };

            /**
             * Creates a LabelEditAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.LabelEditAction} LabelEditAction
             */
            LabelEditAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.LabelEditAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.LabelEditAction();
                if (object.name != null)
                    message.name = String(object.name);
                if (object.color != null)
                    message.color = object.color | 0;
                if (object.predefinedId != null)
                    message.predefinedId = object.predefinedId | 0;
                if (object.deleted != null)
                    message.deleted = Boolean(object.deleted);
                if (object.orderIndex != null)
                    message.orderIndex = object.orderIndex | 0;
                if (object.isActive != null)
                    message.isActive = Boolean(object.isActive);
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "NONE":
                case 0:
                    message.type = 0;
                    break;
                case "UNREAD":
                case 1:
                    message.type = 1;
                    break;
                case "GROUPS":
                case 2:
                    message.type = 2;
                    break;
                case "FAVORITES":
                case 3:
                    message.type = 3;
                    break;
                case "PREDEFINED":
                case 4:
                    message.type = 4;
                    break;
                case "CUSTOM":
                case 5:
                    message.type = 5;
                    break;
                case "COMMUNITY":
                case 6:
                    message.type = 6;
                    break;
                case "SERVER_ASSIGNED":
                case 7:
                    message.type = 7;
                    break;
                }
                if (object.isImmutable != null)
                    message.isImmutable = Boolean(object.isImmutable);
                return message;
            };

            /**
             * Creates a plain object from a LabelEditAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.LabelEditAction
             * @static
             * @param {SyncAction.SyncActionValue.LabelEditAction} message LabelEditAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LabelEditAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.name = "";
                    object.color = 0;
                    object.predefinedId = 0;
                    object.deleted = false;
                    object.orderIndex = 0;
                    object.isActive = false;
                    object.type = options.enums === String ? "NONE" : 0;
                    object.isImmutable = false;
                }
                if (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.name;
                if (message.color != null && message.hasOwnProperty("color"))
                    object.color = message.color;
                if (message.predefinedId != null && message.hasOwnProperty("predefinedId"))
                    object.predefinedId = message.predefinedId;
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    object.deleted = message.deleted;
                if (message.orderIndex != null && message.hasOwnProperty("orderIndex"))
                    object.orderIndex = message.orderIndex;
                if (message.isActive != null && message.hasOwnProperty("isActive"))
                    object.isActive = message.isActive;
                if (message.type != null && message.hasOwnProperty("type"))
                    object.type = options.enums === String ? $root.SyncAction.SyncActionValue.LabelEditAction.ListType[message.type] === undefined ? message.type : $root.SyncAction.SyncActionValue.LabelEditAction.ListType[message.type] : message.type;
                if (message.isImmutable != null && message.hasOwnProperty("isImmutable"))
                    object.isImmutable = message.isImmutable;
                return object;
            };

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

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

            /**
             * ListType enum.
             * @name SyncAction.SyncActionValue.LabelEditAction.ListType
             * @enum {number}
             * @property {number} NONE=0 NONE value
             * @property {number} UNREAD=1 UNREAD value
             * @property {number} GROUPS=2 GROUPS value
             * @property {number} FAVORITES=3 FAVORITES value
             * @property {number} PREDEFINED=4 PREDEFINED value
             * @property {number} CUSTOM=5 CUSTOM value
             * @property {number} COMMUNITY=6 COMMUNITY value
             * @property {number} SERVER_ASSIGNED=7 SERVER_ASSIGNED value
             */
            LabelEditAction.ListType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "NONE"] = 0;
                values[valuesById[1] = "UNREAD"] = 1;
                values[valuesById[2] = "GROUPS"] = 2;
                values[valuesById[3] = "FAVORITES"] = 3;
                values[valuesById[4] = "PREDEFINED"] = 4;
                values[valuesById[5] = "CUSTOM"] = 5;
                values[valuesById[6] = "COMMUNITY"] = 6;
                values[valuesById[7] = "SERVER_ASSIGNED"] = 7;
                return values;
            })();

            return LabelEditAction;
        })();

        SyncActionValue.LabelReorderingAction = (function() {

            /**
             * Properties of a LabelReorderingAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ILabelReorderingAction
             * @property {Array.<number>|null} [sortedLabelIds] LabelReorderingAction sortedLabelIds
             */

            /**
             * Constructs a new LabelReorderingAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a LabelReorderingAction.
             * @implements ILabelReorderingAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ILabelReorderingAction=} [properties] Properties to set
             */
            function LabelReorderingAction(properties) {
                this.sortedLabelIds = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LabelReorderingAction sortedLabelIds.
             * @member {Array.<number>} sortedLabelIds
             * @memberof SyncAction.SyncActionValue.LabelReorderingAction
             * @instance
             */
            LabelReorderingAction.prototype.sortedLabelIds = $util.emptyArray;

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

            /**
             * Encodes the specified LabelReorderingAction message. Does not implicitly {@link SyncAction.SyncActionValue.LabelReorderingAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.LabelReorderingAction
             * @static
             * @param {SyncAction.SyncActionValue.ILabelReorderingAction} message LabelReorderingAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LabelReorderingAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.sortedLabelIds != null && message.sortedLabelIds.length)
                    for (var i = 0; i < message.sortedLabelIds.length; ++i)
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sortedLabelIds[i]);
                return writer;
            };

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

            /**
             * Decodes a LabelReorderingAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.LabelReorderingAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.LabelReorderingAction} LabelReorderingAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LabelReorderingAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.LabelReorderingAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.sortedLabelIds && message.sortedLabelIds.length))
                                message.sortedLabelIds = [];
                            if ((tag & 7) === 2) {
                                var end2 = reader.uint32() + reader.pos;
                                while (reader.pos < end2)
                                    message.sortedLabelIds.push(reader.int32());
                            } else
                                message.sortedLabelIds.push(reader.int32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a LabelReorderingAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.LabelReorderingAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LabelReorderingAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.sortedLabelIds != null && message.hasOwnProperty("sortedLabelIds")) {
                    if (!Array.isArray(message.sortedLabelIds))
                        return "sortedLabelIds: array expected";
                    for (var i = 0; i < message.sortedLabelIds.length; ++i)
                        if (!$util.isInteger(message.sortedLabelIds[i]))
                            return "sortedLabelIds: integer[] expected";
                }
                return null;
            };

            /**
             * Creates a LabelReorderingAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.LabelReorderingAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.LabelReorderingAction} LabelReorderingAction
             */
            LabelReorderingAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.LabelReorderingAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.LabelReorderingAction();
                if (object.sortedLabelIds) {
                    if (!Array.isArray(object.sortedLabelIds))
                        throw TypeError(".SyncAction.SyncActionValue.LabelReorderingAction.sortedLabelIds: array expected");
                    message.sortedLabelIds = [];
                    for (var i = 0; i < object.sortedLabelIds.length; ++i)
                        message.sortedLabelIds[i] = object.sortedLabelIds[i] | 0;
                }
                return message;
            };

            /**
             * Creates a plain object from a LabelReorderingAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.LabelReorderingAction
             * @static
             * @param {SyncAction.SyncActionValue.LabelReorderingAction} message LabelReorderingAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LabelReorderingAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.sortedLabelIds = [];
                if (message.sortedLabelIds && message.sortedLabelIds.length) {
                    object.sortedLabelIds = [];
                    for (var j = 0; j < message.sortedLabelIds.length; ++j)
                        object.sortedLabelIds[j] = message.sortedLabelIds[j];
                }
                return object;
            };

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

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

            return LabelReorderingAction;
        })();

        SyncActionValue.LidContactAction = (function() {

            /**
             * Properties of a LidContactAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ILidContactAction
             * @property {string|null} [fullName] LidContactAction fullName
             * @property {string|null} [firstName] LidContactAction firstName
             * @property {string|null} [username] LidContactAction username
             * @property {boolean|null} [saveOnPrimaryAddressbook] LidContactAction saveOnPrimaryAddressbook
             */

            /**
             * Constructs a new LidContactAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a LidContactAction.
             * @implements ILidContactAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ILidContactAction=} [properties] Properties to set
             */
            function LidContactAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LidContactAction fullName.
             * @member {string} fullName
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @instance
             */
            LidContactAction.prototype.fullName = "";

            /**
             * LidContactAction firstName.
             * @member {string} firstName
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @instance
             */
            LidContactAction.prototype.firstName = "";

            /**
             * LidContactAction username.
             * @member {string} username
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @instance
             */
            LidContactAction.prototype.username = "";

            /**
             * LidContactAction saveOnPrimaryAddressbook.
             * @member {boolean} saveOnPrimaryAddressbook
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @instance
             */
            LidContactAction.prototype.saveOnPrimaryAddressbook = false;

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

            /**
             * Encodes the specified LidContactAction message. Does not implicitly {@link SyncAction.SyncActionValue.LidContactAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @static
             * @param {SyncAction.SyncActionValue.ILidContactAction} message LidContactAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LidContactAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullName);
                if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.firstName);
                if (message.username != null && Object.hasOwnProperty.call(message, "username"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.username);
                if (message.saveOnPrimaryAddressbook != null && Object.hasOwnProperty.call(message, "saveOnPrimaryAddressbook"))
                    writer.uint32(/* id 4, wireType 0 =*/32).bool(message.saveOnPrimaryAddressbook);
                return writer;
            };

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

            /**
             * Decodes a LidContactAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.LidContactAction} LidContactAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LidContactAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.LidContactAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.fullName = reader.string();
                            break;
                        }
                    case 2: {
                            message.firstName = reader.string();
                            break;
                        }
                    case 3: {
                            message.username = reader.string();
                            break;
                        }
                    case 4: {
                            message.saveOnPrimaryAddressbook = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a LidContactAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LidContactAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.fullName != null && message.hasOwnProperty("fullName"))
                    if (!$util.isString(message.fullName))
                        return "fullName: string expected";
                if (message.firstName != null && message.hasOwnProperty("firstName"))
                    if (!$util.isString(message.firstName))
                        return "firstName: string expected";
                if (message.username != null && message.hasOwnProperty("username"))
                    if (!$util.isString(message.username))
                        return "username: string expected";
                if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook"))
                    if (typeof message.saveOnPrimaryAddressbook !== "boolean")
                        return "saveOnPrimaryAddressbook: boolean expected";
                return null;
            };

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

            /**
             * Creates a plain object from a LidContactAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.LidContactAction
             * @static
             * @param {SyncAction.SyncActionValue.LidContactAction} message LidContactAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LidContactAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.fullName = "";
                    object.firstName = "";
                    object.username = "";
                    object.saveOnPrimaryAddressbook = false;
                }
                if (message.fullName != null && message.hasOwnProperty("fullName"))
                    object.fullName = message.fullName;
                if (message.firstName != null && message.hasOwnProperty("firstName"))
                    object.firstName = message.firstName;
                if (message.username != null && message.hasOwnProperty("username"))
                    object.username = message.username;
                if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook"))
                    object.saveOnPrimaryAddressbook = message.saveOnPrimaryAddressbook;
                return object;
            };

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

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

            return LidContactAction;
        })();

        SyncActionValue.LocaleSetting = (function() {

            /**
             * Properties of a LocaleSetting.
             * @memberof SyncAction.SyncActionValue
             * @interface ILocaleSetting
             * @property {string|null} [locale] LocaleSetting locale
             */

            /**
             * Constructs a new LocaleSetting.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a LocaleSetting.
             * @implements ILocaleSetting
             * @constructor
             * @param {SyncAction.SyncActionValue.ILocaleSetting=} [properties] Properties to set
             */
            function LocaleSetting(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LocaleSetting locale.
             * @member {string} locale
             * @memberof SyncAction.SyncActionValue.LocaleSetting
             * @instance
             */
            LocaleSetting.prototype.locale = "";

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

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

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

            /**
             * Decodes a LocaleSetting message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.LocaleSetting
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.LocaleSetting} LocaleSetting
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LocaleSetting.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.LocaleSetting();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.locale = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return LocaleSetting;
        })();

        SyncActionValue.LockChatAction = (function() {

            /**
             * Properties of a LockChatAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ILockChatAction
             * @property {boolean|null} [locked] LockChatAction locked
             */

            /**
             * Constructs a new LockChatAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a LockChatAction.
             * @implements ILockChatAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ILockChatAction=} [properties] Properties to set
             */
            function LockChatAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LockChatAction locked.
             * @member {boolean} locked
             * @memberof SyncAction.SyncActionValue.LockChatAction
             * @instance
             */
            LockChatAction.prototype.locked = false;

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

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

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

            /**
             * Decodes a LockChatAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.LockChatAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.LockChatAction} LockChatAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LockChatAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.LockChatAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.locked = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return LockChatAction;
        })();

        SyncActionValue.MaibaAIFeaturesControlAction = (function() {

            /**
             * Properties of a MaibaAIFeaturesControlAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IMaibaAIFeaturesControlAction
             * @property {SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus|null} [aiFeatureStatus] MaibaAIFeaturesControlAction aiFeatureStatus
             */

            /**
             * Constructs a new MaibaAIFeaturesControlAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a MaibaAIFeaturesControlAction.
             * @implements IMaibaAIFeaturesControlAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IMaibaAIFeaturesControlAction=} [properties] Properties to set
             */
            function MaibaAIFeaturesControlAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * MaibaAIFeaturesControlAction aiFeatureStatus.
             * @member {SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus} aiFeatureStatus
             * @memberof SyncAction.SyncActionValue.MaibaAIFeaturesControlAction
             * @instance
             */
            MaibaAIFeaturesControlAction.prototype.aiFeatureStatus = 0;

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

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

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

            /**
             * Decodes a MaibaAIFeaturesControlAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.MaibaAIFeaturesControlAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.MaibaAIFeaturesControlAction} MaibaAIFeaturesControlAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MaibaAIFeaturesControlAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.aiFeatureStatus = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a MaibaAIFeaturesControlAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.MaibaAIFeaturesControlAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MaibaAIFeaturesControlAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.aiFeatureStatus != null && message.hasOwnProperty("aiFeatureStatus"))
                    switch (message.aiFeatureStatus) {
                    default:
                        return "aiFeatureStatus: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                return null;
            };

            /**
             * Creates a MaibaAIFeaturesControlAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.MaibaAIFeaturesControlAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.MaibaAIFeaturesControlAction} MaibaAIFeaturesControlAction
             */
            MaibaAIFeaturesControlAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction();
                switch (object.aiFeatureStatus) {
                default:
                    if (typeof object.aiFeatureStatus === "number") {
                        message.aiFeatureStatus = object.aiFeatureStatus;
                        break;
                    }
                    break;
                case "ENABLED":
                case 0:
                    message.aiFeatureStatus = 0;
                    break;
                case "ENABLED_HAS_LEARNING":
                case 1:
                    message.aiFeatureStatus = 1;
                    break;
                case "DISABLED":
                case 2:
                    message.aiFeatureStatus = 2;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a MaibaAIFeaturesControlAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.MaibaAIFeaturesControlAction
             * @static
             * @param {SyncAction.SyncActionValue.MaibaAIFeaturesControlAction} message MaibaAIFeaturesControlAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MaibaAIFeaturesControlAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults)
                    object.aiFeatureStatus = options.enums === String ? "ENABLED" : 0;
                if (message.aiFeatureStatus != null && message.hasOwnProperty("aiFeatureStatus"))
                    object.aiFeatureStatus = options.enums === String ? $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus[message.aiFeatureStatus] === undefined ? message.aiFeatureStatus : $root.SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus[message.aiFeatureStatus] : message.aiFeatureStatus;
                return object;
            };

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

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

            /**
             * MaibaAIFeatureStatus enum.
             * @name SyncAction.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus
             * @enum {number}
             * @property {number} ENABLED=0 ENABLED value
             * @property {number} ENABLED_HAS_LEARNING=1 ENABLED_HAS_LEARNING value
             * @property {number} DISABLED=2 DISABLED value
             */
            MaibaAIFeaturesControlAction.MaibaAIFeatureStatus = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "ENABLED"] = 0;
                values[valuesById[1] = "ENABLED_HAS_LEARNING"] = 1;
                values[valuesById[2] = "DISABLED"] = 2;
                return values;
            })();

            return MaibaAIFeaturesControlAction;
        })();

        SyncActionValue.MarkChatAsReadAction = (function() {

            /**
             * Properties of a MarkChatAsReadAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IMarkChatAsReadAction
             * @property {boolean|null} [read] MarkChatAsReadAction read
             * @property {SyncAction.SyncActionValue.ISyncActionMessageRange|null} [messageRange] MarkChatAsReadAction messageRange
             */

            /**
             * Constructs a new MarkChatAsReadAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a MarkChatAsReadAction.
             * @implements IMarkChatAsReadAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IMarkChatAsReadAction=} [properties] Properties to set
             */
            function MarkChatAsReadAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * MarkChatAsReadAction read.
             * @member {boolean} read
             * @memberof SyncAction.SyncActionValue.MarkChatAsReadAction
             * @instance
             */
            MarkChatAsReadAction.prototype.read = false;

            /**
             * MarkChatAsReadAction messageRange.
             * @member {SyncAction.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange
             * @memberof SyncAction.SyncActionValue.MarkChatAsReadAction
             * @instance
             */
            MarkChatAsReadAction.prototype.messageRange = null;

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

            /**
             * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link SyncAction.SyncActionValue.MarkChatAsReadAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.MarkChatAsReadAction
             * @static
             * @param {SyncAction.SyncActionValue.IMarkChatAsReadAction} message MarkChatAsReadAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MarkChatAsReadAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.read != null && Object.hasOwnProperty.call(message, "read"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.read);
                if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange"))
                    $root.SyncAction.SyncActionValue.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes a MarkChatAsReadAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.MarkChatAsReadAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.MarkChatAsReadAction} MarkChatAsReadAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MarkChatAsReadAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.MarkChatAsReadAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.read = reader.bool();
                            break;
                        }
                    case 2: {
                            message.messageRange = $root.SyncAction.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a MarkChatAsReadAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.MarkChatAsReadAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MarkChatAsReadAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.read != null && message.hasOwnProperty("read"))
                    if (typeof message.read !== "boolean")
                        return "read: boolean expected";
                if (message.messageRange != null && message.hasOwnProperty("messageRange")) {
                    var error = $root.SyncAction.SyncActionValue.SyncActionMessageRange.verify(message.messageRange);
                    if (error)
                        return "messageRange." + error;
                }
                return null;
            };

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

            /**
             * Creates a plain object from a MarkChatAsReadAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.MarkChatAsReadAction
             * @static
             * @param {SyncAction.SyncActionValue.MarkChatAsReadAction} message MarkChatAsReadAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MarkChatAsReadAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.read = false;
                    object.messageRange = null;
                }
                if (message.read != null && message.hasOwnProperty("read"))
                    object.read = message.read;
                if (message.messageRange != null && message.hasOwnProperty("messageRange"))
                    object.messageRange = $root.SyncAction.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options);
                return object;
            };

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

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

            return MarkChatAsReadAction;
        })();

        SyncActionValue.MarketingMessageAction = (function() {

            /**
             * Properties of a MarketingMessageAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IMarketingMessageAction
             * @property {string|null} [name] MarketingMessageAction name
             * @property {string|null} [message] MarketingMessageAction message
             * @property {SyncAction.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType|null} [type] MarketingMessageAction type
             * @property {number|Long|null} [createdAt] MarketingMessageAction createdAt
             * @property {number|Long|null} [lastSentAt] MarketingMessageAction lastSentAt
             * @property {boolean|null} [isDeleted] MarketingMessageAction isDeleted
             * @property {string|null} [mediaId] MarketingMessageAction mediaId
             */

            /**
             * Constructs a new MarketingMessageAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a MarketingMessageAction.
             * @implements IMarketingMessageAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IMarketingMessageAction=} [properties] Properties to set
             */
            function MarketingMessageAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * MarketingMessageAction name.
             * @member {string} name
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @instance
             */
            MarketingMessageAction.prototype.name = "";

            /**
             * MarketingMessageAction message.
             * @member {string} message
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @instance
             */
            MarketingMessageAction.prototype.message = "";

            /**
             * MarketingMessageAction type.
             * @member {SyncAction.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType} type
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @instance
             */
            MarketingMessageAction.prototype.type = 0;

            /**
             * MarketingMessageAction createdAt.
             * @member {number|Long} createdAt
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @instance
             */
            MarketingMessageAction.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MarketingMessageAction lastSentAt.
             * @member {number|Long} lastSentAt
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @instance
             */
            MarketingMessageAction.prototype.lastSentAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MarketingMessageAction isDeleted.
             * @member {boolean} isDeleted
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @instance
             */
            MarketingMessageAction.prototype.isDeleted = false;

            /**
             * MarketingMessageAction mediaId.
             * @member {string} mediaId
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @instance
             */
            MarketingMessageAction.prototype.mediaId = "";

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

            /**
             * Encodes the specified MarketingMessageAction message. Does not implicitly {@link SyncAction.SyncActionValue.MarketingMessageAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @static
             * @param {SyncAction.SyncActionValue.IMarketingMessageAction} message MarketingMessageAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MarketingMessageAction.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.message != null && Object.hasOwnProperty.call(message, "message"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int64(message.createdAt);
                if (message.lastSentAt != null && Object.hasOwnProperty.call(message, "lastSentAt"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int64(message.lastSentAt);
                if (message.isDeleted != null && Object.hasOwnProperty.call(message, "isDeleted"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isDeleted);
                if (message.mediaId != null && Object.hasOwnProperty.call(message, "mediaId"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.mediaId);
                return writer;
            };

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

            /**
             * Decodes a MarketingMessageAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.MarketingMessageAction} MarketingMessageAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MarketingMessageAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.MarketingMessageAction();
                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.message = reader.string();
                            break;
                        }
                    case 3: {
                            message.type = reader.int32();
                            break;
                        }
                    case 4: {
                            message.createdAt = reader.int64();
                            break;
                        }
                    case 5: {
                            message.lastSentAt = reader.int64();
                            break;
                        }
                    case 6: {
                            message.isDeleted = reader.bool();
                            break;
                        }
                    case 7: {
                            message.mediaId = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a MarketingMessageAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MarketingMessageAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.name != null && message.hasOwnProperty("name"))
                    if (!$util.isString(message.name))
                        return "name: string expected";
                if (message.message != null && message.hasOwnProperty("message"))
                    if (!$util.isString(message.message))
                        return "message: string expected";
                if (message.type != null && message.hasOwnProperty("type"))
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                        break;
                    }
                if (message.createdAt != null && message.hasOwnProperty("createdAt"))
                    if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
                        return "createdAt: integer|Long expected";
                if (message.lastSentAt != null && message.hasOwnProperty("lastSentAt"))
                    if (!$util.isInteger(message.lastSentAt) && !(message.lastSentAt && $util.isInteger(message.lastSentAt.low) && $util.isInteger(message.lastSentAt.high)))
                        return "lastSentAt: integer|Long expected";
                if (message.isDeleted != null && message.hasOwnProperty("isDeleted"))
                    if (typeof message.isDeleted !== "boolean")
                        return "isDeleted: boolean expected";
                if (message.mediaId != null && message.hasOwnProperty("mediaId"))
                    if (!$util.isString(message.mediaId))
                        return "mediaId: string expected";
                return null;
            };

            /**
             * Creates a MarketingMessageAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.MarketingMessageAction} MarketingMessageAction
             */
            MarketingMessageAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.MarketingMessageAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.MarketingMessageAction();
                if (object.name != null)
                    message.name = String(object.name);
                if (object.message != null)
                    message.message = String(object.message);
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "PERSONALIZED":
                case 0:
                    message.type = 0;
                    break;
                }
                if (object.createdAt != null)
                    if ($util.Long)
                        (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = false;
                    else if (typeof object.createdAt === "string")
                        message.createdAt = parseInt(object.createdAt, 10);
                    else if (typeof object.createdAt === "number")
                        message.createdAt = object.createdAt;
                    else if (typeof object.createdAt === "object")
                        message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber();
                if (object.lastSentAt != null)
                    if ($util.Long)
                        (message.lastSentAt = $util.Long.fromValue(object.lastSentAt)).unsigned = false;
                    else if (typeof object.lastSentAt === "string")
                        message.lastSentAt = parseInt(object.lastSentAt, 10);
                    else if (typeof object.lastSentAt === "number")
                        message.lastSentAt = object.lastSentAt;
                    else if (typeof object.lastSentAt === "object")
                        message.lastSentAt = new $util.LongBits(object.lastSentAt.low >>> 0, object.lastSentAt.high >>> 0).toNumber();
                if (object.isDeleted != null)
                    message.isDeleted = Boolean(object.isDeleted);
                if (object.mediaId != null)
                    message.mediaId = String(object.mediaId);
                return message;
            };

            /**
             * Creates a plain object from a MarketingMessageAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.MarketingMessageAction
             * @static
             * @param {SyncAction.SyncActionValue.MarketingMessageAction} message MarketingMessageAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MarketingMessageAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.name = "";
                    object.message = "";
                    object.type = options.enums === String ? "PERSONALIZED" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.createdAt = options.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.lastSentAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.lastSentAt = options.longs === String ? "0" : 0;
                    object.isDeleted = false;
                    object.mediaId = "";
                }
                if (message.name != null && message.hasOwnProperty("name"))
                    object.name = message.name;
                if (message.message != null && message.hasOwnProperty("message"))
                    object.message = message.message;
                if (message.type != null && message.hasOwnProperty("type"))
                    object.type = options.enums === String ? $root.SyncAction.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType[message.type] === undefined ? message.type : $root.SyncAction.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType[message.type] : message.type;
                if (message.createdAt != null && message.hasOwnProperty("createdAt"))
                    if (typeof message.createdAt === "number")
                        object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
                    else
                        object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber() : message.createdAt;
                if (message.lastSentAt != null && message.hasOwnProperty("lastSentAt"))
                    if (typeof message.lastSentAt === "number")
                        object.lastSentAt = options.longs === String ? String(message.lastSentAt) : message.lastSentAt;
                    else
                        object.lastSentAt = options.longs === String ? $util.Long.prototype.toString.call(message.lastSentAt) : options.longs === Number ? new $util.LongBits(message.lastSentAt.low >>> 0, message.lastSentAt.high >>> 0).toNumber() : message.lastSentAt;
                if (message.isDeleted != null && message.hasOwnProperty("isDeleted"))
                    object.isDeleted = message.isDeleted;
                if (message.mediaId != null && message.hasOwnProperty("mediaId"))
                    object.mediaId = message.mediaId;
                return object;
            };

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

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

            /**
             * MarketingMessagePrototypeType enum.
             * @name SyncAction.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType
             * @enum {number}
             * @property {number} PERSONALIZED=0 PERSONALIZED value
             */
            MarketingMessageAction.MarketingMessagePrototypeType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "PERSONALIZED"] = 0;
                return values;
            })();

            return MarketingMessageAction;
        })();

        SyncActionValue.MarketingMessageBroadcastAction = (function() {

            /**
             * Properties of a MarketingMessageBroadcastAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IMarketingMessageBroadcastAction
             * @property {number|null} [repliedCount] MarketingMessageBroadcastAction repliedCount
             */

            /**
             * Constructs a new MarketingMessageBroadcastAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a MarketingMessageBroadcastAction.
             * @implements IMarketingMessageBroadcastAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IMarketingMessageBroadcastAction=} [properties] Properties to set
             */
            function MarketingMessageBroadcastAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * MarketingMessageBroadcastAction repliedCount.
             * @member {number} repliedCount
             * @memberof SyncAction.SyncActionValue.MarketingMessageBroadcastAction
             * @instance
             */
            MarketingMessageBroadcastAction.prototype.repliedCount = 0;

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

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

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

            /**
             * Decodes a MarketingMessageBroadcastAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.MarketingMessageBroadcastAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.MarketingMessageBroadcastAction} MarketingMessageBroadcastAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MarketingMessageBroadcastAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.MarketingMessageBroadcastAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.repliedCount = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a MarketingMessageBroadcastAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.MarketingMessageBroadcastAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MarketingMessageBroadcastAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.repliedCount != null && message.hasOwnProperty("repliedCount"))
                    if (!$util.isInteger(message.repliedCount))
                        return "repliedCount: integer expected";
                return null;
            };

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

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

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

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

            return MarketingMessageBroadcastAction;
        })();

        SyncActionValue.MerchantPaymentPartnerAction = (function() {

            /**
             * Properties of a MerchantPaymentPartnerAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IMerchantPaymentPartnerAction
             * @property {SyncAction.SyncActionValue.MerchantPaymentPartnerAction.Status} status MerchantPaymentPartnerAction status
             * @property {string} country MerchantPaymentPartnerAction country
             * @property {string|null} [gatewayName] MerchantPaymentPartnerAction gatewayName
             * @property {string|null} [credentialId] MerchantPaymentPartnerAction credentialId
             */

            /**
             * Constructs a new MerchantPaymentPartnerAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a MerchantPaymentPartnerAction.
             * @implements IMerchantPaymentPartnerAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IMerchantPaymentPartnerAction=} [properties] Properties to set
             */
            function MerchantPaymentPartnerAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * MerchantPaymentPartnerAction status.
             * @member {SyncAction.SyncActionValue.MerchantPaymentPartnerAction.Status} status
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @instance
             */
            MerchantPaymentPartnerAction.prototype.status = 0;

            /**
             * MerchantPaymentPartnerAction country.
             * @member {string} country
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @instance
             */
            MerchantPaymentPartnerAction.prototype.country = "";

            /**
             * MerchantPaymentPartnerAction gatewayName.
             * @member {string} gatewayName
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @instance
             */
            MerchantPaymentPartnerAction.prototype.gatewayName = "";

            /**
             * MerchantPaymentPartnerAction credentialId.
             * @member {string} credentialId
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @instance
             */
            MerchantPaymentPartnerAction.prototype.credentialId = "";

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

            /**
             * Encodes the specified MerchantPaymentPartnerAction message. Does not implicitly {@link SyncAction.SyncActionValue.MerchantPaymentPartnerAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @static
             * @param {SyncAction.SyncActionValue.IMerchantPaymentPartnerAction} message MerchantPaymentPartnerAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MerchantPaymentPartnerAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.country);
                if (message.gatewayName != null && Object.hasOwnProperty.call(message, "gatewayName"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.gatewayName);
                if (message.credentialId != null && Object.hasOwnProperty.call(message, "credentialId"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.credentialId);
                return writer;
            };

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

            /**
             * Decodes a MerchantPaymentPartnerAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.MerchantPaymentPartnerAction} MerchantPaymentPartnerAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MerchantPaymentPartnerAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction();
                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.country = reader.string();
                            break;
                        }
                    case 3: {
                            message.gatewayName = reader.string();
                            break;
                        }
                    case 4: {
                            message.credentialId = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                if (!message.hasOwnProperty("status"))
                    throw $util.ProtocolError("missing required 'status'", { instance: message });
                if (!message.hasOwnProperty("country"))
                    throw $util.ProtocolError("missing required 'country'", { instance: message });
                return message;
            };

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

            /**
             * Verifies a MerchantPaymentPartnerAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MerchantPaymentPartnerAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                switch (message.status) {
                default:
                    return "status: enum value expected";
                case 0:
                case 1:
                    break;
                }
                if (!$util.isString(message.country))
                    return "country: string expected";
                if (message.gatewayName != null && message.hasOwnProperty("gatewayName"))
                    if (!$util.isString(message.gatewayName))
                        return "gatewayName: string expected";
                if (message.credentialId != null && message.hasOwnProperty("credentialId"))
                    if (!$util.isString(message.credentialId))
                        return "credentialId: string expected";
                return null;
            };

            /**
             * Creates a MerchantPaymentPartnerAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.MerchantPaymentPartnerAction} MerchantPaymentPartnerAction
             */
            MerchantPaymentPartnerAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction();
                switch (object.status) {
                default:
                    if (typeof object.status === "number") {
                        message.status = object.status;
                        break;
                    }
                    break;
                case "ACTIVE":
                case 0:
                    message.status = 0;
                    break;
                case "INACTIVE":
                case 1:
                    message.status = 1;
                    break;
                }
                if (object.country != null)
                    message.country = String(object.country);
                if (object.gatewayName != null)
                    message.gatewayName = String(object.gatewayName);
                if (object.credentialId != null)
                    message.credentialId = String(object.credentialId);
                return message;
            };

            /**
             * Creates a plain object from a MerchantPaymentPartnerAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.MerchantPaymentPartnerAction
             * @static
             * @param {SyncAction.SyncActionValue.MerchantPaymentPartnerAction} message MerchantPaymentPartnerAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MerchantPaymentPartnerAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.status = options.enums === String ? "ACTIVE" : 0;
                    object.country = "";
                    object.gatewayName = "";
                    object.credentialId = "";
                }
                if (message.status != null && message.hasOwnProperty("status"))
                    object.status = options.enums === String ? $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction.Status[message.status] === undefined ? message.status : $root.SyncAction.SyncActionValue.MerchantPaymentPartnerAction.Status[message.status] : message.status;
                if (message.country != null && message.hasOwnProperty("country"))
                    object.country = message.country;
                if (message.gatewayName != null && message.hasOwnProperty("gatewayName"))
                    object.gatewayName = message.gatewayName;
                if (message.credentialId != null && message.hasOwnProperty("credentialId"))
                    object.credentialId = message.credentialId;
                return object;
            };

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

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

            /**
             * Status enum.
             * @name SyncAction.SyncActionValue.MerchantPaymentPartnerAction.Status
             * @enum {number}
             * @property {number} ACTIVE=0 ACTIVE value
             * @property {number} INACTIVE=1 INACTIVE value
             */
            MerchantPaymentPartnerAction.Status = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "ACTIVE"] = 0;
                values[valuesById[1] = "INACTIVE"] = 1;
                return values;
            })();

            return MerchantPaymentPartnerAction;
        })();

        SyncActionValue.MusicUserIdAction = (function() {

            /**
             * Properties of a MusicUserIdAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IMusicUserIdAction
             * @property {string|null} [musicUserId] MusicUserIdAction musicUserId
             */

            /**
             * Constructs a new MusicUserIdAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a MusicUserIdAction.
             * @implements IMusicUserIdAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IMusicUserIdAction=} [properties] Properties to set
             */
            function MusicUserIdAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * MusicUserIdAction musicUserId.
             * @member {string} musicUserId
             * @memberof SyncAction.SyncActionValue.MusicUserIdAction
             * @instance
             */
            MusicUserIdAction.prototype.musicUserId = "";

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

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

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

            /**
             * Decodes a MusicUserIdAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.MusicUserIdAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.MusicUserIdAction} MusicUserIdAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MusicUserIdAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.MusicUserIdAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.musicUserId = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return MusicUserIdAction;
        })();

        SyncActionValue.MuteAction = (function() {

            /**
             * Properties of a MuteAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IMuteAction
             * @property {boolean|null} [muted] MuteAction muted
             * @property {number|Long|null} [muteEndTimestamp] MuteAction muteEndTimestamp
             * @property {boolean|null} [autoMuted] MuteAction autoMuted
             */

            /**
             * Constructs a new MuteAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a MuteAction.
             * @implements IMuteAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IMuteAction=} [properties] Properties to set
             */
            function MuteAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * MuteAction muted.
             * @member {boolean} muted
             * @memberof SyncAction.SyncActionValue.MuteAction
             * @instance
             */
            MuteAction.prototype.muted = false;

            /**
             * MuteAction muteEndTimestamp.
             * @member {number|Long} muteEndTimestamp
             * @memberof SyncAction.SyncActionValue.MuteAction
             * @instance
             */
            MuteAction.prototype.muteEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MuteAction autoMuted.
             * @member {boolean} autoMuted
             * @memberof SyncAction.SyncActionValue.MuteAction
             * @instance
             */
            MuteAction.prototype.autoMuted = false;

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

            /**
             * Encodes the specified MuteAction message. Does not implicitly {@link SyncAction.SyncActionValue.MuteAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.MuteAction
             * @static
             * @param {SyncAction.SyncActionValue.IMuteAction} message MuteAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MuteAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.muted != null && Object.hasOwnProperty.call(message, "muted"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.muted);
                if (message.muteEndTimestamp != null && Object.hasOwnProperty.call(message, "muteEndTimestamp"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.muteEndTimestamp);
                if (message.autoMuted != null && Object.hasOwnProperty.call(message, "autoMuted"))
                    writer.uint32(/* id 3, wireType 0 =*/24).bool(message.autoMuted);
                return writer;
            };

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

            /**
             * Decodes a MuteAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.MuteAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.MuteAction} MuteAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MuteAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.MuteAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.muted = reader.bool();
                            break;
                        }
                    case 2: {
                            message.muteEndTimestamp = reader.int64();
                            break;
                        }
                    case 3: {
                            message.autoMuted = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a MuteAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.MuteAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MuteAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.muted != null && message.hasOwnProperty("muted"))
                    if (typeof message.muted !== "boolean")
                        return "muted: boolean expected";
                if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp"))
                    if (!$util.isInteger(message.muteEndTimestamp) && !(message.muteEndTimestamp && $util.isInteger(message.muteEndTimestamp.low) && $util.isInteger(message.muteEndTimestamp.high)))
                        return "muteEndTimestamp: integer|Long expected";
                if (message.autoMuted != null && message.hasOwnProperty("autoMuted"))
                    if (typeof message.autoMuted !== "boolean")
                        return "autoMuted: boolean expected";
                return null;
            };

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

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

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

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

            return MuteAction;
        })();

        SyncActionValue.NoteEditAction = (function() {

            /**
             * Properties of a NoteEditAction.
             * @memberof SyncAction.SyncActionValue
             * @interface INoteEditAction
             * @property {SyncAction.SyncActionValue.NoteEditAction.NoteType|null} [type] NoteEditAction type
             * @property {string|null} [chatJid] NoteEditAction chatJid
             * @property {number|Long|null} [createdAt] NoteEditAction createdAt
             * @property {boolean|null} [deleted] NoteEditAction deleted
             * @property {string|null} [unstructuredContent] NoteEditAction unstructuredContent
             */

            /**
             * Constructs a new NoteEditAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a NoteEditAction.
             * @implements INoteEditAction
             * @constructor
             * @param {SyncAction.SyncActionValue.INoteEditAction=} [properties] Properties to set
             */
            function NoteEditAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * NoteEditAction type.
             * @member {SyncAction.SyncActionValue.NoteEditAction.NoteType} type
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @instance
             */
            NoteEditAction.prototype.type = 1;

            /**
             * NoteEditAction chatJid.
             * @member {string} chatJid
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @instance
             */
            NoteEditAction.prototype.chatJid = "";

            /**
             * NoteEditAction createdAt.
             * @member {number|Long} createdAt
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @instance
             */
            NoteEditAction.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * NoteEditAction deleted.
             * @member {boolean} deleted
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @instance
             */
            NoteEditAction.prototype.deleted = false;

            /**
             * NoteEditAction unstructuredContent.
             * @member {string} unstructuredContent
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @instance
             */
            NoteEditAction.prototype.unstructuredContent = "";

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

            /**
             * Encodes the specified NoteEditAction message. Does not implicitly {@link SyncAction.SyncActionValue.NoteEditAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @static
             * @param {SyncAction.SyncActionValue.INoteEditAction} message NoteEditAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NoteEditAction.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.chatJid != null && Object.hasOwnProperty.call(message, "chatJid"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.chatJid);
                if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.createdAt);
                if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted"))
                    writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleted);
                if (message.unstructuredContent != null && Object.hasOwnProperty.call(message, "unstructuredContent"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.unstructuredContent);
                return writer;
            };

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

            /**
             * Decodes a NoteEditAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.NoteEditAction} NoteEditAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NoteEditAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.NoteEditAction();
                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.chatJid = reader.string();
                            break;
                        }
                    case 3: {
                            message.createdAt = reader.int64();
                            break;
                        }
                    case 4: {
                            message.deleted = reader.bool();
                            break;
                        }
                    case 5: {
                            message.unstructuredContent = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a NoteEditAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NoteEditAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.type != null && message.hasOwnProperty("type"))
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 1:
                    case 2:
                        break;
                    }
                if (message.chatJid != null && message.hasOwnProperty("chatJid"))
                    if (!$util.isString(message.chatJid))
                        return "chatJid: string expected";
                if (message.createdAt != null && message.hasOwnProperty("createdAt"))
                    if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
                        return "createdAt: integer|Long expected";
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    if (typeof message.deleted !== "boolean")
                        return "deleted: boolean expected";
                if (message.unstructuredContent != null && message.hasOwnProperty("unstructuredContent"))
                    if (!$util.isString(message.unstructuredContent))
                        return "unstructuredContent: string expected";
                return null;
            };

            /**
             * Creates a NoteEditAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.NoteEditAction} NoteEditAction
             */
            NoteEditAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.NoteEditAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.NoteEditAction();
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "UNSTRUCTURED":
                case 1:
                    message.type = 1;
                    break;
                case "STRUCTURED":
                case 2:
                    message.type = 2;
                    break;
                }
                if (object.chatJid != null)
                    message.chatJid = String(object.chatJid);
                if (object.createdAt != null)
                    if ($util.Long)
                        (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = false;
                    else if (typeof object.createdAt === "string")
                        message.createdAt = parseInt(object.createdAt, 10);
                    else if (typeof object.createdAt === "number")
                        message.createdAt = object.createdAt;
                    else if (typeof object.createdAt === "object")
                        message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber();
                if (object.deleted != null)
                    message.deleted = Boolean(object.deleted);
                if (object.unstructuredContent != null)
                    message.unstructuredContent = String(object.unstructuredContent);
                return message;
            };

            /**
             * Creates a plain object from a NoteEditAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.NoteEditAction
             * @static
             * @param {SyncAction.SyncActionValue.NoteEditAction} message NoteEditAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NoteEditAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.type = options.enums === String ? "UNSTRUCTURED" : 1;
                    object.chatJid = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.createdAt = options.longs === String ? "0" : 0;
                    object.deleted = false;
                    object.unstructuredContent = "";
                }
                if (message.type != null && message.hasOwnProperty("type"))
                    object.type = options.enums === String ? $root.SyncAction.SyncActionValue.NoteEditAction.NoteType[message.type] === undefined ? message.type : $root.SyncAction.SyncActionValue.NoteEditAction.NoteType[message.type] : message.type;
                if (message.chatJid != null && message.hasOwnProperty("chatJid"))
                    object.chatJid = message.chatJid;
                if (message.createdAt != null && message.hasOwnProperty("createdAt"))
                    if (typeof message.createdAt === "number")
                        object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
                    else
                        object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber() : message.createdAt;
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    object.deleted = message.deleted;
                if (message.unstructuredContent != null && message.hasOwnProperty("unstructuredContent"))
                    object.unstructuredContent = message.unstructuredContent;
                return object;
            };

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

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

            /**
             * NoteType enum.
             * @name SyncAction.SyncActionValue.NoteEditAction.NoteType
             * @enum {number}
             * @property {number} UNSTRUCTURED=1 UNSTRUCTURED value
             * @property {number} STRUCTURED=2 STRUCTURED value
             */
            NoteEditAction.NoteType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "UNSTRUCTURED"] = 1;
                values[valuesById[2] = "STRUCTURED"] = 2;
                return values;
            })();

            return NoteEditAction;
        })();

        SyncActionValue.NotificationActivitySettingAction = (function() {

            /**
             * Properties of a NotificationActivitySettingAction.
             * @memberof SyncAction.SyncActionValue
             * @interface INotificationActivitySettingAction
             * @property {SyncAction.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting|null} [notificationActivitySetting] NotificationActivitySettingAction notificationActivitySetting
             */

            /**
             * Constructs a new NotificationActivitySettingAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a NotificationActivitySettingAction.
             * @implements INotificationActivitySettingAction
             * @constructor
             * @param {SyncAction.SyncActionValue.INotificationActivitySettingAction=} [properties] Properties to set
             */
            function NotificationActivitySettingAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * NotificationActivitySettingAction notificationActivitySetting.
             * @member {SyncAction.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting} notificationActivitySetting
             * @memberof SyncAction.SyncActionValue.NotificationActivitySettingAction
             * @instance
             */
            NotificationActivitySettingAction.prototype.notificationActivitySetting = 0;

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

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

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

            /**
             * Decodes a NotificationActivitySettingAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.NotificationActivitySettingAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.NotificationActivitySettingAction} NotificationActivitySettingAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NotificationActivitySettingAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.NotificationActivitySettingAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.notificationActivitySetting = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a NotificationActivitySettingAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.NotificationActivitySettingAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NotificationActivitySettingAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.notificationActivitySetting != null && message.hasOwnProperty("notificationActivitySetting"))
                    switch (message.notificationActivitySetting) {
                    default:
                        return "notificationActivitySetting: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                return null;
            };

            /**
             * Creates a NotificationActivitySettingAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.NotificationActivitySettingAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.NotificationActivitySettingAction} NotificationActivitySettingAction
             */
            NotificationActivitySettingAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.NotificationActivitySettingAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.NotificationActivitySettingAction();
                switch (object.notificationActivitySetting) {
                default:
                    if (typeof object.notificationActivitySetting === "number") {
                        message.notificationActivitySetting = object.notificationActivitySetting;
                        break;
                    }
                    break;
                case "DEFAULT_ALL_MESSAGES":
                case 0:
                    message.notificationActivitySetting = 0;
                    break;
                case "ALL_MESSAGES":
                case 1:
                    message.notificationActivitySetting = 1;
                    break;
                case "HIGHLIGHTS":
                case 2:
                    message.notificationActivitySetting = 2;
                    break;
                case "DEFAULT_HIGHLIGHTS":
                case 3:
                    message.notificationActivitySetting = 3;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a NotificationActivitySettingAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.NotificationActivitySettingAction
             * @static
             * @param {SyncAction.SyncActionValue.NotificationActivitySettingAction} message NotificationActivitySettingAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NotificationActivitySettingAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults)
                    object.notificationActivitySetting = options.enums === String ? "DEFAULT_ALL_MESSAGES" : 0;
                if (message.notificationActivitySetting != null && message.hasOwnProperty("notificationActivitySetting"))
                    object.notificationActivitySetting = options.enums === String ? $root.SyncAction.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting[message.notificationActivitySetting] === undefined ? message.notificationActivitySetting : $root.SyncAction.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting[message.notificationActivitySetting] : message.notificationActivitySetting;
                return object;
            };

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

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

            /**
             * NotificationActivitySetting enum.
             * @name SyncAction.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting
             * @enum {number}
             * @property {number} DEFAULT_ALL_MESSAGES=0 DEFAULT_ALL_MESSAGES value
             * @property {number} ALL_MESSAGES=1 ALL_MESSAGES value
             * @property {number} HIGHLIGHTS=2 HIGHLIGHTS value
             * @property {number} DEFAULT_HIGHLIGHTS=3 DEFAULT_HIGHLIGHTS value
             */
            NotificationActivitySettingAction.NotificationActivitySetting = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "DEFAULT_ALL_MESSAGES"] = 0;
                values[valuesById[1] = "ALL_MESSAGES"] = 1;
                values[valuesById[2] = "HIGHLIGHTS"] = 2;
                values[valuesById[3] = "DEFAULT_HIGHLIGHTS"] = 3;
                return values;
            })();

            return NotificationActivitySettingAction;
        })();

        SyncActionValue.NuxAction = (function() {

            /**
             * Properties of a NuxAction.
             * @memberof SyncAction.SyncActionValue
             * @interface INuxAction
             * @property {boolean|null} [acknowledged] NuxAction acknowledged
             */

            /**
             * Constructs a new NuxAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a NuxAction.
             * @implements INuxAction
             * @constructor
             * @param {SyncAction.SyncActionValue.INuxAction=} [properties] Properties to set
             */
            function NuxAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * NuxAction acknowledged.
             * @member {boolean} acknowledged
             * @memberof SyncAction.SyncActionValue.NuxAction
             * @instance
             */
            NuxAction.prototype.acknowledged = false;

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

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

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

            /**
             * Decodes a NuxAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.NuxAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.NuxAction} NuxAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NuxAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.NuxAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.acknowledged = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return NuxAction;
        })();

        SyncActionValue.PaymentInfoAction = (function() {

            /**
             * Properties of a PaymentInfoAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IPaymentInfoAction
             * @property {string|null} [cpi] PaymentInfoAction cpi
             */

            /**
             * Constructs a new PaymentInfoAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PaymentInfoAction.
             * @implements IPaymentInfoAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IPaymentInfoAction=} [properties] Properties to set
             */
            function PaymentInfoAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PaymentInfoAction cpi.
             * @member {string} cpi
             * @memberof SyncAction.SyncActionValue.PaymentInfoAction
             * @instance
             */
            PaymentInfoAction.prototype.cpi = "";

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

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

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

            /**
             * Decodes a PaymentInfoAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PaymentInfoAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PaymentInfoAction} PaymentInfoAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentInfoAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PaymentInfoAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.cpi = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PaymentInfoAction;
        })();

        SyncActionValue.PaymentTosAction = (function() {

            /**
             * Properties of a PaymentTosAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IPaymentTosAction
             * @property {SyncAction.SyncActionValue.PaymentTosAction.PaymentNotice} paymentNotice PaymentTosAction paymentNotice
             * @property {boolean} accepted PaymentTosAction accepted
             */

            /**
             * Constructs a new PaymentTosAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PaymentTosAction.
             * @implements IPaymentTosAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IPaymentTosAction=} [properties] Properties to set
             */
            function PaymentTosAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PaymentTosAction paymentNotice.
             * @member {SyncAction.SyncActionValue.PaymentTosAction.PaymentNotice} paymentNotice
             * @memberof SyncAction.SyncActionValue.PaymentTosAction
             * @instance
             */
            PaymentTosAction.prototype.paymentNotice = 0;

            /**
             * PaymentTosAction accepted.
             * @member {boolean} accepted
             * @memberof SyncAction.SyncActionValue.PaymentTosAction
             * @instance
             */
            PaymentTosAction.prototype.accepted = false;

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

            /**
             * Encodes the specified PaymentTosAction message. Does not implicitly {@link SyncAction.SyncActionValue.PaymentTosAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.PaymentTosAction
             * @static
             * @param {SyncAction.SyncActionValue.IPaymentTosAction} message PaymentTosAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PaymentTosAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.paymentNotice);
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.accepted);
                return writer;
            };

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

            /**
             * Decodes a PaymentTosAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PaymentTosAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PaymentTosAction} PaymentTosAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentTosAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PaymentTosAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.paymentNotice = reader.int32();
                            break;
                        }
                    case 2: {
                            message.accepted = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                if (!message.hasOwnProperty("paymentNotice"))
                    throw $util.ProtocolError("missing required 'paymentNotice'", { instance: message });
                if (!message.hasOwnProperty("accepted"))
                    throw $util.ProtocolError("missing required 'accepted'", { instance: message });
                return message;
            };

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

            /**
             * Verifies a PaymentTosAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.PaymentTosAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PaymentTosAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                switch (message.paymentNotice) {
                default:
                    return "paymentNotice: enum value expected";
                case 0:
                    break;
                }
                if (typeof message.accepted !== "boolean")
                    return "accepted: boolean expected";
                return null;
            };

            /**
             * Creates a PaymentTosAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.PaymentTosAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.PaymentTosAction} PaymentTosAction
             */
            PaymentTosAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.PaymentTosAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.PaymentTosAction();
                switch (object.paymentNotice) {
                default:
                    if (typeof object.paymentNotice === "number") {
                        message.paymentNotice = object.paymentNotice;
                        break;
                    }
                    break;
                case "BR_PAY_PRIVACY_POLICY":
                case 0:
                    message.paymentNotice = 0;
                    break;
                }
                if (object.accepted != null)
                    message.accepted = Boolean(object.accepted);
                return message;
            };

            /**
             * Creates a plain object from a PaymentTosAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.PaymentTosAction
             * @static
             * @param {SyncAction.SyncActionValue.PaymentTosAction} message PaymentTosAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PaymentTosAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.paymentNotice = options.enums === String ? "BR_PAY_PRIVACY_POLICY" : 0;
                    object.accepted = false;
                }
                if (message.paymentNotice != null && message.hasOwnProperty("paymentNotice"))
                    object.paymentNotice = options.enums === String ? $root.SyncAction.SyncActionValue.PaymentTosAction.PaymentNotice[message.paymentNotice] === undefined ? message.paymentNotice : $root.SyncAction.SyncActionValue.PaymentTosAction.PaymentNotice[message.paymentNotice] : message.paymentNotice;
                if (message.accepted != null && message.hasOwnProperty("accepted"))
                    object.accepted = message.accepted;
                return object;
            };

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

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

            /**
             * PaymentNotice enum.
             * @name SyncAction.SyncActionValue.PaymentTosAction.PaymentNotice
             * @enum {number}
             * @property {number} BR_PAY_PRIVACY_POLICY=0 BR_PAY_PRIVACY_POLICY value
             */
            PaymentTosAction.PaymentNotice = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "BR_PAY_PRIVACY_POLICY"] = 0;
                return values;
            })();

            return PaymentTosAction;
        })();

        SyncActionValue.PinAction = (function() {

            /**
             * Properties of a PinAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IPinAction
             * @property {boolean|null} [pinned] PinAction pinned
             */

            /**
             * Constructs a new PinAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PinAction.
             * @implements IPinAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IPinAction=} [properties] Properties to set
             */
            function PinAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PinAction pinned.
             * @member {boolean} pinned
             * @memberof SyncAction.SyncActionValue.PinAction
             * @instance
             */
            PinAction.prototype.pinned = false;

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

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

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

            /**
             * Decodes a PinAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PinAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PinAction} PinAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PinAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PinAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.pinned = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PinAction;
        })();

        SyncActionValue.PnForLidChatAction = (function() {

            /**
             * Properties of a PnForLidChatAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IPnForLidChatAction
             * @property {string|null} [pnJid] PnForLidChatAction pnJid
             */

            /**
             * Constructs a new PnForLidChatAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PnForLidChatAction.
             * @implements IPnForLidChatAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IPnForLidChatAction=} [properties] Properties to set
             */
            function PnForLidChatAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PnForLidChatAction pnJid.
             * @member {string} pnJid
             * @memberof SyncAction.SyncActionValue.PnForLidChatAction
             * @instance
             */
            PnForLidChatAction.prototype.pnJid = "";

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

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

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

            /**
             * Decodes a PnForLidChatAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PnForLidChatAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PnForLidChatAction} PnForLidChatAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PnForLidChatAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PnForLidChatAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.pnJid = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PnForLidChatAction;
        })();

        SyncActionValue.PrimaryFeature = (function() {

            /**
             * Properties of a PrimaryFeature.
             * @memberof SyncAction.SyncActionValue
             * @interface IPrimaryFeature
             * @property {Array.<string>|null} [flags] PrimaryFeature flags
             */

            /**
             * Constructs a new PrimaryFeature.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PrimaryFeature.
             * @implements IPrimaryFeature
             * @constructor
             * @param {SyncAction.SyncActionValue.IPrimaryFeature=} [properties] Properties to set
             */
            function PrimaryFeature(properties) {
                this.flags = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PrimaryFeature flags.
             * @member {Array.<string>} flags
             * @memberof SyncAction.SyncActionValue.PrimaryFeature
             * @instance
             */
            PrimaryFeature.prototype.flags = $util.emptyArray;

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

            /**
             * Encodes the specified PrimaryFeature message. Does not implicitly {@link SyncAction.SyncActionValue.PrimaryFeature.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.PrimaryFeature
             * @static
             * @param {SyncAction.SyncActionValue.IPrimaryFeature} message PrimaryFeature message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PrimaryFeature.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.flags != null && message.flags.length)
                    for (var i = 0; i < message.flags.length; ++i)
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.flags[i]);
                return writer;
            };

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

            /**
             * Decodes a PrimaryFeature message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PrimaryFeature
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PrimaryFeature} PrimaryFeature
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PrimaryFeature.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PrimaryFeature();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.flags && message.flags.length))
                                message.flags = [];
                            message.flags.push(reader.string());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a PrimaryFeature message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.PrimaryFeature
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PrimaryFeature.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.flags != null && message.hasOwnProperty("flags")) {
                    if (!Array.isArray(message.flags))
                        return "flags: array expected";
                    for (var i = 0; i < message.flags.length; ++i)
                        if (!$util.isString(message.flags[i]))
                            return "flags: string[] expected";
                }
                return null;
            };

            /**
             * Creates a PrimaryFeature message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.PrimaryFeature
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.PrimaryFeature} PrimaryFeature
             */
            PrimaryFeature.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.PrimaryFeature)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.PrimaryFeature();
                if (object.flags) {
                    if (!Array.isArray(object.flags))
                        throw TypeError(".SyncAction.SyncActionValue.PrimaryFeature.flags: array expected");
                    message.flags = [];
                    for (var i = 0; i < object.flags.length; ++i)
                        message.flags[i] = String(object.flags[i]);
                }
                return message;
            };

            /**
             * Creates a plain object from a PrimaryFeature message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.PrimaryFeature
             * @static
             * @param {SyncAction.SyncActionValue.PrimaryFeature} message PrimaryFeature
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PrimaryFeature.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.flags = [];
                if (message.flags && message.flags.length) {
                    object.flags = [];
                    for (var j = 0; j < message.flags.length; ++j)
                        object.flags[j] = message.flags[j];
                }
                return object;
            };

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

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

            return PrimaryFeature;
        })();

        SyncActionValue.PrimaryVersionAction = (function() {

            /**
             * Properties of a PrimaryVersionAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IPrimaryVersionAction
             * @property {string|null} [version] PrimaryVersionAction version
             */

            /**
             * Constructs a new PrimaryVersionAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PrimaryVersionAction.
             * @implements IPrimaryVersionAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IPrimaryVersionAction=} [properties] Properties to set
             */
            function PrimaryVersionAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PrimaryVersionAction version.
             * @member {string} version
             * @memberof SyncAction.SyncActionValue.PrimaryVersionAction
             * @instance
             */
            PrimaryVersionAction.prototype.version = "";

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

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

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

            /**
             * Decodes a PrimaryVersionAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PrimaryVersionAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PrimaryVersionAction} PrimaryVersionAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PrimaryVersionAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PrimaryVersionAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.version = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PrimaryVersionAction;
        })();

        SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction = (function() {

            /**
             * Properties of a PrivacySettingChannelsPersonalisedRecommendationAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IPrivacySettingChannelsPersonalisedRecommendationAction
             * @property {boolean|null} [isUserOptedOut] PrivacySettingChannelsPersonalisedRecommendationAction isUserOptedOut
             */

            /**
             * Constructs a new PrivacySettingChannelsPersonalisedRecommendationAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PrivacySettingChannelsPersonalisedRecommendationAction.
             * @implements IPrivacySettingChannelsPersonalisedRecommendationAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IPrivacySettingChannelsPersonalisedRecommendationAction=} [properties] Properties to set
             */
            function PrivacySettingChannelsPersonalisedRecommendationAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PrivacySettingChannelsPersonalisedRecommendationAction isUserOptedOut.
             * @member {boolean} isUserOptedOut
             * @memberof SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction
             * @instance
             */
            PrivacySettingChannelsPersonalisedRecommendationAction.prototype.isUserOptedOut = false;

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

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

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

            /**
             * Decodes a PrivacySettingChannelsPersonalisedRecommendationAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction} PrivacySettingChannelsPersonalisedRecommendationAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PrivacySettingChannelsPersonalisedRecommendationAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isUserOptedOut = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PrivacySettingChannelsPersonalisedRecommendationAction;
        })();

        SyncActionValue.PrivacySettingDisableLinkPreviewsAction = (function() {

            /**
             * Properties of a PrivacySettingDisableLinkPreviewsAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IPrivacySettingDisableLinkPreviewsAction
             * @property {boolean|null} [isPreviewsDisabled] PrivacySettingDisableLinkPreviewsAction isPreviewsDisabled
             */

            /**
             * Constructs a new PrivacySettingDisableLinkPreviewsAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PrivacySettingDisableLinkPreviewsAction.
             * @implements IPrivacySettingDisableLinkPreviewsAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction=} [properties] Properties to set
             */
            function PrivacySettingDisableLinkPreviewsAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PrivacySettingDisableLinkPreviewsAction isPreviewsDisabled.
             * @member {boolean} isPreviewsDisabled
             * @memberof SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction
             * @instance
             */
            PrivacySettingDisableLinkPreviewsAction.prototype.isPreviewsDisabled = false;

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

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

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

            /**
             * Decodes a PrivacySettingDisableLinkPreviewsAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction} PrivacySettingDisableLinkPreviewsAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PrivacySettingDisableLinkPreviewsAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PrivacySettingDisableLinkPreviewsAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isPreviewsDisabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PrivacySettingDisableLinkPreviewsAction;
        })();

        SyncActionValue.PrivacySettingRelayAllCalls = (function() {

            /**
             * Properties of a PrivacySettingRelayAllCalls.
             * @memberof SyncAction.SyncActionValue
             * @interface IPrivacySettingRelayAllCalls
             * @property {boolean|null} [isEnabled] PrivacySettingRelayAllCalls isEnabled
             */

            /**
             * Constructs a new PrivacySettingRelayAllCalls.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PrivacySettingRelayAllCalls.
             * @implements IPrivacySettingRelayAllCalls
             * @constructor
             * @param {SyncAction.SyncActionValue.IPrivacySettingRelayAllCalls=} [properties] Properties to set
             */
            function PrivacySettingRelayAllCalls(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PrivacySettingRelayAllCalls isEnabled.
             * @member {boolean} isEnabled
             * @memberof SyncAction.SyncActionValue.PrivacySettingRelayAllCalls
             * @instance
             */
            PrivacySettingRelayAllCalls.prototype.isEnabled = false;

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

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

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

            /**
             * Decodes a PrivacySettingRelayAllCalls message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PrivacySettingRelayAllCalls
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PrivacySettingRelayAllCalls} PrivacySettingRelayAllCalls
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PrivacySettingRelayAllCalls.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PrivacySettingRelayAllCalls();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isEnabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PrivacySettingRelayAllCalls;
        })();

        SyncActionValue.PushNameSetting = (function() {

            /**
             * Properties of a PushNameSetting.
             * @memberof SyncAction.SyncActionValue
             * @interface IPushNameSetting
             * @property {string|null} [name] PushNameSetting name
             */

            /**
             * Constructs a new PushNameSetting.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a PushNameSetting.
             * @implements IPushNameSetting
             * @constructor
             * @param {SyncAction.SyncActionValue.IPushNameSetting=} [properties] Properties to set
             */
            function PushNameSetting(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * PushNameSetting name.
             * @member {string} name
             * @memberof SyncAction.SyncActionValue.PushNameSetting
             * @instance
             */
            PushNameSetting.prototype.name = "";

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

            /**
             * Encodes the specified PushNameSetting message. Does not implicitly {@link SyncAction.SyncActionValue.PushNameSetting.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.PushNameSetting
             * @static
             * @param {SyncAction.SyncActionValue.IPushNameSetting} message PushNameSetting message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PushNameSetting.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);
                return writer;
            };

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

            /**
             * Decodes a PushNameSetting message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.PushNameSetting
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.PushNameSetting} PushNameSetting
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PushNameSetting.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.PushNameSetting();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.name = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return PushNameSetting;
        })();

        SyncActionValue.QuickReplyAction = (function() {

            /**
             * Properties of a QuickReplyAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IQuickReplyAction
             * @property {string|null} [shortcut] QuickReplyAction shortcut
             * @property {string|null} [message] QuickReplyAction message
             * @property {Array.<string>|null} [keywords] QuickReplyAction keywords
             * @property {number|null} [count] QuickReplyAction count
             * @property {boolean|null} [deleted] QuickReplyAction deleted
             */

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

            /**
             * QuickReplyAction shortcut.
             * @member {string} shortcut
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @instance
             */
            QuickReplyAction.prototype.shortcut = "";

            /**
             * QuickReplyAction message.
             * @member {string} message
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @instance
             */
            QuickReplyAction.prototype.message = "";

            /**
             * QuickReplyAction keywords.
             * @member {Array.<string>} keywords
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @instance
             */
            QuickReplyAction.prototype.keywords = $util.emptyArray;

            /**
             * QuickReplyAction count.
             * @member {number} count
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @instance
             */
            QuickReplyAction.prototype.count = 0;

            /**
             * QuickReplyAction deleted.
             * @member {boolean} deleted
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @instance
             */
            QuickReplyAction.prototype.deleted = false;

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

            /**
             * Encodes the specified QuickReplyAction message. Does not implicitly {@link SyncAction.SyncActionValue.QuickReplyAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @static
             * @param {SyncAction.SyncActionValue.IQuickReplyAction} message QuickReplyAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QuickReplyAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.shortcut != null && Object.hasOwnProperty.call(message, "shortcut"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortcut);
                if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
                if (message.keywords != null && message.keywords.length)
                    for (var i = 0; i < message.keywords.length; ++i)
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.keywords[i]);
                if (message.count != null && Object.hasOwnProperty.call(message, "count"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count);
                if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted"))
                    writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deleted);
                return writer;
            };

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

            /**
             * Decodes a QuickReplyAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.QuickReplyAction} QuickReplyAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QuickReplyAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.QuickReplyAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.shortcut = reader.string();
                            break;
                        }
                    case 2: {
                            message.message = reader.string();
                            break;
                        }
                    case 3: {
                            if (!(message.keywords && message.keywords.length))
                                message.keywords = [];
                            message.keywords.push(reader.string());
                            break;
                        }
                    case 4: {
                            message.count = reader.int32();
                            break;
                        }
                    case 5: {
                            message.deleted = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a QuickReplyAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QuickReplyAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.shortcut != null && message.hasOwnProperty("shortcut"))
                    if (!$util.isString(message.shortcut))
                        return "shortcut: string expected";
                if (message.message != null && message.hasOwnProperty("message"))
                    if (!$util.isString(message.message))
                        return "message: string 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)
                        if (!$util.isString(message.keywords[i]))
                            return "keywords: string[] expected";
                }
                if (message.count != null && message.hasOwnProperty("count"))
                    if (!$util.isInteger(message.count))
                        return "count: integer expected";
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    if (typeof message.deleted !== "boolean")
                        return "deleted: boolean expected";
                return null;
            };

            /**
             * Creates a QuickReplyAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.QuickReplyAction} QuickReplyAction
             */
            QuickReplyAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.QuickReplyAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.QuickReplyAction();
                if (object.shortcut != null)
                    message.shortcut = String(object.shortcut);
                if (object.message != null)
                    message.message = String(object.message);
                if (object.keywords) {
                    if (!Array.isArray(object.keywords))
                        throw TypeError(".SyncAction.SyncActionValue.QuickReplyAction.keywords: array expected");
                    message.keywords = [];
                    for (var i = 0; i < object.keywords.length; ++i)
                        message.keywords[i] = String(object.keywords[i]);
                }
                if (object.count != null)
                    message.count = object.count | 0;
                if (object.deleted != null)
                    message.deleted = Boolean(object.deleted);
                return message;
            };

            /**
             * Creates a plain object from a QuickReplyAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.QuickReplyAction
             * @static
             * @param {SyncAction.SyncActionValue.QuickReplyAction} message QuickReplyAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QuickReplyAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.keywords = [];
                if (options.defaults) {
                    object.shortcut = "";
                    object.message = "";
                    object.count = 0;
                    object.deleted = false;
                }
                if (message.shortcut != null && message.hasOwnProperty("shortcut"))
                    object.shortcut = message.shortcut;
                if (message.message != null && message.hasOwnProperty("message"))
                    object.message = message.message;
                if (message.keywords && message.keywords.length) {
                    object.keywords = [];
                    for (var j = 0; j < message.keywords.length; ++j)
                        object.keywords[j] = message.keywords[j];
                }
                if (message.count != null && message.hasOwnProperty("count"))
                    object.count = message.count;
                if (message.deleted != null && message.hasOwnProperty("deleted"))
                    object.deleted = message.deleted;
                return object;
            };

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

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

            return QuickReplyAction;
        })();

        SyncActionValue.RecentEmojiWeightsAction = (function() {

            /**
             * Properties of a RecentEmojiWeightsAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IRecentEmojiWeightsAction
             * @property {Array.<SyncAction.IRecentEmojiWeight>|null} [weights] RecentEmojiWeightsAction weights
             */

            /**
             * Constructs a new RecentEmojiWeightsAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a RecentEmojiWeightsAction.
             * @implements IRecentEmojiWeightsAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IRecentEmojiWeightsAction=} [properties] Properties to set
             */
            function RecentEmojiWeightsAction(properties) {
                this.weights = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * RecentEmojiWeightsAction weights.
             * @member {Array.<SyncAction.IRecentEmojiWeight>} weights
             * @memberof SyncAction.SyncActionValue.RecentEmojiWeightsAction
             * @instance
             */
            RecentEmojiWeightsAction.prototype.weights = $util.emptyArray;

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

            /**
             * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link SyncAction.SyncActionValue.RecentEmojiWeightsAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.RecentEmojiWeightsAction
             * @static
             * @param {SyncAction.SyncActionValue.IRecentEmojiWeightsAction} message RecentEmojiWeightsAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RecentEmojiWeightsAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.weights != null && message.weights.length)
                    for (var i = 0; i < message.weights.length; ++i)
                        $root.SyncAction.RecentEmojiWeight.encode(message.weights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.RecentEmojiWeightsAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.RecentEmojiWeightsAction} RecentEmojiWeightsAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RecentEmojiWeightsAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.weights && message.weights.length))
                                message.weights = [];
                            message.weights.push($root.SyncAction.RecentEmojiWeight.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a RecentEmojiWeightsAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.RecentEmojiWeightsAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RecentEmojiWeightsAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.weights != null && message.hasOwnProperty("weights")) {
                    if (!Array.isArray(message.weights))
                        return "weights: array expected";
                    for (var i = 0; i < message.weights.length; ++i) {
                        var error = $root.SyncAction.RecentEmojiWeight.verify(message.weights[i]);
                        if (error)
                            return "weights." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a RecentEmojiWeightsAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.RecentEmojiWeightsAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.RecentEmojiWeightsAction} RecentEmojiWeightsAction
             */
            RecentEmojiWeightsAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.RecentEmojiWeightsAction();
                if (object.weights) {
                    if (!Array.isArray(object.weights))
                        throw TypeError(".SyncAction.SyncActionValue.RecentEmojiWeightsAction.weights: array expected");
                    message.weights = [];
                    for (var i = 0; i < object.weights.length; ++i) {
                        if (typeof object.weights[i] !== "object")
                            throw TypeError(".SyncAction.SyncActionValue.RecentEmojiWeightsAction.weights: object expected");
                        message.weights[i] = $root.SyncAction.RecentEmojiWeight.fromObject(object.weights[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a RecentEmojiWeightsAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.RecentEmojiWeightsAction
             * @static
             * @param {SyncAction.SyncActionValue.RecentEmojiWeightsAction} message RecentEmojiWeightsAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RecentEmojiWeightsAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.weights = [];
                if (message.weights && message.weights.length) {
                    object.weights = [];
                    for (var j = 0; j < message.weights.length; ++j)
                        object.weights[j] = $root.SyncAction.RecentEmojiWeight.toObject(message.weights[j], options);
                }
                return object;
            };

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

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

            return RecentEmojiWeightsAction;
        })();

        SyncActionValue.RemoveRecentStickerAction = (function() {

            /**
             * Properties of a RemoveRecentStickerAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IRemoveRecentStickerAction
             * @property {number|Long|null} [lastStickerSentTs] RemoveRecentStickerAction lastStickerSentTs
             */

            /**
             * Constructs a new RemoveRecentStickerAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a RemoveRecentStickerAction.
             * @implements IRemoveRecentStickerAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IRemoveRecentStickerAction=} [properties] Properties to set
             */
            function RemoveRecentStickerAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * RemoveRecentStickerAction lastStickerSentTs.
             * @member {number|Long} lastStickerSentTs
             * @memberof SyncAction.SyncActionValue.RemoveRecentStickerAction
             * @instance
             */
            RemoveRecentStickerAction.prototype.lastStickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

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

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

            /**
             * Decodes a RemoveRecentStickerAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.RemoveRecentStickerAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.RemoveRecentStickerAction} RemoveRecentStickerAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RemoveRecentStickerAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.RemoveRecentStickerAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.lastStickerSentTs = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return RemoveRecentStickerAction;
        })();

        SyncActionValue.SecurityNotificationSetting = (function() {

            /**
             * Properties of a SecurityNotificationSetting.
             * @memberof SyncAction.SyncActionValue
             * @interface ISecurityNotificationSetting
             * @property {boolean|null} [showNotification] SecurityNotificationSetting showNotification
             */

            /**
             * Constructs a new SecurityNotificationSetting.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a SecurityNotificationSetting.
             * @implements ISecurityNotificationSetting
             * @constructor
             * @param {SyncAction.SyncActionValue.ISecurityNotificationSetting=} [properties] Properties to set
             */
            function SecurityNotificationSetting(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * SecurityNotificationSetting showNotification.
             * @member {boolean} showNotification
             * @memberof SyncAction.SyncActionValue.SecurityNotificationSetting
             * @instance
             */
            SecurityNotificationSetting.prototype.showNotification = false;

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

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

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

            /**
             * Decodes a SecurityNotificationSetting message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.SecurityNotificationSetting
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.SecurityNotificationSetting} SecurityNotificationSetting
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SecurityNotificationSetting.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.SecurityNotificationSetting();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.showNotification = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return SecurityNotificationSetting;
        })();

        SyncActionValue.StarAction = (function() {

            /**
             * Properties of a StarAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IStarAction
             * @property {boolean|null} [starred] StarAction starred
             */

            /**
             * Constructs a new StarAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a StarAction.
             * @implements IStarAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IStarAction=} [properties] Properties to set
             */
            function StarAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * StarAction starred.
             * @member {boolean} starred
             * @memberof SyncAction.SyncActionValue.StarAction
             * @instance
             */
            StarAction.prototype.starred = false;

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

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

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

            /**
             * Decodes a StarAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.StarAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.StarAction} StarAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StarAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.StarAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.starred = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return StarAction;
        })();

        SyncActionValue.StatusPostOptInNotificationPreferencesAction = (function() {

            /**
             * Properties of a StatusPostOptInNotificationPreferencesAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IStatusPostOptInNotificationPreferencesAction
             * @property {boolean|null} [enabled] StatusPostOptInNotificationPreferencesAction enabled
             */

            /**
             * Constructs a new StatusPostOptInNotificationPreferencesAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a StatusPostOptInNotificationPreferencesAction.
             * @implements IStatusPostOptInNotificationPreferencesAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IStatusPostOptInNotificationPreferencesAction=} [properties] Properties to set
             */
            function StatusPostOptInNotificationPreferencesAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * StatusPostOptInNotificationPreferencesAction enabled.
             * @member {boolean} enabled
             * @memberof SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction
             * @instance
             */
            StatusPostOptInNotificationPreferencesAction.prototype.enabled = false;

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

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

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

            /**
             * Decodes a StatusPostOptInNotificationPreferencesAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction} StatusPostOptInNotificationPreferencesAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusPostOptInNotificationPreferencesAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.StatusPostOptInNotificationPreferencesAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.enabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return StatusPostOptInNotificationPreferencesAction;
        })();

        SyncActionValue.StatusPrivacyAction = (function() {

            /**
             * Properties of a StatusPrivacyAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IStatusPrivacyAction
             * @property {SyncAction.SyncActionValue.StatusPrivacyAction.StatusDistributionMode|null} [mode] StatusPrivacyAction mode
             * @property {Array.<string>|null} [userJid] StatusPrivacyAction userJid
             */

            /**
             * Constructs a new StatusPrivacyAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a StatusPrivacyAction.
             * @implements IStatusPrivacyAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IStatusPrivacyAction=} [properties] Properties to set
             */
            function StatusPrivacyAction(properties) {
                this.userJid = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * StatusPrivacyAction mode.
             * @member {SyncAction.SyncActionValue.StatusPrivacyAction.StatusDistributionMode} mode
             * @memberof SyncAction.SyncActionValue.StatusPrivacyAction
             * @instance
             */
            StatusPrivacyAction.prototype.mode = 0;

            /**
             * StatusPrivacyAction userJid.
             * @member {Array.<string>} userJid
             * @memberof SyncAction.SyncActionValue.StatusPrivacyAction
             * @instance
             */
            StatusPrivacyAction.prototype.userJid = $util.emptyArray;

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

            /**
             * Encodes the specified StatusPrivacyAction message. Does not implicitly {@link SyncAction.SyncActionValue.StatusPrivacyAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.StatusPrivacyAction
             * @static
             * @param {SyncAction.SyncActionValue.IStatusPrivacyAction} message StatusPrivacyAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusPrivacyAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.mode != null && Object.hasOwnProperty.call(message, "mode"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode);
                if (message.userJid != null && message.userJid.length)
                    for (var i = 0; i < message.userJid.length; ++i)
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.userJid[i]);
                return writer;
            };

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

            /**
             * Decodes a StatusPrivacyAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.StatusPrivacyAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.StatusPrivacyAction} StatusPrivacyAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusPrivacyAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.StatusPrivacyAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.mode = reader.int32();
                            break;
                        }
                    case 2: {
                            if (!(message.userJid && message.userJid.length))
                                message.userJid = [];
                            message.userJid.push(reader.string());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a StatusPrivacyAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.StatusPrivacyAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusPrivacyAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.mode != null && message.hasOwnProperty("mode"))
                    switch (message.mode) {
                    default:
                        return "mode: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                if (message.userJid != null && message.hasOwnProperty("userJid")) {
                    if (!Array.isArray(message.userJid))
                        return "userJid: array expected";
                    for (var i = 0; i < message.userJid.length; ++i)
                        if (!$util.isString(message.userJid[i]))
                            return "userJid: string[] expected";
                }
                return null;
            };

            /**
             * Creates a StatusPrivacyAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.StatusPrivacyAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.StatusPrivacyAction} StatusPrivacyAction
             */
            StatusPrivacyAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.StatusPrivacyAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.StatusPrivacyAction();
                switch (object.mode) {
                default:
                    if (typeof object.mode === "number") {
                        message.mode = object.mode;
                        break;
                    }
                    break;
                case "ALLOW_LIST":
                case 0:
                    message.mode = 0;
                    break;
                case "DENY_LIST":
                case 1:
                    message.mode = 1;
                    break;
                case "CONTACTS":
                case 2:
                    message.mode = 2;
                    break;
                }
                if (object.userJid) {
                    if (!Array.isArray(object.userJid))
                        throw TypeError(".SyncAction.SyncActionValue.StatusPrivacyAction.userJid: array expected");
                    message.userJid = [];
                    for (var i = 0; i < object.userJid.length; ++i)
                        message.userJid[i] = String(object.userJid[i]);
                }
                return message;
            };

            /**
             * Creates a plain object from a StatusPrivacyAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.StatusPrivacyAction
             * @static
             * @param {SyncAction.SyncActionValue.StatusPrivacyAction} message StatusPrivacyAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusPrivacyAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.userJid = [];
                if (options.defaults)
                    object.mode = options.enums === String ? "ALLOW_LIST" : 0;
                if (message.mode != null && message.hasOwnProperty("mode"))
                    object.mode = options.enums === String ? $root.SyncAction.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[message.mode] === undefined ? message.mode : $root.SyncAction.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[message.mode] : message.mode;
                if (message.userJid && message.userJid.length) {
                    object.userJid = [];
                    for (var j = 0; j < message.userJid.length; ++j)
                        object.userJid[j] = message.userJid[j];
                }
                return object;
            };

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

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

            /**
             * StatusDistributionMode enum.
             * @name SyncAction.SyncActionValue.StatusPrivacyAction.StatusDistributionMode
             * @enum {number}
             * @property {number} ALLOW_LIST=0 ALLOW_LIST value
             * @property {number} DENY_LIST=1 DENY_LIST value
             * @property {number} CONTACTS=2 CONTACTS value
             */
            StatusPrivacyAction.StatusDistributionMode = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "ALLOW_LIST"] = 0;
                values[valuesById[1] = "DENY_LIST"] = 1;
                values[valuesById[2] = "CONTACTS"] = 2;
                return values;
            })();

            return StatusPrivacyAction;
        })();

        SyncActionValue.StickerAction = (function() {

            /**
             * Properties of a StickerAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IStickerAction
             * @property {string|null} [url] StickerAction url
             * @property {Uint8Array|null} [fileEncSha256] StickerAction fileEncSha256
             * @property {Uint8Array|null} [mediaKey] StickerAction mediaKey
             * @property {string|null} [mimetype] StickerAction mimetype
             * @property {number|null} [height] StickerAction height
             * @property {number|null} [width] StickerAction width
             * @property {string|null} [directPath] StickerAction directPath
             * @property {number|Long|null} [fileLength] StickerAction fileLength
             * @property {boolean|null} [isFavorite] StickerAction isFavorite
             * @property {number|null} [deviceIdHint] StickerAction deviceIdHint
             * @property {boolean|null} [isLottie] StickerAction isLottie
             * @property {string|null} [imageHash] StickerAction imageHash
             * @property {boolean|null} [isAvatarSticker] StickerAction isAvatarSticker
             */

            /**
             * Constructs a new StickerAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a StickerAction.
             * @implements IStickerAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IStickerAction=} [properties] Properties to set
             */
            function StickerAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * StickerAction url.
             * @member {string} url
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.url = "";

            /**
             * StickerAction fileEncSha256.
             * @member {Uint8Array} fileEncSha256
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.fileEncSha256 = $util.newBuffer([]);

            /**
             * StickerAction mediaKey.
             * @member {Uint8Array} mediaKey
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.mediaKey = $util.newBuffer([]);

            /**
             * StickerAction mimetype.
             * @member {string} mimetype
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.mimetype = "";

            /**
             * StickerAction height.
             * @member {number} height
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.height = 0;

            /**
             * StickerAction width.
             * @member {number} width
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.width = 0;

            /**
             * StickerAction directPath.
             * @member {string} directPath
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.directPath = "";

            /**
             * StickerAction fileLength.
             * @member {number|Long} fileLength
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * StickerAction isFavorite.
             * @member {boolean} isFavorite
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.isFavorite = false;

            /**
             * StickerAction deviceIdHint.
             * @member {number} deviceIdHint
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.deviceIdHint = 0;

            /**
             * StickerAction isLottie.
             * @member {boolean} isLottie
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.isLottie = false;

            /**
             * StickerAction imageHash.
             * @member {string} imageHash
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.imageHash = "";

            /**
             * StickerAction isAvatarSticker.
             * @member {boolean} isAvatarSticker
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @instance
             */
            StickerAction.prototype.isAvatarSticker = false;

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

            /**
             * Encodes the specified StickerAction message. Does not implicitly {@link SyncAction.SyncActionValue.StickerAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @static
             * @param {SyncAction.SyncActionValue.IStickerAction} message StickerAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StickerAction.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.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileEncSha256);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.mediaKey);
                if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.mimetype);
                if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.height);
                if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                    writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.width);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.directPath);
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.fileLength);
                if (message.isFavorite != null && Object.hasOwnProperty.call(message, "isFavorite"))
                    writer.uint32(/* id 9, wireType 0 =*/72).bool(message.isFavorite);
                if (message.deviceIdHint != null && Object.hasOwnProperty.call(message, "deviceIdHint"))
                    writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.deviceIdHint);
                if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie"))
                    writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isLottie);
                if (message.imageHash != null && Object.hasOwnProperty.call(message, "imageHash"))
                    writer.uint32(/* id 12, wireType 2 =*/98).string(message.imageHash);
                if (message.isAvatarSticker != null && Object.hasOwnProperty.call(message, "isAvatarSticker"))
                    writer.uint32(/* id 13, wireType 0 =*/104).bool(message.isAvatarSticker);
                return writer;
            };

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

            /**
             * Decodes a StickerAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.StickerAction} StickerAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StickerAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.StickerAction();
                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.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.mimetype = reader.string();
                            break;
                        }
                    case 5: {
                            message.height = reader.uint32();
                            break;
                        }
                    case 6: {
                            message.width = reader.uint32();
                            break;
                        }
                    case 7: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 8: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 9: {
                            message.isFavorite = reader.bool();
                            break;
                        }
                    case 10: {
                            message.deviceIdHint = reader.uint32();
                            break;
                        }
                    case 11: {
                            message.isLottie = reader.bool();
                            break;
                        }
                    case 12: {
                            message.imageHash = reader.string();
                            break;
                        }
                    case 13: {
                            message.isAvatarSticker = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a StickerAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StickerAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.url != null && message.hasOwnProperty("url"))
                    if (!$util.isString(message.url))
                        return "url: string expected";
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256"))
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey"))
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                if (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                if (message.height != null && message.hasOwnProperty("height"))
                    if (!$util.isInteger(message.height))
                        return "height: integer expected";
                if (message.width != null && message.hasOwnProperty("width"))
                    if (!$util.isInteger(message.width))
                        return "width: integer expected";
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                if (message.fileLength != null && message.hasOwnProperty("fileLength"))
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                if (message.isFavorite != null && message.hasOwnProperty("isFavorite"))
                    if (typeof message.isFavorite !== "boolean")
                        return "isFavorite: boolean expected";
                if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint"))
                    if (!$util.isInteger(message.deviceIdHint))
                        return "deviceIdHint: integer expected";
                if (message.isLottie != null && message.hasOwnProperty("isLottie"))
                    if (typeof message.isLottie !== "boolean")
                        return "isLottie: boolean expected";
                if (message.imageHash != null && message.hasOwnProperty("imageHash"))
                    if (!$util.isString(message.imageHash))
                        return "imageHash: string expected";
                if (message.isAvatarSticker != null && message.hasOwnProperty("isAvatarSticker"))
                    if (typeof message.isAvatarSticker !== "boolean")
                        return "isAvatarSticker: boolean expected";
                return null;
            };

            /**
             * Creates a StickerAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.StickerAction} StickerAction
             */
            StickerAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.StickerAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.StickerAction();
                if (object.url != null)
                    message.url = String(object.url);
                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.isFavorite != null)
                    message.isFavorite = Boolean(object.isFavorite);
                if (object.deviceIdHint != null)
                    message.deviceIdHint = object.deviceIdHint >>> 0;
                if (object.isLottie != null)
                    message.isLottie = Boolean(object.isLottie);
                if (object.imageHash != null)
                    message.imageHash = String(object.imageHash);
                if (object.isAvatarSticker != null)
                    message.isAvatarSticker = Boolean(object.isAvatarSticker);
                return message;
            };

            /**
             * Creates a plain object from a StickerAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.StickerAction
             * @static
             * @param {SyncAction.SyncActionValue.StickerAction} message StickerAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StickerAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.url = "";
                    if (options.bytes === String)
                        object.fileEncSha256 = "";
                    else {
                        object.fileEncSha256 = [];
                        if (options.bytes !== Array)
                            object.fileEncSha256 = $util.newBuffer(object.fileEncSha256);
                    }
                    if (options.bytes === String)
                        object.mediaKey = "";
                    else {
                        object.mediaKey = [];
                        if (options.bytes !== Array)
                            object.mediaKey = $util.newBuffer(object.mediaKey);
                    }
                    object.mimetype = "";
                    object.height = 0;
                    object.width = 0;
                    object.directPath = "";
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.fileLength = options.longs === String ? "0" : 0;
                    object.isFavorite = false;
                    object.deviceIdHint = 0;
                    object.isLottie = false;
                    object.imageHash = "";
                    object.isAvatarSticker = false;
                }
                if (message.url != null && message.hasOwnProperty("url"))
                    object.url = message.url;
                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 (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 (message.mimetype != null && message.hasOwnProperty("mimetype"))
                    object.mimetype = message.mimetype;
                if (message.height != null && message.hasOwnProperty("height"))
                    object.height = message.height;
                if (message.width != null && message.hasOwnProperty("width"))
                    object.width = message.width;
                if (message.directPath != null && message.hasOwnProperty("directPath"))
                    object.directPath = message.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 (message.isFavorite != null && message.hasOwnProperty("isFavorite"))
                    object.isFavorite = message.isFavorite;
                if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint"))
                    object.deviceIdHint = message.deviceIdHint;
                if (message.isLottie != null && message.hasOwnProperty("isLottie"))
                    object.isLottie = message.isLottie;
                if (message.imageHash != null && message.hasOwnProperty("imageHash"))
                    object.imageHash = message.imageHash;
                if (message.isAvatarSticker != null && message.hasOwnProperty("isAvatarSticker"))
                    object.isAvatarSticker = message.isAvatarSticker;
                return object;
            };

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

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

            return StickerAction;
        })();

        SyncActionValue.SubscriptionAction = (function() {

            /**
             * Properties of a SubscriptionAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ISubscriptionAction
             * @property {boolean|null} [isDeactivated] SubscriptionAction isDeactivated
             * @property {boolean|null} [isAutoRenewing] SubscriptionAction isAutoRenewing
             * @property {number|Long|null} [expirationDate] SubscriptionAction expirationDate
             */

            /**
             * Constructs a new SubscriptionAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a SubscriptionAction.
             * @implements ISubscriptionAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ISubscriptionAction=} [properties] Properties to set
             */
            function SubscriptionAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * SubscriptionAction isDeactivated.
             * @member {boolean} isDeactivated
             * @memberof SyncAction.SyncActionValue.SubscriptionAction
             * @instance
             */
            SubscriptionAction.prototype.isDeactivated = false;

            /**
             * SubscriptionAction isAutoRenewing.
             * @member {boolean} isAutoRenewing
             * @memberof SyncAction.SyncActionValue.SubscriptionAction
             * @instance
             */
            SubscriptionAction.prototype.isAutoRenewing = false;

            /**
             * SubscriptionAction expirationDate.
             * @member {number|Long} expirationDate
             * @memberof SyncAction.SyncActionValue.SubscriptionAction
             * @instance
             */
            SubscriptionAction.prototype.expirationDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

            /**
             * Encodes the specified SubscriptionAction message. Does not implicitly {@link SyncAction.SyncActionValue.SubscriptionAction.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.SubscriptionAction
             * @static
             * @param {SyncAction.SyncActionValue.ISubscriptionAction} message SubscriptionAction message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SubscriptionAction.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.isDeactivated != null && Object.hasOwnProperty.call(message, "isDeactivated"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDeactivated);
                if (message.isAutoRenewing != null && Object.hasOwnProperty.call(message, "isAutoRenewing"))
                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAutoRenewing);
                if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.expirationDate);
                return writer;
            };

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

            /**
             * Decodes a SubscriptionAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.SubscriptionAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.SubscriptionAction} SubscriptionAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SubscriptionAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.SubscriptionAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isDeactivated = reader.bool();
                            break;
                        }
                    case 2: {
                            message.isAutoRenewing = reader.bool();
                            break;
                        }
                    case 3: {
                            message.expirationDate = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a SubscriptionAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.SubscriptionAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SubscriptionAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated"))
                    if (typeof message.isDeactivated !== "boolean")
                        return "isDeactivated: boolean expected";
                if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing"))
                    if (typeof message.isAutoRenewing !== "boolean")
                        return "isAutoRenewing: boolean expected";
                if (message.expirationDate != null && message.hasOwnProperty("expirationDate"))
                    if (!$util.isInteger(message.expirationDate) && !(message.expirationDate && $util.isInteger(message.expirationDate.low) && $util.isInteger(message.expirationDate.high)))
                        return "expirationDate: integer|Long expected";
                return null;
            };

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

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

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

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

            return SubscriptionAction;
        })();

        SyncActionValue.SyncActionMessage = (function() {

            /**
             * Properties of a SyncActionMessage.
             * @memberof SyncAction.SyncActionValue
             * @interface ISyncActionMessage
             * @property {Protocol.IMessageKey|null} [key] SyncActionMessage key
             * @property {number|Long|null} [timestamp] SyncActionMessage timestamp
             */

            /**
             * Constructs a new SyncActionMessage.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a SyncActionMessage.
             * @implements ISyncActionMessage
             * @constructor
             * @param {SyncAction.SyncActionValue.ISyncActionMessage=} [properties] Properties to set
             */
            function SyncActionMessage(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * SyncActionMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof SyncAction.SyncActionValue.SyncActionMessage
             * @instance
             */
            SyncActionMessage.prototype.key = null;

            /**
             * SyncActionMessage timestamp.
             * @member {number|Long} timestamp
             * @memberof SyncAction.SyncActionValue.SyncActionMessage
             * @instance
             */
            SyncActionMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

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

            /**
             * Encodes the specified SyncActionMessage message. Does not implicitly {@link SyncAction.SyncActionValue.SyncActionMessage.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.SyncActionMessage
             * @static
             * @param {SyncAction.SyncActionValue.ISyncActionMessage} message SyncActionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncActionMessage.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp);
                return writer;
            };

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

            /**
             * Decodes a SyncActionMessage message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.SyncActionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.SyncActionMessage} SyncActionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncActionMessage.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.SyncActionMessage();
                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.timestamp = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a SyncActionMessage message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.SyncActionMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SyncActionMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.key != null && message.hasOwnProperty("key")) {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
                if (message.timestamp != null && message.hasOwnProperty("timestamp"))
                    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 SyncActionMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.SyncActionMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.SyncActionMessage} SyncActionMessage
             */
            SyncActionMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.SyncActionMessage)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.SyncActionMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".SyncAction.SyncActionValue.SyncActionMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                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 SyncActionMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.SyncActionMessage
             * @static
             * @param {SyncAction.SyncActionValue.SyncActionMessage} message SyncActionMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SyncActionMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.key = null;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.timestamp = options.longs === String ? "0" : 0;
                }
                if (message.key != null && message.hasOwnProperty("key"))
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                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;
                return object;
            };

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

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

            return SyncActionMessage;
        })();

        SyncActionValue.SyncActionMessageRange = (function() {

            /**
             * Properties of a SyncActionMessageRange.
             * @memberof SyncAction.SyncActionValue
             * @interface ISyncActionMessageRange
             * @property {number|Long|null} [lastMessageTimestamp] SyncActionMessageRange lastMessageTimestamp
             * @property {number|Long|null} [lastSystemMessageTimestamp] SyncActionMessageRange lastSystemMessageTimestamp
             * @property {Array.<SyncAction.SyncActionValue.ISyncActionMessage>|null} [messages] SyncActionMessageRange messages
             */

            /**
             * Constructs a new SyncActionMessageRange.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a SyncActionMessageRange.
             * @implements ISyncActionMessageRange
             * @constructor
             * @param {SyncAction.SyncActionValue.ISyncActionMessageRange=} [properties] Properties to set
             */
            function SyncActionMessageRange(properties) {
                this.messages = [];
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * SyncActionMessageRange lastMessageTimestamp.
             * @member {number|Long} lastMessageTimestamp
             * @memberof SyncAction.SyncActionValue.SyncActionMessageRange
             * @instance
             */
            SyncActionMessageRange.prototype.lastMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * SyncActionMessageRange lastSystemMessageTimestamp.
             * @member {number|Long} lastSystemMessageTimestamp
             * @memberof SyncAction.SyncActionValue.SyncActionMessageRange
             * @instance
             */
            SyncActionMessageRange.prototype.lastSystemMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * SyncActionMessageRange messages.
             * @member {Array.<SyncAction.SyncActionValue.ISyncActionMessage>} messages
             * @memberof SyncAction.SyncActionValue.SyncActionMessageRange
             * @instance
             */
            SyncActionMessageRange.prototype.messages = $util.emptyArray;

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

            /**
             * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link SyncAction.SyncActionValue.SyncActionMessageRange.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.SyncActionValue.SyncActionMessageRange
             * @static
             * @param {SyncAction.SyncActionValue.ISyncActionMessageRange} message SyncActionMessageRange message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncActionMessageRange.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.lastMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastMessageTimestamp"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lastMessageTimestamp);
                if (message.lastSystemMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastSystemMessageTimestamp"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lastSystemMessageTimestamp);
                if (message.messages != null && message.messages.length)
                    for (var i = 0; i < message.messages.length; ++i)
                        $root.SyncAction.SyncActionValue.SyncActionMessage.encode(message.messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

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

            /**
             * Decodes a SyncActionMessageRange message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.SyncActionMessageRange
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.SyncActionMessageRange} SyncActionMessageRange
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncActionMessageRange.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.SyncActionMessageRange();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.lastMessageTimestamp = reader.int64();
                            break;
                        }
                    case 2: {
                            message.lastSystemMessageTimestamp = reader.int64();
                            break;
                        }
                    case 3: {
                            if (!(message.messages && message.messages.length))
                                message.messages = [];
                            message.messages.push($root.SyncAction.SyncActionValue.SyncActionMessage.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a SyncActionMessageRange message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.SyncActionMessageRange
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SyncActionMessageRange.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp"))
                    if (!$util.isInteger(message.lastMessageTimestamp) && !(message.lastMessageTimestamp && $util.isInteger(message.lastMessageTimestamp.low) && $util.isInteger(message.lastMessageTimestamp.high)))
                        return "lastMessageTimestamp: integer|Long expected";
                if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp"))
                    if (!$util.isInteger(message.lastSystemMessageTimestamp) && !(message.lastSystemMessageTimestamp && $util.isInteger(message.lastSystemMessageTimestamp.low) && $util.isInteger(message.lastSystemMessageTimestamp.high)))
                        return "lastSystemMessageTimestamp: integer|Long expected";
                if (message.messages != null && message.hasOwnProperty("messages")) {
                    if (!Array.isArray(message.messages))
                        return "messages: array expected";
                    for (var i = 0; i < message.messages.length; ++i) {
                        var error = $root.SyncAction.SyncActionValue.SyncActionMessage.verify(message.messages[i]);
                        if (error)
                            return "messages." + error;
                    }
                }
                return null;
            };

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

            /**
             * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.SyncActionMessageRange
             * @static
             * @param {SyncAction.SyncActionValue.SyncActionMessageRange} message SyncActionMessageRange
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SyncActionMessageRange.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.messages = [];
                if (options.defaults) {
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.lastMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.lastMessageTimestamp = options.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, false);
                        object.lastSystemMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.lastSystemMessageTimestamp = options.longs === String ? "0" : 0;
                }
                if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp"))
                    if (typeof message.lastMessageTimestamp === "number")
                        object.lastMessageTimestamp = options.longs === String ? String(message.lastMessageTimestamp) : message.lastMessageTimestamp;
                    else
                        object.lastMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMessageTimestamp.low >>> 0, message.lastMessageTimestamp.high >>> 0).toNumber() : message.lastMessageTimestamp;
                if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp"))
                    if (typeof message.lastSystemMessageTimestamp === "number")
                        object.lastSystemMessageTimestamp = options.longs === String ? String(message.lastSystemMessageTimestamp) : message.lastSystemMessageTimestamp;
                    else
                        object.lastSystemMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastSystemMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastSystemMessageTimestamp.low >>> 0, message.lastSystemMessageTimestamp.high >>> 0).toNumber() : message.lastSystemMessageTimestamp;
                if (message.messages && message.messages.length) {
                    object.messages = [];
                    for (var j = 0; j < message.messages.length; ++j)
                        object.messages[j] = $root.SyncAction.SyncActionValue.SyncActionMessage.toObject(message.messages[j], options);
                }
                return object;
            };

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

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

            return SyncActionMessageRange;
        })();

        SyncActionValue.TimeFormatAction = (function() {

            /**
             * Properties of a TimeFormatAction.
             * @memberof SyncAction.SyncActionValue
             * @interface ITimeFormatAction
             * @property {boolean|null} [isTwentyFourHourFormatEnabled] TimeFormatAction isTwentyFourHourFormatEnabled
             */

            /**
             * Constructs a new TimeFormatAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a TimeFormatAction.
             * @implements ITimeFormatAction
             * @constructor
             * @param {SyncAction.SyncActionValue.ITimeFormatAction=} [properties] Properties to set
             */
            function TimeFormatAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * TimeFormatAction isTwentyFourHourFormatEnabled.
             * @member {boolean} isTwentyFourHourFormatEnabled
             * @memberof SyncAction.SyncActionValue.TimeFormatAction
             * @instance
             */
            TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = false;

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

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

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

            /**
             * Decodes a TimeFormatAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.TimeFormatAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.TimeFormatAction} TimeFormatAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TimeFormatAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.TimeFormatAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isTwentyFourHourFormatEnabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return TimeFormatAction;
        })();

        SyncActionValue.UnarchiveChatsSetting = (function() {

            /**
             * Properties of an UnarchiveChatsSetting.
             * @memberof SyncAction.SyncActionValue
             * @interface IUnarchiveChatsSetting
             * @property {boolean|null} [unarchiveChats] UnarchiveChatsSetting unarchiveChats
             */

            /**
             * Constructs a new UnarchiveChatsSetting.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents an UnarchiveChatsSetting.
             * @implements IUnarchiveChatsSetting
             * @constructor
             * @param {SyncAction.SyncActionValue.IUnarchiveChatsSetting=} [properties] Properties to set
             */
            function UnarchiveChatsSetting(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * UnarchiveChatsSetting unarchiveChats.
             * @member {boolean} unarchiveChats
             * @memberof SyncAction.SyncActionValue.UnarchiveChatsSetting
             * @instance
             */
            UnarchiveChatsSetting.prototype.unarchiveChats = false;

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

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

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

            /**
             * Decodes an UnarchiveChatsSetting message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.UnarchiveChatsSetting
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.UnarchiveChatsSetting} UnarchiveChatsSetting
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UnarchiveChatsSetting.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.UnarchiveChatsSetting();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.unarchiveChats = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return UnarchiveChatsSetting;
        })();

        SyncActionValue.UserStatusMuteAction = (function() {

            /**
             * Properties of a UserStatusMuteAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IUserStatusMuteAction
             * @property {boolean|null} [muted] UserStatusMuteAction muted
             */

            /**
             * Constructs a new UserStatusMuteAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a UserStatusMuteAction.
             * @implements IUserStatusMuteAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IUserStatusMuteAction=} [properties] Properties to set
             */
            function UserStatusMuteAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * UserStatusMuteAction muted.
             * @member {boolean} muted
             * @memberof SyncAction.SyncActionValue.UserStatusMuteAction
             * @instance
             */
            UserStatusMuteAction.prototype.muted = false;

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

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

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

            /**
             * Decodes a UserStatusMuteAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.UserStatusMuteAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.UserStatusMuteAction} UserStatusMuteAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UserStatusMuteAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.UserStatusMuteAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.muted = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return UserStatusMuteAction;
        })();

        SyncActionValue.UsernameChatStartModeAction = (function() {

            /**
             * Properties of a UsernameChatStartModeAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IUsernameChatStartModeAction
             * @property {SyncAction.SyncActionValue.UsernameChatStartModeAction.ChatStartMode|null} [chatStartMode] UsernameChatStartModeAction chatStartMode
             */

            /**
             * Constructs a new UsernameChatStartModeAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a UsernameChatStartModeAction.
             * @implements IUsernameChatStartModeAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IUsernameChatStartModeAction=} [properties] Properties to set
             */
            function UsernameChatStartModeAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * UsernameChatStartModeAction chatStartMode.
             * @member {SyncAction.SyncActionValue.UsernameChatStartModeAction.ChatStartMode} chatStartMode
             * @memberof SyncAction.SyncActionValue.UsernameChatStartModeAction
             * @instance
             */
            UsernameChatStartModeAction.prototype.chatStartMode = 1;

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

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

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

            /**
             * Decodes a UsernameChatStartModeAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.UsernameChatStartModeAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.UsernameChatStartModeAction} UsernameChatStartModeAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UsernameChatStartModeAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.UsernameChatStartModeAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.chatStartMode = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a UsernameChatStartModeAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.UsernameChatStartModeAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UsernameChatStartModeAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.chatStartMode != null && message.hasOwnProperty("chatStartMode"))
                    switch (message.chatStartMode) {
                    default:
                        return "chatStartMode: enum value expected";
                    case 1:
                    case 2:
                        break;
                    }
                return null;
            };

            /**
             * Creates a UsernameChatStartModeAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.UsernameChatStartModeAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.UsernameChatStartModeAction} UsernameChatStartModeAction
             */
            UsernameChatStartModeAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.UsernameChatStartModeAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.UsernameChatStartModeAction();
                switch (object.chatStartMode) {
                default:
                    if (typeof object.chatStartMode === "number") {
                        message.chatStartMode = object.chatStartMode;
                        break;
                    }
                    break;
                case "LID":
                case 1:
                    message.chatStartMode = 1;
                    break;
                case "PN":
                case 2:
                    message.chatStartMode = 2;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a UsernameChatStartModeAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.UsernameChatStartModeAction
             * @static
             * @param {SyncAction.SyncActionValue.UsernameChatStartModeAction} message UsernameChatStartModeAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UsernameChatStartModeAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults)
                    object.chatStartMode = options.enums === String ? "LID" : 1;
                if (message.chatStartMode != null && message.hasOwnProperty("chatStartMode"))
                    object.chatStartMode = options.enums === String ? $root.SyncAction.SyncActionValue.UsernameChatStartModeAction.ChatStartMode[message.chatStartMode] === undefined ? message.chatStartMode : $root.SyncAction.SyncActionValue.UsernameChatStartModeAction.ChatStartMode[message.chatStartMode] : message.chatStartMode;
                return object;
            };

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

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

            /**
             * ChatStartMode enum.
             * @name SyncAction.SyncActionValue.UsernameChatStartModeAction.ChatStartMode
             * @enum {number}
             * @property {number} LID=1 LID value
             * @property {number} PN=2 PN value
             */
            UsernameChatStartModeAction.ChatStartMode = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "LID"] = 1;
                values[valuesById[2] = "PN"] = 2;
                return values;
            })();

            return UsernameChatStartModeAction;
        })();

        SyncActionValue.WaffleAccountLinkStateAction = (function() {

            /**
             * Properties of a WaffleAccountLinkStateAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IWaffleAccountLinkStateAction
             * @property {SyncAction.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState|null} [linkState] WaffleAccountLinkStateAction linkState
             */

            /**
             * Constructs a new WaffleAccountLinkStateAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a WaffleAccountLinkStateAction.
             * @implements IWaffleAccountLinkStateAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IWaffleAccountLinkStateAction=} [properties] Properties to set
             */
            function WaffleAccountLinkStateAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * WaffleAccountLinkStateAction linkState.
             * @member {SyncAction.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState} linkState
             * @memberof SyncAction.SyncActionValue.WaffleAccountLinkStateAction
             * @instance
             */
            WaffleAccountLinkStateAction.prototype.linkState = 0;

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

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

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

            /**
             * Decodes a WaffleAccountLinkStateAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.WaffleAccountLinkStateAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.WaffleAccountLinkStateAction} WaffleAccountLinkStateAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WaffleAccountLinkStateAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 2: {
                            message.linkState = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a WaffleAccountLinkStateAction message.
             * @function verify
             * @memberof SyncAction.SyncActionValue.WaffleAccountLinkStateAction
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            WaffleAccountLinkStateAction.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.linkState != null && message.hasOwnProperty("linkState"))
                    switch (message.linkState) {
                    default:
                        return "linkState: enum value expected";
                    case 0:
                        break;
                    }
                return null;
            };

            /**
             * Creates a WaffleAccountLinkStateAction message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.SyncActionValue.WaffleAccountLinkStateAction
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.SyncActionValue.WaffleAccountLinkStateAction} WaffleAccountLinkStateAction
             */
            WaffleAccountLinkStateAction.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction)
                    return object;
                var message = new $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction();
                switch (object.linkState) {
                default:
                    if (typeof object.linkState === "number") {
                        message.linkState = object.linkState;
                        break;
                    }
                    break;
                case "ACTIVE":
                case 0:
                    message.linkState = 0;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a WaffleAccountLinkStateAction message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.SyncActionValue.WaffleAccountLinkStateAction
             * @static
             * @param {SyncAction.SyncActionValue.WaffleAccountLinkStateAction} message WaffleAccountLinkStateAction
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            WaffleAccountLinkStateAction.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults)
                    object.linkState = options.enums === String ? "ACTIVE" : 0;
                if (message.linkState != null && message.hasOwnProperty("linkState"))
                    object.linkState = options.enums === String ? $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState[message.linkState] === undefined ? message.linkState : $root.SyncAction.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState[message.linkState] : message.linkState;
                return object;
            };

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

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

            /**
             * AccountLinkState enum.
             * @name SyncAction.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState
             * @enum {number}
             * @property {number} ACTIVE=0 ACTIVE value
             */
            WaffleAccountLinkStateAction.AccountLinkState = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "ACTIVE"] = 0;
                return values;
            })();

            return WaffleAccountLinkStateAction;
        })();

        SyncActionValue.WamoUserIdentifierAction = (function() {

            /**
             * Properties of a WamoUserIdentifierAction.
             * @memberof SyncAction.SyncActionValue
             * @interface IWamoUserIdentifierAction
             * @property {string|null} [identifier] WamoUserIdentifierAction identifier
             */

            /**
             * Constructs a new WamoUserIdentifierAction.
             * @memberof SyncAction.SyncActionValue
             * @classdesc Represents a WamoUserIdentifierAction.
             * @implements IWamoUserIdentifierAction
             * @constructor
             * @param {SyncAction.SyncActionValue.IWamoUserIdentifierAction=} [properties] Properties to set
             */
            function WamoUserIdentifierAction(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * WamoUserIdentifierAction identifier.
             * @member {string} identifier
             * @memberof SyncAction.SyncActionValue.WamoUserIdentifierAction
             * @instance
             */
            WamoUserIdentifierAction.prototype.identifier = "";

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

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

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

            /**
             * Decodes a WamoUserIdentifierAction message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.SyncActionValue.WamoUserIdentifierAction
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.SyncActionValue.WamoUserIdentifierAction} WamoUserIdentifierAction
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WamoUserIdentifierAction.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.SyncActionValue.WamoUserIdentifierAction();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.identifier = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

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

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

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

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

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

            return WamoUserIdentifierAction;
        })();

        return SyncActionValue;
    })();

    SyncAction.CallLogRecord = (function() {

        /**
         * Properties of a CallLogRecord.
         * @memberof SyncAction
         * @interface ICallLogRecord
         * @property {SyncAction.CallLogRecord.CallResult|null} [callResult] CallLogRecord callResult
         * @property {boolean|null} [isDndMode] CallLogRecord isDndMode
         * @property {SyncAction.CallLogRecord.SilenceReason|null} [silenceReason] CallLogRecord silenceReason
         * @property {number|Long|null} [duration] CallLogRecord duration
         * @property {number|Long|null} [startTime] CallLogRecord startTime
         * @property {boolean|null} [isIncoming] CallLogRecord isIncoming
         * @property {boolean|null} [isVideo] CallLogRecord isVideo
         * @property {boolean|null} [isCallLink] CallLogRecord isCallLink
         * @property {string|null} [callLinkToken] CallLogRecord callLinkToken
         * @property {string|null} [scheduledCallId] CallLogRecord scheduledCallId
         * @property {string|null} [callId] CallLogRecord callId
         * @property {string|null} [callCreatorJid] CallLogRecord callCreatorJid
         * @property {string|null} [groupJid] CallLogRecord groupJid
         * @property {Array.<SyncAction.CallLogRecord.IParticipantInfo>|null} [participants] CallLogRecord participants
         * @property {SyncAction.CallLogRecord.CallType|null} [callType] CallLogRecord callType
         */

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

        /**
         * CallLogRecord callResult.
         * @member {SyncAction.CallLogRecord.CallResult} callResult
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.callResult = 0;

        /**
         * CallLogRecord isDndMode.
         * @member {boolean} isDndMode
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.isDndMode = false;

        /**
         * CallLogRecord silenceReason.
         * @member {SyncAction.CallLogRecord.SilenceReason} silenceReason
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.silenceReason = 0;

        /**
         * CallLogRecord duration.
         * @member {number|Long} duration
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.duration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * CallLogRecord startTime.
         * @member {number|Long} startTime
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * CallLogRecord isIncoming.
         * @member {boolean} isIncoming
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.isIncoming = false;

        /**
         * CallLogRecord isVideo.
         * @member {boolean} isVideo
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.isVideo = false;

        /**
         * CallLogRecord isCallLink.
         * @member {boolean} isCallLink
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.isCallLink = false;

        /**
         * CallLogRecord callLinkToken.
         * @member {string} callLinkToken
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.callLinkToken = "";

        /**
         * CallLogRecord scheduledCallId.
         * @member {string} scheduledCallId
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.scheduledCallId = "";

        /**
         * CallLogRecord callId.
         * @member {string} callId
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.callId = "";

        /**
         * CallLogRecord callCreatorJid.
         * @member {string} callCreatorJid
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.callCreatorJid = "";

        /**
         * CallLogRecord groupJid.
         * @member {string} groupJid
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.groupJid = "";

        /**
         * CallLogRecord participants.
         * @member {Array.<SyncAction.CallLogRecord.IParticipantInfo>} participants
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.participants = $util.emptyArray;

        /**
         * CallLogRecord callType.
         * @member {SyncAction.CallLogRecord.CallType} callType
         * @memberof SyncAction.CallLogRecord
         * @instance
         */
        CallLogRecord.prototype.callType = 0;

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

        /**
         * Encodes the specified CallLogRecord message. Does not implicitly {@link SyncAction.CallLogRecord.verify|verify} messages.
         * @function encode
         * @memberof SyncAction.CallLogRecord
         * @static
         * @param {SyncAction.ICallLogRecord} message CallLogRecord message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CallLogRecord.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.callResult != null && Object.hasOwnProperty.call(message, "callResult"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.callResult);
            if (message.isDndMode != null && Object.hasOwnProperty.call(message, "isDndMode"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDndMode);
            if (message.silenceReason != null && Object.hasOwnProperty.call(message, "silenceReason"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.silenceReason);
            if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.duration);
            if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime"))
                writer.uint32(/* id 5, wireType 0 =*/40).int64(message.startTime);
            if (message.isIncoming != null && Object.hasOwnProperty.call(message, "isIncoming"))
                writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isIncoming);
            if (message.isVideo != null && Object.hasOwnProperty.call(message, "isVideo"))
                writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isVideo);
            if (message.isCallLink != null && Object.hasOwnProperty.call(message, "isCallLink"))
                writer.uint32(/* id 8, wireType 0 =*/64).bool(message.isCallLink);
            if (message.callLinkToken != null && Object.hasOwnProperty.call(message, "callLinkToken"))
                writer.uint32(/* id 9, wireType 2 =*/74).string(message.callLinkToken);
            if (message.scheduledCallId != null && Object.hasOwnProperty.call(message, "scheduledCallId"))
                writer.uint32(/* id 10, wireType 2 =*/82).string(message.scheduledCallId);
            if (message.callId != null && Object.hasOwnProperty.call(message, "callId"))
                writer.uint32(/* id 11, wireType 2 =*/90).string(message.callId);
            if (message.callCreatorJid != null && Object.hasOwnProperty.call(message, "callCreatorJid"))
                writer.uint32(/* id 12, wireType 2 =*/98).string(message.callCreatorJid);
            if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid"))
                writer.uint32(/* id 13, wireType 2 =*/106).string(message.groupJid);
            if (message.participants != null && message.participants.length)
                for (var i = 0; i < message.participants.length; ++i)
                    $root.SyncAction.CallLogRecord.ParticipantInfo.encode(message.participants[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.callType != null && Object.hasOwnProperty.call(message, "callType"))
                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.callType);
            return writer;
        };

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

        /**
         * Decodes a CallLogRecord message from the specified reader or buffer.
         * @function decode
         * @memberof SyncAction.CallLogRecord
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {SyncAction.CallLogRecord} CallLogRecord
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CallLogRecord.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.CallLogRecord();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.callResult = reader.int32();
                        break;
                    }
                case 2: {
                        message.isDndMode = reader.bool();
                        break;
                    }
                case 3: {
                        message.silenceReason = reader.int32();
                        break;
                    }
                case 4: {
                        message.duration = reader.int64();
                        break;
                    }
                case 5: {
                        message.startTime = reader.int64();
                        break;
                    }
                case 6: {
                        message.isIncoming = reader.bool();
                        break;
                    }
                case 7: {
                        message.isVideo = reader.bool();
                        break;
                    }
                case 8: {
                        message.isCallLink = reader.bool();
                        break;
                    }
                case 9: {
                        message.callLinkToken = reader.string();
                        break;
                    }
                case 10: {
                        message.scheduledCallId = reader.string();
                        break;
                    }
                case 11: {
                        message.callId = reader.string();
                        break;
                    }
                case 12: {
                        message.callCreatorJid = reader.string();
                        break;
                    }
                case 13: {
                        message.groupJid = reader.string();
                        break;
                    }
                case 14: {
                        if (!(message.participants && message.participants.length))
                            message.participants = [];
                        message.participants.push($root.SyncAction.CallLogRecord.ParticipantInfo.decode(reader, reader.uint32()));
                        break;
                    }
                case 15: {
                        message.callType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a CallLogRecord message.
         * @function verify
         * @memberof SyncAction.CallLogRecord
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CallLogRecord.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.callResult != null && message.hasOwnProperty("callResult"))
                switch (message.callResult) {
                default:
                    return "callResult: 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.isDndMode != null && message.hasOwnProperty("isDndMode"))
                if (typeof message.isDndMode !== "boolean")
                    return "isDndMode: boolean expected";
            if (message.silenceReason != null && message.hasOwnProperty("silenceReason"))
                switch (message.silenceReason) {
                default:
                    return "silenceReason: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            if (message.duration != null && message.hasOwnProperty("duration"))
                if (!$util.isInteger(message.duration) && !(message.duration && $util.isInteger(message.duration.low) && $util.isInteger(message.duration.high)))
                    return "duration: integer|Long expected";
            if (message.startTime != null && message.hasOwnProperty("startTime"))
                if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high)))
                    return "startTime: integer|Long expected";
            if (message.isIncoming != null && message.hasOwnProperty("isIncoming"))
                if (typeof message.isIncoming !== "boolean")
                    return "isIncoming: boolean expected";
            if (message.isVideo != null && message.hasOwnProperty("isVideo"))
                if (typeof message.isVideo !== "boolean")
                    return "isVideo: boolean expected";
            if (message.isCallLink != null && message.hasOwnProperty("isCallLink"))
                if (typeof message.isCallLink !== "boolean")
                    return "isCallLink: boolean expected";
            if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken"))
                if (!$util.isString(message.callLinkToken))
                    return "callLinkToken: string expected";
            if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId"))
                if (!$util.isString(message.scheduledCallId))
                    return "scheduledCallId: string expected";
            if (message.callId != null && message.hasOwnProperty("callId"))
                if (!$util.isString(message.callId))
                    return "callId: string expected";
            if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid"))
                if (!$util.isString(message.callCreatorJid))
                    return "callCreatorJid: string expected";
            if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                if (!$util.isString(message.groupJid))
                    return "groupJid: string expected";
            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.SyncAction.CallLogRecord.ParticipantInfo.verify(message.participants[i]);
                    if (error)
                        return "participants." + error;
                }
            }
            if (message.callType != null && message.hasOwnProperty("callType"))
                switch (message.callType) {
                default:
                    return "callType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            return null;
        };

        /**
         * Creates a CallLogRecord message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof SyncAction.CallLogRecord
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {SyncAction.CallLogRecord} CallLogRecord
         */
        CallLogRecord.fromObject = function fromObject(object) {
            if (object instanceof $root.SyncAction.CallLogRecord)
                return object;
            var message = new $root.SyncAction.CallLogRecord();
            switch (object.callResult) {
            default:
                if (typeof object.callResult === "number") {
                    message.callResult = object.callResult;
                    break;
                }
                break;
            case "CONNECTED":
            case 0:
                message.callResult = 0;
                break;
            case "REJECTED":
            case 1:
                message.callResult = 1;
                break;
            case "CANCELLED":
            case 2:
                message.callResult = 2;
                break;
            case "ACCEPTEDELSEWHERE":
            case 3:
                message.callResult = 3;
                break;
            case "MISSED":
            case 4:
                message.callResult = 4;
                break;
            case "INVALID":
            case 5:
                message.callResult = 5;
                break;
            case "UNAVAILABLE":
            case 6:
                message.callResult = 6;
                break;
            case "UPCOMING":
            case 7:
                message.callResult = 7;
                break;
            case "FAILED":
            case 8:
                message.callResult = 8;
                break;
            case "ABANDONED":
            case 9:
                message.callResult = 9;
                break;
            case "ONGOING":
            case 10:
                message.callResult = 10;
                break;
            }
            if (object.isDndMode != null)
                message.isDndMode = Boolean(object.isDndMode);
            switch (object.silenceReason) {
            default:
                if (typeof object.silenceReason === "number") {
                    message.silenceReason = object.silenceReason;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.silenceReason = 0;
                break;
            case "SCHEDULED":
            case 1:
                message.silenceReason = 1;
                break;
            case "PRIVACY":
            case 2:
                message.silenceReason = 2;
                break;
            case "LIGHTWEIGHT":
            case 3:
                message.silenceReason = 3;
                break;
            }
            if (object.duration != null)
                if ($util.Long)
                    (message.duration = $util.Long.fromValue(object.duration)).unsigned = false;
                else if (typeof object.duration === "string")
                    message.duration = parseInt(object.duration, 10);
                else if (typeof object.duration === "number")
                    message.duration = object.duration;
                else if (typeof object.duration === "object")
                    message.duration = new $util.LongBits(object.duration.low >>> 0, object.duration.high >>> 0).toNumber();
            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.isIncoming != null)
                message.isIncoming = Boolean(object.isIncoming);
            if (object.isVideo != null)
                message.isVideo = Boolean(object.isVideo);
            if (object.isCallLink != null)
                message.isCallLink = Boolean(object.isCallLink);
            if (object.callLinkToken != null)
                message.callLinkToken = String(object.callLinkToken);
            if (object.scheduledCallId != null)
                message.scheduledCallId = String(object.scheduledCallId);
            if (object.callId != null)
                message.callId = String(object.callId);
            if (object.callCreatorJid != null)
                message.callCreatorJid = String(object.callCreatorJid);
            if (object.groupJid != null)
                message.groupJid = String(object.groupJid);
            if (object.participants) {
                if (!Array.isArray(object.participants))
                    throw TypeError(".SyncAction.CallLogRecord.participants: array expected");
                message.participants = [];
                for (var i = 0; i < object.participants.length; ++i) {
                    if (typeof object.participants[i] !== "object")
                        throw TypeError(".SyncAction.CallLogRecord.participants: object expected");
                    message.participants[i] = $root.SyncAction.CallLogRecord.ParticipantInfo.fromObject(object.participants[i]);
                }
            }
            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;
            }
            return message;
        };

        /**
         * Creates a plain object from a CallLogRecord message. Also converts values to other types if specified.
         * @function toObject
         * @memberof SyncAction.CallLogRecord
         * @static
         * @param {SyncAction.CallLogRecord} message CallLogRecord
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CallLogRecord.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.participants = [];
            if (options.defaults) {
                object.callResult = options.enums === String ? "CONNECTED" : 0;
                object.isDndMode = false;
                object.silenceReason = options.enums === String ? "NONE" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.duration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.duration = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.startTime = options.longs === String ? "0" : 0;
                object.isIncoming = false;
                object.isVideo = false;
                object.isCallLink = false;
                object.callLinkToken = "";
                object.scheduledCallId = "";
                object.callId = "";
                object.callCreatorJid = "";
                object.groupJid = "";
                object.callType = options.enums === String ? "REGULAR" : 0;
            }
            if (message.callResult != null && message.hasOwnProperty("callResult"))
                object.callResult = options.enums === String ? $root.SyncAction.CallLogRecord.CallResult[message.callResult] === undefined ? message.callResult : $root.SyncAction.CallLogRecord.CallResult[message.callResult] : message.callResult;
            if (message.isDndMode != null && message.hasOwnProperty("isDndMode"))
                object.isDndMode = message.isDndMode;
            if (message.silenceReason != null && message.hasOwnProperty("silenceReason"))
                object.silenceReason = options.enums === String ? $root.SyncAction.CallLogRecord.SilenceReason[message.silenceReason] === undefined ? message.silenceReason : $root.SyncAction.CallLogRecord.SilenceReason[message.silenceReason] : message.silenceReason;
            if (message.duration != null && message.hasOwnProperty("duration"))
                if (typeof message.duration === "number")
                    object.duration = options.longs === String ? String(message.duration) : message.duration;
                else
                    object.duration = options.longs === String ? $util.Long.prototype.toString.call(message.duration) : options.longs === Number ? new $util.LongBits(message.duration.low >>> 0, message.duration.high >>> 0).toNumber() : message.duration;
            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 (message.isIncoming != null && message.hasOwnProperty("isIncoming"))
                object.isIncoming = message.isIncoming;
            if (message.isVideo != null && message.hasOwnProperty("isVideo"))
                object.isVideo = message.isVideo;
            if (message.isCallLink != null && message.hasOwnProperty("isCallLink"))
                object.isCallLink = message.isCallLink;
            if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken"))
                object.callLinkToken = message.callLinkToken;
            if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId"))
                object.scheduledCallId = message.scheduledCallId;
            if (message.callId != null && message.hasOwnProperty("callId"))
                object.callId = message.callId;
            if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid"))
                object.callCreatorJid = message.callCreatorJid;
            if (message.groupJid != null && message.hasOwnProperty("groupJid"))
                object.groupJid = message.groupJid;
            if (message.participants && message.participants.length) {
                object.participants = [];
                for (var j = 0; j < message.participants.length; ++j)
                    object.participants[j] = $root.SyncAction.CallLogRecord.ParticipantInfo.toObject(message.participants[j], options);
            }
            if (message.callType != null && message.hasOwnProperty("callType"))
                object.callType = options.enums === String ? $root.SyncAction.CallLogRecord.CallType[message.callType] === undefined ? message.callType : $root.SyncAction.CallLogRecord.CallType[message.callType] : message.callType;
            return object;
        };

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

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

        /**
         * CallResult enum.
         * @name SyncAction.CallLogRecord.CallResult
         * @enum {number}
         * @property {number} CONNECTED=0 CONNECTED value
         * @property {number} REJECTED=1 REJECTED value
         * @property {number} CANCELLED=2 CANCELLED value
         * @property {number} ACCEPTEDELSEWHERE=3 ACCEPTEDELSEWHERE value
         * @property {number} MISSED=4 MISSED value
         * @property {number} INVALID=5 INVALID value
         * @property {number} UNAVAILABLE=6 UNAVAILABLE value
         * @property {number} UPCOMING=7 UPCOMING value
         * @property {number} FAILED=8 FAILED value
         * @property {number} ABANDONED=9 ABANDONED value
         * @property {number} ONGOING=10 ONGOING value
         */
        CallLogRecord.CallResult = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "CONNECTED"] = 0;
            values[valuesById[1] = "REJECTED"] = 1;
            values[valuesById[2] = "CANCELLED"] = 2;
            values[valuesById[3] = "ACCEPTEDELSEWHERE"] = 3;
            values[valuesById[4] = "MISSED"] = 4;
            values[valuesById[5] = "INVALID"] = 5;
            values[valuesById[6] = "UNAVAILABLE"] = 6;
            values[valuesById[7] = "UPCOMING"] = 7;
            values[valuesById[8] = "FAILED"] = 8;
            values[valuesById[9] = "ABANDONED"] = 9;
            values[valuesById[10] = "ONGOING"] = 10;
            return values;
        })();

        /**
         * CallType enum.
         * @name SyncAction.CallLogRecord.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
         */
        CallLogRecord.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;
        })();

        CallLogRecord.ParticipantInfo = (function() {

            /**
             * Properties of a ParticipantInfo.
             * @memberof SyncAction.CallLogRecord
             * @interface IParticipantInfo
             * @property {string|null} [userJid] ParticipantInfo userJid
             * @property {SyncAction.CallLogRecord.CallResult|null} [callResult] ParticipantInfo callResult
             */

            /**
             * Constructs a new ParticipantInfo.
             * @memberof SyncAction.CallLogRecord
             * @classdesc Represents a ParticipantInfo.
             * @implements IParticipantInfo
             * @constructor
             * @param {SyncAction.CallLogRecord.IParticipantInfo=} [properties] Properties to set
             */
            function ParticipantInfo(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * ParticipantInfo userJid.
             * @member {string} userJid
             * @memberof SyncAction.CallLogRecord.ParticipantInfo
             * @instance
             */
            ParticipantInfo.prototype.userJid = "";

            /**
             * ParticipantInfo callResult.
             * @member {SyncAction.CallLogRecord.CallResult} callResult
             * @memberof SyncAction.CallLogRecord.ParticipantInfo
             * @instance
             */
            ParticipantInfo.prototype.callResult = 0;

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

            /**
             * Encodes the specified ParticipantInfo message. Does not implicitly {@link SyncAction.CallLogRecord.ParticipantInfo.verify|verify} messages.
             * @function encode
             * @memberof SyncAction.CallLogRecord.ParticipantInfo
             * @static
             * @param {SyncAction.CallLogRecord.IParticipantInfo} message ParticipantInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ParticipantInfo.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.callResult != null && Object.hasOwnProperty.call(message, "callResult"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.callResult);
                return writer;
            };

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

            /**
             * Decodes a ParticipantInfo message from the specified reader or buffer.
             * @function decode
             * @memberof SyncAction.CallLogRecord.ParticipantInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {SyncAction.CallLogRecord.ParticipantInfo} ParticipantInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ParticipantInfo.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.CallLogRecord.ParticipantInfo();
                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.callResult = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a ParticipantInfo message.
             * @function verify
             * @memberof SyncAction.CallLogRecord.ParticipantInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ParticipantInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.userJid != null && message.hasOwnProperty("userJid"))
                    if (!$util.isString(message.userJid))
                        return "userJid: string expected";
                if (message.callResult != null && message.hasOwnProperty("callResult"))
                    switch (message.callResult) {
                    default:
                        return "callResult: 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;
                    }
                return null;
            };

            /**
             * Creates a ParticipantInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof SyncAction.CallLogRecord.ParticipantInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {SyncAction.CallLogRecord.ParticipantInfo} ParticipantInfo
             */
            ParticipantInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.SyncAction.CallLogRecord.ParticipantInfo)
                    return object;
                var message = new $root.SyncAction.CallLogRecord.ParticipantInfo();
                if (object.userJid != null)
                    message.userJid = String(object.userJid);
                switch (object.callResult) {
                default:
                    if (typeof object.callResult === "number") {
                        message.callResult = object.callResult;
                        break;
                    }
                    break;
                case "CONNECTED":
                case 0:
                    message.callResult = 0;
                    break;
                case "REJECTED":
                case 1:
                    message.callResult = 1;
                    break;
                case "CANCELLED":
                case 2:
                    message.callResult = 2;
                    break;
                case "ACCEPTEDELSEWHERE":
                case 3:
                    message.callResult = 3;
                    break;
                case "MISSED":
                case 4:
                    message.callResult = 4;
                    break;
                case "INVALID":
                case 5:
                    message.callResult = 5;
                    break;
                case "UNAVAILABLE":
                case 6:
                    message.callResult = 6;
                    break;
                case "UPCOMING":
                case 7:
                    message.callResult = 7;
                    break;
                case "FAILED":
                case 8:
                    message.callResult = 8;
                    break;
                case "ABANDONED":
                case 9:
                    message.callResult = 9;
                    break;
                case "ONGOING":
                case 10:
                    message.callResult = 10;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a ParticipantInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof SyncAction.CallLogRecord.ParticipantInfo
             * @static
             * @param {SyncAction.CallLogRecord.ParticipantInfo} message ParticipantInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ParticipantInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.userJid = "";
                    object.callResult = options.enums === String ? "CONNECTED" : 0;
                }
                if (message.userJid != null && message.hasOwnProperty("userJid"))
                    object.userJid = message.userJid;
                if (message.callResult != null && message.hasOwnProperty("callResult"))
                    object.callResult = options.enums === String ? $root.SyncAction.CallLogRecord.CallResult[message.callResult] === undefined ? message.callResult : $root.SyncAction.CallLogRecord.CallResult[message.callResult] : message.callResult;
                return object;
            };

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

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

            return ParticipantInfo;
        })();

        /**
         * SilenceReason enum.
         * @name SyncAction.CallLogRecord.SilenceReason
         * @enum {number}
         * @property {number} NONE=0 NONE value
         * @property {number} SCHEDULED=1 SCHEDULED value
         * @property {number} PRIVACY=2 PRIVACY value
         * @property {number} LIGHTWEIGHT=3 LIGHTWEIGHT value
         */
        CallLogRecord.SilenceReason = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NONE"] = 0;
            values[valuesById[1] = "SCHEDULED"] = 1;
            values[valuesById[2] = "PRIVACY"] = 2;
            values[valuesById[3] = "LIGHTWEIGHT"] = 3;
            return values;
        })();

        return CallLogRecord;
    })();

    SyncAction.RecentEmojiWeight = (function() {

        /**
         * Properties of a RecentEmojiWeight.
         * @memberof SyncAction
         * @interface IRecentEmojiWeight
         * @property {string|null} [emoji] RecentEmojiWeight emoji
         * @property {number|null} [weight] RecentEmojiWeight weight
         */

        /**
         * Constructs a new RecentEmojiWeight.
         * @memberof SyncAction
         * @classdesc Represents a RecentEmojiWeight.
         * @implements IRecentEmojiWeight
         * @constructor
         * @param {SyncAction.IRecentEmojiWeight=} [properties] Properties to set
         */
        function RecentEmojiWeight(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * RecentEmojiWeight emoji.
         * @member {string} emoji
         * @memberof SyncAction.RecentEmojiWeight
         * @instance
         */
        RecentEmojiWeight.prototype.emoji = "";

        /**
         * RecentEmojiWeight weight.
         * @member {number} weight
         * @memberof SyncAction.RecentEmojiWeight
         * @instance
         */
        RecentEmojiWeight.prototype.weight = 0;

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

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

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

        /**
         * Decodes a RecentEmojiWeight message from the specified reader or buffer.
         * @function decode
         * @memberof SyncAction.RecentEmojiWeight
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {SyncAction.RecentEmojiWeight} RecentEmojiWeight
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        RecentEmojiWeight.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SyncAction.RecentEmojiWeight();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.emoji = reader.string();
                        break;
                    }
                case 2: {
                        message.weight = reader.float();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

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

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

        /**
         * Creates a plain object from a RecentEmojiWeight message. Also converts values to other types if specified.
         * @function toObject
         * @memberof SyncAction.RecentEmojiWeight
         * @static
         * @param {SyncAction.RecentEmojiWeight} message RecentEmojiWeight
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        RecentEmojiWeight.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.emoji = "";
                object.weight = 0;
            }
            if (message.emoji != null && message.hasOwnProperty("emoji"))
                object.emoji = message.emoji;
            if (message.weight != null && message.hasOwnProperty("weight"))
                object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight;
            return object;
        };

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

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

        return RecentEmojiWeight;
    })();

    return SyncAction;
})();

$root.DeviceCapabilities = (function() {

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

    DeviceCapabilities.DeviceCapabilities = (function() {

        /**
         * Properties of a DeviceCapabilities.
         * @memberof DeviceCapabilities
         * @interface IDeviceCapabilities
         * @property {DeviceCapabilities.DeviceCapabilities.ChatLockSupportLevel|null} [chatLockSupportLevel] DeviceCapabilities chatLockSupportLevel
         * @property {DeviceCapabilities.DeviceCapabilities.ILIDMigration|null} [lidMigration] DeviceCapabilities lidMigration
         * @property {DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast|null} [businessBroadcast] DeviceCapabilities businessBroadcast
         * @property {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar|null} [userHasAvatar] DeviceCapabilities userHasAvatar
         */

        /**
         * Constructs a new DeviceCapabilities.
         * @memberof DeviceCapabilities
         * @classdesc Represents a DeviceCapabilities.
         * @implements IDeviceCapabilities
         * @constructor
         * @param {DeviceCapabilities.IDeviceCapabilities=} [properties] Properties to set
         */
        function DeviceCapabilities(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * DeviceCapabilities chatLockSupportLevel.
         * @member {DeviceCapabilities.DeviceCapabilities.ChatLockSupportLevel} chatLockSupportLevel
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @instance
         */
        DeviceCapabilities.prototype.chatLockSupportLevel = 0;

        /**
         * DeviceCapabilities lidMigration.
         * @member {DeviceCapabilities.DeviceCapabilities.ILIDMigration|null|undefined} lidMigration
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @instance
         */
        DeviceCapabilities.prototype.lidMigration = null;

        /**
         * DeviceCapabilities businessBroadcast.
         * @member {DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast|null|undefined} businessBroadcast
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @instance
         */
        DeviceCapabilities.prototype.businessBroadcast = null;

        /**
         * DeviceCapabilities userHasAvatar.
         * @member {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar|null|undefined} userHasAvatar
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @instance
         */
        DeviceCapabilities.prototype.userHasAvatar = null;

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

        /**
         * Encodes the specified DeviceCapabilities message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.verify|verify} messages.
         * @function encode
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @static
         * @param {DeviceCapabilities.IDeviceCapabilities} message DeviceCapabilities message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        DeviceCapabilities.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.chatLockSupportLevel != null && Object.hasOwnProperty.call(message, "chatLockSupportLevel"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chatLockSupportLevel);
            if (message.lidMigration != null && Object.hasOwnProperty.call(message, "lidMigration"))
                $root.DeviceCapabilities.DeviceCapabilities.LIDMigration.encode(message.lidMigration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.businessBroadcast != null && Object.hasOwnProperty.call(message, "businessBroadcast"))
                $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.encode(message.businessBroadcast, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.userHasAvatar != null && Object.hasOwnProperty.call(message, "userHasAvatar"))
                $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.encode(message.userHasAvatar, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a DeviceCapabilities message from the specified reader or buffer.
         * @function decode
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {DeviceCapabilities.DeviceCapabilities} DeviceCapabilities
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        DeviceCapabilities.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeviceCapabilities.DeviceCapabilities();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.chatLockSupportLevel = reader.int32();
                        break;
                    }
                case 2: {
                        message.lidMigration = $root.DeviceCapabilities.DeviceCapabilities.LIDMigration.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.businessBroadcast = $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.userHasAvatar = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a DeviceCapabilities message.
         * @function verify
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        DeviceCapabilities.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.chatLockSupportLevel != null && message.hasOwnProperty("chatLockSupportLevel"))
                switch (message.chatLockSupportLevel) {
                default:
                    return "chatLockSupportLevel: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            if (message.lidMigration != null && message.hasOwnProperty("lidMigration")) {
                var error = $root.DeviceCapabilities.DeviceCapabilities.LIDMigration.verify(message.lidMigration);
                if (error)
                    return "lidMigration." + error;
            }
            if (message.businessBroadcast != null && message.hasOwnProperty("businessBroadcast")) {
                var error = $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.verify(message.businessBroadcast);
                if (error)
                    return "businessBroadcast." + error;
            }
            if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar")) {
                var error = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify(message.userHasAvatar);
                if (error)
                    return "userHasAvatar." + error;
            }
            return null;
        };

        /**
         * Creates a DeviceCapabilities message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {DeviceCapabilities.DeviceCapabilities} DeviceCapabilities
         */
        DeviceCapabilities.fromObject = function fromObject(object) {
            if (object instanceof $root.DeviceCapabilities.DeviceCapabilities)
                return object;
            var message = new $root.DeviceCapabilities.DeviceCapabilities();
            switch (object.chatLockSupportLevel) {
            default:
                if (typeof object.chatLockSupportLevel === "number") {
                    message.chatLockSupportLevel = object.chatLockSupportLevel;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.chatLockSupportLevel = 0;
                break;
            case "MINIMAL":
            case 1:
                message.chatLockSupportLevel = 1;
                break;
            case "FULL":
            case 2:
                message.chatLockSupportLevel = 2;
                break;
            }
            if (object.lidMigration != null) {
                if (typeof object.lidMigration !== "object")
                    throw TypeError(".DeviceCapabilities.DeviceCapabilities.lidMigration: object expected");
                message.lidMigration = $root.DeviceCapabilities.DeviceCapabilities.LIDMigration.fromObject(object.lidMigration);
            }
            if (object.businessBroadcast != null) {
                if (typeof object.businessBroadcast !== "object")
                    throw TypeError(".DeviceCapabilities.DeviceCapabilities.businessBroadcast: object expected");
                message.businessBroadcast = $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.fromObject(object.businessBroadcast);
            }
            if (object.userHasAvatar != null) {
                if (typeof object.userHasAvatar !== "object")
                    throw TypeError(".DeviceCapabilities.DeviceCapabilities.userHasAvatar: object expected");
                message.userHasAvatar = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.fromObject(object.userHasAvatar);
            }
            return message;
        };

        /**
         * Creates a plain object from a DeviceCapabilities message. Also converts values to other types if specified.
         * @function toObject
         * @memberof DeviceCapabilities.DeviceCapabilities
         * @static
         * @param {DeviceCapabilities.DeviceCapabilities} message DeviceCapabilities
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        DeviceCapabilities.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.chatLockSupportLevel = options.enums === String ? "NONE" : 0;
                object.lidMigration = null;
                object.businessBroadcast = null;
                object.userHasAvatar = null;
            }
            if (message.chatLockSupportLevel != null && message.hasOwnProperty("chatLockSupportLevel"))
                object.chatLockSupportLevel = options.enums === String ? $root.DeviceCapabilities.DeviceCapabilities.ChatLockSupportLevel[message.chatLockSupportLevel] === undefined ? message.chatLockSupportLevel : $root.DeviceCapabilities.DeviceCapabilities.ChatLockSupportLevel[message.chatLockSupportLevel] : message.chatLockSupportLevel;
            if (message.lidMigration != null && message.hasOwnProperty("lidMigration"))
                object.lidMigration = $root.DeviceCapabilities.DeviceCapabilities.LIDMigration.toObject(message.lidMigration, options);
            if (message.businessBroadcast != null && message.hasOwnProperty("businessBroadcast"))
                object.businessBroadcast = $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.toObject(message.businessBroadcast, options);
            if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar"))
                object.userHasAvatar = $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar.toObject(message.userHasAvatar, options);
            return object;
        };

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

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

        DeviceCapabilities.BusinessBroadcast = (function() {

            /**
             * Properties of a BusinessBroadcast.
             * @memberof DeviceCapabilities.DeviceCapabilities
             * @interface IBusinessBroadcast
             * @property {boolean|null} [importListEnabled] BusinessBroadcast importListEnabled
             */

            /**
             * Constructs a new BusinessBroadcast.
             * @memberof DeviceCapabilities.DeviceCapabilities
             * @classdesc Represents a BusinessBroadcast.
             * @implements IBusinessBroadcast
             * @constructor
             * @param {DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast=} [properties] Properties to set
             */
            function BusinessBroadcast(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * BusinessBroadcast importListEnabled.
             * @member {boolean} importListEnabled
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @instance
             */
            BusinessBroadcast.prototype.importListEnabled = false;

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

            /**
             * Encodes the specified BusinessBroadcast message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.verify|verify} messages.
             * @function encode
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast} message BusinessBroadcast message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BusinessBroadcast.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.importListEnabled != null && Object.hasOwnProperty.call(message, "importListEnabled"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.importListEnabled);
                return writer;
            };

            /**
             * Encodes the specified BusinessBroadcast message, length delimited. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.BusinessBroadcast.verify|verify} messages.
             * @function encodeDelimited
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast} message BusinessBroadcast message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BusinessBroadcast.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BusinessBroadcast message from the specified reader or buffer.
             * @function decode
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {DeviceCapabilities.DeviceCapabilities.BusinessBroadcast} BusinessBroadcast
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BusinessBroadcast.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.importListEnabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a BusinessBroadcast message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {DeviceCapabilities.DeviceCapabilities.BusinessBroadcast} BusinessBroadcast
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BusinessBroadcast.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BusinessBroadcast message.
             * @function verify
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BusinessBroadcast.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.importListEnabled != null && message.hasOwnProperty("importListEnabled"))
                    if (typeof message.importListEnabled !== "boolean")
                        return "importListEnabled: boolean expected";
                return null;
            };

            /**
             * Creates a BusinessBroadcast message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {DeviceCapabilities.DeviceCapabilities.BusinessBroadcast} BusinessBroadcast
             */
            BusinessBroadcast.fromObject = function fromObject(object) {
                if (object instanceof $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast)
                    return object;
                var message = new $root.DeviceCapabilities.DeviceCapabilities.BusinessBroadcast();
                if (object.importListEnabled != null)
                    message.importListEnabled = Boolean(object.importListEnabled);
                return message;
            };

            /**
             * Creates a plain object from a BusinessBroadcast message. Also converts values to other types if specified.
             * @function toObject
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.BusinessBroadcast} message BusinessBroadcast
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BusinessBroadcast.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults)
                    object.importListEnabled = false;
                if (message.importListEnabled != null && message.hasOwnProperty("importListEnabled"))
                    object.importListEnabled = message.importListEnabled;
                return object;
            };

            /**
             * Converts this BusinessBroadcast to JSON.
             * @function toJSON
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BusinessBroadcast.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for BusinessBroadcast
             * @function getTypeUrl
             * @memberof DeviceCapabilities.DeviceCapabilities.BusinessBroadcast
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            BusinessBroadcast.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/DeviceCapabilities.DeviceCapabilities.BusinessBroadcast";
            };

            return BusinessBroadcast;
        })();

        /**
         * ChatLockSupportLevel enum.
         * @name DeviceCapabilities.DeviceCapabilities.ChatLockSupportLevel
         * @enum {number}
         * @property {number} NONE=0 NONE value
         * @property {number} MINIMAL=1 MINIMAL value
         * @property {number} FULL=2 FULL value
         */
        DeviceCapabilities.ChatLockSupportLevel = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NONE"] = 0;
            values[valuesById[1] = "MINIMAL"] = 1;
            values[valuesById[2] = "FULL"] = 2;
            return values;
        })();

        DeviceCapabilities.LIDMigration = (function() {

            /**
             * Properties of a LIDMigration.
             * @memberof DeviceCapabilities.DeviceCapabilities
             * @interface ILIDMigration
             * @property {number|Long|null} [chatDbMigrationTimestamp] LIDMigration chatDbMigrationTimestamp
             */

            /**
             * Constructs a new LIDMigration.
             * @memberof DeviceCapabilities.DeviceCapabilities
             * @classdesc Represents a LIDMigration.
             * @implements ILIDMigration
             * @constructor
             * @param {DeviceCapabilities.DeviceCapabilities.ILIDMigration=} [properties] Properties to set
             */
            function LIDMigration(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * LIDMigration chatDbMigrationTimestamp.
             * @member {number|Long} chatDbMigrationTimestamp
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @instance
             */
            LIDMigration.prototype.chatDbMigrationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new LIDMigration instance using the specified properties.
             * @function create
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.ILIDMigration=} [properties] Properties to set
             * @returns {DeviceCapabilities.DeviceCapabilities.LIDMigration} LIDMigration instance
             */
            LIDMigration.create = function create(properties) {
                return new LIDMigration(properties);
            };

            /**
             * Encodes the specified LIDMigration message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.LIDMigration.verify|verify} messages.
             * @function encode
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.ILIDMigration} message LIDMigration message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LIDMigration.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.chatDbMigrationTimestamp != null && Object.hasOwnProperty.call(message, "chatDbMigrationTimestamp"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.chatDbMigrationTimestamp);
                return writer;
            };

            /**
             * Encodes the specified LIDMigration message, length delimited. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.LIDMigration.verify|verify} messages.
             * @function encodeDelimited
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.ILIDMigration} message LIDMigration message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LIDMigration.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LIDMigration message from the specified reader or buffer.
             * @function decode
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {DeviceCapabilities.DeviceCapabilities.LIDMigration} LIDMigration
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LIDMigration.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeviceCapabilities.DeviceCapabilities.LIDMigration();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.chatDbMigrationTimestamp = reader.uint64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LIDMigration message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {DeviceCapabilities.DeviceCapabilities.LIDMigration} LIDMigration
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LIDMigration.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LIDMigration message.
             * @function verify
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LIDMigration.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.chatDbMigrationTimestamp != null && message.hasOwnProperty("chatDbMigrationTimestamp"))
                    if (!$util.isInteger(message.chatDbMigrationTimestamp) && !(message.chatDbMigrationTimestamp && $util.isInteger(message.chatDbMigrationTimestamp.low) && $util.isInteger(message.chatDbMigrationTimestamp.high)))
                        return "chatDbMigrationTimestamp: integer|Long expected";
                return null;
            };

            /**
             * Creates a LIDMigration message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {DeviceCapabilities.DeviceCapabilities.LIDMigration} LIDMigration
             */
            LIDMigration.fromObject = function fromObject(object) {
                if (object instanceof $root.DeviceCapabilities.DeviceCapabilities.LIDMigration)
                    return object;
                var message = new $root.DeviceCapabilities.DeviceCapabilities.LIDMigration();
                if (object.chatDbMigrationTimestamp != null)
                    if ($util.Long)
                        (message.chatDbMigrationTimestamp = $util.Long.fromValue(object.chatDbMigrationTimestamp)).unsigned = true;
                    else if (typeof object.chatDbMigrationTimestamp === "string")
                        message.chatDbMigrationTimestamp = parseInt(object.chatDbMigrationTimestamp, 10);
                    else if (typeof object.chatDbMigrationTimestamp === "number")
                        message.chatDbMigrationTimestamp = object.chatDbMigrationTimestamp;
                    else if (typeof object.chatDbMigrationTimestamp === "object")
                        message.chatDbMigrationTimestamp = new $util.LongBits(object.chatDbMigrationTimestamp.low >>> 0, object.chatDbMigrationTimestamp.high >>> 0).toNumber(true);
                return message;
            };

            /**
             * Creates a plain object from a LIDMigration message. Also converts values to other types if specified.
             * @function toObject
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.LIDMigration} message LIDMigration
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LIDMigration.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults)
                    if ($util.Long) {
                        var long = new $util.Long(0, 0, true);
                        object.chatDbMigrationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                    } else
                        object.chatDbMigrationTimestamp = options.longs === String ? "0" : 0;
                if (message.chatDbMigrationTimestamp != null && message.hasOwnProperty("chatDbMigrationTimestamp"))
                    if (typeof message.chatDbMigrationTimestamp === "number")
                        object.chatDbMigrationTimestamp = options.longs === String ? String(message.chatDbMigrationTimestamp) : message.chatDbMigrationTimestamp;
                    else
                        object.chatDbMigrationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.chatDbMigrationTimestamp) : options.longs === Number ? new $util.LongBits(message.chatDbMigrationTimestamp.low >>> 0, message.chatDbMigrationTimestamp.high >>> 0).toNumber(true) : message.chatDbMigrationTimestamp;
                return object;
            };

            /**
             * Converts this LIDMigration to JSON.
             * @function toJSON
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LIDMigration.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for LIDMigration
             * @function getTypeUrl
             * @memberof DeviceCapabilities.DeviceCapabilities.LIDMigration
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            LIDMigration.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/DeviceCapabilities.DeviceCapabilities.LIDMigration";
            };

            return LIDMigration;
        })();

        DeviceCapabilities.UserHasAvatar = (function() {

            /**
             * Properties of a UserHasAvatar.
             * @memberof DeviceCapabilities.DeviceCapabilities
             * @interface IUserHasAvatar
             * @property {boolean|null} [userHasAvatar] UserHasAvatar userHasAvatar
             */

            /**
             * Constructs a new UserHasAvatar.
             * @memberof DeviceCapabilities.DeviceCapabilities
             * @classdesc Represents a UserHasAvatar.
             * @implements IUserHasAvatar
             * @constructor
             * @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar=} [properties] Properties to set
             */
            function UserHasAvatar(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * UserHasAvatar userHasAvatar.
             * @member {boolean} userHasAvatar
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @instance
             */
            UserHasAvatar.prototype.userHasAvatar = false;

            /**
             * Creates a new UserHasAvatar instance using the specified properties.
             * @function create
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar=} [properties] Properties to set
             * @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar instance
             */
            UserHasAvatar.create = function create(properties) {
                return new UserHasAvatar(properties);
            };

            /**
             * Encodes the specified UserHasAvatar message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify|verify} messages.
             * @function encode
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar} message UserHasAvatar message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UserHasAvatar.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.userHasAvatar != null && Object.hasOwnProperty.call(message, "userHasAvatar"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userHasAvatar);
                return writer;
            };

            /**
             * Encodes the specified UserHasAvatar message, length delimited. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify|verify} messages.
             * @function encodeDelimited
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.IUserHasAvatar} message UserHasAvatar message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UserHasAvatar.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a UserHasAvatar message from the specified reader or buffer.
             * @function decode
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UserHasAvatar.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.userHasAvatar = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a UserHasAvatar message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UserHasAvatar.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a UserHasAvatar message.
             * @function verify
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UserHasAvatar.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar"))
                    if (typeof message.userHasAvatar !== "boolean")
                        return "userHasAvatar: boolean expected";
                return null;
            };

            /**
             * Creates a UserHasAvatar message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} UserHasAvatar
             */
            UserHasAvatar.fromObject = function fromObject(object) {
                if (object instanceof $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar)
                    return object;
                var message = new $root.DeviceCapabilities.DeviceCapabilities.UserHasAvatar();
                if (object.userHasAvatar != null)
                    message.userHasAvatar = Boolean(object.userHasAvatar);
                return message;
            };

            /**
             * Creates a plain object from a UserHasAvatar message. Also converts values to other types if specified.
             * @function toObject
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {DeviceCapabilities.DeviceCapabilities.UserHasAvatar} message UserHasAvatar
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UserHasAvatar.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults)
                    object.userHasAvatar = false;
                if (message.userHasAvatar != null && message.hasOwnProperty("userHasAvatar"))
                    object.userHasAvatar = message.userHasAvatar;
                return object;
            };

            /**
             * Converts this UserHasAvatar to JSON.
             * @function toJSON
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UserHasAvatar.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for UserHasAvatar
             * @function getTypeUrl
             * @memberof DeviceCapabilities.DeviceCapabilities.UserHasAvatar
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            UserHasAvatar.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/DeviceCapabilities.DeviceCapabilities.UserHasAvatar";
            };

            return UserHasAvatar;
        })();

        return DeviceCapabilities;
    })();

    return DeviceCapabilities;
})();

module.exports = $root;
