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

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

    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.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.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 {Uint8Array|null} [artworkMediaKey] EmbeddedMusic artworkMediaKey
         * @property {string|null} [artistAttribution] EmbeddedMusic artistAttribution
         * @property {Uint8Array|null} [countryBlocklist] EmbeddedMusic countryBlocklist
         * @property {boolean|null} [isExplicit] EmbeddedMusic isExplicit
         */

        /**
         * 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 artworkMediaKey.
         * @member {Uint8Array} artworkMediaKey
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkMediaKey = $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;

        /**
         * 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);
            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 11: {
                        message.artworkMediaKey = reader.bytes();
                        break;
                    }
                case 8: {
                        message.artistAttribution = reader.string();
                        break;
                    }
                case 9: {
                        message.countryBlocklist = reader.bytes();
                        break;
                    }
                case 10: {
                        message.isExplicit = reader.bool();
                        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.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey"))
                if (!(message.artworkMediaKey && typeof message.artworkMediaKey.length === "number" || $util.isString(message.artworkMediaKey)))
                    return "artworkMediaKey: 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";
            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.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.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);
            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 (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;
            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 {BotMetadata.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 {BotMetadata.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.BotMetadata.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.BotMetadata.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.BotMetadata.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.BotMetadata.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.BotMetadata.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:
                    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;
            }
            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
         */
        ThreadID.ThreadType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "VIEW_REPLIES"] = 1;
            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:
                    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;
            }
            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
         */
        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;
            return values;
        })();

        return MessageAssociation;
    })();

    E2E.AIRichResponseMessage = (function() {

        /**
         * Properties of a AIRichResponseMessage.
         * @memberof E2E
         * @interface IAIRichResponseMessage
         * @property {E2E.AIRichResponseMessage.AIRichResponseMessageType|null} [messageType] AIRichResponseMessage messageType
         * @property {Array.<E2E.AIRichResponseMessage.IAIRichResponseSubMessage>|null} [submessages] AIRichResponseMessage submessages
         * @property {E2E.AIRichResponseMessage.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 {E2E.AIRichResponseMessage.AIRichResponseMessageType} messageType
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        AIRichResponseMessage.prototype.messageType = 0;

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

        /**
         * AIRichResponseMessage unifiedResponse.
         * @member {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseSubMessage.encode(message.submessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.unifiedResponse != null && Object.hasOwnProperty.call(message, "unifiedResponse"))
                $root.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseSubMessage.decode(reader, reader.uint32()));
                        break;
                    }
                case 3: {
                        message.unifiedResponse = $root.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseSubMessage.verify(message.submessages[i]);
                    if (error)
                        return "submessages." + error;
                }
            }
            if (message.unifiedResponse != null && message.hasOwnProperty("unifiedResponse")) {
                var error = $root.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseSubMessage.fromObject(object.submessages[i]);
                }
            }
            if (object.unifiedResponse != null) {
                if (typeof object.unifiedResponse !== "object")
                    throw TypeError(".E2E.AIRichResponseMessage.unifiedResponse: object expected");
                message.unifiedResponse = $root.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseMessageType[message.messageType] === undefined ? message.messageType : $root.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseSubMessage.toObject(message.submessages[j], options);
            }
            if (message.unifiedResponse != null && message.hasOwnProperty("unifiedResponse"))
                object.unifiedResponse = $root.E2E.AIRichResponseMessage.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";
        };

        AIRichResponseMessage.AIRichResponseCodeMetadata = (function() {

            /**
             * Properties of a AIRichResponseCodeMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseCodeMetadata
             * @property {string|null} [codeLanguage] AIRichResponseCodeMetadata codeLanguage
             * @property {Array.<E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock>|null} [codeBlocks] AIRichResponseCodeMetadata codeBlocks
             */

            /**
             * Constructs a new AIRichResponseCodeMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseCodeMetadata.
             * @implements IAIRichResponseCodeMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @instance
             */
            AIRichResponseCodeMetadata.prototype.codeLanguage = "";

            /**
             * AIRichResponseCodeMetadata codeBlocks.
             * @member {Array.<E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock>} codeBlocks
             * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @instance
             */
            AIRichResponseCodeMetadata.prototype.codeBlocks = $util.emptyArray;

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

            /**
             * Encodes the specified AIRichResponseCodeMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata
             */
            AIRichResponseCodeMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata();
                if (object.codeLanguage != null)
                    message.codeLanguage = String(object.codeLanguage);
                if (object.codeBlocks) {
                    if (!Array.isArray(object.codeBlocks))
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.codeBlocks: array expected");
                    message.codeBlocks = [];
                    for (var i = 0; i < object.codeBlocks.length; ++i) {
                        if (typeof object.codeBlocks[i] !== "object")
                            throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.codeBlocks: object expected");
                        message.codeBlocks[i] = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.toObject(message.codeBlocks[j], options);
                }
                return object;
            };

            /**
             * Converts this AIRichResponseCodeMetadata to JSON.
             * @function toJSON
             * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseCodeMetadata";
            };

            AIRichResponseCodeMetadata.AIRichResponseCodeBlock = (function() {

                /**
                 * Properties of a AIRichResponseCodeBlock.
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
                 * @interface IAIRichResponseCodeBlock
                 * @property {E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null} [highlightType] AIRichResponseCodeBlock highlightType
                 * @property {string|null} [codeContent] AIRichResponseCodeBlock codeContent
                 */

                /**
                 * Constructs a new AIRichResponseCodeBlock.
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata
                 * @classdesc Represents a AIRichResponseCodeBlock.
                 * @implements IAIRichResponseCodeBlock
                 * @constructor
                 * @param {E2E.AIRichResponseMessage.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 {E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType} highlightType
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @instance
                 */
                AIRichResponseCodeBlock.prototype.highlightType = 0;

                /**
                 * AIRichResponseCodeBlock codeContent.
                 * @member {string} codeContent
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @instance
                 */
                AIRichResponseCodeBlock.prototype.codeContent = "";

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

                /**
                 * Encodes the specified AIRichResponseCodeBlock message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
                 */
                AIRichResponseCodeBlock.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock)
                        return object;
                    var message = new $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
                 * @static
                 * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] === undefined ? message.highlightType : $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock";
                };

                return AIRichResponseCodeBlock;
            })();

            /**
             * AIRichResponseCodeHighlightType enum.
             * @name E2E.AIRichResponseMessage.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;
        })();

        AIRichResponseMessage.AIRichResponseContentItemsMetadata = (function() {

            /**
             * Properties of a AIRichResponseContentItemsMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseContentItemsMetadata
             * @property {Array.<E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata>|null} [itemsMetadata] AIRichResponseContentItemsMetadata itemsMetadata
             * @property {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType|null} [contentType] AIRichResponseContentItemsMetadata contentType
             */

            /**
             * Constructs a new AIRichResponseContentItemsMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseContentItemsMetadata.
             * @implements IAIRichResponseContentItemsMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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.<E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata>} itemsMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @instance
             */
            AIRichResponseContentItemsMetadata.prototype.itemsMetadata = $util.emptyArray;

            /**
             * AIRichResponseContentItemsMetadata contentType.
             * @member {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType} contentType
             * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @instance
             */
            AIRichResponseContentItemsMetadata.prototype.contentType = 0;

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

            /**
             * Encodes the specified AIRichResponseContentItemsMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata
             */
            AIRichResponseContentItemsMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata();
                if (object.itemsMetadata) {
                    if (!Array.isArray(object.itemsMetadata))
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.itemsMetadata: array expected");
                    message.itemsMetadata = [];
                    for (var i = 0; i < object.itemsMetadata.length; ++i) {
                        if (typeof object.itemsMetadata[i] !== "object")
                            throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.itemsMetadata: object expected");
                        message.itemsMetadata[i] = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.toObject(message.itemsMetadata[j], options);
                }
                if (message.contentType != null && message.hasOwnProperty("contentType"))
                    object.contentType = options.enums === String ? $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType[message.contentType] === undefined ? message.contentType : $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType[message.contentType] : message.contentType;
                return object;
            };

            /**
             * Converts this AIRichResponseContentItemsMetadata to JSON.
             * @function toJSON
             * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata";
            };

            AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata = (function() {

                /**
                 * Properties of a AIRichResponseContentItemMetadata.
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
                 * @interface IAIRichResponseContentItemMetadata
                 * @property {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null} [reelItem] AIRichResponseContentItemMetadata reelItem
                 */

                /**
                 * Constructs a new AIRichResponseContentItemMetadata.
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
                 * @classdesc Represents a AIRichResponseContentItemMetadata.
                 * @implements IAIRichResponseContentItemMetadata
                 * @constructor
                 * @param {E2E.AIRichResponseMessage.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 {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null|undefined} reelItem
                 * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
                 * @static
                 * @param {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata=} [properties] Properties to set
                 * @returns {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata instance
                 */
                AIRichResponseContentItemMetadata.create = function create(properties) {
                    return new AIRichResponseContentItemMetadata(properties);
                };

                /**
                 * Encodes the specified AIRichResponseContentItemMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
                 * @static
                 * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.reelItem = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata
                 */
                AIRichResponseContentItemMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata)
                        return object;
                    var message = new $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata();
                    if (object.reelItem != null) {
                        if (typeof object.reelItem !== "object")
                            throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.reelItem: object expected");
                        message.reelItem = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
                 * @static
                 * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.toObject(message.reelItem, options);
                        if (options.oneofs)
                            object.aIRichResponseContentItem = "reelItem";
                    }
                    return object;
                };

                /**
                 * Converts this AIRichResponseContentItemMetadata to JSON.
                 * @function toJSON
                 * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata";
                };

                return AIRichResponseContentItemMetadata;
            })();

            AIRichResponseContentItemsMetadata.AIRichResponseReelItem = (function() {

                /**
                 * Properties of a AIRichResponseReelItem.
                 * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata
                 * @classdesc Represents a AIRichResponseReelItem.
                 * @implements IAIRichResponseReelItem
                 * @constructor
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @instance
                 */
                AIRichResponseReelItem.prototype.title = "";

                /**
                 * AIRichResponseReelItem profileIconUrl.
                 * @member {string} profileIconUrl
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @instance
                 */
                AIRichResponseReelItem.prototype.profileIconUrl = "";

                /**
                 * AIRichResponseReelItem thumbnailUrl.
                 * @member {string} thumbnailUrl
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @instance
                 */
                AIRichResponseReelItem.prototype.thumbnailUrl = "";

                /**
                 * AIRichResponseReelItem videoUrl.
                 * @member {string} videoUrl
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @instance
                 */
                AIRichResponseReelItem.prototype.videoUrl = "";

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

                /**
                 * Encodes the specified AIRichResponseReelItem message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem
                 */
                AIRichResponseReelItem.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem)
                        return object;
                    var message = new $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem";
                };

                return AIRichResponseReelItem;
            })();

            /**
             * ContentType enum.
             * @name E2E.AIRichResponseMessage.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;
        })();

        AIRichResponseMessage.AIRichResponseDynamicMetadata = (function() {

            /**
             * Properties of a AIRichResponseDynamicMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseDynamicMetadata
             * @property {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseDynamicMetadata.
             * @implements IAIRichResponseDynamicMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 {E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType} type
             * @memberof E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @instance
             */
            AIRichResponseDynamicMetadata.prototype.type = 0;

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

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

            /**
             * AIRichResponseDynamicMetadata loopCount.
             * @member {number} loopCount
             * @memberof E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @instance
             */
            AIRichResponseDynamicMetadata.prototype.loopCount = 0;

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

            /**
             * Encodes the specified AIRichResponseDynamicMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata
             */
            AIRichResponseDynamicMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] === undefined ? message.type : $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata";
            };

            /**
             * AIRichResponseDynamicMetadataType enum.
             * @name E2E.AIRichResponseMessage.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;
        })();

        AIRichResponseMessage.AIRichResponseGridImageMetadata = (function() {

            /**
             * Properties of a AIRichResponseGridImageMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseGridImageMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseImageURL|null} [gridImageUrl] AIRichResponseGridImageMetadata gridImageUrl
             * @property {Array.<E2E.AIRichResponseMessage.IAIRichResponseImageURL>|null} [imageUrls] AIRichResponseGridImageMetadata imageUrls
             */

            /**
             * Constructs a new AIRichResponseGridImageMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseGridImageMetadata.
             * @implements IAIRichResponseGridImageMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 {E2E.AIRichResponseMessage.IAIRichResponseImageURL|null|undefined} gridImageUrl
             * @memberof E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @instance
             */
            AIRichResponseGridImageMetadata.prototype.gridImageUrl = null;

            /**
             * AIRichResponseGridImageMetadata imageUrls.
             * @member {Array.<E2E.AIRichResponseMessage.IAIRichResponseImageURL>} imageUrls
             * @memberof E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @instance
             */
            AIRichResponseGridImageMetadata.prototype.imageUrls = $util.emptyArray;

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

            /**
             * Encodes the specified AIRichResponseGridImageMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.gridImageUrl = $root.E2E.AIRichResponseMessage.AIRichResponseImageURL.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            if (!(message.imageUrls && message.imageUrls.length))
                                message.imageUrls = [];
                            message.imageUrls.push($root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata
             */
            AIRichResponseGridImageMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata();
                if (object.gridImageUrl != null) {
                    if (typeof object.gridImageUrl !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata.gridImageUrl: object expected");
                    message.gridImageUrl = $root.E2E.AIRichResponseMessage.AIRichResponseImageURL.fromObject(object.gridImageUrl);
                }
                if (object.imageUrls) {
                    if (!Array.isArray(object.imageUrls))
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata.imageUrls: array expected");
                    message.imageUrls = [];
                    for (var i = 0; i < object.imageUrls.length; ++i) {
                        if (typeof object.imageUrls[i] !== "object")
                            throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata.imageUrls: object expected");
                        message.imageUrls[i] = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseImageURL.toObject(message.imageUrls[j], options);
                }
                return object;
            };

            /**
             * Converts this AIRichResponseGridImageMetadata to JSON.
             * @function toJSON
             * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata";
            };

            return AIRichResponseGridImageMetadata;
        })();

        AIRichResponseMessage.AIRichResponseImageURL = (function() {

            /**
             * Properties of a AIRichResponseImageURL.
             * @memberof E2E.AIRichResponseMessage
             * @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 E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseImageURL.
             * @implements IAIRichResponseImageURL
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @instance
             */
            AIRichResponseImageURL.prototype.imagePreviewUrl = "";

            /**
             * AIRichResponseImageURL imageHighResUrl.
             * @member {string} imageHighResUrl
             * @memberof E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @instance
             */
            AIRichResponseImageURL.prototype.imageHighResUrl = "";

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

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

            /**
             * Encodes the specified AIRichResponseImageURL message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL
             */
            AIRichResponseImageURL.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseImageURL)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseImageURL
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseImageURL";
            };

            return AIRichResponseImageURL;
        })();

        AIRichResponseMessage.AIRichResponseInlineImageMetadata = (function() {

            /**
             * Properties of a AIRichResponseInlineImageMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseInlineImageMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseImageURL|null} [imageUrl] AIRichResponseInlineImageMetadata imageUrl
             * @property {string|null} [imageText] AIRichResponseInlineImageMetadata imageText
             * @property {E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null} [alignment] AIRichResponseInlineImageMetadata alignment
             * @property {string|null} [tapLinkUrl] AIRichResponseInlineImageMetadata tapLinkUrl
             */

            /**
             * Constructs a new AIRichResponseInlineImageMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseInlineImageMetadata.
             * @implements IAIRichResponseInlineImageMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 {E2E.AIRichResponseMessage.IAIRichResponseImageURL|null|undefined} imageUrl
             * @memberof E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @instance
             */
            AIRichResponseInlineImageMetadata.prototype.imageUrl = null;

            /**
             * AIRichResponseInlineImageMetadata imageText.
             * @member {string} imageText
             * @memberof E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @instance
             */
            AIRichResponseInlineImageMetadata.prototype.imageText = "";

            /**
             * AIRichResponseInlineImageMetadata alignment.
             * @member {E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment} alignment
             * @memberof E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @instance
             */
            AIRichResponseInlineImageMetadata.prototype.alignment = 0;

            /**
             * AIRichResponseInlineImageMetadata tapLinkUrl.
             * @member {string} tapLinkUrl
             * @memberof E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @instance
             */
            AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = "";

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

            /**
             * Encodes the specified AIRichResponseInlineImageMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.imageUrl = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
             */
            AIRichResponseInlineImageMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata();
                if (object.imageUrl != null) {
                    if (typeof object.imageUrl !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.imageUrl: object expected");
                    message.imageUrl = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] === undefined ? message.alignment : $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata";
            };

            /**
             * AIRichResponseImageAlignment enum.
             * @name E2E.AIRichResponseMessage.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;
        })();

        AIRichResponseMessage.AIRichResponseLatexMetadata = (function() {

            /**
             * Properties of a AIRichResponseLatexMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseLatexMetadata
             * @property {string|null} [text] AIRichResponseLatexMetadata text
             * @property {Array.<E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression>|null} [expressions] AIRichResponseLatexMetadata expressions
             */

            /**
             * Constructs a new AIRichResponseLatexMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseLatexMetadata.
             * @implements IAIRichResponseLatexMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @instance
             */
            AIRichResponseLatexMetadata.prototype.text = "";

            /**
             * AIRichResponseLatexMetadata expressions.
             * @member {Array.<E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression>} expressions
             * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @instance
             */
            AIRichResponseLatexMetadata.prototype.expressions = $util.emptyArray;

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

            /**
             * Encodes the specified AIRichResponseLatexMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata
             */
            AIRichResponseLatexMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata();
                if (object.text != null)
                    message.text = String(object.text);
                if (object.expressions) {
                    if (!Array.isArray(object.expressions))
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.expressions: array expected");
                    message.expressions = [];
                    for (var i = 0; i < object.expressions.length; ++i) {
                        if (typeof object.expressions[i] !== "object")
                            throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.expressions: object expected");
                        message.expressions[i] = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.toObject(message.expressions[j], options);
                }
                return object;
            };

            /**
             * Converts this AIRichResponseLatexMetadata to JSON.
             * @function toJSON
             * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseLatexMetadata";
            };

            AIRichResponseLatexMetadata.AIRichResponseLatexExpression = (function() {

                /**
                 * Properties of a AIRichResponseLatexExpression.
                 * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata
                 * @classdesc Represents a AIRichResponseLatexExpression.
                 * @implements IAIRichResponseLatexExpression
                 * @constructor
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @instance
                 */
                AIRichResponseLatexExpression.prototype.latexExpression = "";

                /**
                 * AIRichResponseLatexExpression url.
                 * @member {string} url
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @instance
                 */
                AIRichResponseLatexExpression.prototype.url = "";

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

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

                /**
                 * AIRichResponseLatexExpression fontHeight.
                 * @member {number} fontHeight
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @instance
                 */
                AIRichResponseLatexExpression.prototype.fontHeight = 0;

                /**
                 * AIRichResponseLatexExpression imageTopPadding.
                 * @member {number} imageTopPadding
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @instance
                 */
                AIRichResponseLatexExpression.prototype.imageTopPadding = 0;

                /**
                 * AIRichResponseLatexExpression imageLeadingPadding.
                 * @member {number} imageLeadingPadding
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @instance
                 */
                AIRichResponseLatexExpression.prototype.imageLeadingPadding = 0;

                /**
                 * AIRichResponseLatexExpression imageBottomPadding.
                 * @member {number} imageBottomPadding
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @instance
                 */
                AIRichResponseLatexExpression.prototype.imageBottomPadding = 0;

                /**
                 * AIRichResponseLatexExpression imageTrailingPadding.
                 * @member {number} imageTrailingPadding
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @instance
                 */
                AIRichResponseLatexExpression.prototype.imageTrailingPadding = 0;

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

                /**
                 * Encodes the specified AIRichResponseLatexExpression message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression
                 */
                AIRichResponseLatexExpression.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression)
                        return object;
                    var message = new $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression";
                };

                return AIRichResponseLatexExpression;
            })();

            return AIRichResponseLatexMetadata;
        })();

        AIRichResponseMessage.AIRichResponseMapMetadata = (function() {

            /**
             * Properties of a AIRichResponseMapMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @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.<E2E.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation>|null} [annotations] AIRichResponseMapMetadata annotations
             * @property {boolean|null} [showInfoList] AIRichResponseMapMetadata showInfoList
             */

            /**
             * Constructs a new AIRichResponseMapMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseMapMetadata.
             * @implements IAIRichResponseMapMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @instance
             */
            AIRichResponseMapMetadata.prototype.centerLatitude = 0;

            /**
             * AIRichResponseMapMetadata centerLongitude.
             * @member {number} centerLongitude
             * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @instance
             */
            AIRichResponseMapMetadata.prototype.centerLongitude = 0;

            /**
             * AIRichResponseMapMetadata latitudeDelta.
             * @member {number} latitudeDelta
             * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @instance
             */
            AIRichResponseMapMetadata.prototype.latitudeDelta = 0;

            /**
             * AIRichResponseMapMetadata longitudeDelta.
             * @member {number} longitudeDelta
             * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @instance
             */
            AIRichResponseMapMetadata.prototype.longitudeDelta = 0;

            /**
             * AIRichResponseMapMetadata annotations.
             * @member {Array.<E2E.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation>} annotations
             * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @instance
             */
            AIRichResponseMapMetadata.prototype.annotations = $util.emptyArray;

            /**
             * AIRichResponseMapMetadata showInfoList.
             * @member {boolean} showInfoList
             * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @instance
             */
            AIRichResponseMapMetadata.prototype.showInfoList = false;

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

            /**
             * Encodes the specified AIRichResponseMapMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseMapMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseMapMetadata} AIRichResponseMapMetadata
             */
            AIRichResponseMapMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseMapMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.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(".E2E.AIRichResponseMessage.AIRichResponseMapMetadata.annotations: array expected");
                    message.annotations = [];
                    for (var i = 0; i < object.annotations.length; ++i) {
                        if (typeof object.annotations[i] !== "object")
                            throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseMapMetadata.annotations: object expected");
                        message.annotations[i] = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseMapMetadata";
            };

            AIRichResponseMapMetadata.AIRichResponseMapAnnotation = (function() {

                /**
                 * Properties of a AIRichResponseMapAnnotation.
                 * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata
                 * @classdesc Represents a AIRichResponseMapAnnotation.
                 * @implements IAIRichResponseMapAnnotation
                 * @constructor
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @instance
                 */
                AIRichResponseMapAnnotation.prototype.annotationNumber = 0;

                /**
                 * AIRichResponseMapAnnotation latitude.
                 * @member {number} latitude
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @instance
                 */
                AIRichResponseMapAnnotation.prototype.latitude = 0;

                /**
                 * AIRichResponseMapAnnotation longitude.
                 * @member {number} longitude
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @instance
                 */
                AIRichResponseMapAnnotation.prototype.longitude = 0;

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

                /**
                 * AIRichResponseMapAnnotation body.
                 * @member {string} body
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @instance
                 */
                AIRichResponseMapAnnotation.prototype.body = "";

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

                /**
                 * Encodes the specified AIRichResponseMapAnnotation message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation
                 */
                AIRichResponseMapAnnotation.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation)
                        return object;
                    var message = new $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation";
                };

                return AIRichResponseMapAnnotation;
            })();

            return AIRichResponseMapMetadata;
        })();

        /**
         * AIRichResponseMessageType enum.
         * @name E2E.AIRichResponseMessage.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
         */
        AIRichResponseMessage.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;
        })();

        AIRichResponseMessage.AIRichResponseSubMessage = (function() {

            /**
             * Properties of a AIRichResponseSubMessage.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseSubMessage
             * @property {E2E.AIRichResponseMessage.AIRichResponseSubMessageType|null} [messageType] AIRichResponseSubMessage messageType
             * @property {E2E.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null} [gridImageMetadata] AIRichResponseSubMessage gridImageMetadata
             * @property {string|null} [messageText] AIRichResponseSubMessage messageText
             * @property {E2E.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null} [imageMetadata] AIRichResponseSubMessage imageMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseCodeMetadata|null} [codeMetadata] AIRichResponseSubMessage codeMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseTableMetadata|null} [tableMetadata] AIRichResponseSubMessage tableMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null} [dynamicMetadata] AIRichResponseSubMessage dynamicMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseLatexMetadata|null} [latexMetadata] AIRichResponseSubMessage latexMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseMapMetadata|null} [mapMetadata] AIRichResponseSubMessage mapMetadata
             * @property {E2E.AIRichResponseMessage.IAIRichResponseContentItemsMetadata|null} [contentItemsMetadata] AIRichResponseSubMessage contentItemsMetadata
             */

            /**
             * Constructs a new AIRichResponseSubMessage.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseSubMessage.
             * @implements IAIRichResponseSubMessage
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 {E2E.AIRichResponseMessage.AIRichResponseSubMessageType} messageType
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.messageType = 0;

            /**
             * AIRichResponseSubMessage gridImageMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null|undefined} gridImageMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.gridImageMetadata = null;

            /**
             * AIRichResponseSubMessage messageText.
             * @member {string} messageText
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.messageText = "";

            /**
             * AIRichResponseSubMessage imageMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null|undefined} imageMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.imageMetadata = null;

            /**
             * AIRichResponseSubMessage codeMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseCodeMetadata|null|undefined} codeMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.codeMetadata = null;

            /**
             * AIRichResponseSubMessage tableMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseTableMetadata|null|undefined} tableMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.tableMetadata = null;

            /**
             * AIRichResponseSubMessage dynamicMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null|undefined} dynamicMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.dynamicMetadata = null;

            /**
             * AIRichResponseSubMessage latexMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseLatexMetadata|null|undefined} latexMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.latexMetadata = null;

            /**
             * AIRichResponseSubMessage mapMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseMapMetadata|null|undefined} mapMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.mapMetadata = null;

            /**
             * AIRichResponseSubMessage contentItemsMetadata.
             * @member {E2E.AIRichResponseMessage.IAIRichResponseContentItemsMetadata|null|undefined} contentItemsMetadata
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @instance
             */
            AIRichResponseSubMessage.prototype.contentItemsMetadata = null;

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

            /**
             * Encodes the specified AIRichResponseSubMessage message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.encode(message.imageMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.codeMetadata != null && Object.hasOwnProperty.call(message, "codeMetadata"))
                    $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.encode(message.codeMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.tableMetadata != null && Object.hasOwnProperty.call(message, "tableMetadata"))
                    $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata.encode(message.tableMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                if (message.dynamicMetadata != null && Object.hasOwnProperty.call(message, "dynamicMetadata"))
                    $root.E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.encode(message.dynamicMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                if (message.latexMetadata != null && Object.hasOwnProperty.call(message, "latexMetadata"))
                    $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.encode(message.latexMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                if (message.mapMetadata != null && Object.hasOwnProperty.call(message, "mapMetadata"))
                    $root.E2E.AIRichResponseMessage.AIRichResponseMapMetadata.encode(message.mapMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                if (message.contentItemsMetadata != null && Object.hasOwnProperty.call(message, "contentItemsMetadata"))
                    $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.messageText = reader.string();
                            break;
                        }
                    case 4: {
                            message.imageMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            message.codeMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 6: {
                            message.tableMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 7: {
                            message.dynamicMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 8: {
                            message.latexMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 9: {
                            message.mapMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseMapMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 10: {
                            message.contentItemsMetadata = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify(message.imageMetadata);
                    if (error)
                        return "imageMetadata." + error;
                }
                if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
                    var error = $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.verify(message.codeMetadata);
                    if (error)
                        return "codeMetadata." + error;
                }
                if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
                    var error = $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata.verify(message.tableMetadata);
                    if (error)
                        return "tableMetadata." + error;
                }
                if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
                    var error = $root.E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify(message.dynamicMetadata);
                    if (error)
                        return "dynamicMetadata." + error;
                }
                if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) {
                    var error = $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.verify(message.latexMetadata);
                    if (error)
                        return "latexMetadata." + error;
                }
                if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) {
                    var error = $root.E2E.AIRichResponseMessage.AIRichResponseMapMetadata.verify(message.mapMetadata);
                    if (error)
                        return "mapMetadata." + error;
                }
                if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) {
                    var error = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage
             */
            AIRichResponseSubMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseSubMessage)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.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(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.gridImageMetadata: object expected");
                    message.gridImageMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseGridImageMetadata.fromObject(object.gridImageMetadata);
                }
                if (object.messageText != null)
                    message.messageText = String(object.messageText);
                if (object.imageMetadata != null) {
                    if (typeof object.imageMetadata !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.imageMetadata: object expected");
                    message.imageMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.fromObject(object.imageMetadata);
                }
                if (object.codeMetadata != null) {
                    if (typeof object.codeMetadata !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.codeMetadata: object expected");
                    message.codeMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.fromObject(object.codeMetadata);
                }
                if (object.tableMetadata != null) {
                    if (typeof object.tableMetadata !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.tableMetadata: object expected");
                    message.tableMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata.fromObject(object.tableMetadata);
                }
                if (object.dynamicMetadata != null) {
                    if (typeof object.dynamicMetadata !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.dynamicMetadata: object expected");
                    message.dynamicMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.fromObject(object.dynamicMetadata);
                }
                if (object.latexMetadata != null) {
                    if (typeof object.latexMetadata !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.latexMetadata: object expected");
                    message.latexMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.fromObject(object.latexMetadata);
                }
                if (object.mapMetadata != null) {
                    if (typeof object.mapMetadata !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.mapMetadata: object expected");
                    message.mapMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseMapMetadata.fromObject(object.mapMetadata);
                }
                if (object.contentItemsMetadata != null) {
                    if (typeof object.contentItemsMetadata !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseSubMessage.contentItemsMetadata: object expected");
                    message.contentItemsMetadata = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseSubMessage
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseSubMessageType[message.messageType] === undefined ? message.messageType : $root.E2E.AIRichResponseMessage.AIRichResponseSubMessageType[message.messageType] : message.messageType;
                if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata"))
                    object.gridImageMetadata = $root.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.AIRichResponseInlineImageMetadata.toObject(message.imageMetadata, options);
                if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata"))
                    object.codeMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseCodeMetadata.toObject(message.codeMetadata, options);
                if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata"))
                    object.tableMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata.toObject(message.tableMetadata, options);
                if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata"))
                    object.dynamicMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseDynamicMetadata.toObject(message.dynamicMetadata, options);
                if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata"))
                    object.latexMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseLatexMetadata.toObject(message.latexMetadata, options);
                if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata"))
                    object.mapMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseMapMetadata.toObject(message.mapMetadata, options);
                if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata"))
                    object.contentItemsMetadata = $root.E2E.AIRichResponseMessage.AIRichResponseContentItemsMetadata.toObject(message.contentItemsMetadata, options);
                return object;
            };

            /**
             * Converts this AIRichResponseSubMessage to JSON.
             * @function toJSON
             * @memberof E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseSubMessage";
            };

            return AIRichResponseSubMessage;
        })();

        /**
         * AIRichResponseSubMessageType enum.
         * @name E2E.AIRichResponseMessage.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
         */
        AIRichResponseMessage.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;
        })();

        AIRichResponseMessage.AIRichResponseTableMetadata = (function() {

            /**
             * Properties of a AIRichResponseTableMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseTableMetadata
             * @property {Array.<E2E.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow>|null} [rows] AIRichResponseTableMetadata rows
             * @property {string|null} [title] AIRichResponseTableMetadata title
             */

            /**
             * Constructs a new AIRichResponseTableMetadata.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseTableMetadata.
             * @implements IAIRichResponseTableMetadata
             * @constructor
             * @param {E2E.AIRichResponseMessage.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.<E2E.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow>} rows
             * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata
             * @instance
             */
            AIRichResponseTableMetadata.prototype.rows = $util.emptyArray;

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

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

            /**
             * Encodes the specified AIRichResponseTableMetadata message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata
             */
            AIRichResponseTableMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata();
                if (object.rows) {
                    if (!Array.isArray(object.rows))
                        throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseTableMetadata.rows: array expected");
                    message.rows = [];
                    for (var i = 0; i < object.rows.length; ++i) {
                        if (typeof object.rows[i] !== "object")
                            throw TypeError(".E2E.AIRichResponseMessage.AIRichResponseTableMetadata.rows: object expected");
                        message.rows[i] = $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata
             * @static
             * @param {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseTableMetadata";
            };

            AIRichResponseTableMetadata.AIRichResponseTableRow = (function() {

                /**
                 * Properties of a AIRichResponseTableRow.
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata
                 * @interface IAIRichResponseTableRow
                 * @property {Array.<string>|null} [items] AIRichResponseTableRow items
                 * @property {boolean|null} [isHeading] AIRichResponseTableRow isHeading
                 */

                /**
                 * Constructs a new AIRichResponseTableRow.
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata
                 * @classdesc Represents a AIRichResponseTableRow.
                 * @implements IAIRichResponseTableRow
                 * @constructor
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @instance
                 */
                AIRichResponseTableRow.prototype.items = $util.emptyArray;

                /**
                 * AIRichResponseTableRow isHeading.
                 * @member {boolean} isHeading
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @instance
                 */
                AIRichResponseTableRow.prototype.isHeading = false;

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

                /**
                 * Encodes the specified AIRichResponseTableRow message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow
                 */
                AIRichResponseTableRow.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow)
                        return object;
                    var message = new $root.E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow();
                    if (object.items) {
                        if (!Array.isArray(object.items))
                            throw TypeError(".E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow
                 * @static
                 * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow";
                };

                return AIRichResponseTableRow;
            })();

            return AIRichResponseTableMetadata;
        })();

        AIRichResponseMessage.AIRichResponseUnifiedResponse = (function() {

            /**
             * Properties of a AIRichResponseUnifiedResponse.
             * @memberof E2E.AIRichResponseMessage
             * @interface IAIRichResponseUnifiedResponse
             * @property {Uint8Array|null} [data] AIRichResponseUnifiedResponse data
             */

            /**
             * Constructs a new AIRichResponseUnifiedResponse.
             * @memberof E2E.AIRichResponseMessage
             * @classdesc Represents a AIRichResponseUnifiedResponse.
             * @implements IAIRichResponseUnifiedResponse
             * @constructor
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse
             * @instance
             */
            AIRichResponseUnifiedResponse.prototype.data = $util.newBuffer([]);

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

            /**
             * Encodes the specified AIRichResponseUnifiedResponse message. Does not implicitly {@link E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse.verify|verify} messages.
             * @function encode
             * @memberof E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.AIRichResponseMessage.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.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse} AIRichResponseUnifiedResponse
             */
            AIRichResponseUnifiedResponse.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse)
                    return object;
                var message = new $root.E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse
             * @static
             * @param {E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 E2E.AIRichResponseMessage.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 + "/E2E.AIRichResponseMessage.AIRichResponseUnifiedResponse";
            };

            return AIRichResponseUnifiedResponse;
        })();

        return AIRichResponseMessage;
    })();

    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 {E2E.ContextInfo.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
         */

        /**
         * 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 {E2E.ContextInfo.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;

        /**
         * 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.E2E.ContextInfo.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();
            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.E2E.ContextInfo.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;
                    }
                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.E2E.ContextInfo.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:
                    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:
                    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;
            }
            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.E2E.ContextInfo.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;
            }
            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;
            }
            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);
            }
            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;
            }
            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.E2E.ContextInfo.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);
            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
             */

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

            /**
             * 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);
                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;
                        }
                    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";
                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);
                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;
                }
                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;
                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
         */
        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;
            return values;
        })();

        ContextInfo.ForwardedAIBotMessageInfo = (function() {

            /**
             * Properties of a ForwardedAIBotMessageInfo.
             * @memberof E2E.ContextInfo
             * @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 E2E.ContextInfo
             * @classdesc Represents a ForwardedAIBotMessageInfo.
             * @implements IForwardedAIBotMessageInfo
             * @constructor
             * @param {E2E.ContextInfo.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 E2E.ContextInfo.ForwardedAIBotMessageInfo
             * @instance
             */
            ForwardedAIBotMessageInfo.prototype.botName = "";

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

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

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

            /**
             * Encodes the specified ForwardedAIBotMessageInfo message. Does not implicitly {@link E2E.ContextInfo.ForwardedAIBotMessageInfo.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.ForwardedAIBotMessageInfo
             * @static
             * @param {E2E.ContextInfo.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 E2E.ContextInfo.ForwardedAIBotMessageInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.ForwardedAIBotMessageInfo
             * @static
             * @param {E2E.ContextInfo.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 E2E.ContextInfo.ForwardedAIBotMessageInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.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.E2E.ContextInfo.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 E2E.ContextInfo.ForwardedAIBotMessageInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.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 E2E.ContextInfo.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 E2E.ContextInfo.ForwardedAIBotMessageInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo
             */
            ForwardedAIBotMessageInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.ForwardedAIBotMessageInfo)
                    return object;
                var message = new $root.E2E.ContextInfo.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 E2E.ContextInfo.ForwardedAIBotMessageInfo
             * @static
             * @param {E2E.ContextInfo.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 E2E.ContextInfo.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 E2E.ContextInfo.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 + "/E2E.ContextInfo.ForwardedAIBotMessageInfo";
            };

            return ForwardedAIBotMessageInfo;
        })();

        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
         */
        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;
            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;
        })();

        /**
         * 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} [pollCreationMessageV5] Message pollCreationMessageV5
         * @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
         */

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

        /**
         * 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.pollCreationMessageV5 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV5"))
                $root.E2E.Message.FutureProofMessage.encode(message.pollCreationMessageV5, writer.uint32(/* id 94, wireType 2 =*/754).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();
            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 94: {
                        message.pollCreationMessageV5 = $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;
                    }
                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.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) {
                var error = $root.E2E.Message.FutureProofMessage.verify(message.pollCreationMessageV5);
                if (error)
                    return "pollCreationMessageV5." + 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;
            }
            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.pollCreationMessageV5 != null) {
                if (typeof object.pollCreationMessageV5 !== "object")
                    throw TypeError(".E2E.Message.pollCreationMessageV5: object expected");
                message.pollCreationMessageV5 = $root.E2E.Message.FutureProofMessage.fromObject(object.pollCreationMessageV5);
            }
            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);
            }
            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.pollCreationMessageV5 = 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;
            }
            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.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5"))
                object.pollCreationMessageV5 = $root.E2E.Message.FutureProofMessage.toObject(message.pollCreationMessageV5, 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);
            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.BotFeedbackMessage = (function() {

            /**
             * Properties of a BotFeedbackMessage.
             * @memberof E2E.Message
             * @interface IBotFeedbackMessage
             * @property {Protocol.IMessageKey|null} [messageKey] BotFeedbackMessage messageKey
             * @property {E2E.Message.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 {E2E.Message.BotFeedbackMessage.ReportKind|null} [kindReport] BotFeedbackMessage kindReport
             * @property {E2E.Message.BotFeedbackMessage.ISideBySideSurveyMetadata|null} [sideBySideSurveyMetadata] BotFeedbackMessage sideBySideSurveyMetadata
             */

            /**
             * Constructs a new BotFeedbackMessage.
             * @memberof E2E.Message
             * @classdesc Represents a BotFeedbackMessage.
             * @implements IBotFeedbackMessage
             * @constructor
             * @param {E2E.Message.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 E2E.Message.BotFeedbackMessage
             * @instance
             */
            BotFeedbackMessage.prototype.messageKey = null;

            /**
             * BotFeedbackMessage kind.
             * @member {E2E.Message.BotFeedbackMessage.BotFeedbackKind} kind
             * @memberof E2E.Message.BotFeedbackMessage
             * @instance
             */
            BotFeedbackMessage.prototype.kind = 0;

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

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

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

            /**
             * BotFeedbackMessage kindReport.
             * @member {E2E.Message.BotFeedbackMessage.ReportKind} kindReport
             * @memberof E2E.Message.BotFeedbackMessage
             * @instance
             */
            BotFeedbackMessage.prototype.kindReport = 0;

            /**
             * BotFeedbackMessage sideBySideSurveyMetadata.
             * @member {E2E.Message.BotFeedbackMessage.ISideBySideSurveyMetadata|null|undefined} sideBySideSurveyMetadata
             * @memberof E2E.Message.BotFeedbackMessage
             * @instance
             */
            BotFeedbackMessage.prototype.sideBySideSurveyMetadata = null;

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

            /**
             * Encodes the specified BotFeedbackMessage message. Does not implicitly {@link E2E.Message.BotFeedbackMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.BotFeedbackMessage
             * @static
             * @param {E2E.Message.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.E2E.Message.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 E2E.Message.BotFeedbackMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.BotFeedbackMessage
             * @static
             * @param {E2E.Message.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 E2E.Message.BotFeedbackMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.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.E2E.Message.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.E2E.Message.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 E2E.Message.BotFeedbackMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.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 E2E.Message.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.E2E.Message.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 E2E.Message.BotFeedbackMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.BotFeedbackMessage} BotFeedbackMessage
             */
            BotFeedbackMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.BotFeedbackMessage)
                    return object;
                var message = new $root.E2E.Message.BotFeedbackMessage();
                if (object.messageKey != null) {
                    if (typeof object.messageKey !== "object")
                        throw TypeError(".E2E.Message.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(".E2E.Message.BotFeedbackMessage.sideBySideSurveyMetadata: object expected");
                    message.sideBySideSurveyMetadata = $root.E2E.Message.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 E2E.Message.BotFeedbackMessage
             * @static
             * @param {E2E.Message.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.E2E.Message.BotFeedbackMessage.BotFeedbackKind[message.kind] === undefined ? message.kind : $root.E2E.Message.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.E2E.Message.BotFeedbackMessage.ReportKind[message.kindReport] === undefined ? message.kindReport : $root.E2E.Message.BotFeedbackMessage.ReportKind[message.kindReport] : message.kindReport;
                if (message.sideBySideSurveyMetadata != null && message.hasOwnProperty("sideBySideSurveyMetadata"))
                    object.sideBySideSurveyMetadata = $root.E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.toObject(message.sideBySideSurveyMetadata, options);
                return object;
            };

            /**
             * Converts this BotFeedbackMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.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 E2E.Message.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 + "/E2E.Message.BotFeedbackMessage";
            };

            /**
             * BotFeedbackKind enum.
             * @name E2E.Message.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 E2E.Message.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 E2E.Message.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 E2E.Message.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 E2E.Message.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 {E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData|null} [analyticsData] SideBySideSurveyMetadata analyticsData
                 */

                /**
                 * Constructs a new SideBySideSurveyMetadata.
                 * @memberof E2E.Message.BotFeedbackMessage
                 * @classdesc Represents a SideBySideSurveyMetadata.
                 * @implements ISideBySideSurveyMetadata
                 * @constructor
                 * @param {E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.selectedRequestId = "";

                /**
                 * SideBySideSurveyMetadata surveyId.
                 * @member {number} surveyId
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.surveyId = 0;

                /**
                 * SideBySideSurveyMetadata simonSessionFbid.
                 * @member {string} simonSessionFbid
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.simonSessionFbid = "";

                /**
                 * SideBySideSurveyMetadata responseOtid.
                 * @member {string} responseOtid
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.responseOtid = "";

                /**
                 * SideBySideSurveyMetadata responseTimestampMsString.
                 * @member {string} responseTimestampMsString
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.responseTimestampMsString = "";

                /**
                 * SideBySideSurveyMetadata isSelectedResponsePrimary.
                 * @member {boolean} isSelectedResponsePrimary
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.isSelectedResponsePrimary = false;

                /**
                 * SideBySideSurveyMetadata messageIdToEdit.
                 * @member {string} messageIdToEdit
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.messageIdToEdit = "";

                /**
                 * SideBySideSurveyMetadata analyticsData.
                 * @member {E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData|null|undefined} analyticsData
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @instance
                 */
                SideBySideSurveyMetadata.prototype.analyticsData = null;

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

                /**
                 * Encodes the specified SideBySideSurveyMetadata message. Does not implicitly {@link E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @static
                 * @param {E2E.Message.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.E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @static
                 * @param {E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.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.E2E.Message.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.E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.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 E2E.Message.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.E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata} SideBySideSurveyMetadata
                 */
                SideBySideSurveyMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata)
                        return object;
                    var message = new $root.E2E.Message.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(".E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.analyticsData: object expected");
                        message.analyticsData = $root.E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @static
                 * @param {E2E.Message.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.E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.toObject(message.analyticsData, options);
                    return object;
                };

                /**
                 * Converts this SideBySideSurveyMetadata to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.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 E2E.Message.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 + "/E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata";
                };

                SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData = (function() {

                    /**
                     * Properties of a SideBySideSurveyAnalyticsData.
                     * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                     * @interface ISideBySideSurveyAnalyticsData
                     * @property {string|null} [tessaEvent] SideBySideSurveyAnalyticsData tessaEvent
                     * @property {string|null} [tessaSessionFbid] SideBySideSurveyAnalyticsData tessaSessionFbid
                     */

                    /**
                     * Constructs a new SideBySideSurveyAnalyticsData.
                     * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata
                     * @classdesc Represents a SideBySideSurveyAnalyticsData.
                     * @implements ISideBySideSurveyAnalyticsData
                     * @constructor
                     * @param {E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @instance
                     */
                    SideBySideSurveyAnalyticsData.prototype.tessaEvent = "";

                    /**
                     * SideBySideSurveyAnalyticsData tessaSessionFbid.
                     * @member {string} tessaSessionFbid
                     * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @instance
                     */
                    SideBySideSurveyAnalyticsData.prototype.tessaSessionFbid = "";

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

                    /**
                     * Encodes the specified SideBySideSurveyAnalyticsData message. Does not implicitly {@link E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @static
                     * @param {E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @static
                     * @param {E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.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.E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.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 E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData} SideBySideSurveyAnalyticsData
                     */
                    SideBySideSurveyAnalyticsData.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData)
                            return object;
                        var message = new $root.E2E.Message.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 E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                     * @static
                     * @param {E2E.Message.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 E2E.Message.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 E2E.Message.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 + "/E2E.Message.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData";
                    };

                    return SideBySideSurveyAnalyticsData;
                })();

                return SideBySideSurveyMetadata;
            })();

            return BotFeedbackMessage;
        })();

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

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

            /**
             * 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();
                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;
                        }
                    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;
                    }
                }
                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]);
                    }
                }
                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;
                }
                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);
                }
                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.HistorySyncNotification.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.HistorySyncNotification.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.HistorySyncNotification.HistorySyncType[message.syncType] === undefined ? message.syncType : $root.E2E.Message.HistorySyncNotification.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";
            };

            /**
             * HistorySyncType enum.
             * @name E2E.Message.HistorySyncNotification.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
             */
            HistorySyncNotification.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;
            })();

            return HistorySyncNotification;
        })();

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

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

            /**
             * 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);
                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;
                        }
                    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;
                    }
                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;
                }
                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;
                }
                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;
                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:
                            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 "DEFAULT":
                    case 0:
                        message.carouselCardType = 0;
                        break;
                    case "ALBUM":
                    case 1:
                        message.carouselCardType = 1;
                        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 ? "DEFAULT" : 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} DEFAULT=0 DEFAULT value
                 * @property {number} ALBUM=1 ALBUM value
                 */
                CarouselMessage.CarouselCardType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "DEFAULT"] = 0;
                    values[valuesById[1] = "ALBUM"] = 1;
                    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
                 */

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

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

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

            /**
             * 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);
                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;
                        }
                    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;
                    }
                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;
                }
                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;
                }
                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;
                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.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.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
             */

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

            /**
             * 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();
                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;
                        }
                    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:
                        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;
                }
                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;
                }
                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);
                }
                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;
                }
                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);
                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.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:
                        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;
                }
                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
                 */

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

                /**
                 * 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();
                    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;
                            }
                        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;
                    }
                    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);
                    }
                    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;
                    }
                    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);
                    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.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
         */
        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;
            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.PollCreationMessage.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.PollCreationMessage.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.PollCreationMessage.PollType[message.pollType] === undefined ? message.pollType : $root.E2E.Message.PollCreationMessage.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;
            })();

            /**
             * PollType enum.
             * @name E2E.Message.PollCreationMessage.PollType
             * @enum {number}
             * @property {number} POLL=0 POLL value
             * @property {number} QUIZ=1 QUIZ value
             */
            PollCreationMessage.PollType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "POLL"] = 0;
                values[valuesById[1] = "QUIZ"] = 1;
                return values;
            })();

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

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

            /**
             * 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();
                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;
                        }
                    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;
                }
                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);
                }
                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;
                }
                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);
                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;
        })();

        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 {E2E.Message.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 {E2E.Message.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.E2E.Message.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.E2E.Message.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.E2E.Message.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.E2E.Message.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.E2E.Message.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.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.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.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.BotMetadata = (function() {

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

    BotMetadata.BotMetadata = (function() {

        /**
         * Properties of a BotMetadata.
         * @memberof BotMetadata
         * @interface IBotMetadata
         * @property {BotMetadata.IBotAvatarMetadata|null} [avatarMetadata] BotMetadata avatarMetadata
         * @property {string|null} [personaId] BotMetadata personaId
         * @property {BotMetadata.IBotPluginMetadata|null} [pluginMetadata] BotMetadata pluginMetadata
         * @property {BotMetadata.IBotSuggestedPromptMetadata|null} [suggestedPromptMetadata] BotMetadata suggestedPromptMetadata
         * @property {string|null} [invokerJid] BotMetadata invokerJid
         * @property {BotMetadata.IBotSessionMetadata|null} [sessionMetadata] BotMetadata sessionMetadata
         * @property {BotMetadata.IBotMemuMetadata|null} [memuMetadata] BotMetadata memuMetadata
         * @property {string|null} [timezone] BotMetadata timezone
         * @property {BotMetadata.IBotReminderMetadata|null} [reminderMetadata] BotMetadata reminderMetadata
         * @property {BotMetadata.IBotModelMetadata|null} [modelMetadata] BotMetadata modelMetadata
         * @property {string|null} [messageDisclaimerText] BotMetadata messageDisclaimerText
         * @property {BotMetadata.IBotProgressIndicatorMetadata|null} [progressIndicatorMetadata] BotMetadata progressIndicatorMetadata
         * @property {BotMetadata.IBotCapabilityMetadata|null} [capabilityMetadata] BotMetadata capabilityMetadata
         * @property {BotMetadata.IBotImagineMetadata|null} [imagineMetadata] BotMetadata imagineMetadata
         * @property {BotMetadata.IBotMemoryMetadata|null} [memoryMetadata] BotMetadata memoryMetadata
         * @property {BotMetadata.IBotRenderingMetadata|null} [renderingMetadata] BotMetadata renderingMetadata
         * @property {BotMetadata.IBotMetricsMetadata|null} [botMetricsMetadata] BotMetadata botMetricsMetadata
         * @property {BotMetadata.IBotLinkedAccountsMetadata|null} [botLinkedAccountsMetadata] BotMetadata botLinkedAccountsMetadata
         * @property {BotMetadata.IBotSourcesMetadata|null} [richResponseSourcesMetadata] BotMetadata richResponseSourcesMetadata
         * @property {Uint8Array|null} [aiConversationContext] BotMetadata aiConversationContext
         * @property {BotMetadata.IBotPromotionMessageMetadata|null} [botPromotionMessageMetadata] BotMetadata botPromotionMessageMetadata
         * @property {BotMetadata.IBotModeSelectionMetadata|null} [botModeSelectionMetadata] BotMetadata botModeSelectionMetadata
         * @property {BotMetadata.IBotQuotaMetadata|null} [botQuotaMetadata] BotMetadata botQuotaMetadata
         * @property {BotMetadata.IBotAgeCollectionMetadata|null} [botAgeCollectionMetadata] BotMetadata botAgeCollectionMetadata
         * @property {string|null} [conversationStarterPromptId] BotMetadata conversationStarterPromptId
         * @property {string|null} [botResponseId] BotMetadata botResponseId
         * @property {BotMetadata.IBotSignatureVerificationMetadata|null} [verificationMetadata] BotMetadata verificationMetadata
         * @property {BotMetadata.IBotUnifiedResponseMutation|null} [unifiedResponseMutation] BotMetadata unifiedResponseMutation
         * @property {BotMetadata.IBotMessageOriginMetadata|null} [botMessageOriginMetadata] BotMetadata botMessageOriginMetadata
         * @property {BotMetadata.IInThreadSurveyMetadata|null} [inThreadSurveyMetadata] BotMetadata inThreadSurveyMetadata
         */

        /**
         * Constructs a new BotMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotMetadata.
         * @implements IBotMetadata
         * @constructor
         * @param {BotMetadata.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 {BotMetadata.IBotAvatarMetadata|null|undefined} avatarMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.avatarMetadata = null;

        /**
         * BotMetadata personaId.
         * @member {string} personaId
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.personaId = "";

        /**
         * BotMetadata pluginMetadata.
         * @member {BotMetadata.IBotPluginMetadata|null|undefined} pluginMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.pluginMetadata = null;

        /**
         * BotMetadata suggestedPromptMetadata.
         * @member {BotMetadata.IBotSuggestedPromptMetadata|null|undefined} suggestedPromptMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.suggestedPromptMetadata = null;

        /**
         * BotMetadata invokerJid.
         * @member {string} invokerJid
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.invokerJid = "";

        /**
         * BotMetadata sessionMetadata.
         * @member {BotMetadata.IBotSessionMetadata|null|undefined} sessionMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.sessionMetadata = null;

        /**
         * BotMetadata memuMetadata.
         * @member {BotMetadata.IBotMemuMetadata|null|undefined} memuMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.memuMetadata = null;

        /**
         * BotMetadata timezone.
         * @member {string} timezone
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.timezone = "";

        /**
         * BotMetadata reminderMetadata.
         * @member {BotMetadata.IBotReminderMetadata|null|undefined} reminderMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.reminderMetadata = null;

        /**
         * BotMetadata modelMetadata.
         * @member {BotMetadata.IBotModelMetadata|null|undefined} modelMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.modelMetadata = null;

        /**
         * BotMetadata messageDisclaimerText.
         * @member {string} messageDisclaimerText
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.messageDisclaimerText = "";

        /**
         * BotMetadata progressIndicatorMetadata.
         * @member {BotMetadata.IBotProgressIndicatorMetadata|null|undefined} progressIndicatorMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.progressIndicatorMetadata = null;

        /**
         * BotMetadata capabilityMetadata.
         * @member {BotMetadata.IBotCapabilityMetadata|null|undefined} capabilityMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.capabilityMetadata = null;

        /**
         * BotMetadata imagineMetadata.
         * @member {BotMetadata.IBotImagineMetadata|null|undefined} imagineMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.imagineMetadata = null;

        /**
         * BotMetadata memoryMetadata.
         * @member {BotMetadata.IBotMemoryMetadata|null|undefined} memoryMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.memoryMetadata = null;

        /**
         * BotMetadata renderingMetadata.
         * @member {BotMetadata.IBotRenderingMetadata|null|undefined} renderingMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.renderingMetadata = null;

        /**
         * BotMetadata botMetricsMetadata.
         * @member {BotMetadata.IBotMetricsMetadata|null|undefined} botMetricsMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botMetricsMetadata = null;

        /**
         * BotMetadata botLinkedAccountsMetadata.
         * @member {BotMetadata.IBotLinkedAccountsMetadata|null|undefined} botLinkedAccountsMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botLinkedAccountsMetadata = null;

        /**
         * BotMetadata richResponseSourcesMetadata.
         * @member {BotMetadata.IBotSourcesMetadata|null|undefined} richResponseSourcesMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.richResponseSourcesMetadata = null;

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

        /**
         * BotMetadata botPromotionMessageMetadata.
         * @member {BotMetadata.IBotPromotionMessageMetadata|null|undefined} botPromotionMessageMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botPromotionMessageMetadata = null;

        /**
         * BotMetadata botModeSelectionMetadata.
         * @member {BotMetadata.IBotModeSelectionMetadata|null|undefined} botModeSelectionMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botModeSelectionMetadata = null;

        /**
         * BotMetadata botQuotaMetadata.
         * @member {BotMetadata.IBotQuotaMetadata|null|undefined} botQuotaMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botQuotaMetadata = null;

        /**
         * BotMetadata botAgeCollectionMetadata.
         * @member {BotMetadata.IBotAgeCollectionMetadata|null|undefined} botAgeCollectionMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botAgeCollectionMetadata = null;

        /**
         * BotMetadata conversationStarterPromptId.
         * @member {string} conversationStarterPromptId
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.conversationStarterPromptId = "";

        /**
         * BotMetadata botResponseId.
         * @member {string} botResponseId
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botResponseId = "";

        /**
         * BotMetadata verificationMetadata.
         * @member {BotMetadata.IBotSignatureVerificationMetadata|null|undefined} verificationMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.verificationMetadata = null;

        /**
         * BotMetadata unifiedResponseMutation.
         * @member {BotMetadata.IBotUnifiedResponseMutation|null|undefined} unifiedResponseMutation
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.unifiedResponseMutation = null;

        /**
         * BotMetadata botMessageOriginMetadata.
         * @member {BotMetadata.IBotMessageOriginMetadata|null|undefined} botMessageOriginMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botMessageOriginMetadata = null;

        /**
         * BotMetadata inThreadSurveyMetadata.
         * @member {BotMetadata.IInThreadSurveyMetadata|null|undefined} inThreadSurveyMetadata
         * @memberof BotMetadata.BotMetadata
         * @instance
         */
        BotMetadata.prototype.inThreadSurveyMetadata = null;

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

        /**
         * Encodes the specified BotMetadata message. Does not implicitly {@link BotMetadata.BotMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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.BotMetadata.BotPluginMetadata.encode(message.pluginMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.suggestedPromptMetadata != null && Object.hasOwnProperty.call(message, "suggestedPromptMetadata"))
                $root.BotMetadata.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.BotMetadata.BotSessionMetadata.encode(message.sessionMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.memuMetadata != null && Object.hasOwnProperty.call(message, "memuMetadata"))
                $root.BotMetadata.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.BotMetadata.BotReminderMetadata.encode(message.reminderMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
            if (message.modelMetadata != null && Object.hasOwnProperty.call(message, "modelMetadata"))
                $root.BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.encode(message.progressIndicatorMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.capabilityMetadata != null && Object.hasOwnProperty.call(message, "capabilityMetadata"))
                $root.BotMetadata.BotCapabilityMetadata.encode(message.capabilityMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            if (message.imagineMetadata != null && Object.hasOwnProperty.call(message, "imagineMetadata"))
                $root.BotMetadata.BotImagineMetadata.encode(message.imagineMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.memoryMetadata != null && Object.hasOwnProperty.call(message, "memoryMetadata"))
                $root.BotMetadata.BotMemoryMetadata.encode(message.memoryMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.renderingMetadata != null && Object.hasOwnProperty.call(message, "renderingMetadata"))
                $root.BotMetadata.BotRenderingMetadata.encode(message.renderingMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.botMetricsMetadata != null && Object.hasOwnProperty.call(message, "botMetricsMetadata"))
                $root.BotMetadata.BotMetricsMetadata.encode(message.botMetricsMetadata, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
            if (message.botLinkedAccountsMetadata != null && Object.hasOwnProperty.call(message, "botLinkedAccountsMetadata"))
                $root.BotMetadata.BotLinkedAccountsMetadata.encode(message.botLinkedAccountsMetadata, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
            if (message.richResponseSourcesMetadata != null && Object.hasOwnProperty.call(message, "richResponseSourcesMetadata"))
                $root.BotMetadata.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.BotMetadata.BotPromotionMessageMetadata.encode(message.botPromotionMessageMetadata, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
            if (message.botModeSelectionMetadata != null && Object.hasOwnProperty.call(message, "botModeSelectionMetadata"))
                $root.BotMetadata.BotModeSelectionMetadata.encode(message.botModeSelectionMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
            if (message.botQuotaMetadata != null && Object.hasOwnProperty.call(message, "botQuotaMetadata"))
                $root.BotMetadata.BotQuotaMetadata.encode(message.botQuotaMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
            if (message.botAgeCollectionMetadata != null && Object.hasOwnProperty.call(message, "botAgeCollectionMetadata"))
                $root.BotMetadata.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.BotMetadata.BotSignatureVerificationMetadata.encode(message.verificationMetadata, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
            if (message.unifiedResponseMutation != null && Object.hasOwnProperty.call(message, "unifiedResponseMutation"))
                $root.BotMetadata.BotUnifiedResponseMutation.encode(message.unifiedResponseMutation, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
            if (message.botMessageOriginMetadata != null && Object.hasOwnProperty.call(message, "botMessageOriginMetadata"))
                $root.BotMetadata.BotMessageOriginMetadata.encode(message.botMessageOriginMetadata, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
            if (message.inThreadSurveyMetadata != null && Object.hasOwnProperty.call(message, "inThreadSurveyMetadata"))
                $root.BotMetadata.InThreadSurveyMetadata.encode(message.inThreadSurveyMetadata, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotMetadata message, length delimited. Does not implicitly {@link BotMetadata.BotMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.BotMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.avatarMetadata = $root.BotMetadata.BotAvatarMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.personaId = reader.string();
                        break;
                    }
                case 3: {
                        message.pluginMetadata = $root.BotMetadata.BotPluginMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.suggestedPromptMetadata = $root.BotMetadata.BotSuggestedPromptMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.invokerJid = reader.string();
                        break;
                    }
                case 6: {
                        message.sessionMetadata = $root.BotMetadata.BotSessionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.memuMetadata = $root.BotMetadata.BotMemuMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.timezone = reader.string();
                        break;
                    }
                case 9: {
                        message.reminderMetadata = $root.BotMetadata.BotReminderMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 10: {
                        message.modelMetadata = $root.BotMetadata.BotModelMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.messageDisclaimerText = reader.string();
                        break;
                    }
                case 12: {
                        message.progressIndicatorMetadata = $root.BotMetadata.BotProgressIndicatorMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 13: {
                        message.capabilityMetadata = $root.BotMetadata.BotCapabilityMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 14: {
                        message.imagineMetadata = $root.BotMetadata.BotImagineMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 15: {
                        message.memoryMetadata = $root.BotMetadata.BotMemoryMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 16: {
                        message.renderingMetadata = $root.BotMetadata.BotRenderingMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 17: {
                        message.botMetricsMetadata = $root.BotMetadata.BotMetricsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 18: {
                        message.botLinkedAccountsMetadata = $root.BotMetadata.BotLinkedAccountsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 19: {
                        message.richResponseSourcesMetadata = $root.BotMetadata.BotSourcesMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 20: {
                        message.aiConversationContext = reader.bytes();
                        break;
                    }
                case 21: {
                        message.botPromotionMessageMetadata = $root.BotMetadata.BotPromotionMessageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 22: {
                        message.botModeSelectionMetadata = $root.BotMetadata.BotModeSelectionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 23: {
                        message.botQuotaMetadata = $root.BotMetadata.BotQuotaMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 24: {
                        message.botAgeCollectionMetadata = $root.BotMetadata.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.BotMetadata.BotSignatureVerificationMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 28: {
                        message.unifiedResponseMutation = $root.BotMetadata.BotUnifiedResponseMutation.decode(reader, reader.uint32());
                        break;
                    }
                case 29: {
                        message.botMessageOriginMetadata = $root.BotMetadata.BotMessageOriginMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 30: {
                        message.inThreadSurveyMetadata = $root.BotMetadata.InThreadSurveyMetadata.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof BotMetadata.BotMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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.BotMetadata.BotPluginMetadata.verify(message.pluginMetadata);
                if (error)
                    return "pluginMetadata." + error;
            }
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) {
                var error = $root.BotMetadata.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.BotMetadata.BotSessionMetadata.verify(message.sessionMetadata);
                if (error)
                    return "sessionMetadata." + error;
            }
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) {
                var error = $root.BotMetadata.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.BotMetadata.BotReminderMetadata.verify(message.reminderMetadata);
                if (error)
                    return "reminderMetadata." + error;
            }
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) {
                var error = $root.BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.verify(message.progressIndicatorMetadata);
                if (error)
                    return "progressIndicatorMetadata." + error;
            }
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) {
                var error = $root.BotMetadata.BotCapabilityMetadata.verify(message.capabilityMetadata);
                if (error)
                    return "capabilityMetadata." + error;
            }
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) {
                var error = $root.BotMetadata.BotImagineMetadata.verify(message.imagineMetadata);
                if (error)
                    return "imagineMetadata." + error;
            }
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) {
                var error = $root.BotMetadata.BotMemoryMetadata.verify(message.memoryMetadata);
                if (error)
                    return "memoryMetadata." + error;
            }
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) {
                var error = $root.BotMetadata.BotRenderingMetadata.verify(message.renderingMetadata);
                if (error)
                    return "renderingMetadata." + error;
            }
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) {
                var error = $root.BotMetadata.BotMetricsMetadata.verify(message.botMetricsMetadata);
                if (error)
                    return "botMetricsMetadata." + error;
            }
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) {
                var error = $root.BotMetadata.BotLinkedAccountsMetadata.verify(message.botLinkedAccountsMetadata);
                if (error)
                    return "botLinkedAccountsMetadata." + error;
            }
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata")) {
                var error = $root.BotMetadata.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.BotMetadata.BotPromotionMessageMetadata.verify(message.botPromotionMessageMetadata);
                if (error)
                    return "botPromotionMessageMetadata." + error;
            }
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata")) {
                var error = $root.BotMetadata.BotModeSelectionMetadata.verify(message.botModeSelectionMetadata);
                if (error)
                    return "botModeSelectionMetadata." + error;
            }
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata")) {
                var error = $root.BotMetadata.BotQuotaMetadata.verify(message.botQuotaMetadata);
                if (error)
                    return "botQuotaMetadata." + error;
            }
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata")) {
                var error = $root.BotMetadata.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.BotMetadata.BotSignatureVerificationMetadata.verify(message.verificationMetadata);
                if (error)
                    return "verificationMetadata." + error;
            }
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation")) {
                var error = $root.BotMetadata.BotUnifiedResponseMutation.verify(message.unifiedResponseMutation);
                if (error)
                    return "unifiedResponseMutation." + error;
            }
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata")) {
                var error = $root.BotMetadata.BotMessageOriginMetadata.verify(message.botMessageOriginMetadata);
                if (error)
                    return "botMessageOriginMetadata." + error;
            }
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata")) {
                var error = $root.BotMetadata.InThreadSurveyMetadata.verify(message.inThreadSurveyMetadata);
                if (error)
                    return "inThreadSurveyMetadata." + error;
            }
            return null;
        };

        /**
         * Creates a BotMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof BotMetadata.BotMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMetadata} BotMetadata
         */
        BotMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMetadata)
                return object;
            var message = new $root.BotMetadata.BotMetadata();
            if (object.avatarMetadata != null) {
                if (typeof object.avatarMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.avatarMetadata: object expected");
                message.avatarMetadata = $root.BotMetadata.BotAvatarMetadata.fromObject(object.avatarMetadata);
            }
            if (object.personaId != null)
                message.personaId = String(object.personaId);
            if (object.pluginMetadata != null) {
                if (typeof object.pluginMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.pluginMetadata: object expected");
                message.pluginMetadata = $root.BotMetadata.BotPluginMetadata.fromObject(object.pluginMetadata);
            }
            if (object.suggestedPromptMetadata != null) {
                if (typeof object.suggestedPromptMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.suggestedPromptMetadata: object expected");
                message.suggestedPromptMetadata = $root.BotMetadata.BotSuggestedPromptMetadata.fromObject(object.suggestedPromptMetadata);
            }
            if (object.invokerJid != null)
                message.invokerJid = String(object.invokerJid);
            if (object.sessionMetadata != null) {
                if (typeof object.sessionMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.sessionMetadata: object expected");
                message.sessionMetadata = $root.BotMetadata.BotSessionMetadata.fromObject(object.sessionMetadata);
            }
            if (object.memuMetadata != null) {
                if (typeof object.memuMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.memuMetadata: object expected");
                message.memuMetadata = $root.BotMetadata.BotMemuMetadata.fromObject(object.memuMetadata);
            }
            if (object.timezone != null)
                message.timezone = String(object.timezone);
            if (object.reminderMetadata != null) {
                if (typeof object.reminderMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.reminderMetadata: object expected");
                message.reminderMetadata = $root.BotMetadata.BotReminderMetadata.fromObject(object.reminderMetadata);
            }
            if (object.modelMetadata != null) {
                if (typeof object.modelMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.modelMetadata: object expected");
                message.modelMetadata = $root.BotMetadata.BotModelMetadata.fromObject(object.modelMetadata);
            }
            if (object.messageDisclaimerText != null)
                message.messageDisclaimerText = String(object.messageDisclaimerText);
            if (object.progressIndicatorMetadata != null) {
                if (typeof object.progressIndicatorMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.progressIndicatorMetadata: object expected");
                message.progressIndicatorMetadata = $root.BotMetadata.BotProgressIndicatorMetadata.fromObject(object.progressIndicatorMetadata);
            }
            if (object.capabilityMetadata != null) {
                if (typeof object.capabilityMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.capabilityMetadata: object expected");
                message.capabilityMetadata = $root.BotMetadata.BotCapabilityMetadata.fromObject(object.capabilityMetadata);
            }
            if (object.imagineMetadata != null) {
                if (typeof object.imagineMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.imagineMetadata: object expected");
                message.imagineMetadata = $root.BotMetadata.BotImagineMetadata.fromObject(object.imagineMetadata);
            }
            if (object.memoryMetadata != null) {
                if (typeof object.memoryMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.memoryMetadata: object expected");
                message.memoryMetadata = $root.BotMetadata.BotMemoryMetadata.fromObject(object.memoryMetadata);
            }
            if (object.renderingMetadata != null) {
                if (typeof object.renderingMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.renderingMetadata: object expected");
                message.renderingMetadata = $root.BotMetadata.BotRenderingMetadata.fromObject(object.renderingMetadata);
            }
            if (object.botMetricsMetadata != null) {
                if (typeof object.botMetricsMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.botMetricsMetadata: object expected");
                message.botMetricsMetadata = $root.BotMetadata.BotMetricsMetadata.fromObject(object.botMetricsMetadata);
            }
            if (object.botLinkedAccountsMetadata != null) {
                if (typeof object.botLinkedAccountsMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.botLinkedAccountsMetadata: object expected");
                message.botLinkedAccountsMetadata = $root.BotMetadata.BotLinkedAccountsMetadata.fromObject(object.botLinkedAccountsMetadata);
            }
            if (object.richResponseSourcesMetadata != null) {
                if (typeof object.richResponseSourcesMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.richResponseSourcesMetadata: object expected");
                message.richResponseSourcesMetadata = $root.BotMetadata.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(".BotMetadata.BotMetadata.botPromotionMessageMetadata: object expected");
                message.botPromotionMessageMetadata = $root.BotMetadata.BotPromotionMessageMetadata.fromObject(object.botPromotionMessageMetadata);
            }
            if (object.botModeSelectionMetadata != null) {
                if (typeof object.botModeSelectionMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.botModeSelectionMetadata: object expected");
                message.botModeSelectionMetadata = $root.BotMetadata.BotModeSelectionMetadata.fromObject(object.botModeSelectionMetadata);
            }
            if (object.botQuotaMetadata != null) {
                if (typeof object.botQuotaMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.botQuotaMetadata: object expected");
                message.botQuotaMetadata = $root.BotMetadata.BotQuotaMetadata.fromObject(object.botQuotaMetadata);
            }
            if (object.botAgeCollectionMetadata != null) {
                if (typeof object.botAgeCollectionMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.botAgeCollectionMetadata: object expected");
                message.botAgeCollectionMetadata = $root.BotMetadata.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(".BotMetadata.BotMetadata.verificationMetadata: object expected");
                message.verificationMetadata = $root.BotMetadata.BotSignatureVerificationMetadata.fromObject(object.verificationMetadata);
            }
            if (object.unifiedResponseMutation != null) {
                if (typeof object.unifiedResponseMutation !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.unifiedResponseMutation: object expected");
                message.unifiedResponseMutation = $root.BotMetadata.BotUnifiedResponseMutation.fromObject(object.unifiedResponseMutation);
            }
            if (object.botMessageOriginMetadata != null) {
                if (typeof object.botMessageOriginMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.botMessageOriginMetadata: object expected");
                message.botMessageOriginMetadata = $root.BotMetadata.BotMessageOriginMetadata.fromObject(object.botMessageOriginMetadata);
            }
            if (object.inThreadSurveyMetadata != null) {
                if (typeof object.inThreadSurveyMetadata !== "object")
                    throw TypeError(".BotMetadata.BotMetadata.inThreadSurveyMetadata: object expected");
                message.inThreadSurveyMetadata = $root.BotMetadata.InThreadSurveyMetadata.fromObject(object.inThreadSurveyMetadata);
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof BotMetadata.BotMetadata
         * @static
         * @param {BotMetadata.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;
            }
            if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata"))
                object.avatarMetadata = $root.BotMetadata.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.BotMetadata.BotPluginMetadata.toObject(message.pluginMetadata, options);
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata"))
                object.suggestedPromptMetadata = $root.BotMetadata.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.BotMetadata.BotSessionMetadata.toObject(message.sessionMetadata, options);
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata"))
                object.memuMetadata = $root.BotMetadata.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.BotMetadata.BotReminderMetadata.toObject(message.reminderMetadata, options);
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata"))
                object.modelMetadata = $root.BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.toObject(message.progressIndicatorMetadata, options);
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata"))
                object.capabilityMetadata = $root.BotMetadata.BotCapabilityMetadata.toObject(message.capabilityMetadata, options);
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata"))
                object.imagineMetadata = $root.BotMetadata.BotImagineMetadata.toObject(message.imagineMetadata, options);
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata"))
                object.memoryMetadata = $root.BotMetadata.BotMemoryMetadata.toObject(message.memoryMetadata, options);
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata"))
                object.renderingMetadata = $root.BotMetadata.BotRenderingMetadata.toObject(message.renderingMetadata, options);
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata"))
                object.botMetricsMetadata = $root.BotMetadata.BotMetricsMetadata.toObject(message.botMetricsMetadata, options);
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata"))
                object.botLinkedAccountsMetadata = $root.BotMetadata.BotLinkedAccountsMetadata.toObject(message.botLinkedAccountsMetadata, options);
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata"))
                object.richResponseSourcesMetadata = $root.BotMetadata.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.BotMetadata.BotPromotionMessageMetadata.toObject(message.botPromotionMessageMetadata, options);
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata"))
                object.botModeSelectionMetadata = $root.BotMetadata.BotModeSelectionMetadata.toObject(message.botModeSelectionMetadata, options);
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata"))
                object.botQuotaMetadata = $root.BotMetadata.BotQuotaMetadata.toObject(message.botQuotaMetadata, options);
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata"))
                object.botAgeCollectionMetadata = $root.BotMetadata.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.BotMetadata.BotSignatureVerificationMetadata.toObject(message.verificationMetadata, options);
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation"))
                object.unifiedResponseMutation = $root.BotMetadata.BotUnifiedResponseMutation.toObject(message.unifiedResponseMutation, options);
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata"))
                object.botMessageOriginMetadata = $root.BotMetadata.BotMessageOriginMetadata.toObject(message.botMessageOriginMetadata, options);
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata"))
                object.inThreadSurveyMetadata = $root.BotMetadata.InThreadSurveyMetadata.toObject(message.inThreadSurveyMetadata, options);
            return object;
        };

        /**
         * Converts this BotMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMetadata";
        };

        return BotMetadata;
    })();

    BotMetadata.BotUnifiedResponseMutation = (function() {

        /**
         * Properties of a BotUnifiedResponseMutation.
         * @memberof BotMetadata
         * @interface IBotUnifiedResponseMutation
         * @property {BotMetadata.BotUnifiedResponseMutation.ISideBySideMetadata|null} [sbsMetadata] BotUnifiedResponseMutation sbsMetadata
         */

        /**
         * Constructs a new BotUnifiedResponseMutation.
         * @memberof BotMetadata
         * @classdesc Represents a BotUnifiedResponseMutation.
         * @implements IBotUnifiedResponseMutation
         * @constructor
         * @param {BotMetadata.IBotUnifiedResponseMutation=} [properties] Properties to set
         */
        function BotUnifiedResponseMutation(properties) {
            if (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 {BotMetadata.BotUnifiedResponseMutation.ISideBySideMetadata|null|undefined} sbsMetadata
         * @memberof BotMetadata.BotUnifiedResponseMutation
         * @instance
         */
        BotUnifiedResponseMutation.prototype.sbsMetadata = null;

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

        /**
         * Encodes the specified BotUnifiedResponseMutation message. Does not implicitly {@link BotMetadata.BotUnifiedResponseMutation.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotUnifiedResponseMutation
         * @static
         * @param {BotMetadata.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.BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata.encode(message.sbsMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotUnifiedResponseMutation message, length delimited. Does not implicitly {@link BotMetadata.BotUnifiedResponseMutation.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotUnifiedResponseMutation
         * @static
         * @param {BotMetadata.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 BotMetadata.BotUnifiedResponseMutation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.BotUnifiedResponseMutation();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.sbsMetadata = $root.BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata.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 BotMetadata.BotUnifiedResponseMutation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata.verify(message.sbsMetadata);
                if (error)
                    return "sbsMetadata." + error;
            }
            return null;
        };

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

        /**
         * Creates a plain object from a BotUnifiedResponseMutation message. Also converts values to other types if specified.
         * @function toObject
         * @memberof BotMetadata.BotUnifiedResponseMutation
         * @static
         * @param {BotMetadata.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.defaults)
                object.sbsMetadata = null;
            if (message.sbsMetadata != null && message.hasOwnProperty("sbsMetadata"))
                object.sbsMetadata = $root.BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata.toObject(message.sbsMetadata, options);
            return object;
        };

        /**
         * Converts this BotUnifiedResponseMutation to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotUnifiedResponseMutation";
        };

        BotUnifiedResponseMutation.SideBySideMetadata = (function() {

            /**
             * Properties of a SideBySideMetadata.
             * @memberof BotMetadata.BotUnifiedResponseMutation
             * @interface ISideBySideMetadata
             * @property {string|null} [primaryResponseId] SideBySideMetadata primaryResponseId
             */

            /**
             * Constructs a new SideBySideMetadata.
             * @memberof BotMetadata.BotUnifiedResponseMutation
             * @classdesc Represents a SideBySideMetadata.
             * @implements ISideBySideMetadata
             * @constructor
             * @param {BotMetadata.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 BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            SideBySideMetadata.prototype.primaryResponseId = "";

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

            /**
             * Encodes the specified SideBySideMetadata message. Does not implicitly {@link BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {BotMetadata.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 BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {BotMetadata.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 BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata} SideBySideMetadata
             */
            SideBySideMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata)
                    return object;
                var message = new $root.BotMetadata.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 BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotUnifiedResponseMutation.SideBySideMetadata";
            };

            return SideBySideMetadata;
        })();

        return BotUnifiedResponseMutation;
    })();

    BotMetadata.BotMessageOrigin = (function() {

        /**
         * Properties of a BotMessageOrigin.
         * @memberof BotMetadata
         * @interface IBotMessageOrigin
         * @property {BotMetadata.BotMessageOrigin.BotMessageOriginType|null} [type] BotMessageOrigin type
         */

        /**
         * Constructs a new BotMessageOrigin.
         * @memberof BotMetadata
         * @classdesc Represents a BotMessageOrigin.
         * @implements IBotMessageOrigin
         * @constructor
         * @param {BotMetadata.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 {BotMetadata.BotMessageOrigin.BotMessageOriginType} type
         * @memberof BotMetadata.BotMessageOrigin
         * @instance
         */
        BotMessageOrigin.prototype.type = 0;

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

        /**
         * Encodes the specified BotMessageOrigin message. Does not implicitly {@link BotMetadata.BotMessageOrigin.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMessageOrigin
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMessageOrigin.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMessageOrigin
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMessageOrigin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotMessageOrigin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotMessageOrigin
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMessageOrigin} BotMessageOrigin
         */
        BotMessageOrigin.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMessageOrigin)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotMessageOrigin
         * @static
         * @param {BotMetadata.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.BotMetadata.BotMessageOrigin.BotMessageOriginType[message.type] === undefined ? message.type : $root.BotMetadata.BotMessageOrigin.BotMessageOriginType[message.type] : message.type;
            return object;
        };

        /**
         * Converts this BotMessageOrigin to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMessageOrigin";
        };

        /**
         * BotMessageOriginType enum.
         * @name BotMetadata.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;
    })();

    BotMetadata.BotMessageOriginMetadata = (function() {

        /**
         * Properties of a BotMessageOriginMetadata.
         * @memberof BotMetadata
         * @interface IBotMessageOriginMetadata
         * @property {Array.<BotMetadata.IBotMessageOrigin>|null} [origins] BotMessageOriginMetadata origins
         */

        /**
         * Constructs a new BotMessageOriginMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotMessageOriginMetadata.
         * @implements IBotMessageOriginMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.IBotMessageOrigin>} origins
         * @memberof BotMetadata.BotMessageOriginMetadata
         * @instance
         */
        BotMessageOriginMetadata.prototype.origins = $util.emptyArray;

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

        /**
         * Encodes the specified BotMessageOriginMetadata message. Does not implicitly {@link BotMetadata.BotMessageOriginMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMessageOriginMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotMessageOriginMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMessageOriginMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMessageOriginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotMessageOriginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotMessageOriginMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMessageOriginMetadata} BotMessageOriginMetadata
         */
        BotMessageOriginMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMessageOriginMetadata)
                return object;
            var message = new $root.BotMetadata.BotMessageOriginMetadata();
            if (object.origins) {
                if (!Array.isArray(object.origins))
                    throw TypeError(".BotMetadata.BotMessageOriginMetadata.origins: array expected");
                message.origins = [];
                for (var i = 0; i < object.origins.length; ++i) {
                    if (typeof object.origins[i] !== "object")
                        throw TypeError(".BotMetadata.BotMessageOriginMetadata.origins: object expected");
                    message.origins[i] = $root.BotMetadata.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 BotMetadata.BotMessageOriginMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotMessageOrigin.toObject(message.origins[j], options);
            }
            return object;
        };

        /**
         * Converts this BotMessageOriginMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMessageOriginMetadata";
        };

        return BotMessageOriginMetadata;
    })();

    BotMetadata.InThreadSurveyMetadata = (function() {

        /**
         * Properties of an InThreadSurveyMetadata.
         * @memberof BotMetadata
         * @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.<BotMetadata.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.<BotMetadata.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart>|null} [privacyStatementParts] InThreadSurveyMetadata privacyStatementParts
         * @property {string|null} [feedbackToastText] InThreadSurveyMetadata feedbackToastText
         */

        /**
         * Constructs a new InThreadSurveyMetadata.
         * @memberof BotMetadata
         * @classdesc Represents an InThreadSurveyMetadata.
         * @implements IInThreadSurveyMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaSessionId = "";

        /**
         * InThreadSurveyMetadata simonSessionId.
         * @member {string} simonSessionId
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSessionId = "";

        /**
         * InThreadSurveyMetadata simonSurveyId.
         * @member {string} simonSurveyId
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSurveyId = "";

        /**
         * InThreadSurveyMetadata tessaRootId.
         * @member {string} tessaRootId
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaRootId = "";

        /**
         * InThreadSurveyMetadata requestId.
         * @member {string} requestId
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.requestId = "";

        /**
         * InThreadSurveyMetadata tessaEvent.
         * @member {string} tessaEvent
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaEvent = "";

        /**
         * InThreadSurveyMetadata invitationHeaderText.
         * @member {string} invitationHeaderText
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationHeaderText = "";

        /**
         * InThreadSurveyMetadata invitationBodyText.
         * @member {string} invitationBodyText
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationBodyText = "";

        /**
         * InThreadSurveyMetadata invitationCtaText.
         * @member {string} invitationCtaText
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaText = "";

        /**
         * InThreadSurveyMetadata invitationCtaUrl.
         * @member {string} invitationCtaUrl
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaUrl = "";

        /**
         * InThreadSurveyMetadata surveyTitle.
         * @member {string} surveyTitle
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyTitle = "";

        /**
         * InThreadSurveyMetadata questions.
         * @member {Array.<BotMetadata.InThreadSurveyMetadata.IInThreadSurveyQuestion>} questions
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.questions = $util.emptyArray;

        /**
         * InThreadSurveyMetadata surveyContinueButtonText.
         * @member {string} surveyContinueButtonText
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyContinueButtonText = "";

        /**
         * InThreadSurveyMetadata surveySubmitButtonText.
         * @member {string} surveySubmitButtonText
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveySubmitButtonText = "";

        /**
         * InThreadSurveyMetadata privacyStatementFull.
         * @member {string} privacyStatementFull
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.privacyStatementFull = "";

        /**
         * InThreadSurveyMetadata privacyStatementParts.
         * @member {Array.<BotMetadata.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart>} privacyStatementParts
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.privacyStatementParts = $util.emptyArray;

        /**
         * InThreadSurveyMetadata feedbackToastText.
         * @member {string} feedbackToastText
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.feedbackToastText = "";

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

        /**
         * Encodes the specified InThreadSurveyMetadata message. Does not implicitly {@link BotMetadata.InThreadSurveyMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.InThreadSurveyMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.InThreadSurveyMetadata} InThreadSurveyMetadata
         */
        InThreadSurveyMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.InThreadSurveyMetadata)
                return object;
            var message = new $root.BotMetadata.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(".BotMetadata.InThreadSurveyMetadata.questions: array expected");
                message.questions = [];
                for (var i = 0; i < object.questions.length; ++i) {
                    if (typeof object.questions[i] !== "object")
                        throw TypeError(".BotMetadata.InThreadSurveyMetadata.questions: object expected");
                    message.questions[i] = $root.BotMetadata.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(".BotMetadata.InThreadSurveyMetadata.privacyStatementParts: array expected");
                message.privacyStatementParts = [];
                for (var i = 0; i < object.privacyStatementParts.length; ++i) {
                    if (typeof object.privacyStatementParts[i] !== "object")
                        throw TypeError(".BotMetadata.InThreadSurveyMetadata.privacyStatementParts: object expected");
                    message.privacyStatementParts[i] = $root.BotMetadata.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 BotMetadata.InThreadSurveyMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.InThreadSurveyMetadata";
        };

        InThreadSurveyMetadata.InThreadSurveyOption = (function() {

            /**
             * Properties of an InThreadSurveyOption.
             * @memberof BotMetadata.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 BotMetadata.InThreadSurveyMetadata
             * @classdesc Represents an InThreadSurveyOption.
             * @implements IInThreadSurveyOption
             * @constructor
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.stringValue = "";

            /**
             * InThreadSurveyOption numericValue.
             * @member {number} numericValue
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.numericValue = 0;

            /**
             * InThreadSurveyOption textTranslated.
             * @member {string} textTranslated
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.textTranslated = "";

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

            /**
             * Encodes the specified InThreadSurveyOption message. Does not implicitly {@link BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption} InThreadSurveyOption
             */
            InThreadSurveyOption.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption)
                    return object;
                var message = new $root.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption";
            };

            return InThreadSurveyOption;
        })();

        InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart = (function() {

            /**
             * Properties of an InThreadSurveyPrivacyStatementPart.
             * @memberof BotMetadata.InThreadSurveyMetadata
             * @interface IInThreadSurveyPrivacyStatementPart
             * @property {string|null} [text] InThreadSurveyPrivacyStatementPart text
             * @property {string|null} [url] InThreadSurveyPrivacyStatementPart url
             */

            /**
             * Constructs a new InThreadSurveyPrivacyStatementPart.
             * @memberof BotMetadata.InThreadSurveyMetadata
             * @classdesc Represents an InThreadSurveyPrivacyStatementPart.
             * @implements IInThreadSurveyPrivacyStatementPart
             * @constructor
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.text = "";

            /**
             * InThreadSurveyPrivacyStatementPart url.
             * @member {string} url
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.url = "";

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

            /**
             * Encodes the specified InThreadSurveyPrivacyStatementPart message. Does not implicitly {@link BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart} InThreadSurveyPrivacyStatementPart
             */
            InThreadSurveyPrivacyStatementPart.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart)
                    return object;
                var message = new $root.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart";
            };

            return InThreadSurveyPrivacyStatementPart;
        })();

        InThreadSurveyMetadata.InThreadSurveyQuestion = (function() {

            /**
             * Properties of an InThreadSurveyQuestion.
             * @memberof BotMetadata.InThreadSurveyMetadata
             * @interface IInThreadSurveyQuestion
             * @property {string|null} [questionText] InThreadSurveyQuestion questionText
             * @property {string|null} [questionId] InThreadSurveyQuestion questionId
             * @property {Array.<BotMetadata.InThreadSurveyMetadata.IInThreadSurveyOption>|null} [questionOptions] InThreadSurveyQuestion questionOptions
             */

            /**
             * Constructs a new InThreadSurveyQuestion.
             * @memberof BotMetadata.InThreadSurveyMetadata
             * @classdesc Represents an InThreadSurveyQuestion.
             * @implements IInThreadSurveyQuestion
             * @constructor
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionText = "";

            /**
             * InThreadSurveyQuestion questionId.
             * @member {string} questionId
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionId = "";

            /**
             * InThreadSurveyQuestion questionOptions.
             * @member {Array.<BotMetadata.InThreadSurveyMetadata.IInThreadSurveyOption>} questionOptions
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionOptions = $util.emptyArray;

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

            /**
             * Encodes the specified InThreadSurveyQuestion message. Does not implicitly {@link BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion} InThreadSurveyQuestion
             */
            InThreadSurveyQuestion.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion)
                    return object;
                var message = new $root.BotMetadata.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(".BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion.questionOptions: array expected");
                    message.questionOptions = [];
                    for (var i = 0; i < object.questionOptions.length; ++i) {
                        if (typeof object.questionOptions[i] !== "object")
                            throw TypeError(".BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion.questionOptions: object expected");
                        message.questionOptions[i] = $root.BotMetadata.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 BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {BotMetadata.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.BotMetadata.InThreadSurveyMetadata.InThreadSurveyOption.toObject(message.questionOptions[j], options);
                }
                return object;
            };

            /**
             * Converts this InThreadSurveyQuestion to JSON.
             * @function toJSON
             * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.InThreadSurveyMetadata.InThreadSurveyQuestion";
            };

            return InThreadSurveyQuestion;
        })();

        return InThreadSurveyMetadata;
    })();

    BotMetadata.BotSourcesMetadata = (function() {

        /**
         * Properties of a BotSourcesMetadata.
         * @memberof BotMetadata
         * @interface IBotSourcesMetadata
         * @property {Array.<BotMetadata.BotSourcesMetadata.IBotSourceItem>|null} [sources] BotSourcesMetadata sources
         */

        /**
         * Constructs a new BotSourcesMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotSourcesMetadata.
         * @implements IBotSourcesMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.BotSourcesMetadata.IBotSourceItem>} sources
         * @memberof BotMetadata.BotSourcesMetadata
         * @instance
         */
        BotSourcesMetadata.prototype.sources = $util.emptyArray;

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

        /**
         * Encodes the specified BotSourcesMetadata message. Does not implicitly {@link BotMetadata.BotSourcesMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotSourcesMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotSourcesMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotSourcesMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotSourcesMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotSourcesMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotSourcesMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotSourcesMetadata} BotSourcesMetadata
         */
        BotSourcesMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotSourcesMetadata)
                return object;
            var message = new $root.BotMetadata.BotSourcesMetadata();
            if (object.sources) {
                if (!Array.isArray(object.sources))
                    throw TypeError(".BotMetadata.BotSourcesMetadata.sources: array expected");
                message.sources = [];
                for (var i = 0; i < object.sources.length; ++i) {
                    if (typeof object.sources[i] !== "object")
                        throw TypeError(".BotMetadata.BotSourcesMetadata.sources: object expected");
                    message.sources[i] = $root.BotMetadata.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 BotMetadata.BotSourcesMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotSourcesMetadata.BotSourceItem.toObject(message.sources[j], options);
            }
            return object;
        };

        /**
         * Converts this BotSourcesMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotSourcesMetadata";
        };

        BotSourcesMetadata.BotSourceItem = (function() {

            /**
             * Properties of a BotSourceItem.
             * @memberof BotMetadata.BotSourcesMetadata
             * @interface IBotSourceItem
             * @property {BotMetadata.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 BotMetadata.BotSourcesMetadata
             * @classdesc Represents a BotSourceItem.
             * @implements IBotSourceItem
             * @constructor
             * @param {BotMetadata.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 {BotMetadata.BotSourcesMetadata.BotSourceItem.SourceProvider} provider
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.provider = 0;

            /**
             * BotSourceItem thumbnailCdnUrl.
             * @member {string} thumbnailCdnUrl
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.thumbnailCdnUrl = "";

            /**
             * BotSourceItem sourceProviderUrl.
             * @member {string} sourceProviderUrl
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceProviderUrl = "";

            /**
             * BotSourceItem sourceQuery.
             * @member {string} sourceQuery
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceQuery = "";

            /**
             * BotSourceItem faviconCdnUrl.
             * @member {string} faviconCdnUrl
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.faviconCdnUrl = "";

            /**
             * BotSourceItem citationNumber.
             * @member {number} citationNumber
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.citationNumber = 0;

            /**
             * BotSourceItem sourceTitle.
             * @member {string} sourceTitle
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceTitle = "";

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

            /**
             * Encodes the specified BotSourceItem message. Does not implicitly {@link BotMetadata.BotSourcesMetadata.BotSourceItem.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {BotMetadata.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 BotMetadata.BotSourcesMetadata.BotSourceItem.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {BotMetadata.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 BotMetadata.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.BotSourcesMetadata.BotSourceItem} BotSourceItem
             */
            BotSourceItem.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.BotSourcesMetadata.BotSourceItem)
                    return object;
                var message = new $root.BotMetadata.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 BotMetadata.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {BotMetadata.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.BotMetadata.BotSourcesMetadata.BotSourceItem.SourceProvider[message.provider] === undefined ? message.provider : $root.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotSourcesMetadata.BotSourceItem";
            };

            /**
             * SourceProvider enum.
             * @name BotMetadata.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;
    })();

    BotMetadata.BotAgeCollectionMetadata = (function() {

        /**
         * Properties of a BotAgeCollectionMetadata.
         * @memberof BotMetadata
         * @interface IBotAgeCollectionMetadata
         * @property {boolean|null} [ageCollectionEligible] BotAgeCollectionMetadata ageCollectionEligible
         * @property {boolean|null} [shouldTriggerAgeCollectionOnClient] BotAgeCollectionMetadata shouldTriggerAgeCollectionOnClient
         */

        /**
         * Constructs a new BotAgeCollectionMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotAgeCollectionMetadata.
         * @implements IBotAgeCollectionMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.ageCollectionEligible = false;

        /**
         * BotAgeCollectionMetadata shouldTriggerAgeCollectionOnClient.
         * @member {boolean} shouldTriggerAgeCollectionOnClient
         * @memberof BotMetadata.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.shouldTriggerAgeCollectionOnClient = false;

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

        /**
         * Encodes the specified BotAgeCollectionMetadata message. Does not implicitly {@link BotMetadata.BotAgeCollectionMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotAgeCollectionMetadata
         * @static
         * @param {BotMetadata.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);
            return writer;
        };

        /**
         * Encodes the specified BotAgeCollectionMetadata message, length delimited. Does not implicitly {@link BotMetadata.BotAgeCollectionMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotAgeCollectionMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotAgeCollectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotAgeCollectionMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof BotMetadata.BotAgeCollectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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";
            return null;
        };

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

        /**
         * Creates a plain object from a BotAgeCollectionMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof BotMetadata.BotAgeCollectionMetadata
         * @static
         * @param {BotMetadata.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;
            }
            if (message.ageCollectionEligible != null && message.hasOwnProperty("ageCollectionEligible"))
                object.ageCollectionEligible = message.ageCollectionEligible;
            if (message.shouldTriggerAgeCollectionOnClient != null && message.hasOwnProperty("shouldTriggerAgeCollectionOnClient"))
                object.shouldTriggerAgeCollectionOnClient = message.shouldTriggerAgeCollectionOnClient;
            return object;
        };

        /**
         * Converts this BotAgeCollectionMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotAgeCollectionMetadata";
        };

        return BotAgeCollectionMetadata;
    })();

    BotMetadata.BotImagineMetadata = (function() {

        /**
         * Properties of a BotImagineMetadata.
         * @memberof BotMetadata
         * @interface IBotImagineMetadata
         * @property {BotMetadata.BotImagineMetadata.ImagineType|null} [imagineType] BotImagineMetadata imagineType
         */

        /**
         * Constructs a new BotImagineMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotImagineMetadata.
         * @implements IBotImagineMetadata
         * @constructor
         * @param {BotMetadata.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 {BotMetadata.BotImagineMetadata.ImagineType} imagineType
         * @memberof BotMetadata.BotImagineMetadata
         * @instance
         */
        BotImagineMetadata.prototype.imagineType = 0;

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

        /**
         * Encodes the specified BotImagineMetadata message. Does not implicitly {@link BotMetadata.BotImagineMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotImagineMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotImagineMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotImagineMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotImagineMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotImagineMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotImagineMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotImagineMetadata} BotImagineMetadata
         */
        BotImagineMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotImagineMetadata)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotImagineMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotImagineMetadata.ImagineType[message.imagineType] === undefined ? message.imagineType : $root.BotMetadata.BotImagineMetadata.ImagineType[message.imagineType] : message.imagineType;
            return object;
        };

        /**
         * Converts this BotImagineMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotImagineMetadata";
        };

        /**
         * ImagineType enum.
         * @name BotMetadata.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;
    })();

    BotMetadata.BotQuotaMetadata = (function() {

        /**
         * Properties of a BotQuotaMetadata.
         * @memberof BotMetadata
         * @interface IBotQuotaMetadata
         * @property {Array.<BotMetadata.BotQuotaMetadata.IBotFeatureQuotaMetadata>|null} [botFeatureQuotaMetadata] BotQuotaMetadata botFeatureQuotaMetadata
         */

        /**
         * Constructs a new BotQuotaMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotQuotaMetadata.
         * @implements IBotQuotaMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.BotQuotaMetadata.IBotFeatureQuotaMetadata>} botFeatureQuotaMetadata
         * @memberof BotMetadata.BotQuotaMetadata
         * @instance
         */
        BotQuotaMetadata.prototype.botFeatureQuotaMetadata = $util.emptyArray;

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

        /**
         * Encodes the specified BotQuotaMetadata message. Does not implicitly {@link BotMetadata.BotQuotaMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotQuotaMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotQuotaMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotQuotaMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotQuotaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotQuotaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotQuotaMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotQuotaMetadata} BotQuotaMetadata
         */
        BotQuotaMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotQuotaMetadata)
                return object;
            var message = new $root.BotMetadata.BotQuotaMetadata();
            if (object.botFeatureQuotaMetadata) {
                if (!Array.isArray(object.botFeatureQuotaMetadata))
                    throw TypeError(".BotMetadata.BotQuotaMetadata.botFeatureQuotaMetadata: array expected");
                message.botFeatureQuotaMetadata = [];
                for (var i = 0; i < object.botFeatureQuotaMetadata.length; ++i) {
                    if (typeof object.botFeatureQuotaMetadata[i] !== "object")
                        throw TypeError(".BotMetadata.BotQuotaMetadata.botFeatureQuotaMetadata: object expected");
                    message.botFeatureQuotaMetadata[i] = $root.BotMetadata.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 BotMetadata.BotQuotaMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata.toObject(message.botFeatureQuotaMetadata[j], options);
            }
            return object;
        };

        /**
         * Converts this BotQuotaMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotQuotaMetadata";
        };

        BotQuotaMetadata.BotFeatureQuotaMetadata = (function() {

            /**
             * Properties of a BotFeatureQuotaMetadata.
             * @memberof BotMetadata.BotQuotaMetadata
             * @interface IBotFeatureQuotaMetadata
             * @property {BotMetadata.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 BotMetadata.BotQuotaMetadata
             * @classdesc Represents a BotFeatureQuotaMetadata.
             * @implements IBotFeatureQuotaMetadata
             * @constructor
             * @param {BotMetadata.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 {BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType} featureType
             * @memberof BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.featureType = 0;

            /**
             * BotFeatureQuotaMetadata remainingQuota.
             * @member {number} remainingQuota
             * @memberof BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.remainingQuota = 0;

            /**
             * BotFeatureQuotaMetadata expirationTimestamp.
             * @member {number|Long} expirationTimestamp
             * @memberof BotMetadata.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 BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {BotMetadata.BotQuotaMetadata.IBotFeatureQuotaMetadata=} [properties] Properties to set
             * @returns {BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata} BotFeatureQuotaMetadata instance
             */
            BotFeatureQuotaMetadata.create = function create(properties) {
                return new BotFeatureQuotaMetadata(properties);
            };

            /**
             * Encodes the specified BotFeatureQuotaMetadata message. Does not implicitly {@link BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {BotMetadata.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 BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {BotMetadata.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 BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata} BotFeatureQuotaMetadata
             */
            BotFeatureQuotaMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata)
                    return object;
                var message = new $root.BotMetadata.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 BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {BotMetadata.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.BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType[message.featureType] === undefined ? message.featureType : $root.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotQuotaMetadata.BotFeatureQuotaMetadata";
            };

            /**
             * BotFeatureType enum.
             * @name BotMetadata.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;
    })();

    BotMetadata.BotModeSelectionMetadata = (function() {

        /**
         * Properties of a BotModeSelectionMetadata.
         * @memberof BotMetadata
         * @interface IBotModeSelectionMetadata
         * @property {Array.<BotMetadata.BotModeSelectionMetadata.BotUserSelectionMode>|null} [mode] BotModeSelectionMetadata mode
         */

        /**
         * Constructs a new BotModeSelectionMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotModeSelectionMetadata.
         * @implements IBotModeSelectionMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.BotModeSelectionMetadata.BotUserSelectionMode>} mode
         * @memberof BotMetadata.BotModeSelectionMetadata
         * @instance
         */
        BotModeSelectionMetadata.prototype.mode = $util.emptyArray;

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

        /**
         * Encodes the specified BotModeSelectionMetadata message. Does not implicitly {@link BotMetadata.BotModeSelectionMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotModeSelectionMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotModeSelectionMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotModeSelectionMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotModeSelectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotModeSelectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotModeSelectionMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotModeSelectionMetadata} BotModeSelectionMetadata
         */
        BotModeSelectionMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotModeSelectionMetadata)
                return object;
            var message = new $root.BotMetadata.BotModeSelectionMetadata();
            if (object.mode) {
                if (!Array.isArray(object.mode))
                    throw TypeError(".BotMetadata.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 BotMetadata.BotModeSelectionMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotModeSelectionMetadata.BotUserSelectionMode[message.mode[j]] === undefined ? message.mode[j] : $root.BotMetadata.BotModeSelectionMetadata.BotUserSelectionMode[message.mode[j]] : message.mode[j];
            }
            return object;
        };

        /**
         * Converts this BotModeSelectionMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotModeSelectionMetadata";
        };

        /**
         * BotUserSelectionMode enum.
         * @name BotMetadata.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;
    })();

    BotMetadata.BotCapabilityMetadata = (function() {

        /**
         * Properties of a BotCapabilityMetadata.
         * @memberof BotMetadata
         * @interface IBotCapabilityMetadata
         * @property {Array.<BotMetadata.BotCapabilityMetadata.BotCapabilityType>|null} [capabilities] BotCapabilityMetadata capabilities
         */

        /**
         * Constructs a new BotCapabilityMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotCapabilityMetadata.
         * @implements IBotCapabilityMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.BotCapabilityMetadata.BotCapabilityType>} capabilities
         * @memberof BotMetadata.BotCapabilityMetadata
         * @instance
         */
        BotCapabilityMetadata.prototype.capabilities = $util.emptyArray;

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

        /**
         * Encodes the specified BotCapabilityMetadata message. Does not implicitly {@link BotMetadata.BotCapabilityMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotCapabilityMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotCapabilityMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotCapabilityMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotCapabilityMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotCapabilityMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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:
                        break;
                    }
            }
            return null;
        };

        /**
         * Creates a BotCapabilityMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof BotMetadata.BotCapabilityMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotCapabilityMetadata} BotCapabilityMetadata
         */
        BotCapabilityMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotCapabilityMetadata)
                return object;
            var message = new $root.BotMetadata.BotCapabilityMetadata();
            if (object.capabilities) {
                if (!Array.isArray(object.capabilities))
                    throw TypeError(".BotMetadata.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;
                    }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotCapabilityMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof BotMetadata.BotCapabilityMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] === undefined ? message.capabilities[j] : $root.BotMetadata.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] : message.capabilities[j];
            }
            return object;
        };

        /**
         * Converts this BotCapabilityMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotCapabilityMetadata";
        };

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

        return BotCapabilityMetadata;
    })();

    BotMetadata.BotProgressIndicatorMetadata = (function() {

        /**
         * Properties of a BotProgressIndicatorMetadata.
         * @memberof BotMetadata
         * @interface IBotProgressIndicatorMetadata
         * @property {string|null} [progressDescription] BotProgressIndicatorMetadata progressDescription
         * @property {Array.<BotMetadata.BotProgressIndicatorMetadata.IBotPlanningStepMetadata>|null} [stepsMetadata] BotProgressIndicatorMetadata stepsMetadata
         */

        /**
         * Constructs a new BotProgressIndicatorMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotProgressIndicatorMetadata.
         * @implements IBotProgressIndicatorMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata
         * @instance
         */
        BotProgressIndicatorMetadata.prototype.progressDescription = "";

        /**
         * BotProgressIndicatorMetadata stepsMetadata.
         * @member {Array.<BotMetadata.BotProgressIndicatorMetadata.IBotPlanningStepMetadata>} stepsMetadata
         * @memberof BotMetadata.BotProgressIndicatorMetadata
         * @instance
         */
        BotProgressIndicatorMetadata.prototype.stepsMetadata = $util.emptyArray;

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

        /**
         * Encodes the specified BotProgressIndicatorMetadata message. Does not implicitly {@link BotMetadata.BotProgressIndicatorMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotProgressIndicatorMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotProgressIndicatorMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata
         */
        BotProgressIndicatorMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotProgressIndicatorMetadata)
                return object;
            var message = new $root.BotMetadata.BotProgressIndicatorMetadata();
            if (object.progressDescription != null)
                message.progressDescription = String(object.progressDescription);
            if (object.stepsMetadata) {
                if (!Array.isArray(object.stepsMetadata))
                    throw TypeError(".BotMetadata.BotProgressIndicatorMetadata.stepsMetadata: array expected");
                message.stepsMetadata = [];
                for (var i = 0; i < object.stepsMetadata.length; ++i) {
                    if (typeof object.stepsMetadata[i] !== "object")
                        throw TypeError(".BotMetadata.BotProgressIndicatorMetadata.stepsMetadata: object expected");
                    message.stepsMetadata[i] = $root.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.toObject(message.stepsMetadata[j], options);
            }
            return object;
        };

        /**
         * Converts this BotProgressIndicatorMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotProgressIndicatorMetadata";
        };

        BotProgressIndicatorMetadata.BotPlanningStepMetadata = (function() {

            /**
             * Properties of a BotPlanningStepMetadata.
             * @memberof BotMetadata.BotProgressIndicatorMetadata
             * @interface IBotPlanningStepMetadata
             * @property {string|null} [statusTitle] BotPlanningStepMetadata statusTitle
             * @property {string|null} [statusBody] BotPlanningStepMetadata statusBody
             * @property {Array.<BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata>|null} [sourcesMetadata] BotPlanningStepMetadata sourcesMetadata
             * @property {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null} [status] BotPlanningStepMetadata status
             * @property {boolean|null} [isReasoning] BotPlanningStepMetadata isReasoning
             * @property {boolean|null} [isEnhancedSearch] BotPlanningStepMetadata isEnhancedSearch
             * @property {Array.<BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata>|null} [sections] BotPlanningStepMetadata sections
             */

            /**
             * Constructs a new BotPlanningStepMetadata.
             * @memberof BotMetadata.BotProgressIndicatorMetadata
             * @classdesc Represents a BotPlanningStepMetadata.
             * @implements IBotPlanningStepMetadata
             * @constructor
             * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusTitle = "";

            /**
             * BotPlanningStepMetadata statusBody.
             * @member {string} statusBody
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusBody = "";

            /**
             * BotPlanningStepMetadata sourcesMetadata.
             * @member {Array.<BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata>} sourcesMetadata
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.sourcesMetadata = $util.emptyArray;

            /**
             * BotPlanningStepMetadata status.
             * @member {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus} status
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.status = 0;

            /**
             * BotPlanningStepMetadata isReasoning.
             * @member {boolean} isReasoning
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isReasoning = false;

            /**
             * BotPlanningStepMetadata isEnhancedSearch.
             * @member {boolean} isEnhancedSearch
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isEnhancedSearch = false;

            /**
             * BotPlanningStepMetadata sections.
             * @member {Array.<BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata>} sections
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.sections = $util.emptyArray;

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

            /**
             * Encodes the specified BotPlanningStepMetadata message. Does not implicitly {@link BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata
             */
            BotPlanningStepMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata)
                    return object;
                var message = new $root.BotMetadata.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(".BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: array expected");
                    message.sourcesMetadata = [];
                    for (var i = 0; i < object.sourcesMetadata.length; ++i) {
                        if (typeof object.sourcesMetadata[i] !== "object")
                            throw TypeError(".BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: object expected");
                        message.sourcesMetadata[i] = $root.BotMetadata.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(".BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sections: array expected");
                    message.sections = [];
                    for (var i = 0; i < object.sections.length; ++i) {
                        if (typeof object.sections[i] !== "object")
                            throw TypeError(".BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sections: object expected");
                        message.sections[i] = $root.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.toObject(message.sourcesMetadata[j], options);
                }
                if (message.status != null && message.hasOwnProperty("status"))
                    object.status = options.enums === String ? $root.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[message.status] === undefined ? message.status : $root.BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.toObject(message.sections[j], options);
                }
                return object;
            };

            /**
             * Converts this BotPlanningStepMetadata to JSON.
             * @function toJSON
             * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata";
            };

            BotPlanningStepMetadata.BotPlanningSearchSourceMetadata = (function() {

                /**
                 * Properties of a BotPlanningSearchSourceMetadata.
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @interface IBotPlanningSearchSourceMetadata
                 * @property {string|null} [title] BotPlanningSearchSourceMetadata title
                 * @property {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider|null} [provider] BotPlanningSearchSourceMetadata provider
                 * @property {string|null} [sourceUrl] BotPlanningSearchSourceMetadata sourceUrl
                 * @property {string|null} [favIconUrl] BotPlanningSearchSourceMetadata favIconUrl
                 */

                /**
                 * Constructs a new BotPlanningSearchSourceMetadata.
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @classdesc Represents a BotPlanningSearchSourceMetadata.
                 * @implements IBotPlanningSearchSourceMetadata
                 * @constructor
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.title = "";

                /**
                 * BotPlanningSearchSourceMetadata provider.
                 * @member {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider} provider
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.provider = 0;

                /**
                 * BotPlanningSearchSourceMetadata sourceUrl.
                 * @member {string} sourceUrl
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.sourceUrl = "";

                /**
                 * BotPlanningSearchSourceMetadata favIconUrl.
                 * @member {string} favIconUrl
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.favIconUrl = "";

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

                /**
                 * Encodes the specified BotPlanningSearchSourceMetadata message. Does not implicitly {@link BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} BotPlanningSearchSourceMetadata
                 */
                BotPlanningSearchSourceMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata)
                        return object;
                    var message = new $root.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider[message.provider] === undefined ? message.provider : $root.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata";
                };

                return BotPlanningSearchSourceMetadata;
            })();

            BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata = (function() {

                /**
                 * Properties of a BotPlanningSearchSourcesMetadata.
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @interface IBotPlanningSearchSourcesMetadata
                 * @property {string|null} [sourceTitle] BotPlanningSearchSourcesMetadata sourceTitle
                 * @property {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null} [provider] BotPlanningSearchSourcesMetadata provider
                 * @property {string|null} [sourceUrl] BotPlanningSearchSourcesMetadata sourceUrl
                 */

                /**
                 * Constructs a new BotPlanningSearchSourcesMetadata.
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @classdesc Represents a BotPlanningSearchSourcesMetadata.
                 * @implements IBotPlanningSearchSourcesMetadata
                 * @constructor
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceTitle = "";

                /**
                 * BotPlanningSearchSourcesMetadata provider.
                 * @member {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider} provider
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.provider = 0;

                /**
                 * BotPlanningSearchSourcesMetadata sourceUrl.
                 * @member {string} sourceUrl
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceUrl = "";

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

                /**
                 * Encodes the specified BotPlanningSearchSourcesMetadata message. Does not implicitly {@link BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata
                 */
                BotPlanningSearchSourcesMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata)
                        return object;
                    var message = new $root.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[message.provider] === undefined ? message.provider : $root.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata";
                };

                /**
                 * BotPlanningSearchSourceProvider enum.
                 * @name BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @interface IBotPlanningStepSectionMetadata
                 * @property {string|null} [sectionTitle] BotPlanningStepSectionMetadata sectionTitle
                 * @property {string|null} [sectionBody] BotPlanningStepSectionMetadata sectionBody
                 * @property {Array.<BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata>|null} [sourcesMetadata] BotPlanningStepSectionMetadata sourcesMetadata
                 */

                /**
                 * Constructs a new BotPlanningStepSectionMetadata.
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @classdesc Represents a BotPlanningStepSectionMetadata.
                 * @implements IBotPlanningStepSectionMetadata
                 * @constructor
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionTitle = "";

                /**
                 * BotPlanningStepSectionMetadata sectionBody.
                 * @member {string} sectionBody
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionBody = "";

                /**
                 * BotPlanningStepSectionMetadata sourcesMetadata.
                 * @member {Array.<BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata>} sourcesMetadata
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sourcesMetadata = $util.emptyArray;

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

                /**
                 * Encodes the specified BotPlanningStepSectionMetadata message. Does not implicitly {@link BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata} BotPlanningStepSectionMetadata
                 */
                BotPlanningStepSectionMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata)
                        return object;
                    var message = new $root.BotMetadata.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(".BotMetadata.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(".BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.sourcesMetadata: object expected");
                            message.sourcesMetadata[i] = $root.BotMetadata.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 BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {BotMetadata.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.BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.toObject(message.sourcesMetadata[j], options);
                    }
                    return object;
                };

                /**
                 * Converts this BotPlanningStepSectionMetadata to JSON.
                 * @function toJSON
                 * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata";
                };

                return BotPlanningStepSectionMetadata;
            })();

            /**
             * BotSearchSourceProvider enum.
             * @name BotMetadata.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 BotMetadata.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;
    })();

    BotMetadata.BotModelMetadata = (function() {

        /**
         * Properties of a BotModelMetadata.
         * @memberof BotMetadata
         * @interface IBotModelMetadata
         * @property {BotMetadata.BotModelMetadata.ModelType|null} [modelType] BotModelMetadata modelType
         * @property {BotMetadata.BotModelMetadata.PremiumModelStatus|null} [premiumModelStatus] BotModelMetadata premiumModelStatus
         */

        /**
         * Constructs a new BotModelMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotModelMetadata.
         * @implements IBotModelMetadata
         * @constructor
         * @param {BotMetadata.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 {BotMetadata.BotModelMetadata.ModelType} modelType
         * @memberof BotMetadata.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.modelType = 0;

        /**
         * BotModelMetadata premiumModelStatus.
         * @member {BotMetadata.BotModelMetadata.PremiumModelStatus} premiumModelStatus
         * @memberof BotMetadata.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.premiumModelStatus = 0;

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

        /**
         * Encodes the specified BotModelMetadata message. Does not implicitly {@link BotMetadata.BotModelMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotModelMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotModelMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotModelMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotModelMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotModelMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotModelMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotModelMetadata} BotModelMetadata
         */
        BotModelMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotModelMetadata)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotModelMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotModelMetadata.ModelType[message.modelType] === undefined ? message.modelType : $root.BotMetadata.BotModelMetadata.ModelType[message.modelType] : message.modelType;
            if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus"))
                object.premiumModelStatus = options.enums === String ? $root.BotMetadata.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] === undefined ? message.premiumModelStatus : $root.BotMetadata.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] : message.premiumModelStatus;
            return object;
        };

        /**
         * Converts this BotModelMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotModelMetadata";
        };

        /**
         * ModelType enum.
         * @name BotMetadata.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 BotMetadata.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;
    })();

    BotMetadata.BotReminderMetadata = (function() {

        /**
         * Properties of a BotReminderMetadata.
         * @memberof BotMetadata
         * @interface IBotReminderMetadata
         * @property {Protocol.IMessageKey|null} [requestMessageKey] BotReminderMetadata requestMessageKey
         * @property {BotMetadata.BotReminderMetadata.ReminderAction|null} [action] BotReminderMetadata action
         * @property {string|null} [name] BotReminderMetadata name
         * @property {number|Long|null} [nextTriggerTimestamp] BotReminderMetadata nextTriggerTimestamp
         * @property {BotMetadata.BotReminderMetadata.ReminderFrequency|null} [frequency] BotReminderMetadata frequency
         */

        /**
         * Constructs a new BotReminderMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotReminderMetadata.
         * @implements IBotReminderMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.requestMessageKey = null;

        /**
         * BotReminderMetadata action.
         * @member {BotMetadata.BotReminderMetadata.ReminderAction} action
         * @memberof BotMetadata.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.action = 1;

        /**
         * BotReminderMetadata name.
         * @member {string} name
         * @memberof BotMetadata.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.name = "";

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

        /**
         * BotReminderMetadata frequency.
         * @member {BotMetadata.BotReminderMetadata.ReminderFrequency} frequency
         * @memberof BotMetadata.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.frequency = 1;

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

        /**
         * Encodes the specified BotReminderMetadata message. Does not implicitly {@link BotMetadata.BotReminderMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotReminderMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotReminderMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotReminderMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotReminderMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotReminderMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotReminderMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotReminderMetadata} BotReminderMetadata
         */
        BotReminderMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotReminderMetadata)
                return object;
            var message = new $root.BotMetadata.BotReminderMetadata();
            if (object.requestMessageKey != null) {
                if (typeof object.requestMessageKey !== "object")
                    throw TypeError(".BotMetadata.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 BotMetadata.BotReminderMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotReminderMetadata.ReminderAction[message.action] === undefined ? message.action : $root.BotMetadata.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.BotMetadata.BotReminderMetadata.ReminderFrequency[message.frequency] === undefined ? message.frequency : $root.BotMetadata.BotReminderMetadata.ReminderFrequency[message.frequency] : message.frequency;
            return object;
        };

        /**
         * Converts this BotReminderMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotReminderMetadata";
        };

        /**
         * ReminderAction enum.
         * @name BotMetadata.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 BotMetadata.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;
    })();

    BotMetadata.BotMemuMetadata = (function() {

        /**
         * Properties of a BotMemuMetadata.
         * @memberof BotMetadata
         * @interface IBotMemuMetadata
         * @property {Array.<BotMetadata.IBotMediaMetadata>|null} [faceImages] BotMemuMetadata faceImages
         */

        /**
         * Constructs a new BotMemuMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotMemuMetadata.
         * @implements IBotMemuMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.IBotMediaMetadata>} faceImages
         * @memberof BotMetadata.BotMemuMetadata
         * @instance
         */
        BotMemuMetadata.prototype.faceImages = $util.emptyArray;

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

        /**
         * Encodes the specified BotMemuMetadata message. Does not implicitly {@link BotMetadata.BotMemuMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMemuMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotMemuMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMemuMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMemuMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotMemuMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotMemuMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMemuMetadata} BotMemuMetadata
         */
        BotMemuMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMemuMetadata)
                return object;
            var message = new $root.BotMetadata.BotMemuMetadata();
            if (object.faceImages) {
                if (!Array.isArray(object.faceImages))
                    throw TypeError(".BotMetadata.BotMemuMetadata.faceImages: array expected");
                message.faceImages = [];
                for (var i = 0; i < object.faceImages.length; ++i) {
                    if (typeof object.faceImages[i] !== "object")
                        throw TypeError(".BotMetadata.BotMemuMetadata.faceImages: object expected");
                    message.faceImages[i] = $root.BotMetadata.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 BotMetadata.BotMemuMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotMediaMetadata.toObject(message.faceImages[j], options);
            }
            return object;
        };

        /**
         * Converts this BotMemuMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMemuMetadata";
        };

        return BotMemuMetadata;
    })();

    BotMetadata.BotMediaMetadata = (function() {

        /**
         * Properties of a BotMediaMetadata.
         * @memberof BotMetadata
         * @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 {BotMetadata.BotMediaMetadata.OrientationType|null} [orientationType] BotMediaMetadata orientationType
         */

        /**
         * Constructs a new BotMediaMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotMediaMetadata.
         * @implements IBotMediaMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileSha256 = "";

        /**
         * BotMediaMetadata mediaKey.
         * @member {string} mediaKey
         * @memberof BotMetadata.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mediaKey = "";

        /**
         * BotMediaMetadata fileEncSha256.
         * @member {string} fileEncSha256
         * @memberof BotMetadata.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileEncSha256 = "";

        /**
         * BotMediaMetadata directPath.
         * @member {string} directPath
         * @memberof BotMetadata.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.directPath = "";

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

        /**
         * BotMediaMetadata mimetype.
         * @member {string} mimetype
         * @memberof BotMetadata.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mimetype = "";

        /**
         * BotMediaMetadata orientationType.
         * @member {BotMetadata.BotMediaMetadata.OrientationType} orientationType
         * @memberof BotMetadata.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.orientationType = 1;

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

        /**
         * Encodes the specified BotMediaMetadata message. Does not implicitly {@link BotMetadata.BotMediaMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMediaMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMediaMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMediaMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMediaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotMediaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotMediaMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMediaMetadata} BotMediaMetadata
         */
        BotMediaMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMediaMetadata)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotMediaMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotMediaMetadata.OrientationType[message.orientationType] === undefined ? message.orientationType : $root.BotMetadata.BotMediaMetadata.OrientationType[message.orientationType] : message.orientationType;
            return object;
        };

        /**
         * Converts this BotMediaMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMediaMetadata";
        };

        /**
         * OrientationType enum.
         * @name BotMetadata.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;
    })();

    BotMetadata.BotSessionMetadata = (function() {

        /**
         * Properties of a BotSessionMetadata.
         * @memberof BotMetadata
         * @interface IBotSessionMetadata
         * @property {string|null} [sessionId] BotSessionMetadata sessionId
         * @property {BotMetadata.BotSessionSource|null} [sessionSource] BotSessionMetadata sessionSource
         */

        /**
         * Constructs a new BotSessionMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotSessionMetadata.
         * @implements IBotSessionMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionId = "";

        /**
         * BotSessionMetadata sessionSource.
         * @member {BotMetadata.BotSessionSource} sessionSource
         * @memberof BotMetadata.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionSource = 0;

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

        /**
         * Encodes the specified BotSessionMetadata message. Does not implicitly {@link BotMetadata.BotSessionMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotSessionMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotSessionMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotSessionMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotSessionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotSessionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotSessionMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotSessionMetadata} BotSessionMetadata
         */
        BotSessionMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotSessionMetadata)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotSessionMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotSessionSource[message.sessionSource] === undefined ? message.sessionSource : $root.BotMetadata.BotSessionSource[message.sessionSource] : message.sessionSource;
            return object;
        };

        /**
         * Converts this BotSessionMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotSessionMetadata";
        };

        return BotSessionMetadata;
    })();

    BotMetadata.BotMetricsMetadata = (function() {

        /**
         * Properties of a BotMetricsMetadata.
         * @memberof BotMetadata
         * @interface IBotMetricsMetadata
         * @property {string|null} [destinationId] BotMetricsMetadata destinationId
         * @property {BotMetadata.BotMetricsEntryPoint|null} [destinationEntryPoint] BotMetricsMetadata destinationEntryPoint
         * @property {BotMetadata.BotMetricsThreadEntryPoint|null} [threadOrigin] BotMetricsMetadata threadOrigin
         */

        /**
         * Constructs a new BotMetricsMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotMetricsMetadata.
         * @implements IBotMetricsMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationId = "";

        /**
         * BotMetricsMetadata destinationEntryPoint.
         * @member {BotMetadata.BotMetricsEntryPoint} destinationEntryPoint
         * @memberof BotMetadata.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationEntryPoint = 1;

        /**
         * BotMetricsMetadata threadOrigin.
         * @member {BotMetadata.BotMetricsThreadEntryPoint} threadOrigin
         * @memberof BotMetadata.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.threadOrigin = 1;

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

        /**
         * Encodes the specified BotMetricsMetadata message. Does not implicitly {@link BotMetadata.BotMetricsMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMetricsMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMetricsMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMetricsMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMetricsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotMetricsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 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.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 BotMetadata.BotMetricsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMetricsMetadata} BotMetricsMetadata
         */
        BotMetricsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMetricsMetadata)
                return object;
            var message = new $root.BotMetadata.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 "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;
            }
            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 BotMetadata.BotMetricsMetadata
         * @static
         * @param {BotMetadata.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 ? "FAVICON" : 1;
                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.BotMetadata.BotMetricsEntryPoint[message.destinationEntryPoint] === undefined ? message.destinationEntryPoint : $root.BotMetadata.BotMetricsEntryPoint[message.destinationEntryPoint] : message.destinationEntryPoint;
            if (message.threadOrigin != null && message.hasOwnProperty("threadOrigin"))
                object.threadOrigin = options.enums === String ? $root.BotMetadata.BotMetricsThreadEntryPoint[message.threadOrigin] === undefined ? message.threadOrigin : $root.BotMetadata.BotMetricsThreadEntryPoint[message.threadOrigin] : message.threadOrigin;
            return object;
        };

        /**
         * Converts this BotMetricsMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMetricsMetadata";
        };

        return BotMetricsMetadata;
    })();

    BotMetadata.BotRenderingMetadata = (function() {

        /**
         * Properties of a BotRenderingMetadata.
         * @memberof BotMetadata
         * @interface IBotRenderingMetadata
         * @property {Array.<BotMetadata.BotRenderingMetadata.IKeyword>|null} [keywords] BotRenderingMetadata keywords
         */

        /**
         * Constructs a new BotRenderingMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotRenderingMetadata.
         * @implements IBotRenderingMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.BotRenderingMetadata.IKeyword>} keywords
         * @memberof BotMetadata.BotRenderingMetadata
         * @instance
         */
        BotRenderingMetadata.prototype.keywords = $util.emptyArray;

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

        /**
         * Encodes the specified BotRenderingMetadata message. Does not implicitly {@link BotMetadata.BotRenderingMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotRenderingMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotRenderingMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotRenderingMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotRenderingMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotRenderingMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotRenderingMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotRenderingMetadata} BotRenderingMetadata
         */
        BotRenderingMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotRenderingMetadata)
                return object;
            var message = new $root.BotMetadata.BotRenderingMetadata();
            if (object.keywords) {
                if (!Array.isArray(object.keywords))
                    throw TypeError(".BotMetadata.BotRenderingMetadata.keywords: array expected");
                message.keywords = [];
                for (var i = 0; i < object.keywords.length; ++i) {
                    if (typeof object.keywords[i] !== "object")
                        throw TypeError(".BotMetadata.BotRenderingMetadata.keywords: object expected");
                    message.keywords[i] = $root.BotMetadata.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 BotMetadata.BotRenderingMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotRenderingMetadata.Keyword.toObject(message.keywords[j], options);
            }
            return object;
        };

        /**
         * Converts this BotRenderingMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotRenderingMetadata";
        };

        BotRenderingMetadata.Keyword = (function() {

            /**
             * Properties of a Keyword.
             * @memberof BotMetadata.BotRenderingMetadata
             * @interface IKeyword
             * @property {string|null} [value] Keyword value
             * @property {Array.<string>|null} [associatedPrompts] Keyword associatedPrompts
             */

            /**
             * Constructs a new Keyword.
             * @memberof BotMetadata.BotRenderingMetadata
             * @classdesc Represents a Keyword.
             * @implements IKeyword
             * @constructor
             * @param {BotMetadata.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 BotMetadata.BotRenderingMetadata.Keyword
             * @instance
             */
            Keyword.prototype.value = "";

            /**
             * Keyword associatedPrompts.
             * @member {Array.<string>} associatedPrompts
             * @memberof BotMetadata.BotRenderingMetadata.Keyword
             * @instance
             */
            Keyword.prototype.associatedPrompts = $util.emptyArray;

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

            /**
             * Encodes the specified Keyword message. Does not implicitly {@link BotMetadata.BotRenderingMetadata.Keyword.verify|verify} messages.
             * @function encode
             * @memberof BotMetadata.BotRenderingMetadata.Keyword
             * @static
             * @param {BotMetadata.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 BotMetadata.BotRenderingMetadata.Keyword.verify|verify} messages.
             * @function encodeDelimited
             * @memberof BotMetadata.BotRenderingMetadata.Keyword
             * @static
             * @param {BotMetadata.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 BotMetadata.BotRenderingMetadata.Keyword
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotRenderingMetadata.Keyword
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotRenderingMetadata.Keyword
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {BotMetadata.BotRenderingMetadata.Keyword} Keyword
             */
            Keyword.fromObject = function fromObject(object) {
                if (object instanceof $root.BotMetadata.BotRenderingMetadata.Keyword)
                    return object;
                var message = new $root.BotMetadata.BotRenderingMetadata.Keyword();
                if (object.value != null)
                    message.value = String(object.value);
                if (object.associatedPrompts) {
                    if (!Array.isArray(object.associatedPrompts))
                        throw TypeError(".BotMetadata.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 BotMetadata.BotRenderingMetadata.Keyword
             * @static
             * @param {BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotRenderingMetadata.Keyword";
            };

            return Keyword;
        })();

        return BotRenderingMetadata;
    })();

    BotMetadata.BotPromotionMessageMetadata = (function() {

        /**
         * Properties of a BotPromotionMessageMetadata.
         * @memberof BotMetadata
         * @interface IBotPromotionMessageMetadata
         * @property {BotMetadata.BotPromotionMessageMetadata.BotPromotionType|null} [promotionType] BotPromotionMessageMetadata promotionType
         * @property {string|null} [buttonTitle] BotPromotionMessageMetadata buttonTitle
         */

        /**
         * Constructs a new BotPromotionMessageMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotPromotionMessageMetadata.
         * @implements IBotPromotionMessageMetadata
         * @constructor
         * @param {BotMetadata.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 {BotMetadata.BotPromotionMessageMetadata.BotPromotionType} promotionType
         * @memberof BotMetadata.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.promotionType = 0;

        /**
         * BotPromotionMessageMetadata buttonTitle.
         * @member {string} buttonTitle
         * @memberof BotMetadata.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.buttonTitle = "";

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

        /**
         * Encodes the specified BotPromotionMessageMetadata message. Does not implicitly {@link BotMetadata.BotPromotionMessageMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotPromotionMessageMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotPromotionMessageMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotPromotionMessageMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotPromotionMessageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotPromotionMessageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotPromotionMessageMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotPromotionMessageMetadata} BotPromotionMessageMetadata
         */
        BotPromotionMessageMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotPromotionMessageMetadata)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotPromotionMessageMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotPromotionMessageMetadata.BotPromotionType[message.promotionType] === undefined ? message.promotionType : $root.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotPromotionMessageMetadata";
        };

        /**
         * BotPromotionType enum.
         * @name BotMetadata.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;
    })();

    BotMetadata.BotSignatureVerificationUseCaseProof = (function() {

        /**
         * Properties of a BotSignatureVerificationUseCaseProof.
         * @memberof BotMetadata
         * @interface IBotSignatureVerificationUseCaseProof
         * @property {number|null} [version] BotSignatureVerificationUseCaseProof version
         * @property {BotMetadata.BotSignatureVerificationUseCaseProof.BotSignatureUseCase|null} [useCase] BotSignatureVerificationUseCaseProof useCase
         * @property {Uint8Array|null} [signature] BotSignatureVerificationUseCaseProof signature
         * @property {Uint8Array|null} [certificateChain] BotSignatureVerificationUseCaseProof certificateChain
         */

        /**
         * Constructs a new BotSignatureVerificationUseCaseProof.
         * @memberof BotMetadata
         * @classdesc Represents a BotSignatureVerificationUseCaseProof.
         * @implements IBotSignatureVerificationUseCaseProof
         * @constructor
         * @param {BotMetadata.IBotSignatureVerificationUseCaseProof=} [properties] Properties to set
         */
        function BotSignatureVerificationUseCaseProof(properties) {
            if (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 BotMetadata.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.version = 0;

        /**
         * BotSignatureVerificationUseCaseProof useCase.
         * @member {BotMetadata.BotSignatureVerificationUseCaseProof.BotSignatureUseCase} useCase
         * @memberof BotMetadata.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.useCase = 0;

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

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

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

        /**
         * Encodes the specified BotSignatureVerificationUseCaseProof message. Does not implicitly {@link BotMetadata.BotSignatureVerificationUseCaseProof.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotSignatureVerificationUseCaseProof
         * @static
         * @param {BotMetadata.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 && Object.hasOwnProperty.call(message, "certificateChain"))
                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.certificateChain);
            return writer;
        };

        /**
         * Encodes the specified BotSignatureVerificationUseCaseProof message, length delimited. Does not implicitly {@link BotMetadata.BotSignatureVerificationUseCaseProof.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotSignatureVerificationUseCaseProof
         * @static
         * @param {BotMetadata.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 BotMetadata.BotSignatureVerificationUseCaseProof
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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: {
                        message.certificateChain = 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 BotMetadata.BotSignatureVerificationUseCaseProof
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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:
                    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 (!(message.certificateChain && typeof message.certificateChain.length === "number" || $util.isString(message.certificateChain)))
                    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 BotMetadata.BotSignatureVerificationUseCaseProof
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotSignatureVerificationUseCaseProof} BotSignatureVerificationUseCaseProof
         */
        BotSignatureVerificationUseCaseProof.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotSignatureVerificationUseCaseProof)
                return object;
            var message = new $root.BotMetadata.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 "WA_BOT_MSG":
            case 0:
                message.useCase = 0;
                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 != null)
                if (typeof object.certificateChain === "string")
                    $util.base64.decode(object.certificateChain, message.certificateChain = $util.newBuffer($util.base64.length(object.certificateChain)), 0);
                else if (object.certificateChain.length >= 0)
                    message.certificateChain = object.certificateChain;
            return message;
        };

        /**
         * Creates a plain object from a BotSignatureVerificationUseCaseProof message. Also converts values to other types if specified.
         * @function toObject
         * @memberof BotMetadata.BotSignatureVerificationUseCaseProof
         * @static
         * @param {BotMetadata.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.defaults) {
                object.version = 0;
                object.useCase = options.enums === String ? "WA_BOT_MSG" : 0;
                if (options.bytes === String)
                    object.signature = "";
                else {
                    object.signature = [];
                    if (options.bytes !== Array)
                        object.signature = $util.newBuffer(object.signature);
                }
                if (options.bytes === String)
                    object.certificateChain = "";
                else {
                    object.certificateChain = [];
                    if (options.bytes !== Array)
                        object.certificateChain = $util.newBuffer(object.certificateChain);
                }
            }
            if (message.version != null && message.hasOwnProperty("version"))
                object.version = message.version;
            if (message.useCase != null && message.hasOwnProperty("useCase"))
                object.useCase = options.enums === String ? $root.BotMetadata.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[message.useCase] === undefined ? message.useCase : $root.BotMetadata.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 != null && message.hasOwnProperty("certificateChain"))
                object.certificateChain = options.bytes === String ? $util.base64.encode(message.certificateChain, 0, message.certificateChain.length) : options.bytes === Array ? Array.prototype.slice.call(message.certificateChain) : message.certificateChain;
            return object;
        };

        /**
         * Converts this BotSignatureVerificationUseCaseProof to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotSignatureVerificationUseCaseProof";
        };

        /**
         * BotSignatureUseCase enum.
         * @name BotMetadata.BotSignatureVerificationUseCaseProof.BotSignatureUseCase
         * @enum {number}
         * @property {number} WA_BOT_MSG=0 WA_BOT_MSG value
         */
        BotSignatureVerificationUseCaseProof.BotSignatureUseCase = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "WA_BOT_MSG"] = 0;
            return values;
        })();

        return BotSignatureVerificationUseCaseProof;
    })();

    BotMetadata.BotSignatureVerificationMetadata = (function() {

        /**
         * Properties of a BotSignatureVerificationMetadata.
         * @memberof BotMetadata
         * @interface IBotSignatureVerificationMetadata
         * @property {Array.<BotMetadata.IBotSignatureVerificationUseCaseProof>|null} [proofs] BotSignatureVerificationMetadata proofs
         */

        /**
         * Constructs a new BotSignatureVerificationMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotSignatureVerificationMetadata.
         * @implements IBotSignatureVerificationMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.IBotSignatureVerificationUseCaseProof>} proofs
         * @memberof BotMetadata.BotSignatureVerificationMetadata
         * @instance
         */
        BotSignatureVerificationMetadata.prototype.proofs = $util.emptyArray;

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

        /**
         * Encodes the specified BotSignatureVerificationMetadata message. Does not implicitly {@link BotMetadata.BotSignatureVerificationMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotSignatureVerificationMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotSignatureVerificationMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotSignatureVerificationMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotSignatureVerificationMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotSignatureVerificationMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotSignatureVerificationMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotSignatureVerificationMetadata} BotSignatureVerificationMetadata
         */
        BotSignatureVerificationMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotSignatureVerificationMetadata)
                return object;
            var message = new $root.BotMetadata.BotSignatureVerificationMetadata();
            if (object.proofs) {
                if (!Array.isArray(object.proofs))
                    throw TypeError(".BotMetadata.BotSignatureVerificationMetadata.proofs: array expected");
                message.proofs = [];
                for (var i = 0; i < object.proofs.length; ++i) {
                    if (typeof object.proofs[i] !== "object")
                        throw TypeError(".BotMetadata.BotSignatureVerificationMetadata.proofs: object expected");
                    message.proofs[i] = $root.BotMetadata.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 BotMetadata.BotSignatureVerificationMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotSignatureVerificationUseCaseProof.toObject(message.proofs[j], options);
            }
            return object;
        };

        /**
         * Converts this BotSignatureVerificationMetadata to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotSignatureVerificationMetadata";
        };

        return BotSignatureVerificationMetadata;
    })();

    BotMetadata.BotMemoryFact = (function() {

        /**
         * Properties of a BotMemoryFact.
         * @memberof BotMetadata
         * @interface IBotMemoryFact
         * @property {string|null} [fact] BotMemoryFact fact
         * @property {string|null} [factId] BotMemoryFact factId
         */

        /**
         * Constructs a new BotMemoryFact.
         * @memberof BotMetadata
         * @classdesc Represents a BotMemoryFact.
         * @implements IBotMemoryFact
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.fact = "";

        /**
         * BotMemoryFact factId.
         * @member {string} factId
         * @memberof BotMetadata.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.factId = "";

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

        /**
         * Encodes the specified BotMemoryFact message. Does not implicitly {@link BotMetadata.BotMemoryFact.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMemoryFact
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMemoryFact.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMemoryFact
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMemoryFact
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotMemoryFact
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotMemoryFact
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMemoryFact} BotMemoryFact
         */
        BotMemoryFact.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMemoryFact)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotMemoryFact
         * @static
         * @param {BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMemoryFact";
        };

        return BotMemoryFact;
    })();

    BotMetadata.BotMemoryMetadata = (function() {

        /**
         * Properties of a BotMemoryMetadata.
         * @memberof BotMetadata
         * @interface IBotMemoryMetadata
         * @property {Array.<BotMetadata.IBotMemoryFact>|null} [addedFacts] BotMemoryMetadata addedFacts
         * @property {Array.<BotMetadata.IBotMemoryFact>|null} [removedFacts] BotMemoryMetadata removedFacts
         * @property {string|null} [disclaimer] BotMemoryMetadata disclaimer
         */

        /**
         * Constructs a new BotMemoryMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotMemoryMetadata.
         * @implements IBotMemoryMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.IBotMemoryFact>} addedFacts
         * @memberof BotMetadata.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.addedFacts = $util.emptyArray;

        /**
         * BotMemoryMetadata removedFacts.
         * @member {Array.<BotMetadata.IBotMemoryFact>} removedFacts
         * @memberof BotMetadata.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.removedFacts = $util.emptyArray;

        /**
         * BotMemoryMetadata disclaimer.
         * @member {string} disclaimer
         * @memberof BotMetadata.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.disclaimer = "";

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

        /**
         * Encodes the specified BotMemoryMetadata message. Does not implicitly {@link BotMetadata.BotMemoryMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotMemoryMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotMemoryMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotMemoryMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotMemoryMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.BotMemoryFact.decode(reader, reader.uint32()));
                        break;
                    }
                case 2: {
                        if (!(message.removedFacts && message.removedFacts.length))
                            message.removedFacts = [];
                        message.removedFacts.push($root.BotMetadata.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 BotMetadata.BotMemoryMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotMemoryMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotMemoryMetadata} BotMemoryMetadata
         */
        BotMemoryMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotMemoryMetadata)
                return object;
            var message = new $root.BotMetadata.BotMemoryMetadata();
            if (object.addedFacts) {
                if (!Array.isArray(object.addedFacts))
                    throw TypeError(".BotMetadata.BotMemoryMetadata.addedFacts: array expected");
                message.addedFacts = [];
                for (var i = 0; i < object.addedFacts.length; ++i) {
                    if (typeof object.addedFacts[i] !== "object")
                        throw TypeError(".BotMetadata.BotMemoryMetadata.addedFacts: object expected");
                    message.addedFacts[i] = $root.BotMetadata.BotMemoryFact.fromObject(object.addedFacts[i]);
                }
            }
            if (object.removedFacts) {
                if (!Array.isArray(object.removedFacts))
                    throw TypeError(".BotMetadata.BotMemoryMetadata.removedFacts: array expected");
                message.removedFacts = [];
                for (var i = 0; i < object.removedFacts.length; ++i) {
                    if (typeof object.removedFacts[i] !== "object")
                        throw TypeError(".BotMetadata.BotMemoryMetadata.removedFacts: object expected");
                    message.removedFacts[i] = $root.BotMetadata.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 BotMetadata.BotMemoryMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotMemoryMetadata";
        };

        return BotMemoryMetadata;
    })();

    BotMetadata.BotLinkedAccount = (function() {

        /**
         * Properties of a BotLinkedAccount.
         * @memberof BotMetadata
         * @interface IBotLinkedAccount
         * @property {BotMetadata.BotLinkedAccount.BotLinkedAccountType|null} [type] BotLinkedAccount type
         */

        /**
         * Constructs a new BotLinkedAccount.
         * @memberof BotMetadata
         * @classdesc Represents a BotLinkedAccount.
         * @implements IBotLinkedAccount
         * @constructor
         * @param {BotMetadata.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 {BotMetadata.BotLinkedAccount.BotLinkedAccountType} type
         * @memberof BotMetadata.BotLinkedAccount
         * @instance
         */
        BotLinkedAccount.prototype.type = 0;

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

        /**
         * Encodes the specified BotLinkedAccount message. Does not implicitly {@link BotMetadata.BotLinkedAccount.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotLinkedAccount
         * @static
         * @param {BotMetadata.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 BotMetadata.BotLinkedAccount.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotLinkedAccount
         * @static
         * @param {BotMetadata.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 BotMetadata.BotLinkedAccount
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotLinkedAccount
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotLinkedAccount
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotLinkedAccount} BotLinkedAccount
         */
        BotLinkedAccount.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotLinkedAccount)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotLinkedAccount
         * @static
         * @param {BotMetadata.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.BotMetadata.BotLinkedAccount.BotLinkedAccountType[message.type] === undefined ? message.type : $root.BotMetadata.BotLinkedAccount.BotLinkedAccountType[message.type] : message.type;
            return object;
        };

        /**
         * Converts this BotLinkedAccount to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotLinkedAccount";
        };

        /**
         * BotLinkedAccountType enum.
         * @name BotMetadata.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;
    })();

    BotMetadata.BotLinkedAccountsMetadata = (function() {

        /**
         * Properties of a BotLinkedAccountsMetadata.
         * @memberof BotMetadata
         * @interface IBotLinkedAccountsMetadata
         * @property {Array.<BotMetadata.IBotLinkedAccount>|null} [accounts] BotLinkedAccountsMetadata accounts
         * @property {Uint8Array|null} [acAuthTokens] BotLinkedAccountsMetadata acAuthTokens
         * @property {number|null} [acErrorCode] BotLinkedAccountsMetadata acErrorCode
         */

        /**
         * Constructs a new BotLinkedAccountsMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotLinkedAccountsMetadata.
         * @implements IBotLinkedAccountsMetadata
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.IBotLinkedAccount>} accounts
         * @memberof BotMetadata.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.accounts = $util.emptyArray;

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

        /**
         * BotLinkedAccountsMetadata acErrorCode.
         * @member {number} acErrorCode
         * @memberof BotMetadata.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.acErrorCode = 0;

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

        /**
         * Encodes the specified BotLinkedAccountsMetadata message. Does not implicitly {@link BotMetadata.BotLinkedAccountsMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotLinkedAccountsMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotLinkedAccountsMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotLinkedAccountsMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotLinkedAccountsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotLinkedAccountsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotLinkedAccountsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata
         */
        BotLinkedAccountsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotLinkedAccountsMetadata)
                return object;
            var message = new $root.BotMetadata.BotLinkedAccountsMetadata();
            if (object.accounts) {
                if (!Array.isArray(object.accounts))
                    throw TypeError(".BotMetadata.BotLinkedAccountsMetadata.accounts: array expected");
                message.accounts = [];
                for (var i = 0; i < object.accounts.length; ++i) {
                    if (typeof object.accounts[i] !== "object")
                        throw TypeError(".BotMetadata.BotLinkedAccountsMetadata.accounts: object expected");
                    message.accounts[i] = $root.BotMetadata.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 BotMetadata.BotLinkedAccountsMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotLinkedAccountsMetadata";
        };

        return BotLinkedAccountsMetadata;
    })();

    BotMetadata.BotPromptSuggestion = (function() {

        /**
         * Properties of a BotPromptSuggestion.
         * @memberof BotMetadata
         * @interface IBotPromptSuggestion
         * @property {string|null} [prompt] BotPromptSuggestion prompt
         * @property {string|null} [promptId] BotPromptSuggestion promptId
         */

        /**
         * Constructs a new BotPromptSuggestion.
         * @memberof BotMetadata
         * @classdesc Represents a BotPromptSuggestion.
         * @implements IBotPromptSuggestion
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.prompt = "";

        /**
         * BotPromptSuggestion promptId.
         * @member {string} promptId
         * @memberof BotMetadata.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.promptId = "";

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

        /**
         * Encodes the specified BotPromptSuggestion message. Does not implicitly {@link BotMetadata.BotPromptSuggestion.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotPromptSuggestion
         * @static
         * @param {BotMetadata.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 BotMetadata.BotPromptSuggestion.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotPromptSuggestion
         * @static
         * @param {BotMetadata.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 BotMetadata.BotPromptSuggestion
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotPromptSuggestion
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotPromptSuggestion
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotPromptSuggestion} BotPromptSuggestion
         */
        BotPromptSuggestion.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotPromptSuggestion)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotPromptSuggestion
         * @static
         * @param {BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotPromptSuggestion";
        };

        return BotPromptSuggestion;
    })();

    BotMetadata.BotPromptSuggestions = (function() {

        /**
         * Properties of a BotPromptSuggestions.
         * @memberof BotMetadata
         * @interface IBotPromptSuggestions
         * @property {Array.<BotMetadata.IBotPromptSuggestion>|null} [suggestions] BotPromptSuggestions suggestions
         */

        /**
         * Constructs a new BotPromptSuggestions.
         * @memberof BotMetadata
         * @classdesc Represents a BotPromptSuggestions.
         * @implements IBotPromptSuggestions
         * @constructor
         * @param {BotMetadata.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.<BotMetadata.IBotPromptSuggestion>} suggestions
         * @memberof BotMetadata.BotPromptSuggestions
         * @instance
         */
        BotPromptSuggestions.prototype.suggestions = $util.emptyArray;

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

        /**
         * Encodes the specified BotPromptSuggestions message. Does not implicitly {@link BotMetadata.BotPromptSuggestions.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotPromptSuggestions
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotPromptSuggestions.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotPromptSuggestions
         * @static
         * @param {BotMetadata.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 BotMetadata.BotPromptSuggestions
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotPromptSuggestions
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotPromptSuggestions
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotPromptSuggestions} BotPromptSuggestions
         */
        BotPromptSuggestions.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotPromptSuggestions)
                return object;
            var message = new $root.BotMetadata.BotPromptSuggestions();
            if (object.suggestions) {
                if (!Array.isArray(object.suggestions))
                    throw TypeError(".BotMetadata.BotPromptSuggestions.suggestions: array expected");
                message.suggestions = [];
                for (var i = 0; i < object.suggestions.length; ++i) {
                    if (typeof object.suggestions[i] !== "object")
                        throw TypeError(".BotMetadata.BotPromptSuggestions.suggestions: object expected");
                    message.suggestions[i] = $root.BotMetadata.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 BotMetadata.BotPromptSuggestions
         * @static
         * @param {BotMetadata.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.BotMetadata.BotPromptSuggestion.toObject(message.suggestions[j], options);
            }
            return object;
        };

        /**
         * Converts this BotPromptSuggestions to JSON.
         * @function toJSON
         * @memberof BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotPromptSuggestions";
        };

        return BotPromptSuggestions;
    })();

    BotMetadata.BotSuggestedPromptMetadata = (function() {

        /**
         * Properties of a BotSuggestedPromptMetadata.
         * @memberof BotMetadata
         * @interface IBotSuggestedPromptMetadata
         * @property {Array.<string>|null} [suggestedPrompts] BotSuggestedPromptMetadata suggestedPrompts
         * @property {number|null} [selectedPromptIndex] BotSuggestedPromptMetadata selectedPromptIndex
         * @property {BotMetadata.IBotPromptSuggestions|null} [promptSuggestions] BotSuggestedPromptMetadata promptSuggestions
         * @property {string|null} [selectedPromptId] BotSuggestedPromptMetadata selectedPromptId
         */

        /**
         * Constructs a new BotSuggestedPromptMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotSuggestedPromptMetadata.
         * @implements IBotSuggestedPromptMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.suggestedPrompts = $util.emptyArray;

        /**
         * BotSuggestedPromptMetadata selectedPromptIndex.
         * @member {number} selectedPromptIndex
         * @memberof BotMetadata.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptIndex = 0;

        /**
         * BotSuggestedPromptMetadata promptSuggestions.
         * @member {BotMetadata.IBotPromptSuggestions|null|undefined} promptSuggestions
         * @memberof BotMetadata.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.promptSuggestions = null;

        /**
         * BotSuggestedPromptMetadata selectedPromptId.
         * @member {string} selectedPromptId
         * @memberof BotMetadata.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptId = "";

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

        /**
         * Encodes the specified BotSuggestedPromptMetadata message. Does not implicitly {@link BotMetadata.BotSuggestedPromptMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotSuggestedPromptMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.BotSuggestedPromptMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotSuggestedPromptMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotSuggestedPromptMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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.BotMetadata.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 BotMetadata.BotSuggestedPromptMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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.BotMetadata.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 BotMetadata.BotSuggestedPromptMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata
         */
        BotSuggestedPromptMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotSuggestedPromptMetadata)
                return object;
            var message = new $root.BotMetadata.BotSuggestedPromptMetadata();
            if (object.suggestedPrompts) {
                if (!Array.isArray(object.suggestedPrompts))
                    throw TypeError(".BotMetadata.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(".BotMetadata.BotSuggestedPromptMetadata.promptSuggestions: object expected");
                message.promptSuggestions = $root.BotMetadata.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 BotMetadata.BotSuggestedPromptMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotSuggestedPromptMetadata";
        };

        return BotSuggestedPromptMetadata;
    })();

    BotMetadata.BotPluginMetadata = (function() {

        /**
         * Properties of a BotPluginMetadata.
         * @memberof BotMetadata
         * @interface IBotPluginMetadata
         * @property {BotMetadata.BotPluginMetadata.SearchProvider|null} [provider] BotPluginMetadata provider
         * @property {BotMetadata.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 {BotMetadata.BotPluginMetadata.PluginType|null} [deprecatedField] BotPluginMetadata deprecatedField
         * @property {BotMetadata.BotPluginMetadata.PluginType|null} [parentPluginType] BotPluginMetadata parentPluginType
         * @property {string|null} [faviconCdnUrl] BotPluginMetadata faviconCdnUrl
         */

        /**
         * Constructs a new BotPluginMetadata.
         * @memberof BotMetadata
         * @classdesc Represents a BotPluginMetadata.
         * @implements IBotPluginMetadata
         * @constructor
         * @param {BotMetadata.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 {BotMetadata.BotPluginMetadata.SearchProvider} provider
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.provider = 0;

        /**
         * BotPluginMetadata pluginType.
         * @member {BotMetadata.BotPluginMetadata.PluginType} pluginType
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.pluginType = 0;

        /**
         * BotPluginMetadata thumbnailCdnUrl.
         * @member {string} thumbnailCdnUrl
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.thumbnailCdnUrl = "";

        /**
         * BotPluginMetadata profilePhotoCdnUrl.
         * @member {string} profilePhotoCdnUrl
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.profilePhotoCdnUrl = "";

        /**
         * BotPluginMetadata searchProviderUrl.
         * @member {string} searchProviderUrl
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchProviderUrl = "";

        /**
         * BotPluginMetadata referenceIndex.
         * @member {number} referenceIndex
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.referenceIndex = 0;

        /**
         * BotPluginMetadata expectedLinksCount.
         * @member {number} expectedLinksCount
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.expectedLinksCount = 0;

        /**
         * BotPluginMetadata searchQuery.
         * @member {string} searchQuery
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchQuery = "";

        /**
         * BotPluginMetadata parentPluginMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} parentPluginMessageKey
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.parentPluginMessageKey = null;

        /**
         * BotPluginMetadata deprecatedField.
         * @member {BotMetadata.BotPluginMetadata.PluginType} deprecatedField
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.deprecatedField = 0;

        /**
         * BotPluginMetadata parentPluginType.
         * @member {BotMetadata.BotPluginMetadata.PluginType} parentPluginType
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.parentPluginType = 0;

        /**
         * BotPluginMetadata faviconCdnUrl.
         * @member {string} faviconCdnUrl
         * @memberof BotMetadata.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.faviconCdnUrl = "";

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

        /**
         * Encodes the specified BotPluginMetadata message. Does not implicitly {@link BotMetadata.BotPluginMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotPluginMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotPluginMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotPluginMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotPluginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotPluginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotPluginMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotPluginMetadata} BotPluginMetadata
         */
        BotPluginMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotPluginMetadata)
                return object;
            var message = new $root.BotMetadata.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(".BotMetadata.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 BotMetadata.BotPluginMetadata
         * @static
         * @param {BotMetadata.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.BotMetadata.BotPluginMetadata.SearchProvider[message.provider] === undefined ? message.provider : $root.BotMetadata.BotPluginMetadata.SearchProvider[message.provider] : message.provider;
            if (message.pluginType != null && message.hasOwnProperty("pluginType"))
                object.pluginType = options.enums === String ? $root.BotMetadata.BotPluginMetadata.PluginType[message.pluginType] === undefined ? message.pluginType : $root.BotMetadata.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.BotMetadata.BotPluginMetadata.PluginType[message.deprecatedField] === undefined ? message.deprecatedField : $root.BotMetadata.BotPluginMetadata.PluginType[message.deprecatedField] : message.deprecatedField;
            if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType"))
                object.parentPluginType = options.enums === String ? $root.BotMetadata.BotPluginMetadata.PluginType[message.parentPluginType] === undefined ? message.parentPluginType : $root.BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotPluginMetadata";
        };

        /**
         * PluginType enum.
         * @name BotMetadata.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 BotMetadata.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;
    })();

    BotMetadata.BotAvatarMetadata = (function() {

        /**
         * Properties of a BotAvatarMetadata.
         * @memberof BotMetadata
         * @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 BotMetadata
         * @classdesc Represents a BotAvatarMetadata.
         * @implements IBotAvatarMetadata
         * @constructor
         * @param {BotMetadata.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 BotMetadata.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.sentiment = 0;

        /**
         * BotAvatarMetadata behaviorGraph.
         * @member {string} behaviorGraph
         * @memberof BotMetadata.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.behaviorGraph = "";

        /**
         * BotAvatarMetadata action.
         * @member {number} action
         * @memberof BotMetadata.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.action = 0;

        /**
         * BotAvatarMetadata intensity.
         * @member {number} intensity
         * @memberof BotMetadata.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.intensity = 0;

        /**
         * BotAvatarMetadata wordCount.
         * @member {number} wordCount
         * @memberof BotMetadata.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.wordCount = 0;

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

        /**
         * Encodes the specified BotAvatarMetadata message. Does not implicitly {@link BotMetadata.BotAvatarMetadata.verify|verify} messages.
         * @function encode
         * @memberof BotMetadata.BotAvatarMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotAvatarMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof BotMetadata.BotAvatarMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.BotAvatarMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {BotMetadata.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.BotMetadata.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 BotMetadata.BotAvatarMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {BotMetadata.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 BotMetadata.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 BotMetadata.BotAvatarMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {BotMetadata.BotAvatarMetadata} BotAvatarMetadata
         */
        BotAvatarMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.BotMetadata.BotAvatarMetadata)
                return object;
            var message = new $root.BotMetadata.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 BotMetadata.BotAvatarMetadata
         * @static
         * @param {BotMetadata.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 BotMetadata.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 BotMetadata.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 + "/BotMetadata.BotAvatarMetadata";
        };

        return BotAvatarMetadata;
    })();

    /**
     * BotSessionSource enum.
     * @name BotMetadata.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
     */
    BotMetadata.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 BotMetadata.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
     */
    BotMetadata.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 BotMetadata.BotMetricsEntryPoint
     * @enum {number}
     * @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
     */
    BotMetadata.BotMetricsEntryPoint = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        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;
        return values;
    })();

    return BotMetadata;
})();

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

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

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

        /**
         * StatusAttribution attributionData.
         * @member {"statusReshare"|"externalShare"|"music"|"groupStatus"|"rlAttribution"|undefined} attributionData
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        Object.defineProperty(StatusAttribution.prototype, "attributionData", {
            get: $util.oneOfGetter($oneOfFields = ["statusReshare", "externalShare", "music", "groupStatus", "rlAttribution"]),
            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();
            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;
                    }
                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:
                    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;
                }
            }
            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;
            }
            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);
            }
            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";
            }
            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.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:
                        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;
                }
                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
             */
            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;
                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:
                        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;
                }
                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
             */
            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;
                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
         */
        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;
            return values;
        })();

        return StatusAttribution;
    })();

    return StatusAttributions;
})();

$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;
})();

module.exports = $root;
