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

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

    AICommon.AIRichResponseSubMessage = (function() {

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

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

        /**
         * AIRichResponseSubMessage messageType.
         * @member {AICommon.AIRichResponseSubMessageType|null|undefined} messageType
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.messageType = null;

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

        /**
         * AIRichResponseSubMessage messageText.
         * @member {string|null|undefined} messageText
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.messageText = null;

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

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

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

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

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

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

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

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

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

        /**
         * AIRichResponseSubMessage _gridImageMetadata.
         * @member {"gridImageMetadata"|undefined} _gridImageMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_gridImageMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["gridImageMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _messageText.
         * @member {"messageText"|undefined} _messageText
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_messageText", {
            get: $util.oneOfGetter($oneOfFields = ["messageText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _imageMetadata.
         * @member {"imageMetadata"|undefined} _imageMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_imageMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["imageMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _codeMetadata.
         * @member {"codeMetadata"|undefined} _codeMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_codeMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["codeMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _tableMetadata.
         * @member {"tableMetadata"|undefined} _tableMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_tableMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["tableMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _dynamicMetadata.
         * @member {"dynamicMetadata"|undefined} _dynamicMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_dynamicMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["dynamicMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _latexMetadata.
         * @member {"latexMetadata"|undefined} _latexMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_latexMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["latexMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _mapMetadata.
         * @member {"mapMetadata"|undefined} _mapMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_mapMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["mapMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _contentItemsMetadata.
         * @member {"contentItemsMetadata"|undefined} _contentItemsMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_contentItemsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["contentItemsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified AIRichResponseSubMessage message. Does not implicitly {@link AICommon.AIRichResponseSubMessage.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {AICommon.IAIRichResponseSubMessage} message AIRichResponseSubMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseSubMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType);
            if (message.gridImageMetadata != null && Object.hasOwnProperty.call(message, "gridImageMetadata"))
                $root.AICommon.AIRichResponseGridImageMetadata.encode(message.gridImageMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.messageText != null && Object.hasOwnProperty.call(message, "messageText"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageText);
            if (message.imageMetadata != null && Object.hasOwnProperty.call(message, "imageMetadata"))
                $root.AICommon.AIRichResponseInlineImageMetadata.encode(message.imageMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.codeMetadata != null && Object.hasOwnProperty.call(message, "codeMetadata"))
                $root.AICommon.AIRichResponseCodeMetadata.encode(message.codeMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.tableMetadata != null && Object.hasOwnProperty.call(message, "tableMetadata"))
                $root.AICommon.AIRichResponseTableMetadata.encode(message.tableMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.dynamicMetadata != null && Object.hasOwnProperty.call(message, "dynamicMetadata"))
                $root.AICommon.AIRichResponseDynamicMetadata.encode(message.dynamicMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.latexMetadata != null && Object.hasOwnProperty.call(message, "latexMetadata"))
                $root.AICommon.AIRichResponseLatexMetadata.encode(message.latexMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            if (message.mapMetadata != null && Object.hasOwnProperty.call(message, "mapMetadata"))
                $root.AICommon.AIRichResponseMapMetadata.encode(message.mapMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
            if (message.contentItemsMetadata != null && Object.hasOwnProperty.call(message, "contentItemsMetadata"))
                $root.AICommon.AIRichResponseContentItemsMetadata.encode(message.contentItemsMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a AIRichResponseSubMessage message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseSubMessage} AIRichResponseSubMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseSubMessage.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AICommon.AIRichResponseSubMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageType = reader.int32();
                        break;
                    }
                case 2: {
                        message.gridImageMetadata = $root.AICommon.AIRichResponseGridImageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.messageText = reader.string();
                        break;
                    }
                case 4: {
                        message.imageMetadata = $root.AICommon.AIRichResponseInlineImageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.codeMetadata = $root.AICommon.AIRichResponseCodeMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.tableMetadata = $root.AICommon.AIRichResponseTableMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.dynamicMetadata = $root.AICommon.AIRichResponseDynamicMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.latexMetadata = $root.AICommon.AIRichResponseLatexMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 9: {
                        message.mapMetadata = $root.AICommon.AIRichResponseMapMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 10: {
                        message.contentItemsMetadata = $root.AICommon.AIRichResponseContentItemsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a AIRichResponseSubMessage message.
         * @function verify
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseSubMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageType != null && message.hasOwnProperty("messageType")) {
                properties._messageType = 1;
                switch (message.messageType) {
                default:
                    return "messageType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                    break;
                }
            }
            if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) {
                properties._gridImageMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseGridImageMetadata.verify(message.gridImageMetadata);
                    if (error)
                        return "gridImageMetadata." + error;
                }
            }
            if (message.messageText != null && message.hasOwnProperty("messageText")) {
                properties._messageText = 1;
                if (!$util.isString(message.messageText))
                    return "messageText: string expected";
            }
            if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) {
                properties._imageMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseInlineImageMetadata.verify(message.imageMetadata);
                    if (error)
                        return "imageMetadata." + error;
                }
            }
            if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
                properties._codeMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseCodeMetadata.verify(message.codeMetadata);
                    if (error)
                        return "codeMetadata." + error;
                }
            }
            if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
                properties._tableMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseTableMetadata.verify(message.tableMetadata);
                    if (error)
                        return "tableMetadata." + error;
                }
            }
            if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
                properties._dynamicMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseDynamicMetadata.verify(message.dynamicMetadata);
                    if (error)
                        return "dynamicMetadata." + error;
                }
            }
            if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) {
                properties._latexMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseLatexMetadata.verify(message.latexMetadata);
                    if (error)
                        return "latexMetadata." + error;
                }
            }
            if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) {
                properties._mapMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseMapMetadata.verify(message.mapMetadata);
                    if (error)
                        return "mapMetadata." + error;
                }
            }
            if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) {
                properties._contentItemsMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseContentItemsMetadata.verify(message.contentItemsMetadata);
                    if (error)
                        return "contentItemsMetadata." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIRichResponseSubMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseSubMessage} AIRichResponseSubMessage
         */
        AIRichResponseSubMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseSubMessage)
                return object;
            var message = new $root.AICommon.AIRichResponseSubMessage();
            switch (object.messageType) {
            default:
                if (typeof object.messageType === "number") {
                    message.messageType = object.messageType;
                    break;
                }
                break;
            case "AI_RICH_RESPONSE_UNKNOWN":
            case 0:
                message.messageType = 0;
                break;
            case "AI_RICH_RESPONSE_GRID_IMAGE":
            case 1:
                message.messageType = 1;
                break;
            case "AI_RICH_RESPONSE_TEXT":
            case 2:
                message.messageType = 2;
                break;
            case "AI_RICH_RESPONSE_INLINE_IMAGE":
            case 3:
                message.messageType = 3;
                break;
            case "AI_RICH_RESPONSE_TABLE":
            case 4:
                message.messageType = 4;
                break;
            case "AI_RICH_RESPONSE_CODE":
            case 5:
                message.messageType = 5;
                break;
            case "AI_RICH_RESPONSE_DYNAMIC":
            case 6:
                message.messageType = 6;
                break;
            case "AI_RICH_RESPONSE_MAP":
            case 7:
                message.messageType = 7;
                break;
            case "AI_RICH_RESPONSE_LATEX":
            case 8:
                message.messageType = 8;
                break;
            case "AI_RICH_RESPONSE_CONTENT_ITEMS":
            case 9:
                message.messageType = 9;
                break;
            }
            if (object.gridImageMetadata != null) {
                if (typeof object.gridImageMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.gridImageMetadata: object expected");
                message.gridImageMetadata = $root.AICommon.AIRichResponseGridImageMetadata.fromObject(object.gridImageMetadata);
            }
            if (object.messageText != null)
                message.messageText = String(object.messageText);
            if (object.imageMetadata != null) {
                if (typeof object.imageMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.imageMetadata: object expected");
                message.imageMetadata = $root.AICommon.AIRichResponseInlineImageMetadata.fromObject(object.imageMetadata);
            }
            if (object.codeMetadata != null) {
                if (typeof object.codeMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.codeMetadata: object expected");
                message.codeMetadata = $root.AICommon.AIRichResponseCodeMetadata.fromObject(object.codeMetadata);
            }
            if (object.tableMetadata != null) {
                if (typeof object.tableMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.tableMetadata: object expected");
                message.tableMetadata = $root.AICommon.AIRichResponseTableMetadata.fromObject(object.tableMetadata);
            }
            if (object.dynamicMetadata != null) {
                if (typeof object.dynamicMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.dynamicMetadata: object expected");
                message.dynamicMetadata = $root.AICommon.AIRichResponseDynamicMetadata.fromObject(object.dynamicMetadata);
            }
            if (object.latexMetadata != null) {
                if (typeof object.latexMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.latexMetadata: object expected");
                message.latexMetadata = $root.AICommon.AIRichResponseLatexMetadata.fromObject(object.latexMetadata);
            }
            if (object.mapMetadata != null) {
                if (typeof object.mapMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.mapMetadata: object expected");
                message.mapMetadata = $root.AICommon.AIRichResponseMapMetadata.fromObject(object.mapMetadata);
            }
            if (object.contentItemsMetadata != null) {
                if (typeof object.contentItemsMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.contentItemsMetadata: object expected");
                message.contentItemsMetadata = $root.AICommon.AIRichResponseContentItemsMetadata.fromObject(object.contentItemsMetadata);
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseSubMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {AICommon.AIRichResponseSubMessage} message AIRichResponseSubMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseSubMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageType != null && message.hasOwnProperty("messageType")) {
                object.messageType = options.enums === String ? $root.AICommon.AIRichResponseSubMessageType[message.messageType] === undefined ? message.messageType : $root.AICommon.AIRichResponseSubMessageType[message.messageType] : message.messageType;
                if (options.oneofs)
                    object._messageType = "messageType";
            }
            if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) {
                object.gridImageMetadata = $root.AICommon.AIRichResponseGridImageMetadata.toObject(message.gridImageMetadata, options);
                if (options.oneofs)
                    object._gridImageMetadata = "gridImageMetadata";
            }
            if (message.messageText != null && message.hasOwnProperty("messageText")) {
                object.messageText = message.messageText;
                if (options.oneofs)
                    object._messageText = "messageText";
            }
            if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) {
                object.imageMetadata = $root.AICommon.AIRichResponseInlineImageMetadata.toObject(message.imageMetadata, options);
                if (options.oneofs)
                    object._imageMetadata = "imageMetadata";
            }
            if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
                object.codeMetadata = $root.AICommon.AIRichResponseCodeMetadata.toObject(message.codeMetadata, options);
                if (options.oneofs)
                    object._codeMetadata = "codeMetadata";
            }
            if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
                object.tableMetadata = $root.AICommon.AIRichResponseTableMetadata.toObject(message.tableMetadata, options);
                if (options.oneofs)
                    object._tableMetadata = "tableMetadata";
            }
            if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
                object.dynamicMetadata = $root.AICommon.AIRichResponseDynamicMetadata.toObject(message.dynamicMetadata, options);
                if (options.oneofs)
                    object._dynamicMetadata = "dynamicMetadata";
            }
            if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) {
                object.latexMetadata = $root.AICommon.AIRichResponseLatexMetadata.toObject(message.latexMetadata, options);
                if (options.oneofs)
                    object._latexMetadata = "latexMetadata";
            }
            if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) {
                object.mapMetadata = $root.AICommon.AIRichResponseMapMetadata.toObject(message.mapMetadata, options);
                if (options.oneofs)
                    object._mapMetadata = "mapMetadata";
            }
            if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) {
                object.contentItemsMetadata = $root.AICommon.AIRichResponseContentItemsMetadata.toObject(message.contentItemsMetadata, options);
                if (options.oneofs)
                    object._contentItemsMetadata = "contentItemsMetadata";
            }
            return object;
        };

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

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

        return AIRichResponseSubMessage;
    })();

    AICommon.AIRichResponseContentItemsMetadata = (function() {

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

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

        /**
         * AIRichResponseContentItemsMetadata itemsMetadata.
         * @member {Array.<AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata>} itemsMetadata
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         */
        AIRichResponseContentItemsMetadata.prototype.itemsMetadata = $util.emptyArray;

        /**
         * AIRichResponseContentItemsMetadata contentType.
         * @member {AICommon.AIRichResponseContentItemsMetadata.ContentType|null|undefined} contentType
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         */
        AIRichResponseContentItemsMetadata.prototype.contentType = null;

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

        /**
         * AIRichResponseContentItemsMetadata _contentType.
         * @member {"contentType"|undefined} _contentType
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseContentItemsMetadata.prototype, "_contentType", {
            get: $util.oneOfGetter($oneOfFields = ["contentType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified AIRichResponseContentItemsMetadata message. Does not implicitly {@link AICommon.AIRichResponseContentItemsMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {AICommon.IAIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseContentItemsMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.itemsMetadata != null && message.itemsMetadata.length)
                for (var i = 0; i < message.itemsMetadata.length; ++i)
                    $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.encode(message.itemsMetadata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.contentType);
            return writer;
        };

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

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

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

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

        /**
         * Creates a AIRichResponseContentItemsMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata
         */
        AIRichResponseContentItemsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseContentItemsMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseContentItemsMetadata();
            if (object.itemsMetadata) {
                if (!Array.isArray(object.itemsMetadata))
                    throw TypeError(".AICommon.AIRichResponseContentItemsMetadata.itemsMetadata: array expected");
                message.itemsMetadata = [];
                for (var i = 0; i < object.itemsMetadata.length; ++i) {
                    if (typeof object.itemsMetadata[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseContentItemsMetadata.itemsMetadata: object expected");
                    message.itemsMetadata[i] = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.fromObject(object.itemsMetadata[i]);
                }
            }
            switch (object.contentType) {
            default:
                if (typeof object.contentType === "number") {
                    message.contentType = object.contentType;
                    break;
                }
                break;
            case "DEFAULT":
            case 0:
                message.contentType = 0;
                break;
            case "CAROUSEL":
            case 1:
                message.contentType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseContentItemsMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {AICommon.AIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseContentItemsMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.itemsMetadata = [];
            if (message.itemsMetadata && message.itemsMetadata.length) {
                object.itemsMetadata = [];
                for (var j = 0; j < message.itemsMetadata.length; ++j)
                    object.itemsMetadata[j] = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.toObject(message.itemsMetadata[j], options);
            }
            if (message.contentType != null && message.hasOwnProperty("contentType")) {
                object.contentType = options.enums === String ? $root.AICommon.AIRichResponseContentItemsMetadata.ContentType[message.contentType] === undefined ? message.contentType : $root.AICommon.AIRichResponseContentItemsMetadata.ContentType[message.contentType] : message.contentType;
                if (options.oneofs)
                    object._contentType = "contentType";
            }
            return object;
        };

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

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

        AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata = (function() {

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

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

            /**
             * AIRichResponseContentItemMetadata reelItem.
             * @member {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null|undefined} reelItem
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @instance
             */
            AIRichResponseContentItemMetadata.prototype.reelItem = null;

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

            /**
             * AIRichResponseContentItemMetadata aIRichResponseContentItem.
             * @member {"reelItem"|undefined} aIRichResponseContentItem
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @instance
             */
            Object.defineProperty(AIRichResponseContentItemMetadata.prototype, "aIRichResponseContentItem", {
                get: $util.oneOfGetter($oneOfFields = ["reelItem"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

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

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

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

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

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

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

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

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

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

            return AIRichResponseContentItemMetadata;
        })();

        AIRichResponseContentItemsMetadata.AIRichResponseReelItem = (function() {

            /**
             * Properties of a AIRichResponseReelItem.
             * @memberof AICommon.AIRichResponseContentItemsMetadata
             * @interface IAIRichResponseReelItem
             * @property {string|null} [title] AIRichResponseReelItem title
             * @property {string|null} [profileIconUrl] AIRichResponseReelItem profileIconUrl
             * @property {string|null} [thumbnailUrl] AIRichResponseReelItem thumbnailUrl
             * @property {string|null} [videoUrl] AIRichResponseReelItem videoUrl
             */

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

            /**
             * AIRichResponseReelItem title.
             * @member {string|null|undefined} title
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.title = null;

            /**
             * AIRichResponseReelItem profileIconUrl.
             * @member {string|null|undefined} profileIconUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.profileIconUrl = null;

            /**
             * AIRichResponseReelItem thumbnailUrl.
             * @member {string|null|undefined} thumbnailUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.thumbnailUrl = null;

            /**
             * AIRichResponseReelItem videoUrl.
             * @member {string|null|undefined} videoUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.videoUrl = null;

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

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

            /**
             * AIRichResponseReelItem _profileIconUrl.
             * @member {"profileIconUrl"|undefined} _profileIconUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            Object.defineProperty(AIRichResponseReelItem.prototype, "_profileIconUrl", {
                get: $util.oneOfGetter($oneOfFields = ["profileIconUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseReelItem _thumbnailUrl.
             * @member {"thumbnailUrl"|undefined} _thumbnailUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            Object.defineProperty(AIRichResponseReelItem.prototype, "_thumbnailUrl", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseReelItem _videoUrl.
             * @member {"videoUrl"|undefined} _videoUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            Object.defineProperty(AIRichResponseReelItem.prototype, "_videoUrl", {
                get: $util.oneOfGetter($oneOfFields = ["videoUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

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

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

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

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

            /**
             * Verifies a AIRichResponseReelItem message.
             * @function verify
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseReelItem.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl")) {
                    properties._profileIconUrl = 1;
                    if (!$util.isString(message.profileIconUrl))
                        return "profileIconUrl: string expected";
                }
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
                    properties._thumbnailUrl = 1;
                    if (!$util.isString(message.thumbnailUrl))
                        return "thumbnailUrl: string expected";
                }
                if (message.videoUrl != null && message.hasOwnProperty("videoUrl")) {
                    properties._videoUrl = 1;
                    if (!$util.isString(message.videoUrl))
                        return "videoUrl: string expected";
                }
                return null;
            };

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

            /**
             * Creates a plain object from a AIRichResponseReelItem message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} message AIRichResponseReelItem
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseReelItem.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl")) {
                    object.profileIconUrl = message.profileIconUrl;
                    if (options.oneofs)
                        object._profileIconUrl = "profileIconUrl";
                }
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
                    object.thumbnailUrl = message.thumbnailUrl;
                    if (options.oneofs)
                        object._thumbnailUrl = "thumbnailUrl";
                }
                if (message.videoUrl != null && message.hasOwnProperty("videoUrl")) {
                    object.videoUrl = message.videoUrl;
                    if (options.oneofs)
                        object._videoUrl = "videoUrl";
                }
                return object;
            };

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

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

            return AIRichResponseReelItem;
        })();

        /**
         * ContentType enum.
         * @name AICommon.AIRichResponseContentItemsMetadata.ContentType
         * @enum {number}
         * @property {number} DEFAULT=0 DEFAULT value
         * @property {number} CAROUSEL=1 CAROUSEL value
         */
        AIRichResponseContentItemsMetadata.ContentType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "DEFAULT"] = 0;
            values[valuesById[1] = "CAROUSEL"] = 1;
            return values;
        })();

        return AIRichResponseContentItemsMetadata;
    })();

    AICommon.AIRichResponseMapMetadata = (function() {

        /**
         * Properties of a AIRichResponseMapMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseMapMetadata
         * @property {number|null} [centerLatitude] AIRichResponseMapMetadata centerLatitude
         * @property {number|null} [centerLongitude] AIRichResponseMapMetadata centerLongitude
         * @property {number|null} [latitudeDelta] AIRichResponseMapMetadata latitudeDelta
         * @property {number|null} [longitudeDelta] AIRichResponseMapMetadata longitudeDelta
         * @property {Array.<AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation>|null} [annotations] AIRichResponseMapMetadata annotations
         * @property {boolean|null} [showInfoList] AIRichResponseMapMetadata showInfoList
         */

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

        /**
         * AIRichResponseMapMetadata centerLatitude.
         * @member {number|null|undefined} centerLatitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.centerLatitude = null;

        /**
         * AIRichResponseMapMetadata centerLongitude.
         * @member {number|null|undefined} centerLongitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.centerLongitude = null;

        /**
         * AIRichResponseMapMetadata latitudeDelta.
         * @member {number|null|undefined} latitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.latitudeDelta = null;

        /**
         * AIRichResponseMapMetadata longitudeDelta.
         * @member {number|null|undefined} longitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.longitudeDelta = null;

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

        /**
         * AIRichResponseMapMetadata showInfoList.
         * @member {boolean|null|undefined} showInfoList
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.showInfoList = null;

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

        /**
         * AIRichResponseMapMetadata _centerLatitude.
         * @member {"centerLatitude"|undefined} _centerLatitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_centerLatitude", {
            get: $util.oneOfGetter($oneOfFields = ["centerLatitude"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _centerLongitude.
         * @member {"centerLongitude"|undefined} _centerLongitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_centerLongitude", {
            get: $util.oneOfGetter($oneOfFields = ["centerLongitude"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _latitudeDelta.
         * @member {"latitudeDelta"|undefined} _latitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_latitudeDelta", {
            get: $util.oneOfGetter($oneOfFields = ["latitudeDelta"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _longitudeDelta.
         * @member {"longitudeDelta"|undefined} _longitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_longitudeDelta", {
            get: $util.oneOfGetter($oneOfFields = ["longitudeDelta"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _showInfoList.
         * @member {"showInfoList"|undefined} _showInfoList
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_showInfoList", {
            get: $util.oneOfGetter($oneOfFields = ["showInfoList"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified AIRichResponseMapMetadata message. Does not implicitly {@link AICommon.AIRichResponseMapMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {AICommon.IAIRichResponseMapMetadata} message AIRichResponseMapMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseMapMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.centerLatitude != null && Object.hasOwnProperty.call(message, "centerLatitude"))
                writer.uint32(/* id 1, wireType 1 =*/9).double(message.centerLatitude);
            if (message.centerLongitude != null && Object.hasOwnProperty.call(message, "centerLongitude"))
                writer.uint32(/* id 2, wireType 1 =*/17).double(message.centerLongitude);
            if (message.latitudeDelta != null && Object.hasOwnProperty.call(message, "latitudeDelta"))
                writer.uint32(/* id 3, wireType 1 =*/25).double(message.latitudeDelta);
            if (message.longitudeDelta != null && Object.hasOwnProperty.call(message, "longitudeDelta"))
                writer.uint32(/* id 4, wireType 1 =*/33).double(message.longitudeDelta);
            if (message.annotations != null && message.annotations.length)
                for (var i = 0; i < message.annotations.length; ++i)
                    $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.encode(message.annotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.showInfoList != null && Object.hasOwnProperty.call(message, "showInfoList"))
                writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showInfoList);
            return writer;
        };

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

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

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

        /**
         * Verifies a AIRichResponseMapMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseMapMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude")) {
                properties._centerLatitude = 1;
                if (typeof message.centerLatitude !== "number")
                    return "centerLatitude: number expected";
            }
            if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude")) {
                properties._centerLongitude = 1;
                if (typeof message.centerLongitude !== "number")
                    return "centerLongitude: number expected";
            }
            if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta")) {
                properties._latitudeDelta = 1;
                if (typeof message.latitudeDelta !== "number")
                    return "latitudeDelta: number expected";
            }
            if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta")) {
                properties._longitudeDelta = 1;
                if (typeof message.longitudeDelta !== "number")
                    return "longitudeDelta: number expected";
            }
            if (message.annotations != null && message.hasOwnProperty("annotations")) {
                if (!Array.isArray(message.annotations))
                    return "annotations: array expected";
                for (var i = 0; i < message.annotations.length; ++i) {
                    var error = $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify(message.annotations[i]);
                    if (error)
                        return "annotations." + error;
                }
            }
            if (message.showInfoList != null && message.hasOwnProperty("showInfoList")) {
                properties._showInfoList = 1;
                if (typeof message.showInfoList !== "boolean")
                    return "showInfoList: boolean expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseMapMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseMapMetadata} AIRichResponseMapMetadata
         */
        AIRichResponseMapMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseMapMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseMapMetadata();
            if (object.centerLatitude != null)
                message.centerLatitude = Number(object.centerLatitude);
            if (object.centerLongitude != null)
                message.centerLongitude = Number(object.centerLongitude);
            if (object.latitudeDelta != null)
                message.latitudeDelta = Number(object.latitudeDelta);
            if (object.longitudeDelta != null)
                message.longitudeDelta = Number(object.longitudeDelta);
            if (object.annotations) {
                if (!Array.isArray(object.annotations))
                    throw TypeError(".AICommon.AIRichResponseMapMetadata.annotations: array expected");
                message.annotations = [];
                for (var i = 0; i < object.annotations.length; ++i) {
                    if (typeof object.annotations[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseMapMetadata.annotations: object expected");
                    message.annotations[i] = $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.fromObject(object.annotations[i]);
                }
            }
            if (object.showInfoList != null)
                message.showInfoList = Boolean(object.showInfoList);
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseMapMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {AICommon.AIRichResponseMapMetadata} message AIRichResponseMapMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseMapMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.annotations = [];
            if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude")) {
                object.centerLatitude = options.json && !isFinite(message.centerLatitude) ? String(message.centerLatitude) : message.centerLatitude;
                if (options.oneofs)
                    object._centerLatitude = "centerLatitude";
            }
            if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude")) {
                object.centerLongitude = options.json && !isFinite(message.centerLongitude) ? String(message.centerLongitude) : message.centerLongitude;
                if (options.oneofs)
                    object._centerLongitude = "centerLongitude";
            }
            if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta")) {
                object.latitudeDelta = options.json && !isFinite(message.latitudeDelta) ? String(message.latitudeDelta) : message.latitudeDelta;
                if (options.oneofs)
                    object._latitudeDelta = "latitudeDelta";
            }
            if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta")) {
                object.longitudeDelta = options.json && !isFinite(message.longitudeDelta) ? String(message.longitudeDelta) : message.longitudeDelta;
                if (options.oneofs)
                    object._longitudeDelta = "longitudeDelta";
            }
            if (message.annotations && message.annotations.length) {
                object.annotations = [];
                for (var j = 0; j < message.annotations.length; ++j)
                    object.annotations[j] = $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.toObject(message.annotations[j], options);
            }
            if (message.showInfoList != null && message.hasOwnProperty("showInfoList")) {
                object.showInfoList = message.showInfoList;
                if (options.oneofs)
                    object._showInfoList = "showInfoList";
            }
            return object;
        };

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

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

        AIRichResponseMapMetadata.AIRichResponseMapAnnotation = (function() {

            /**
             * Properties of a AIRichResponseMapAnnotation.
             * @memberof AICommon.AIRichResponseMapMetadata
             * @interface IAIRichResponseMapAnnotation
             * @property {number|null} [annotationNumber] AIRichResponseMapAnnotation annotationNumber
             * @property {number|null} [latitude] AIRichResponseMapAnnotation latitude
             * @property {number|null} [longitude] AIRichResponseMapAnnotation longitude
             * @property {string|null} [title] AIRichResponseMapAnnotation title
             * @property {string|null} [body] AIRichResponseMapAnnotation body
             */

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

            /**
             * AIRichResponseMapAnnotation annotationNumber.
             * @member {number|null|undefined} annotationNumber
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.annotationNumber = null;

            /**
             * AIRichResponseMapAnnotation latitude.
             * @member {number|null|undefined} latitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.latitude = null;

            /**
             * AIRichResponseMapAnnotation longitude.
             * @member {number|null|undefined} longitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.longitude = null;

            /**
             * AIRichResponseMapAnnotation title.
             * @member {string|null|undefined} title
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.title = null;

            /**
             * AIRichResponseMapAnnotation body.
             * @member {string|null|undefined} body
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.body = null;

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

            /**
             * AIRichResponseMapAnnotation _annotationNumber.
             * @member {"annotationNumber"|undefined} _annotationNumber
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_annotationNumber", {
                get: $util.oneOfGetter($oneOfFields = ["annotationNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseMapAnnotation _latitude.
             * @member {"latitude"|undefined} _latitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_latitude", {
                get: $util.oneOfGetter($oneOfFields = ["latitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseMapAnnotation _longitude.
             * @member {"longitude"|undefined} _longitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_longitude", {
                get: $util.oneOfGetter($oneOfFields = ["longitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * AIRichResponseMapAnnotation _body.
             * @member {"body"|undefined} _body
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_body", {
                get: $util.oneOfGetter($oneOfFields = ["body"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified AIRichResponseMapAnnotation message. Does not implicitly {@link AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation} message AIRichResponseMapAnnotation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseMapAnnotation.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.annotationNumber != null && Object.hasOwnProperty.call(message, "annotationNumber"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.annotationNumber);
                if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
                    writer.uint32(/* id 2, wireType 1 =*/17).double(message.latitude);
                if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
                    writer.uint32(/* id 3, wireType 1 =*/25).double(message.longitude);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.title);
                if (message.body != null && Object.hasOwnProperty.call(message, "body"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.body);
                return writer;
            };

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

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

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

            /**
             * Verifies a AIRichResponseMapAnnotation message.
             * @function verify
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseMapAnnotation.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber")) {
                    properties._annotationNumber = 1;
                    if (!$util.isInteger(message.annotationNumber))
                        return "annotationNumber: integer expected";
                }
                if (message.latitude != null && message.hasOwnProperty("latitude")) {
                    properties._latitude = 1;
                    if (typeof message.latitude !== "number")
                        return "latitude: number expected";
                }
                if (message.longitude != null && message.hasOwnProperty("longitude")) {
                    properties._longitude = 1;
                    if (typeof message.longitude !== "number")
                        return "longitude: number expected";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    properties._body = 1;
                    if (!$util.isString(message.body))
                        return "body: string expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseMapAnnotation message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation
             */
            AIRichResponseMapAnnotation.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation)
                    return object;
                var message = new $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation();
                if (object.annotationNumber != null)
                    message.annotationNumber = object.annotationNumber >>> 0;
                if (object.latitude != null)
                    message.latitude = Number(object.latitude);
                if (object.longitude != null)
                    message.longitude = Number(object.longitude);
                if (object.title != null)
                    message.title = String(object.title);
                if (object.body != null)
                    message.body = String(object.body);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseMapAnnotation message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} message AIRichResponseMapAnnotation
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseMapAnnotation.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber")) {
                    object.annotationNumber = message.annotationNumber;
                    if (options.oneofs)
                        object._annotationNumber = "annotationNumber";
                }
                if (message.latitude != null && message.hasOwnProperty("latitude")) {
                    object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
                    if (options.oneofs)
                        object._latitude = "latitude";
                }
                if (message.longitude != null && message.hasOwnProperty("longitude")) {
                    object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
                    if (options.oneofs)
                        object._longitude = "longitude";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    object.body = message.body;
                    if (options.oneofs)
                        object._body = "body";
                }
                return object;
            };

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

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

            return AIRichResponseMapAnnotation;
        })();

        return AIRichResponseMapMetadata;
    })();

    AICommon.AIRichResponseLatexMetadata = (function() {

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

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

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

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

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

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

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

        /**
         * Encodes the specified AIRichResponseLatexMetadata message. Does not implicitly {@link AICommon.AIRichResponseLatexMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {AICommon.IAIRichResponseLatexMetadata} message AIRichResponseLatexMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseLatexMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
            if (message.expressions != null && message.expressions.length)
                for (var i = 0; i < message.expressions.length; ++i)
                    $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.encode(message.expressions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        AIRichResponseLatexMetadata.AIRichResponseLatexExpression = (function() {

            /**
             * Properties of a AIRichResponseLatexExpression.
             * @memberof AICommon.AIRichResponseLatexMetadata
             * @interface IAIRichResponseLatexExpression
             * @property {string|null} [latexExpression] AIRichResponseLatexExpression latexExpression
             * @property {string|null} [url] AIRichResponseLatexExpression url
             * @property {number|null} [width] AIRichResponseLatexExpression width
             * @property {number|null} [height] AIRichResponseLatexExpression height
             * @property {number|null} [fontHeight] AIRichResponseLatexExpression fontHeight
             * @property {number|null} [imageTopPadding] AIRichResponseLatexExpression imageTopPadding
             * @property {number|null} [imageLeadingPadding] AIRichResponseLatexExpression imageLeadingPadding
             * @property {number|null} [imageBottomPadding] AIRichResponseLatexExpression imageBottomPadding
             * @property {number|null} [imageTrailingPadding] AIRichResponseLatexExpression imageTrailingPadding
             */

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

            /**
             * AIRichResponseLatexExpression latexExpression.
             * @member {string|null|undefined} latexExpression
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.latexExpression = null;

            /**
             * AIRichResponseLatexExpression url.
             * @member {string|null|undefined} url
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.url = null;

            /**
             * AIRichResponseLatexExpression width.
             * @member {number|null|undefined} width
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.width = null;

            /**
             * AIRichResponseLatexExpression height.
             * @member {number|null|undefined} height
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.height = null;

            /**
             * AIRichResponseLatexExpression fontHeight.
             * @member {number|null|undefined} fontHeight
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.fontHeight = null;

            /**
             * AIRichResponseLatexExpression imageTopPadding.
             * @member {number|null|undefined} imageTopPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageTopPadding = null;

            /**
             * AIRichResponseLatexExpression imageLeadingPadding.
             * @member {number|null|undefined} imageLeadingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageLeadingPadding = null;

            /**
             * AIRichResponseLatexExpression imageBottomPadding.
             * @member {number|null|undefined} imageBottomPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageBottomPadding = null;

            /**
             * AIRichResponseLatexExpression imageTrailingPadding.
             * @member {number|null|undefined} imageTrailingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageTrailingPadding = null;

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

            /**
             * AIRichResponseLatexExpression _latexExpression.
             * @member {"latexExpression"|undefined} _latexExpression
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_latexExpression", {
                get: $util.oneOfGetter($oneOfFields = ["latexExpression"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _url.
             * @member {"url"|undefined} _url
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _width.
             * @member {"width"|undefined} _width
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_width", {
                get: $util.oneOfGetter($oneOfFields = ["width"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _height.
             * @member {"height"|undefined} _height
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_height", {
                get: $util.oneOfGetter($oneOfFields = ["height"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _fontHeight.
             * @member {"fontHeight"|undefined} _fontHeight
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_fontHeight", {
                get: $util.oneOfGetter($oneOfFields = ["fontHeight"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageTopPadding.
             * @member {"imageTopPadding"|undefined} _imageTopPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTopPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageTopPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageLeadingPadding.
             * @member {"imageLeadingPadding"|undefined} _imageLeadingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageLeadingPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageLeadingPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageBottomPadding.
             * @member {"imageBottomPadding"|undefined} _imageBottomPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageBottomPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageBottomPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageTrailingPadding.
             * @member {"imageTrailingPadding"|undefined} _imageTrailingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTrailingPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageTrailingPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified AIRichResponseLatexExpression message. Does not implicitly {@link AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression} message AIRichResponseLatexExpression message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseLatexExpression.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.latexExpression != null && Object.hasOwnProperty.call(message, "latexExpression"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.latexExpression);
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.url);
                if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                    writer.uint32(/* id 3, wireType 1 =*/25).double(message.width);
                if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                    writer.uint32(/* id 4, wireType 1 =*/33).double(message.height);
                if (message.fontHeight != null && Object.hasOwnProperty.call(message, "fontHeight"))
                    writer.uint32(/* id 5, wireType 1 =*/41).double(message.fontHeight);
                if (message.imageTopPadding != null && Object.hasOwnProperty.call(message, "imageTopPadding"))
                    writer.uint32(/* id 6, wireType 1 =*/49).double(message.imageTopPadding);
                if (message.imageLeadingPadding != null && Object.hasOwnProperty.call(message, "imageLeadingPadding"))
                    writer.uint32(/* id 7, wireType 1 =*/57).double(message.imageLeadingPadding);
                if (message.imageBottomPadding != null && Object.hasOwnProperty.call(message, "imageBottomPadding"))
                    writer.uint32(/* id 8, wireType 1 =*/65).double(message.imageBottomPadding);
                if (message.imageTrailingPadding != null && Object.hasOwnProperty.call(message, "imageTrailingPadding"))
                    writer.uint32(/* id 9, wireType 1 =*/73).double(message.imageTrailingPadding);
                return writer;
            };

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

            /**
             * Decodes a AIRichResponseLatexExpression message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseLatexExpression.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.latexExpression = reader.string();
                            break;
                        }
                    case 2: {
                            message.url = reader.string();
                            break;
                        }
                    case 3: {
                            message.width = reader.double();
                            break;
                        }
                    case 4: {
                            message.height = reader.double();
                            break;
                        }
                    case 5: {
                            message.fontHeight = reader.double();
                            break;
                        }
                    case 6: {
                            message.imageTopPadding = reader.double();
                            break;
                        }
                    case 7: {
                            message.imageLeadingPadding = reader.double();
                            break;
                        }
                    case 8: {
                            message.imageBottomPadding = reader.double();
                            break;
                        }
                    case 9: {
                            message.imageTrailingPadding = reader.double();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

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

            /**
             * Verifies a AIRichResponseLatexExpression message.
             * @function verify
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseLatexExpression.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.latexExpression != null && message.hasOwnProperty("latexExpression")) {
                    properties._latexExpression = 1;
                    if (!$util.isString(message.latexExpression))
                        return "latexExpression: string expected";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    properties._width = 1;
                    if (typeof message.width !== "number")
                        return "width: number expected";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    properties._height = 1;
                    if (typeof message.height !== "number")
                        return "height: number expected";
                }
                if (message.fontHeight != null && message.hasOwnProperty("fontHeight")) {
                    properties._fontHeight = 1;
                    if (typeof message.fontHeight !== "number")
                        return "fontHeight: number expected";
                }
                if (message.imageTopPadding != null && message.hasOwnProperty("imageTopPadding")) {
                    properties._imageTopPadding = 1;
                    if (typeof message.imageTopPadding !== "number")
                        return "imageTopPadding: number expected";
                }
                if (message.imageLeadingPadding != null && message.hasOwnProperty("imageLeadingPadding")) {
                    properties._imageLeadingPadding = 1;
                    if (typeof message.imageLeadingPadding !== "number")
                        return "imageLeadingPadding: number expected";
                }
                if (message.imageBottomPadding != null && message.hasOwnProperty("imageBottomPadding")) {
                    properties._imageBottomPadding = 1;
                    if (typeof message.imageBottomPadding !== "number")
                        return "imageBottomPadding: number expected";
                }
                if (message.imageTrailingPadding != null && message.hasOwnProperty("imageTrailingPadding")) {
                    properties._imageTrailingPadding = 1;
                    if (typeof message.imageTrailingPadding !== "number")
                        return "imageTrailingPadding: number expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseLatexExpression message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression
             */
            AIRichResponseLatexExpression.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression)
                    return object;
                var message = new $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression();
                if (object.latexExpression != null)
                    message.latexExpression = String(object.latexExpression);
                if (object.url != null)
                    message.url = String(object.url);
                if (object.width != null)
                    message.width = Number(object.width);
                if (object.height != null)
                    message.height = Number(object.height);
                if (object.fontHeight != null)
                    message.fontHeight = Number(object.fontHeight);
                if (object.imageTopPadding != null)
                    message.imageTopPadding = Number(object.imageTopPadding);
                if (object.imageLeadingPadding != null)
                    message.imageLeadingPadding = Number(object.imageLeadingPadding);
                if (object.imageBottomPadding != null)
                    message.imageBottomPadding = Number(object.imageBottomPadding);
                if (object.imageTrailingPadding != null)
                    message.imageTrailingPadding = Number(object.imageTrailingPadding);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseLatexExpression message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} message AIRichResponseLatexExpression
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseLatexExpression.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.latexExpression != null && message.hasOwnProperty("latexExpression")) {
                    object.latexExpression = message.latexExpression;
                    if (options.oneofs)
                        object._latexExpression = "latexExpression";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width;
                    if (options.oneofs)
                        object._width = "width";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height;
                    if (options.oneofs)
                        object._height = "height";
                }
                if (message.fontHeight != null && message.hasOwnProperty("fontHeight")) {
                    object.fontHeight = options.json && !isFinite(message.fontHeight) ? String(message.fontHeight) : message.fontHeight;
                    if (options.oneofs)
                        object._fontHeight = "fontHeight";
                }
                if (message.imageTopPadding != null && message.hasOwnProperty("imageTopPadding")) {
                    object.imageTopPadding = options.json && !isFinite(message.imageTopPadding) ? String(message.imageTopPadding) : message.imageTopPadding;
                    if (options.oneofs)
                        object._imageTopPadding = "imageTopPadding";
                }
                if (message.imageLeadingPadding != null && message.hasOwnProperty("imageLeadingPadding")) {
                    object.imageLeadingPadding = options.json && !isFinite(message.imageLeadingPadding) ? String(message.imageLeadingPadding) : message.imageLeadingPadding;
                    if (options.oneofs)
                        object._imageLeadingPadding = "imageLeadingPadding";
                }
                if (message.imageBottomPadding != null && message.hasOwnProperty("imageBottomPadding")) {
                    object.imageBottomPadding = options.json && !isFinite(message.imageBottomPadding) ? String(message.imageBottomPadding) : message.imageBottomPadding;
                    if (options.oneofs)
                        object._imageBottomPadding = "imageBottomPadding";
                }
                if (message.imageTrailingPadding != null && message.hasOwnProperty("imageTrailingPadding")) {
                    object.imageTrailingPadding = options.json && !isFinite(message.imageTrailingPadding) ? String(message.imageTrailingPadding) : message.imageTrailingPadding;
                    if (options.oneofs)
                        object._imageTrailingPadding = "imageTrailingPadding";
                }
                return object;
            };

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

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

            return AIRichResponseLatexExpression;
        })();

        return AIRichResponseLatexMetadata;
    })();

    AICommon.AIRichResponseUnifiedResponse = (function() {

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

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

        /**
         * AIRichResponseUnifiedResponse data.
         * @member {Uint8Array|null|undefined} data
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @instance
         */
        AIRichResponseUnifiedResponse.prototype.data = null;

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

        /**
         * AIRichResponseUnifiedResponse _data.
         * @member {"data"|undefined} _data
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @instance
         */
        Object.defineProperty(AIRichResponseUnifiedResponse.prototype, "_data", {
            get: $util.oneOfGetter($oneOfFields = ["data"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

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

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

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

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

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

        return AIRichResponseUnifiedResponse;
    })();

    AICommon.AIRichResponseDynamicMetadata = (function() {

        /**
         * Properties of a AIRichResponseDynamicMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseDynamicMetadata
         * @property {AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null} [type] AIRichResponseDynamicMetadata type
         * @property {number|Long|null} [version] AIRichResponseDynamicMetadata version
         * @property {string|null} [url] AIRichResponseDynamicMetadata url
         * @property {number|null} [loopCount] AIRichResponseDynamicMetadata loopCount
         */

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

        /**
         * AIRichResponseDynamicMetadata type.
         * @member {AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null|undefined} type
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.type = null;

        /**
         * AIRichResponseDynamicMetadata version.
         * @member {number|Long|null|undefined} version
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.version = null;

        /**
         * AIRichResponseDynamicMetadata url.
         * @member {string|null|undefined} url
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.url = null;

        /**
         * AIRichResponseDynamicMetadata loopCount.
         * @member {number|null|undefined} loopCount
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.loopCount = null;

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

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

        /**
         * AIRichResponseDynamicMetadata _version.
         * @member {"version"|undefined} _version
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_version", {
            get: $util.oneOfGetter($oneOfFields = ["version"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseDynamicMetadata _url.
         * @member {"url"|undefined} _url
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_url", {
            get: $util.oneOfGetter($oneOfFields = ["url"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseDynamicMetadata _loopCount.
         * @member {"loopCount"|undefined} _loopCount
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_loopCount", {
            get: $util.oneOfGetter($oneOfFields = ["loopCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified AIRichResponseDynamicMetadata message. Does not implicitly {@link AICommon.AIRichResponseDynamicMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {AICommon.IAIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseDynamicMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version);
            if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.url);
            if (message.loopCount != null && Object.hasOwnProperty.call(message, "loopCount"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.loopCount);
            return writer;
        };

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

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

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

        /**
         * Verifies a AIRichResponseDynamicMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseDynamicMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.version != null && message.hasOwnProperty("version")) {
                properties._version = 1;
                if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
                    return "version: integer|Long expected";
            }
            if (message.url != null && message.hasOwnProperty("url")) {
                properties._url = 1;
                if (!$util.isString(message.url))
                    return "url: string expected";
            }
            if (message.loopCount != null && message.hasOwnProperty("loopCount")) {
                properties._loopCount = 1;
                if (!$util.isInteger(message.loopCount))
                    return "loopCount: integer expected";
            }
            return null;
        };

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

        /**
         * Creates a plain object from a AIRichResponseDynamicMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {AICommon.AIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseDynamicMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] === undefined ? message.type : $root.AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            if (message.version != null && message.hasOwnProperty("version")) {
                if (typeof message.version === "number")
                    object.version = options.longs === String ? String(message.version) : message.version;
                else
                    object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version;
                if (options.oneofs)
                    object._version = "version";
            }
            if (message.url != null && message.hasOwnProperty("url")) {
                object.url = message.url;
                if (options.oneofs)
                    object._url = "url";
            }
            if (message.loopCount != null && message.hasOwnProperty("loopCount")) {
                object.loopCount = message.loopCount;
                if (options.oneofs)
                    object._loopCount = "loopCount";
            }
            return object;
        };

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

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

        /**
         * AIRichResponseDynamicMetadataType enum.
         * @name AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType
         * @enum {number}
         * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN value
         * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE=1 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE value
         * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF=2 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF value
         */
        AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN"] = 0;
            values[valuesById[1] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE"] = 1;
            values[valuesById[2] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF"] = 2;
            return values;
        })();

        return AIRichResponseDynamicMetadata;
    })();

    AICommon.AIRichResponseTableMetadata = (function() {

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

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

        /**
         * AIRichResponseTableMetadata rows.
         * @member {Array.<AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow>} rows
         * @memberof AICommon.AIRichResponseTableMetadata
         * @instance
         */
        AIRichResponseTableMetadata.prototype.rows = $util.emptyArray;

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

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

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

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

        /**
         * Encodes the specified AIRichResponseTableMetadata message. Does not implicitly {@link AICommon.AIRichResponseTableMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {AICommon.IAIRichResponseTableMetadata} message AIRichResponseTableMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseTableMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.rows != null && message.rows.length)
                for (var i = 0; i < message.rows.length; ++i)
                    $root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.title);
            return writer;
        };

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

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

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

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

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

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

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

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

        AIRichResponseTableMetadata.AIRichResponseTableRow = (function() {

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

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

            /**
             * AIRichResponseTableRow items.
             * @member {Array.<string>} items
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             */
            AIRichResponseTableRow.prototype.items = $util.emptyArray;

            /**
             * AIRichResponseTableRow isHeading.
             * @member {boolean|null|undefined} isHeading
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             */
            AIRichResponseTableRow.prototype.isHeading = null;

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

            /**
             * AIRichResponseTableRow _isHeading.
             * @member {"isHeading"|undefined} _isHeading
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             */
            Object.defineProperty(AIRichResponseTableRow.prototype, "_isHeading", {
                get: $util.oneOfGetter($oneOfFields = ["isHeading"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified AIRichResponseTableRow message. Does not implicitly {@link AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow} message AIRichResponseTableRow message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseTableRow.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.items != null && message.items.length)
                    for (var i = 0; i < message.items.length; ++i)
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]);
                if (message.isHeading != null && Object.hasOwnProperty.call(message, "isHeading"))
                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isHeading);
                return writer;
            };

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

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

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

            /**
             * Verifies a AIRichResponseTableRow message.
             * @function verify
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseTableRow.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.items != null && message.hasOwnProperty("items")) {
                    if (!Array.isArray(message.items))
                        return "items: array expected";
                    for (var i = 0; i < message.items.length; ++i)
                        if (!$util.isString(message.items[i]))
                            return "items: string[] expected";
                }
                if (message.isHeading != null && message.hasOwnProperty("isHeading")) {
                    properties._isHeading = 1;
                    if (typeof message.isHeading !== "boolean")
                        return "isHeading: boolean expected";
                }
                return null;
            };

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

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

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

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

            return AIRichResponseTableRow;
        })();

        return AIRichResponseTableMetadata;
    })();

    AICommon.AIRichResponseCodeMetadata = (function() {

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

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

        /**
         * AIRichResponseCodeMetadata codeLanguage.
         * @member {string|null|undefined} codeLanguage
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         */
        AIRichResponseCodeMetadata.prototype.codeLanguage = null;

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

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

        /**
         * AIRichResponseCodeMetadata _codeLanguage.
         * @member {"codeLanguage"|undefined} _codeLanguage
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseCodeMetadata.prototype, "_codeLanguage", {
            get: $util.oneOfGetter($oneOfFields = ["codeLanguage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified AIRichResponseCodeMetadata message. Does not implicitly {@link AICommon.AIRichResponseCodeMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {AICommon.IAIRichResponseCodeMetadata} message AIRichResponseCodeMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseCodeMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.codeLanguage != null && Object.hasOwnProperty.call(message, "codeLanguage"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.codeLanguage);
            if (message.codeBlocks != null && message.codeBlocks.length)
                for (var i = 0; i < message.codeBlocks.length; ++i)
                    $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.encode(message.codeBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        AIRichResponseCodeMetadata.AIRichResponseCodeBlock = (function() {

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

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

            /**
             * AIRichResponseCodeBlock highlightType.
             * @member {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null|undefined} highlightType
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            AIRichResponseCodeBlock.prototype.highlightType = null;

            /**
             * AIRichResponseCodeBlock codeContent.
             * @member {string|null|undefined} codeContent
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            AIRichResponseCodeBlock.prototype.codeContent = null;

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

            /**
             * AIRichResponseCodeBlock _highlightType.
             * @member {"highlightType"|undefined} _highlightType
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            Object.defineProperty(AIRichResponseCodeBlock.prototype, "_highlightType", {
                get: $util.oneOfGetter($oneOfFields = ["highlightType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseCodeBlock _codeContent.
             * @member {"codeContent"|undefined} _codeContent
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            Object.defineProperty(AIRichResponseCodeBlock.prototype, "_codeContent", {
                get: $util.oneOfGetter($oneOfFields = ["codeContent"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

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

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

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

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

            /**
             * Verifies a AIRichResponseCodeBlock message.
             * @function verify
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseCodeBlock.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.highlightType != null && message.hasOwnProperty("highlightType")) {
                    properties._highlightType = 1;
                    switch (message.highlightType) {
                    default:
                        return "highlightType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (message.codeContent != null && message.hasOwnProperty("codeContent")) {
                    properties._codeContent = 1;
                    if (!$util.isString(message.codeContent))
                        return "codeContent: string expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseCodeBlock message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
             */
            AIRichResponseCodeBlock.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock)
                    return object;
                var message = new $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock();
                switch (object.highlightType) {
                default:
                    if (typeof object.highlightType === "number") {
                        message.highlightType = object.highlightType;
                        break;
                    }
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT":
                case 0:
                    message.highlightType = 0;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD":
                case 1:
                    message.highlightType = 1;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD":
                case 2:
                    message.highlightType = 2;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING":
                case 3:
                    message.highlightType = 3;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER":
                case 4:
                    message.highlightType = 4;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT":
                case 5:
                    message.highlightType = 5;
                    break;
                }
                if (object.codeContent != null)
                    message.codeContent = String(object.codeContent);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseCodeBlock message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} message AIRichResponseCodeBlock
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseCodeBlock.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.highlightType != null && message.hasOwnProperty("highlightType")) {
                    object.highlightType = options.enums === String ? $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] === undefined ? message.highlightType : $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] : message.highlightType;
                    if (options.oneofs)
                        object._highlightType = "highlightType";
                }
                if (message.codeContent != null && message.hasOwnProperty("codeContent")) {
                    object.codeContent = message.codeContent;
                    if (options.oneofs)
                        object._codeContent = "codeContent";
                }
                return object;
            };

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

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

            return AIRichResponseCodeBlock;
        })();

        /**
         * AIRichResponseCodeHighlightType enum.
         * @name AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType
         * @enum {number}
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT=0 AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD=1 AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD=2 AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING=3 AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER=4 AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT=5 AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT value
         */
        AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT"] = 0;
            values[valuesById[1] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD"] = 1;
            values[valuesById[2] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD"] = 2;
            values[valuesById[3] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING"] = 3;
            values[valuesById[4] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER"] = 4;
            values[valuesById[5] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT"] = 5;
            return values;
        })();

        return AIRichResponseCodeMetadata;
    })();

    AICommon.AIRichResponseInlineImageMetadata = (function() {

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

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

        /**
         * AIRichResponseInlineImageMetadata imageUrl.
         * @member {AICommon.IAIRichResponseImageURL|null|undefined} imageUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.imageUrl = null;

        /**
         * AIRichResponseInlineImageMetadata imageText.
         * @member {string|null|undefined} imageText
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.imageText = null;

        /**
         * AIRichResponseInlineImageMetadata alignment.
         * @member {AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null|undefined} alignment
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.alignment = null;

        /**
         * AIRichResponseInlineImageMetadata tapLinkUrl.
         * @member {string|null|undefined} tapLinkUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = null;

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

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

        /**
         * AIRichResponseInlineImageMetadata _imageText.
         * @member {"imageText"|undefined} _imageText
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageText", {
            get: $util.oneOfGetter($oneOfFields = ["imageText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseInlineImageMetadata _alignment.
         * @member {"alignment"|undefined} _alignment
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_alignment", {
            get: $util.oneOfGetter($oneOfFields = ["alignment"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseInlineImageMetadata _tapLinkUrl.
         * @member {"tapLinkUrl"|undefined} _tapLinkUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_tapLinkUrl", {
            get: $util.oneOfGetter($oneOfFields = ["tapLinkUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified AIRichResponseInlineImageMetadata message. Does not implicitly {@link AICommon.AIRichResponseInlineImageMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseInlineImageMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.imageUrl != null && Object.hasOwnProperty.call(message, "imageUrl"))
                $root.AICommon.AIRichResponseImageURL.encode(message.imageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.imageText != null && Object.hasOwnProperty.call(message, "imageText"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageText);
            if (message.alignment != null && Object.hasOwnProperty.call(message, "alignment"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.alignment);
            if (message.tapLinkUrl != null && Object.hasOwnProperty.call(message, "tapLinkUrl"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.tapLinkUrl);
            return writer;
        };

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

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

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

        /**
         * Verifies a AIRichResponseInlineImageMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseInlineImageMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
                properties._imageUrl = 1;
                {
                    var error = $root.AICommon.AIRichResponseImageURL.verify(message.imageUrl);
                    if (error)
                        return "imageUrl." + error;
                }
            }
            if (message.imageText != null && message.hasOwnProperty("imageText")) {
                properties._imageText = 1;
                if (!$util.isString(message.imageText))
                    return "imageText: string expected";
            }
            if (message.alignment != null && message.hasOwnProperty("alignment")) {
                properties._alignment = 1;
                switch (message.alignment) {
                default:
                    return "alignment: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) {
                properties._tapLinkUrl = 1;
                if (!$util.isString(message.tapLinkUrl))
                    return "tapLinkUrl: string expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseInlineImageMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
         */
        AIRichResponseInlineImageMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseInlineImageMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseInlineImageMetadata();
            if (object.imageUrl != null) {
                if (typeof object.imageUrl !== "object")
                    throw TypeError(".AICommon.AIRichResponseInlineImageMetadata.imageUrl: object expected");
                message.imageUrl = $root.AICommon.AIRichResponseImageURL.fromObject(object.imageUrl);
            }
            if (object.imageText != null)
                message.imageText = String(object.imageText);
            switch (object.alignment) {
            default:
                if (typeof object.alignment === "number") {
                    message.alignment = object.alignment;
                    break;
                }
                break;
            case "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED":
            case 0:
                message.alignment = 0;
                break;
            case "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED":
            case 1:
                message.alignment = 1;
                break;
            case "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED":
            case 2:
                message.alignment = 2;
                break;
            }
            if (object.tapLinkUrl != null)
                message.tapLinkUrl = String(object.tapLinkUrl);
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseInlineImageMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {AICommon.AIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseInlineImageMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
                object.imageUrl = $root.AICommon.AIRichResponseImageURL.toObject(message.imageUrl, options);
                if (options.oneofs)
                    object._imageUrl = "imageUrl";
            }
            if (message.imageText != null && message.hasOwnProperty("imageText")) {
                object.imageText = message.imageText;
                if (options.oneofs)
                    object._imageText = "imageText";
            }
            if (message.alignment != null && message.hasOwnProperty("alignment")) {
                object.alignment = options.enums === String ? $root.AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] === undefined ? message.alignment : $root.AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] : message.alignment;
                if (options.oneofs)
                    object._alignment = "alignment";
            }
            if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) {
                object.tapLinkUrl = message.tapLinkUrl;
                if (options.oneofs)
                    object._tapLinkUrl = "tapLinkUrl";
            }
            return object;
        };

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

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

        /**
         * AIRichResponseImageAlignment enum.
         * @name AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment
         * @enum {number}
         * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED=0 AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED value
         * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED=1 AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED value
         * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED=2 AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED value
         */
        AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED"] = 0;
            values[valuesById[1] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED"] = 1;
            values[valuesById[2] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED"] = 2;
            return values;
        })();

        return AIRichResponseInlineImageMetadata;
    })();

    AICommon.AIRichResponseGridImageMetadata = (function() {

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

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

        /**
         * AIRichResponseGridImageMetadata gridImageUrl.
         * @member {AICommon.IAIRichResponseImageURL|null|undefined} gridImageUrl
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @instance
         */
        AIRichResponseGridImageMetadata.prototype.gridImageUrl = null;

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

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

        /**
         * AIRichResponseGridImageMetadata _gridImageUrl.
         * @member {"gridImageUrl"|undefined} _gridImageUrl
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseGridImageMetadata.prototype, "_gridImageUrl", {
            get: $util.oneOfGetter($oneOfFields = ["gridImageUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified AIRichResponseGridImageMetadata message. Does not implicitly {@link AICommon.AIRichResponseGridImageMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseGridImageMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.gridImageUrl != null && Object.hasOwnProperty.call(message, "gridImageUrl"))
                $root.AICommon.AIRichResponseImageURL.encode(message.gridImageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.imageUrls != null && message.imageUrls.length)
                for (var i = 0; i < message.imageUrls.length; ++i)
                    $root.AICommon.AIRichResponseImageURL.encode(message.imageUrls[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        return AIRichResponseGridImageMetadata;
    })();

    AICommon.AIRichResponseImageURL = (function() {

        /**
         * Properties of a AIRichResponseImageURL.
         * @memberof AICommon
         * @interface IAIRichResponseImageURL
         * @property {string|null} [imagePreviewUrl] AIRichResponseImageURL imagePreviewUrl
         * @property {string|null} [imageHighResUrl] AIRichResponseImageURL imageHighResUrl
         * @property {string|null} [sourceUrl] AIRichResponseImageURL sourceUrl
         */

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

        /**
         * AIRichResponseImageURL imagePreviewUrl.
         * @member {string|null|undefined} imagePreviewUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.imagePreviewUrl = null;

        /**
         * AIRichResponseImageURL imageHighResUrl.
         * @member {string|null|undefined} imageHighResUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.imageHighResUrl = null;

        /**
         * AIRichResponseImageURL sourceUrl.
         * @member {string|null|undefined} sourceUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.sourceUrl = null;

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

        /**
         * AIRichResponseImageURL _imagePreviewUrl.
         * @member {"imagePreviewUrl"|undefined} _imagePreviewUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        Object.defineProperty(AIRichResponseImageURL.prototype, "_imagePreviewUrl", {
            get: $util.oneOfGetter($oneOfFields = ["imagePreviewUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseImageURL _imageHighResUrl.
         * @member {"imageHighResUrl"|undefined} _imageHighResUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        Object.defineProperty(AIRichResponseImageURL.prototype, "_imageHighResUrl", {
            get: $util.oneOfGetter($oneOfFields = ["imageHighResUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseImageURL _sourceUrl.
         * @member {"sourceUrl"|undefined} _sourceUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        Object.defineProperty(AIRichResponseImageURL.prototype, "_sourceUrl", {
            get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

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

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

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

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

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

        return AIRichResponseImageURL;
    })();

    AICommon.ForwardedAIBotMessageInfo = (function() {

        /**
         * Properties of a ForwardedAIBotMessageInfo.
         * @memberof AICommon
         * @interface IForwardedAIBotMessageInfo
         * @property {string|null} [botName] ForwardedAIBotMessageInfo botName
         * @property {string|null} [botJid] ForwardedAIBotMessageInfo botJid
         * @property {string|null} [creatorName] ForwardedAIBotMessageInfo creatorName
         */

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

        /**
         * ForwardedAIBotMessageInfo botName.
         * @member {string|null|undefined} botName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.botName = null;

        /**
         * ForwardedAIBotMessageInfo botJid.
         * @member {string|null|undefined} botJid
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.botJid = null;

        /**
         * ForwardedAIBotMessageInfo creatorName.
         * @member {string|null|undefined} creatorName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.creatorName = null;

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

        /**
         * ForwardedAIBotMessageInfo _botName.
         * @member {"botName"|undefined} _botName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botName", {
            get: $util.oneOfGetter($oneOfFields = ["botName"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ForwardedAIBotMessageInfo _botJid.
         * @member {"botJid"|undefined} _botJid
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botJid", {
            get: $util.oneOfGetter($oneOfFields = ["botJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ForwardedAIBotMessageInfo _creatorName.
         * @member {"creatorName"|undefined} _creatorName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_creatorName", {
            get: $util.oneOfGetter($oneOfFields = ["creatorName"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

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

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

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

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

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

        return ForwardedAIBotMessageInfo;
    })();

    AICommon.BotFeedbackMessage = (function() {

        /**
         * Properties of a BotFeedbackMessage.
         * @memberof AICommon
         * @interface IBotFeedbackMessage
         * @property {Protocol.IMessageKey|null} [messageKey] BotFeedbackMessage messageKey
         * @property {AICommon.BotFeedbackMessage.BotFeedbackKind|null} [kind] BotFeedbackMessage kind
         * @property {string|null} [text] BotFeedbackMessage text
         * @property {number|Long|null} [kindNegative] BotFeedbackMessage kindNegative
         * @property {number|Long|null} [kindPositive] BotFeedbackMessage kindPositive
         * @property {AICommon.BotFeedbackMessage.ReportKind|null} [kindReport] BotFeedbackMessage kindReport
         * @property {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata|null} [sideBySideSurveyMetadata] BotFeedbackMessage sideBySideSurveyMetadata
         */

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

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

        /**
         * BotFeedbackMessage kind.
         * @member {AICommon.BotFeedbackMessage.BotFeedbackKind|null|undefined} kind
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kind = null;

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

        /**
         * BotFeedbackMessage kindNegative.
         * @member {number|Long|null|undefined} kindNegative
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindNegative = null;

        /**
         * BotFeedbackMessage kindPositive.
         * @member {number|Long|null|undefined} kindPositive
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindPositive = null;

        /**
         * BotFeedbackMessage kindReport.
         * @member {AICommon.BotFeedbackMessage.ReportKind|null|undefined} kindReport
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindReport = null;

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

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

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

        /**
         * BotFeedbackMessage _kind.
         * @member {"kind"|undefined} _kind
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kind", {
            get: $util.oneOfGetter($oneOfFields = ["kind"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * BotFeedbackMessage _kindNegative.
         * @member {"kindNegative"|undefined} _kindNegative
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kindNegative", {
            get: $util.oneOfGetter($oneOfFields = ["kindNegative"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _kindPositive.
         * @member {"kindPositive"|undefined} _kindPositive
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kindPositive", {
            get: $util.oneOfGetter($oneOfFields = ["kindPositive"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _kindReport.
         * @member {"kindReport"|undefined} _kindReport
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kindReport", {
            get: $util.oneOfGetter($oneOfFields = ["kindReport"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _sideBySideSurveyMetadata.
         * @member {"sideBySideSurveyMetadata"|undefined} _sideBySideSurveyMetadata
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_sideBySideSurveyMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["sideBySideSurveyMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotFeedbackMessage message. Does not implicitly {@link AICommon.BotFeedbackMessage.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {AICommon.IBotFeedbackMessage} message BotFeedbackMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotFeedbackMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageKey != null && Object.hasOwnProperty.call(message, "messageKey"))
                $root.Protocol.MessageKey.encode(message.messageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind);
            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.text);
            if (message.kindNegative != null && Object.hasOwnProperty.call(message, "kindNegative"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.kindNegative);
            if (message.kindPositive != null && Object.hasOwnProperty.call(message, "kindPositive"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.kindPositive);
            if (message.kindReport != null && Object.hasOwnProperty.call(message, "kindReport"))
                writer.uint32(/* id 6, wireType 0 =*/48).int32(message.kindReport);
            if (message.sideBySideSurveyMetadata != null && Object.hasOwnProperty.call(message, "sideBySideSurveyMetadata"))
                $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.encode(message.sideBySideSurveyMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            return writer;
        };

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

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

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

        /**
         * Verifies a BotFeedbackMessage message.
         * @function verify
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotFeedbackMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                properties._messageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.messageKey);
                    if (error)
                        return "messageKey." + error;
                }
            }
            if (message.kind != null && message.hasOwnProperty("kind")) {
                properties._kind = 1;
                switch (message.kind) {
                default:
                    return "kind: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                    break;
                }
            }
            if (message.text != null && message.hasOwnProperty("text")) {
                properties._text = 1;
                if (!$util.isString(message.text))
                    return "text: string expected";
            }
            if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) {
                properties._kindNegative = 1;
                if (!$util.isInteger(message.kindNegative) && !(message.kindNegative && $util.isInteger(message.kindNegative.low) && $util.isInteger(message.kindNegative.high)))
                    return "kindNegative: integer|Long expected";
            }
            if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) {
                properties._kindPositive = 1;
                if (!$util.isInteger(message.kindPositive) && !(message.kindPositive && $util.isInteger(message.kindPositive.low) && $util.isInteger(message.kindPositive.high)))
                    return "kindPositive: integer|Long expected";
            }
            if (message.kindReport != null && message.hasOwnProperty("kindReport")) {
                properties._kindReport = 1;
                switch (message.kindReport) {
                default:
                    return "kindReport: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.sideBySideSurveyMetadata != null && message.hasOwnProperty("sideBySideSurveyMetadata")) {
                properties._sideBySideSurveyMetadata = 1;
                {
                    var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.verify(message.sideBySideSurveyMetadata);
                    if (error)
                        return "sideBySideSurveyMetadata." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotFeedbackMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotFeedbackMessage} BotFeedbackMessage
         */
        BotFeedbackMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotFeedbackMessage)
                return object;
            var message = new $root.AICommon.BotFeedbackMessage();
            if (object.messageKey != null) {
                if (typeof object.messageKey !== "object")
                    throw TypeError(".AICommon.BotFeedbackMessage.messageKey: object expected");
                message.messageKey = $root.Protocol.MessageKey.fromObject(object.messageKey);
            }
            switch (object.kind) {
            default:
                if (typeof object.kind === "number") {
                    message.kind = object.kind;
                    break;
                }
                break;
            case "BOT_FEEDBACK_POSITIVE":
            case 0:
                message.kind = 0;
                break;
            case "BOT_FEEDBACK_NEGATIVE_GENERIC":
            case 1:
                message.kind = 1;
                break;
            case "BOT_FEEDBACK_NEGATIVE_HELPFUL":
            case 2:
                message.kind = 2;
                break;
            case "BOT_FEEDBACK_NEGATIVE_INTERESTING":
            case 3:
                message.kind = 3;
                break;
            case "BOT_FEEDBACK_NEGATIVE_ACCURATE":
            case 4:
                message.kind = 4;
                break;
            case "BOT_FEEDBACK_NEGATIVE_SAFE":
            case 5:
                message.kind = 5;
                break;
            case "BOT_FEEDBACK_NEGATIVE_OTHER":
            case 6:
                message.kind = 6;
                break;
            case "BOT_FEEDBACK_NEGATIVE_REFUSED":
            case 7:
                message.kind = 7;
                break;
            case "BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING":
            case 8:
                message.kind = 8;
                break;
            case "BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT":
            case 9:
                message.kind = 9;
                break;
            case "BOT_FEEDBACK_NEGATIVE_PERSONALIZED":
            case 10:
                message.kind = 10;
                break;
            case "BOT_FEEDBACK_NEGATIVE_CLARITY":
            case 11:
                message.kind = 11;
                break;
            case "BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON":
            case 12:
                message.kind = 12;
                break;
            case "BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY":
            case 13:
                message.kind = 13;
                break;
            case "BOT_FEEDBACK_NEGATIVE":
            case 14:
                message.kind = 14;
                break;
            }
            if (object.text != null)
                message.text = String(object.text);
            if (object.kindNegative != null)
                if ($util.Long)
                    (message.kindNegative = $util.Long.fromValue(object.kindNegative)).unsigned = true;
                else if (typeof object.kindNegative === "string")
                    message.kindNegative = parseInt(object.kindNegative, 10);
                else if (typeof object.kindNegative === "number")
                    message.kindNegative = object.kindNegative;
                else if (typeof object.kindNegative === "object")
                    message.kindNegative = new $util.LongBits(object.kindNegative.low >>> 0, object.kindNegative.high >>> 0).toNumber(true);
            if (object.kindPositive != null)
                if ($util.Long)
                    (message.kindPositive = $util.Long.fromValue(object.kindPositive)).unsigned = true;
                else if (typeof object.kindPositive === "string")
                    message.kindPositive = parseInt(object.kindPositive, 10);
                else if (typeof object.kindPositive === "number")
                    message.kindPositive = object.kindPositive;
                else if (typeof object.kindPositive === "object")
                    message.kindPositive = new $util.LongBits(object.kindPositive.low >>> 0, object.kindPositive.high >>> 0).toNumber(true);
            switch (object.kindReport) {
            default:
                if (typeof object.kindReport === "number") {
                    message.kindReport = object.kindReport;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.kindReport = 0;
                break;
            case "GENERIC":
            case 1:
                message.kindReport = 1;
                break;
            }
            if (object.sideBySideSurveyMetadata != null) {
                if (typeof object.sideBySideSurveyMetadata !== "object")
                    throw TypeError(".AICommon.BotFeedbackMessage.sideBySideSurveyMetadata: object expected");
                message.sideBySideSurveyMetadata = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.fromObject(object.sideBySideSurveyMetadata);
            }
            return message;
        };

        /**
         * Creates a plain object from a BotFeedbackMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {AICommon.BotFeedbackMessage} message BotFeedbackMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotFeedbackMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
                if (options.oneofs)
                    object._messageKey = "messageKey";
            }
            if (message.kind != null && message.hasOwnProperty("kind")) {
                object.kind = options.enums === String ? $root.AICommon.BotFeedbackMessage.BotFeedbackKind[message.kind] === undefined ? message.kind : $root.AICommon.BotFeedbackMessage.BotFeedbackKind[message.kind] : message.kind;
                if (options.oneofs)
                    object._kind = "kind";
            }
            if (message.text != null && message.hasOwnProperty("text")) {
                object.text = message.text;
                if (options.oneofs)
                    object._text = "text";
            }
            if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) {
                if (typeof message.kindNegative === "number")
                    object.kindNegative = options.longs === String ? String(message.kindNegative) : message.kindNegative;
                else
                    object.kindNegative = options.longs === String ? $util.Long.prototype.toString.call(message.kindNegative) : options.longs === Number ? new $util.LongBits(message.kindNegative.low >>> 0, message.kindNegative.high >>> 0).toNumber(true) : message.kindNegative;
                if (options.oneofs)
                    object._kindNegative = "kindNegative";
            }
            if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) {
                if (typeof message.kindPositive === "number")
                    object.kindPositive = options.longs === String ? String(message.kindPositive) : message.kindPositive;
                else
                    object.kindPositive = options.longs === String ? $util.Long.prototype.toString.call(message.kindPositive) : options.longs === Number ? new $util.LongBits(message.kindPositive.low >>> 0, message.kindPositive.high >>> 0).toNumber(true) : message.kindPositive;
                if (options.oneofs)
                    object._kindPositive = "kindPositive";
            }
            if (message.kindReport != null && message.hasOwnProperty("kindReport")) {
                object.kindReport = options.enums === String ? $root.AICommon.BotFeedbackMessage.ReportKind[message.kindReport] === undefined ? message.kindReport : $root.AICommon.BotFeedbackMessage.ReportKind[message.kindReport] : message.kindReport;
                if (options.oneofs)
                    object._kindReport = "kindReport";
            }
            if (message.sideBySideSurveyMetadata != null && message.hasOwnProperty("sideBySideSurveyMetadata")) {
                object.sideBySideSurveyMetadata = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.toObject(message.sideBySideSurveyMetadata, options);
                if (options.oneofs)
                    object._sideBySideSurveyMetadata = "sideBySideSurveyMetadata";
            }
            return object;
        };

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

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

        /**
         * BotFeedbackKind enum.
         * @name AICommon.BotFeedbackMessage.BotFeedbackKind
         * @enum {number}
         * @property {number} BOT_FEEDBACK_POSITIVE=0 BOT_FEEDBACK_POSITIVE value
         * @property {number} BOT_FEEDBACK_NEGATIVE_GENERIC=1 BOT_FEEDBACK_NEGATIVE_GENERIC value
         * @property {number} BOT_FEEDBACK_NEGATIVE_HELPFUL=2 BOT_FEEDBACK_NEGATIVE_HELPFUL value
         * @property {number} BOT_FEEDBACK_NEGATIVE_INTERESTING=3 BOT_FEEDBACK_NEGATIVE_INTERESTING value
         * @property {number} BOT_FEEDBACK_NEGATIVE_ACCURATE=4 BOT_FEEDBACK_NEGATIVE_ACCURATE value
         * @property {number} BOT_FEEDBACK_NEGATIVE_SAFE=5 BOT_FEEDBACK_NEGATIVE_SAFE value
         * @property {number} BOT_FEEDBACK_NEGATIVE_OTHER=6 BOT_FEEDBACK_NEGATIVE_OTHER value
         * @property {number} BOT_FEEDBACK_NEGATIVE_REFUSED=7 BOT_FEEDBACK_NEGATIVE_REFUSED value
         * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING=8 BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING value
         * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT=9 BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT value
         * @property {number} BOT_FEEDBACK_NEGATIVE_PERSONALIZED=10 BOT_FEEDBACK_NEGATIVE_PERSONALIZED value
         * @property {number} BOT_FEEDBACK_NEGATIVE_CLARITY=11 BOT_FEEDBACK_NEGATIVE_CLARITY value
         * @property {number} BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON=12 BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON value
         * @property {number} BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY=13 BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY value
         * @property {number} BOT_FEEDBACK_NEGATIVE=14 BOT_FEEDBACK_NEGATIVE value
         */
        BotFeedbackMessage.BotFeedbackKind = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "BOT_FEEDBACK_POSITIVE"] = 0;
            values[valuesById[1] = "BOT_FEEDBACK_NEGATIVE_GENERIC"] = 1;
            values[valuesById[2] = "BOT_FEEDBACK_NEGATIVE_HELPFUL"] = 2;
            values[valuesById[3] = "BOT_FEEDBACK_NEGATIVE_INTERESTING"] = 3;
            values[valuesById[4] = "BOT_FEEDBACK_NEGATIVE_ACCURATE"] = 4;
            values[valuesById[5] = "BOT_FEEDBACK_NEGATIVE_SAFE"] = 5;
            values[valuesById[6] = "BOT_FEEDBACK_NEGATIVE_OTHER"] = 6;
            values[valuesById[7] = "BOT_FEEDBACK_NEGATIVE_REFUSED"] = 7;
            values[valuesById[8] = "BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING"] = 8;
            values[valuesById[9] = "BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT"] = 9;
            values[valuesById[10] = "BOT_FEEDBACK_NEGATIVE_PERSONALIZED"] = 10;
            values[valuesById[11] = "BOT_FEEDBACK_NEGATIVE_CLARITY"] = 11;
            values[valuesById[12] = "BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON"] = 12;
            values[valuesById[13] = "BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY"] = 13;
            values[valuesById[14] = "BOT_FEEDBACK_NEGATIVE"] = 14;
            return values;
        })();

        /**
         * BotFeedbackKindMultipleNegative enum.
         * @name AICommon.BotFeedbackMessage.BotFeedbackKindMultipleNegative
         * @enum {number}
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC=1 BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL=2 BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING=4 BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE=8 BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE=16 BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER=32 BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED=64 BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING=128 BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT=256 BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT value
         */
        BotFeedbackMessage.BotFeedbackKindMultipleNegative = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC"] = 1;
            values[valuesById[2] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL"] = 2;
            values[valuesById[4] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING"] = 4;
            values[valuesById[8] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE"] = 8;
            values[valuesById[16] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE"] = 16;
            values[valuesById[32] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER"] = 32;
            values[valuesById[64] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED"] = 64;
            values[valuesById[128] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING"] = 128;
            values[valuesById[256] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT"] = 256;
            return values;
        })();

        /**
         * BotFeedbackKindMultiplePositive enum.
         * @name AICommon.BotFeedbackMessage.BotFeedbackKindMultiplePositive
         * @enum {number}
         * @property {number} BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC=1 BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC value
         */
        BotFeedbackMessage.BotFeedbackKindMultiplePositive = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC"] = 1;
            return values;
        })();

        /**
         * ReportKind enum.
         * @name AICommon.BotFeedbackMessage.ReportKind
         * @enum {number}
         * @property {number} NONE=0 NONE value
         * @property {number} GENERIC=1 GENERIC value
         */
        BotFeedbackMessage.ReportKind = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NONE"] = 0;
            values[valuesById[1] = "GENERIC"] = 1;
            return values;
        })();

        BotFeedbackMessage.SideBySideSurveyMetadata = (function() {

            /**
             * Properties of a SideBySideSurveyMetadata.
             * @memberof AICommon.BotFeedbackMessage
             * @interface ISideBySideSurveyMetadata
             * @property {string|null} [selectedRequestId] SideBySideSurveyMetadata selectedRequestId
             * @property {number|null} [surveyId] SideBySideSurveyMetadata surveyId
             * @property {string|null} [simonSessionFbid] SideBySideSurveyMetadata simonSessionFbid
             * @property {string|null} [responseOtid] SideBySideSurveyMetadata responseOtid
             * @property {string|null} [responseTimestampMsString] SideBySideSurveyMetadata responseTimestampMsString
             * @property {boolean|null} [isSelectedResponsePrimary] SideBySideSurveyMetadata isSelectedResponsePrimary
             * @property {string|null} [messageIdToEdit] SideBySideSurveyMetadata messageIdToEdit
             * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData|null} [analyticsData] SideBySideSurveyMetadata analyticsData
             */

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

            /**
             * SideBySideSurveyMetadata selectedRequestId.
             * @member {string|null|undefined} selectedRequestId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.selectedRequestId = null;

            /**
             * SideBySideSurveyMetadata surveyId.
             * @member {number|null|undefined} surveyId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.surveyId = null;

            /**
             * SideBySideSurveyMetadata simonSessionFbid.
             * @member {string|null|undefined} simonSessionFbid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.simonSessionFbid = null;

            /**
             * SideBySideSurveyMetadata responseOtid.
             * @member {string|null|undefined} responseOtid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.responseOtid = null;

            /**
             * SideBySideSurveyMetadata responseTimestampMsString.
             * @member {string|null|undefined} responseTimestampMsString
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.responseTimestampMsString = null;

            /**
             * SideBySideSurveyMetadata isSelectedResponsePrimary.
             * @member {boolean|null|undefined} isSelectedResponsePrimary
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.isSelectedResponsePrimary = null;

            /**
             * SideBySideSurveyMetadata messageIdToEdit.
             * @member {string|null|undefined} messageIdToEdit
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.messageIdToEdit = null;

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

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

            /**
             * SideBySideSurveyMetadata _selectedRequestId.
             * @member {"selectedRequestId"|undefined} _selectedRequestId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_selectedRequestId", {
                get: $util.oneOfGetter($oneOfFields = ["selectedRequestId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _surveyId.
             * @member {"surveyId"|undefined} _surveyId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_surveyId", {
                get: $util.oneOfGetter($oneOfFields = ["surveyId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _simonSessionFbid.
             * @member {"simonSessionFbid"|undefined} _simonSessionFbid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_simonSessionFbid", {
                get: $util.oneOfGetter($oneOfFields = ["simonSessionFbid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _responseOtid.
             * @member {"responseOtid"|undefined} _responseOtid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_responseOtid", {
                get: $util.oneOfGetter($oneOfFields = ["responseOtid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _responseTimestampMsString.
             * @member {"responseTimestampMsString"|undefined} _responseTimestampMsString
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_responseTimestampMsString", {
                get: $util.oneOfGetter($oneOfFields = ["responseTimestampMsString"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _isSelectedResponsePrimary.
             * @member {"isSelectedResponsePrimary"|undefined} _isSelectedResponsePrimary
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_isSelectedResponsePrimary", {
                get: $util.oneOfGetter($oneOfFields = ["isSelectedResponsePrimary"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _messageIdToEdit.
             * @member {"messageIdToEdit"|undefined} _messageIdToEdit
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_messageIdToEdit", {
                get: $util.oneOfGetter($oneOfFields = ["messageIdToEdit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _analyticsData.
             * @member {"analyticsData"|undefined} _analyticsData
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_analyticsData", {
                get: $util.oneOfGetter($oneOfFields = ["analyticsData"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified SideBySideSurveyMetadata message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata} message SideBySideSurveyMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SideBySideSurveyMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.selectedRequestId != null && Object.hasOwnProperty.call(message, "selectedRequestId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedRequestId);
                if (message.surveyId != null && Object.hasOwnProperty.call(message, "surveyId"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.surveyId);
                if (message.simonSessionFbid != null && Object.hasOwnProperty.call(message, "simonSessionFbid"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.simonSessionFbid);
                if (message.responseOtid != null && Object.hasOwnProperty.call(message, "responseOtid"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.responseOtid);
                if (message.responseTimestampMsString != null && Object.hasOwnProperty.call(message, "responseTimestampMsString"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.responseTimestampMsString);
                if (message.isSelectedResponsePrimary != null && Object.hasOwnProperty.call(message, "isSelectedResponsePrimary"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isSelectedResponsePrimary);
                if (message.messageIdToEdit != null && Object.hasOwnProperty.call(message, "messageIdToEdit"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.messageIdToEdit);
                if (message.analyticsData != null && Object.hasOwnProperty.call(message, "analyticsData"))
                    $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.encode(message.analyticsData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                return writer;
            };

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

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

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

            /**
             * Verifies a SideBySideSurveyMetadata message.
             * @function verify
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SideBySideSurveyMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.selectedRequestId != null && message.hasOwnProperty("selectedRequestId")) {
                    properties._selectedRequestId = 1;
                    if (!$util.isString(message.selectedRequestId))
                        return "selectedRequestId: string expected";
                }
                if (message.surveyId != null && message.hasOwnProperty("surveyId")) {
                    properties._surveyId = 1;
                    if (!$util.isInteger(message.surveyId))
                        return "surveyId: integer expected";
                }
                if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid")) {
                    properties._simonSessionFbid = 1;
                    if (!$util.isString(message.simonSessionFbid))
                        return "simonSessionFbid: string expected";
                }
                if (message.responseOtid != null && message.hasOwnProperty("responseOtid")) {
                    properties._responseOtid = 1;
                    if (!$util.isString(message.responseOtid))
                        return "responseOtid: string expected";
                }
                if (message.responseTimestampMsString != null && message.hasOwnProperty("responseTimestampMsString")) {
                    properties._responseTimestampMsString = 1;
                    if (!$util.isString(message.responseTimestampMsString))
                        return "responseTimestampMsString: string expected";
                }
                if (message.isSelectedResponsePrimary != null && message.hasOwnProperty("isSelectedResponsePrimary")) {
                    properties._isSelectedResponsePrimary = 1;
                    if (typeof message.isSelectedResponsePrimary !== "boolean")
                        return "isSelectedResponsePrimary: boolean expected";
                }
                if (message.messageIdToEdit != null && message.hasOwnProperty("messageIdToEdit")) {
                    properties._messageIdToEdit = 1;
                    if (!$util.isString(message.messageIdToEdit))
                        return "messageIdToEdit: string expected";
                }
                if (message.analyticsData != null && message.hasOwnProperty("analyticsData")) {
                    properties._analyticsData = 1;
                    {
                        var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.verify(message.analyticsData);
                        if (error)
                            return "analyticsData." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a SideBySideSurveyMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata} SideBySideSurveyMetadata
             */
            SideBySideSurveyMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata)
                    return object;
                var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata();
                if (object.selectedRequestId != null)
                    message.selectedRequestId = String(object.selectedRequestId);
                if (object.surveyId != null)
                    message.surveyId = object.surveyId >>> 0;
                if (object.simonSessionFbid != null)
                    message.simonSessionFbid = String(object.simonSessionFbid);
                if (object.responseOtid != null)
                    message.responseOtid = String(object.responseOtid);
                if (object.responseTimestampMsString != null)
                    message.responseTimestampMsString = String(object.responseTimestampMsString);
                if (object.isSelectedResponsePrimary != null)
                    message.isSelectedResponsePrimary = Boolean(object.isSelectedResponsePrimary);
                if (object.messageIdToEdit != null)
                    message.messageIdToEdit = String(object.messageIdToEdit);
                if (object.analyticsData != null) {
                    if (typeof object.analyticsData !== "object")
                        throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.analyticsData: object expected");
                    message.analyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.fromObject(object.analyticsData);
                }
                return message;
            };

            /**
             * Creates a plain object from a SideBySideSurveyMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata} message SideBySideSurveyMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SideBySideSurveyMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.selectedRequestId != null && message.hasOwnProperty("selectedRequestId")) {
                    object.selectedRequestId = message.selectedRequestId;
                    if (options.oneofs)
                        object._selectedRequestId = "selectedRequestId";
                }
                if (message.surveyId != null && message.hasOwnProperty("surveyId")) {
                    object.surveyId = message.surveyId;
                    if (options.oneofs)
                        object._surveyId = "surveyId";
                }
                if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid")) {
                    object.simonSessionFbid = message.simonSessionFbid;
                    if (options.oneofs)
                        object._simonSessionFbid = "simonSessionFbid";
                }
                if (message.responseOtid != null && message.hasOwnProperty("responseOtid")) {
                    object.responseOtid = message.responseOtid;
                    if (options.oneofs)
                        object._responseOtid = "responseOtid";
                }
                if (message.responseTimestampMsString != null && message.hasOwnProperty("responseTimestampMsString")) {
                    object.responseTimestampMsString = message.responseTimestampMsString;
                    if (options.oneofs)
                        object._responseTimestampMsString = "responseTimestampMsString";
                }
                if (message.isSelectedResponsePrimary != null && message.hasOwnProperty("isSelectedResponsePrimary")) {
                    object.isSelectedResponsePrimary = message.isSelectedResponsePrimary;
                    if (options.oneofs)
                        object._isSelectedResponsePrimary = "isSelectedResponsePrimary";
                }
                if (message.messageIdToEdit != null && message.hasOwnProperty("messageIdToEdit")) {
                    object.messageIdToEdit = message.messageIdToEdit;
                    if (options.oneofs)
                        object._messageIdToEdit = "messageIdToEdit";
                }
                if (message.analyticsData != null && message.hasOwnProperty("analyticsData")) {
                    object.analyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.toObject(message.analyticsData, options);
                    if (options.oneofs)
                        object._analyticsData = "analyticsData";
                }
                return object;
            };

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

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

            SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData = (function() {

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

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

                /**
                 * SideBySideSurveyAnalyticsData tessaEvent.
                 * @member {string|null|undefined} tessaEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                SideBySideSurveyAnalyticsData.prototype.tessaEvent = null;

                /**
                 * SideBySideSurveyAnalyticsData tessaSessionFbid.
                 * @member {string|null|undefined} tessaSessionFbid
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                SideBySideSurveyAnalyticsData.prototype.tessaSessionFbid = null;

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

                /**
                 * SideBySideSurveyAnalyticsData _tessaEvent.
                 * @member {"tessaEvent"|undefined} _tessaEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_tessaEvent", {
                    get: $util.oneOfGetter($oneOfFields = ["tessaEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SideBySideSurveyAnalyticsData _tessaSessionFbid.
                 * @member {"tessaSessionFbid"|undefined} _tessaSessionFbid
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_tessaSessionFbid", {
                    get: $util.oneOfGetter($oneOfFields = ["tessaSessionFbid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

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

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

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

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

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

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

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

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

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

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

                return SideBySideSurveyAnalyticsData;
            })();

            return SideBySideSurveyMetadata;
        })();

        return BotFeedbackMessage;
    })();

    AICommon.BotMetadata = (function() {

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

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

        /**
         * BotMetadata avatarMetadata.
         * @member {AICommon.IBotAvatarMetadata|null|undefined} avatarMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.avatarMetadata = null;

        /**
         * BotMetadata personaId.
         * @member {string|null|undefined} personaId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.personaId = null;

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

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

        /**
         * BotMetadata invokerJid.
         * @member {string|null|undefined} invokerJid
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.invokerJid = null;

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

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

        /**
         * BotMetadata timezone.
         * @member {string|null|undefined} timezone
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.timezone = null;

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

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

        /**
         * BotMetadata messageDisclaimerText.
         * @member {string|null|undefined} messageDisclaimerText
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.messageDisclaimerText = null;

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

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

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

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

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

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

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

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

        /**
         * BotMetadata aiConversationContext.
         * @member {Uint8Array|null|undefined} aiConversationContext
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.aiConversationContext = null;

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

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

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

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

        /**
         * BotMetadata conversationStarterPromptId.
         * @member {string|null|undefined} conversationStarterPromptId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.conversationStarterPromptId = null;

        /**
         * BotMetadata botResponseId.
         * @member {string|null|undefined} botResponseId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botResponseId = null;

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

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

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

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

        /**
         * BotMetadata botThreadInfo.
         * @member {AICommon.IAIThreadInfo|null|undefined} botThreadInfo
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botThreadInfo = null;

        /**
         * BotMetadata internalMetadata.
         * @member {Uint8Array|null|undefined} internalMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.internalMetadata = null;

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

        /**
         * BotMetadata _avatarMetadata.
         * @member {"avatarMetadata"|undefined} _avatarMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_avatarMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["avatarMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _personaId.
         * @member {"personaId"|undefined} _personaId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_personaId", {
            get: $util.oneOfGetter($oneOfFields = ["personaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _pluginMetadata.
         * @member {"pluginMetadata"|undefined} _pluginMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_pluginMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["pluginMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _suggestedPromptMetadata.
         * @member {"suggestedPromptMetadata"|undefined} _suggestedPromptMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_suggestedPromptMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["suggestedPromptMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _invokerJid.
         * @member {"invokerJid"|undefined} _invokerJid
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_invokerJid", {
            get: $util.oneOfGetter($oneOfFields = ["invokerJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _sessionMetadata.
         * @member {"sessionMetadata"|undefined} _sessionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_sessionMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["sessionMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _memuMetadata.
         * @member {"memuMetadata"|undefined} _memuMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_memuMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["memuMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _timezone.
         * @member {"timezone"|undefined} _timezone
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_timezone", {
            get: $util.oneOfGetter($oneOfFields = ["timezone"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _reminderMetadata.
         * @member {"reminderMetadata"|undefined} _reminderMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_reminderMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["reminderMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _modelMetadata.
         * @member {"modelMetadata"|undefined} _modelMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_modelMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["modelMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _messageDisclaimerText.
         * @member {"messageDisclaimerText"|undefined} _messageDisclaimerText
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_messageDisclaimerText", {
            get: $util.oneOfGetter($oneOfFields = ["messageDisclaimerText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _progressIndicatorMetadata.
         * @member {"progressIndicatorMetadata"|undefined} _progressIndicatorMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_progressIndicatorMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["progressIndicatorMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _capabilityMetadata.
         * @member {"capabilityMetadata"|undefined} _capabilityMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_capabilityMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["capabilityMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _imagineMetadata.
         * @member {"imagineMetadata"|undefined} _imagineMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_imagineMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["imagineMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _memoryMetadata.
         * @member {"memoryMetadata"|undefined} _memoryMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_memoryMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["memoryMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _renderingMetadata.
         * @member {"renderingMetadata"|undefined} _renderingMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_renderingMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["renderingMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botMetricsMetadata.
         * @member {"botMetricsMetadata"|undefined} _botMetricsMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botMetricsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botMetricsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botLinkedAccountsMetadata.
         * @member {"botLinkedAccountsMetadata"|undefined} _botLinkedAccountsMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botLinkedAccountsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botLinkedAccountsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _richResponseSourcesMetadata.
         * @member {"richResponseSourcesMetadata"|undefined} _richResponseSourcesMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_richResponseSourcesMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["richResponseSourcesMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _aiConversationContext.
         * @member {"aiConversationContext"|undefined} _aiConversationContext
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_aiConversationContext", {
            get: $util.oneOfGetter($oneOfFields = ["aiConversationContext"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botPromotionMessageMetadata.
         * @member {"botPromotionMessageMetadata"|undefined} _botPromotionMessageMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botPromotionMessageMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botPromotionMessageMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botModeSelectionMetadata.
         * @member {"botModeSelectionMetadata"|undefined} _botModeSelectionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botModeSelectionMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botModeSelectionMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botQuotaMetadata.
         * @member {"botQuotaMetadata"|undefined} _botQuotaMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botQuotaMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botQuotaMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botAgeCollectionMetadata.
         * @member {"botAgeCollectionMetadata"|undefined} _botAgeCollectionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botAgeCollectionMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botAgeCollectionMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _conversationStarterPromptId.
         * @member {"conversationStarterPromptId"|undefined} _conversationStarterPromptId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_conversationStarterPromptId", {
            get: $util.oneOfGetter($oneOfFields = ["conversationStarterPromptId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botResponseId.
         * @member {"botResponseId"|undefined} _botResponseId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botResponseId", {
            get: $util.oneOfGetter($oneOfFields = ["botResponseId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _verificationMetadata.
         * @member {"verificationMetadata"|undefined} _verificationMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_verificationMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["verificationMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _unifiedResponseMutation.
         * @member {"unifiedResponseMutation"|undefined} _unifiedResponseMutation
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_unifiedResponseMutation", {
            get: $util.oneOfGetter($oneOfFields = ["unifiedResponseMutation"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botMessageOriginMetadata.
         * @member {"botMessageOriginMetadata"|undefined} _botMessageOriginMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botMessageOriginMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botMessageOriginMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _inThreadSurveyMetadata.
         * @member {"inThreadSurveyMetadata"|undefined} _inThreadSurveyMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_inThreadSurveyMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["inThreadSurveyMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botThreadInfo.
         * @member {"botThreadInfo"|undefined} _botThreadInfo
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botThreadInfo", {
            get: $util.oneOfGetter($oneOfFields = ["botThreadInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _internalMetadata.
         * @member {"internalMetadata"|undefined} _internalMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_internalMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["internalMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotMetadata message. Does not implicitly {@link AICommon.BotMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMetadata
         * @static
         * @param {AICommon.IBotMetadata} message BotMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.avatarMetadata != null && Object.hasOwnProperty.call(message, "avatarMetadata"))
                $root.AICommon.BotAvatarMetadata.encode(message.avatarMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.personaId != null && Object.hasOwnProperty.call(message, "personaId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.personaId);
            if (message.pluginMetadata != null && Object.hasOwnProperty.call(message, "pluginMetadata"))
                $root.AICommon.BotPluginMetadata.encode(message.pluginMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.suggestedPromptMetadata != null && Object.hasOwnProperty.call(message, "suggestedPromptMetadata"))
                $root.AICommon.BotSuggestedPromptMetadata.encode(message.suggestedPromptMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.invokerJid != null && Object.hasOwnProperty.call(message, "invokerJid"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.invokerJid);
            if (message.sessionMetadata != null && Object.hasOwnProperty.call(message, "sessionMetadata"))
                $root.AICommon.BotSessionMetadata.encode(message.sessionMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.memuMetadata != null && Object.hasOwnProperty.call(message, "memuMetadata"))
                $root.AICommon.BotMemuMetadata.encode(message.memuMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.timezone != null && Object.hasOwnProperty.call(message, "timezone"))
                writer.uint32(/* id 8, wireType 2 =*/66).string(message.timezone);
            if (message.reminderMetadata != null && Object.hasOwnProperty.call(message, "reminderMetadata"))
                $root.AICommon.BotReminderMetadata.encode(message.reminderMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
            if (message.modelMetadata != null && Object.hasOwnProperty.call(message, "modelMetadata"))
                $root.AICommon.BotModelMetadata.encode(message.modelMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            if (message.messageDisclaimerText != null && Object.hasOwnProperty.call(message, "messageDisclaimerText"))
                writer.uint32(/* id 11, wireType 2 =*/90).string(message.messageDisclaimerText);
            if (message.progressIndicatorMetadata != null && Object.hasOwnProperty.call(message, "progressIndicatorMetadata"))
                $root.AICommon.BotProgressIndicatorMetadata.encode(message.progressIndicatorMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.capabilityMetadata != null && Object.hasOwnProperty.call(message, "capabilityMetadata"))
                $root.AICommon.BotCapabilityMetadata.encode(message.capabilityMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            if (message.imagineMetadata != null && Object.hasOwnProperty.call(message, "imagineMetadata"))
                $root.AICommon.BotImagineMetadata.encode(message.imagineMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.memoryMetadata != null && Object.hasOwnProperty.call(message, "memoryMetadata"))
                $root.AICommon.BotMemoryMetadata.encode(message.memoryMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.renderingMetadata != null && Object.hasOwnProperty.call(message, "renderingMetadata"))
                $root.AICommon.BotRenderingMetadata.encode(message.renderingMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.botMetricsMetadata != null && Object.hasOwnProperty.call(message, "botMetricsMetadata"))
                $root.AICommon.BotMetricsMetadata.encode(message.botMetricsMetadata, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
            if (message.botLinkedAccountsMetadata != null && Object.hasOwnProperty.call(message, "botLinkedAccountsMetadata"))
                $root.AICommon.BotLinkedAccountsMetadata.encode(message.botLinkedAccountsMetadata, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
            if (message.richResponseSourcesMetadata != null && Object.hasOwnProperty.call(message, "richResponseSourcesMetadata"))
                $root.AICommon.BotSourcesMetadata.encode(message.richResponseSourcesMetadata, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
            if (message.aiConversationContext != null && Object.hasOwnProperty.call(message, "aiConversationContext"))
                writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.aiConversationContext);
            if (message.botPromotionMessageMetadata != null && Object.hasOwnProperty.call(message, "botPromotionMessageMetadata"))
                $root.AICommon.BotPromotionMessageMetadata.encode(message.botPromotionMessageMetadata, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
            if (message.botModeSelectionMetadata != null && Object.hasOwnProperty.call(message, "botModeSelectionMetadata"))
                $root.AICommon.BotModeSelectionMetadata.encode(message.botModeSelectionMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
            if (message.botQuotaMetadata != null && Object.hasOwnProperty.call(message, "botQuotaMetadata"))
                $root.AICommon.BotQuotaMetadata.encode(message.botQuotaMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
            if (message.botAgeCollectionMetadata != null && Object.hasOwnProperty.call(message, "botAgeCollectionMetadata"))
                $root.AICommon.BotAgeCollectionMetadata.encode(message.botAgeCollectionMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
            if (message.conversationStarterPromptId != null && Object.hasOwnProperty.call(message, "conversationStarterPromptId"))
                writer.uint32(/* id 25, wireType 2 =*/202).string(message.conversationStarterPromptId);
            if (message.botResponseId != null && Object.hasOwnProperty.call(message, "botResponseId"))
                writer.uint32(/* id 26, wireType 2 =*/210).string(message.botResponseId);
            if (message.verificationMetadata != null && Object.hasOwnProperty.call(message, "verificationMetadata"))
                $root.AICommon.BotSignatureVerificationMetadata.encode(message.verificationMetadata, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
            if (message.unifiedResponseMutation != null && Object.hasOwnProperty.call(message, "unifiedResponseMutation"))
                $root.AICommon.BotUnifiedResponseMutation.encode(message.unifiedResponseMutation, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
            if (message.botMessageOriginMetadata != null && Object.hasOwnProperty.call(message, "botMessageOriginMetadata"))
                $root.AICommon.BotMessageOriginMetadata.encode(message.botMessageOriginMetadata, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
            if (message.inThreadSurveyMetadata != null && Object.hasOwnProperty.call(message, "inThreadSurveyMetadata"))
                $root.AICommon.InThreadSurveyMetadata.encode(message.inThreadSurveyMetadata, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
            if (message.botThreadInfo != null && Object.hasOwnProperty.call(message, "botThreadInfo"))
                $root.AICommon.AIThreadInfo.encode(message.botThreadInfo, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim();
            if (message.internalMetadata != null && Object.hasOwnProperty.call(message, "internalMetadata"))
                writer.uint32(/* id 999, wireType 2 =*/7994).bytes(message.internalMetadata);
            return writer;
        };

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

        /**
         * Decodes a BotMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMetadata} BotMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMetadata.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AICommon.BotMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.avatarMetadata = $root.AICommon.BotAvatarMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.personaId = reader.string();
                        break;
                    }
                case 3: {
                        message.pluginMetadata = $root.AICommon.BotPluginMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.suggestedPromptMetadata = $root.AICommon.BotSuggestedPromptMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.invokerJid = reader.string();
                        break;
                    }
                case 6: {
                        message.sessionMetadata = $root.AICommon.BotSessionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.memuMetadata = $root.AICommon.BotMemuMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.timezone = reader.string();
                        break;
                    }
                case 9: {
                        message.reminderMetadata = $root.AICommon.BotReminderMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 10: {
                        message.modelMetadata = $root.AICommon.BotModelMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.messageDisclaimerText = reader.string();
                        break;
                    }
                case 12: {
                        message.progressIndicatorMetadata = $root.AICommon.BotProgressIndicatorMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 13: {
                        message.capabilityMetadata = $root.AICommon.BotCapabilityMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 14: {
                        message.imagineMetadata = $root.AICommon.BotImagineMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 15: {
                        message.memoryMetadata = $root.AICommon.BotMemoryMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 16: {
                        message.renderingMetadata = $root.AICommon.BotRenderingMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 17: {
                        message.botMetricsMetadata = $root.AICommon.BotMetricsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 18: {
                        message.botLinkedAccountsMetadata = $root.AICommon.BotLinkedAccountsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 19: {
                        message.richResponseSourcesMetadata = $root.AICommon.BotSourcesMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 20: {
                        message.aiConversationContext = reader.bytes();
                        break;
                    }
                case 21: {
                        message.botPromotionMessageMetadata = $root.AICommon.BotPromotionMessageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 22: {
                        message.botModeSelectionMetadata = $root.AICommon.BotModeSelectionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 23: {
                        message.botQuotaMetadata = $root.AICommon.BotQuotaMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 24: {
                        message.botAgeCollectionMetadata = $root.AICommon.BotAgeCollectionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 25: {
                        message.conversationStarterPromptId = reader.string();
                        break;
                    }
                case 26: {
                        message.botResponseId = reader.string();
                        break;
                    }
                case 27: {
                        message.verificationMetadata = $root.AICommon.BotSignatureVerificationMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 28: {
                        message.unifiedResponseMutation = $root.AICommon.BotUnifiedResponseMutation.decode(reader, reader.uint32());
                        break;
                    }
                case 29: {
                        message.botMessageOriginMetadata = $root.AICommon.BotMessageOriginMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 30: {
                        message.inThreadSurveyMetadata = $root.AICommon.InThreadSurveyMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 31: {
                        message.botThreadInfo = $root.AICommon.AIThreadInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 999: {
                        message.internalMetadata = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a BotMetadata message.
         * @function verify
         * @memberof AICommon.BotMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) {
                properties._avatarMetadata = 1;
                {
                    var error = $root.AICommon.BotAvatarMetadata.verify(message.avatarMetadata);
                    if (error)
                        return "avatarMetadata." + error;
                }
            }
            if (message.personaId != null && message.hasOwnProperty("personaId")) {
                properties._personaId = 1;
                if (!$util.isString(message.personaId))
                    return "personaId: string expected";
            }
            if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) {
                properties._pluginMetadata = 1;
                {
                    var error = $root.AICommon.BotPluginMetadata.verify(message.pluginMetadata);
                    if (error)
                        return "pluginMetadata." + error;
                }
            }
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) {
                properties._suggestedPromptMetadata = 1;
                {
                    var error = $root.AICommon.BotSuggestedPromptMetadata.verify(message.suggestedPromptMetadata);
                    if (error)
                        return "suggestedPromptMetadata." + error;
                }
            }
            if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) {
                properties._invokerJid = 1;
                if (!$util.isString(message.invokerJid))
                    return "invokerJid: string expected";
            }
            if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata")) {
                properties._sessionMetadata = 1;
                {
                    var error = $root.AICommon.BotSessionMetadata.verify(message.sessionMetadata);
                    if (error)
                        return "sessionMetadata." + error;
                }
            }
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) {
                properties._memuMetadata = 1;
                {
                    var error = $root.AICommon.BotMemuMetadata.verify(message.memuMetadata);
                    if (error)
                        return "memuMetadata." + error;
                }
            }
            if (message.timezone != null && message.hasOwnProperty("timezone")) {
                properties._timezone = 1;
                if (!$util.isString(message.timezone))
                    return "timezone: string expected";
            }
            if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata")) {
                properties._reminderMetadata = 1;
                {
                    var error = $root.AICommon.BotReminderMetadata.verify(message.reminderMetadata);
                    if (error)
                        return "reminderMetadata." + error;
                }
            }
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) {
                properties._modelMetadata = 1;
                {
                    var error = $root.AICommon.BotModelMetadata.verify(message.modelMetadata);
                    if (error)
                        return "modelMetadata." + error;
                }
            }
            if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText")) {
                properties._messageDisclaimerText = 1;
                if (!$util.isString(message.messageDisclaimerText))
                    return "messageDisclaimerText: string expected";
            }
            if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata")) {
                properties._progressIndicatorMetadata = 1;
                {
                    var error = $root.AICommon.BotProgressIndicatorMetadata.verify(message.progressIndicatorMetadata);
                    if (error)
                        return "progressIndicatorMetadata." + error;
                }
            }
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) {
                properties._capabilityMetadata = 1;
                {
                    var error = $root.AICommon.BotCapabilityMetadata.verify(message.capabilityMetadata);
                    if (error)
                        return "capabilityMetadata." + error;
                }
            }
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) {
                properties._imagineMetadata = 1;
                {
                    var error = $root.AICommon.BotImagineMetadata.verify(message.imagineMetadata);
                    if (error)
                        return "imagineMetadata." + error;
                }
            }
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) {
                properties._memoryMetadata = 1;
                {
                    var error = $root.AICommon.BotMemoryMetadata.verify(message.memoryMetadata);
                    if (error)
                        return "memoryMetadata." + error;
                }
            }
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) {
                properties._renderingMetadata = 1;
                {
                    var error = $root.AICommon.BotRenderingMetadata.verify(message.renderingMetadata);
                    if (error)
                        return "renderingMetadata." + error;
                }
            }
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) {
                properties._botMetricsMetadata = 1;
                {
                    var error = $root.AICommon.BotMetricsMetadata.verify(message.botMetricsMetadata);
                    if (error)
                        return "botMetricsMetadata." + error;
                }
            }
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) {
                properties._botLinkedAccountsMetadata = 1;
                {
                    var error = $root.AICommon.BotLinkedAccountsMetadata.verify(message.botLinkedAccountsMetadata);
                    if (error)
                        return "botLinkedAccountsMetadata." + error;
                }
            }
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata")) {
                properties._richResponseSourcesMetadata = 1;
                {
                    var error = $root.AICommon.BotSourcesMetadata.verify(message.richResponseSourcesMetadata);
                    if (error)
                        return "richResponseSourcesMetadata." + error;
                }
            }
            if (message.aiConversationContext != null && message.hasOwnProperty("aiConversationContext")) {
                properties._aiConversationContext = 1;
                if (!(message.aiConversationContext && typeof message.aiConversationContext.length === "number" || $util.isString(message.aiConversationContext)))
                    return "aiConversationContext: buffer expected";
            }
            if (message.botPromotionMessageMetadata != null && message.hasOwnProperty("botPromotionMessageMetadata")) {
                properties._botPromotionMessageMetadata = 1;
                {
                    var error = $root.AICommon.BotPromotionMessageMetadata.verify(message.botPromotionMessageMetadata);
                    if (error)
                        return "botPromotionMessageMetadata." + error;
                }
            }
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata")) {
                properties._botModeSelectionMetadata = 1;
                {
                    var error = $root.AICommon.BotModeSelectionMetadata.verify(message.botModeSelectionMetadata);
                    if (error)
                        return "botModeSelectionMetadata." + error;
                }
            }
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata")) {
                properties._botQuotaMetadata = 1;
                {
                    var error = $root.AICommon.BotQuotaMetadata.verify(message.botQuotaMetadata);
                    if (error)
                        return "botQuotaMetadata." + error;
                }
            }
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata")) {
                properties._botAgeCollectionMetadata = 1;
                {
                    var error = $root.AICommon.BotAgeCollectionMetadata.verify(message.botAgeCollectionMetadata);
                    if (error)
                        return "botAgeCollectionMetadata." + error;
                }
            }
            if (message.conversationStarterPromptId != null && message.hasOwnProperty("conversationStarterPromptId")) {
                properties._conversationStarterPromptId = 1;
                if (!$util.isString(message.conversationStarterPromptId))
                    return "conversationStarterPromptId: string expected";
            }
            if (message.botResponseId != null && message.hasOwnProperty("botResponseId")) {
                properties._botResponseId = 1;
                if (!$util.isString(message.botResponseId))
                    return "botResponseId: string expected";
            }
            if (message.verificationMetadata != null && message.hasOwnProperty("verificationMetadata")) {
                properties._verificationMetadata = 1;
                {
                    var error = $root.AICommon.BotSignatureVerificationMetadata.verify(message.verificationMetadata);
                    if (error)
                        return "verificationMetadata." + error;
                }
            }
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation")) {
                properties._unifiedResponseMutation = 1;
                {
                    var error = $root.AICommon.BotUnifiedResponseMutation.verify(message.unifiedResponseMutation);
                    if (error)
                        return "unifiedResponseMutation." + error;
                }
            }
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata")) {
                properties._botMessageOriginMetadata = 1;
                {
                    var error = $root.AICommon.BotMessageOriginMetadata.verify(message.botMessageOriginMetadata);
                    if (error)
                        return "botMessageOriginMetadata." + error;
                }
            }
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata")) {
                properties._inThreadSurveyMetadata = 1;
                {
                    var error = $root.AICommon.InThreadSurveyMetadata.verify(message.inThreadSurveyMetadata);
                    if (error)
                        return "inThreadSurveyMetadata." + error;
                }
            }
            if (message.botThreadInfo != null && message.hasOwnProperty("botThreadInfo")) {
                properties._botThreadInfo = 1;
                {
                    var error = $root.AICommon.AIThreadInfo.verify(message.botThreadInfo);
                    if (error)
                        return "botThreadInfo." + error;
                }
            }
            if (message.internalMetadata != null && message.hasOwnProperty("internalMetadata")) {
                properties._internalMetadata = 1;
                if (!(message.internalMetadata && typeof message.internalMetadata.length === "number" || $util.isString(message.internalMetadata)))
                    return "internalMetadata: buffer expected";
            }
            return null;
        };

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

        /**
         * Creates a plain object from a BotMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMetadata
         * @static
         * @param {AICommon.BotMetadata} message BotMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) {
                object.avatarMetadata = $root.AICommon.BotAvatarMetadata.toObject(message.avatarMetadata, options);
                if (options.oneofs)
                    object._avatarMetadata = "avatarMetadata";
            }
            if (message.personaId != null && message.hasOwnProperty("personaId")) {
                object.personaId = message.personaId;
                if (options.oneofs)
                    object._personaId = "personaId";
            }
            if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) {
                object.pluginMetadata = $root.AICommon.BotPluginMetadata.toObject(message.pluginMetadata, options);
                if (options.oneofs)
                    object._pluginMetadata = "pluginMetadata";
            }
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) {
                object.suggestedPromptMetadata = $root.AICommon.BotSuggestedPromptMetadata.toObject(message.suggestedPromptMetadata, options);
                if (options.oneofs)
                    object._suggestedPromptMetadata = "suggestedPromptMetadata";
            }
            if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) {
                object.invokerJid = message.invokerJid;
                if (options.oneofs)
                    object._invokerJid = "invokerJid";
            }
            if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata")) {
                object.sessionMetadata = $root.AICommon.BotSessionMetadata.toObject(message.sessionMetadata, options);
                if (options.oneofs)
                    object._sessionMetadata = "sessionMetadata";
            }
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) {
                object.memuMetadata = $root.AICommon.BotMemuMetadata.toObject(message.memuMetadata, options);
                if (options.oneofs)
                    object._memuMetadata = "memuMetadata";
            }
            if (message.timezone != null && message.hasOwnProperty("timezone")) {
                object.timezone = message.timezone;
                if (options.oneofs)
                    object._timezone = "timezone";
            }
            if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata")) {
                object.reminderMetadata = $root.AICommon.BotReminderMetadata.toObject(message.reminderMetadata, options);
                if (options.oneofs)
                    object._reminderMetadata = "reminderMetadata";
            }
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) {
                object.modelMetadata = $root.AICommon.BotModelMetadata.toObject(message.modelMetadata, options);
                if (options.oneofs)
                    object._modelMetadata = "modelMetadata";
            }
            if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText")) {
                object.messageDisclaimerText = message.messageDisclaimerText;
                if (options.oneofs)
                    object._messageDisclaimerText = "messageDisclaimerText";
            }
            if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata")) {
                object.progressIndicatorMetadata = $root.AICommon.BotProgressIndicatorMetadata.toObject(message.progressIndicatorMetadata, options);
                if (options.oneofs)
                    object._progressIndicatorMetadata = "progressIndicatorMetadata";
            }
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) {
                object.capabilityMetadata = $root.AICommon.BotCapabilityMetadata.toObject(message.capabilityMetadata, options);
                if (options.oneofs)
                    object._capabilityMetadata = "capabilityMetadata";
            }
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) {
                object.imagineMetadata = $root.AICommon.BotImagineMetadata.toObject(message.imagineMetadata, options);
                if (options.oneofs)
                    object._imagineMetadata = "imagineMetadata";
            }
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) {
                object.memoryMetadata = $root.AICommon.BotMemoryMetadata.toObject(message.memoryMetadata, options);
                if (options.oneofs)
                    object._memoryMetadata = "memoryMetadata";
            }
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) {
                object.renderingMetadata = $root.AICommon.BotRenderingMetadata.toObject(message.renderingMetadata, options);
                if (options.oneofs)
                    object._renderingMetadata = "renderingMetadata";
            }
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) {
                object.botMetricsMetadata = $root.AICommon.BotMetricsMetadata.toObject(message.botMetricsMetadata, options);
                if (options.oneofs)
                    object._botMetricsMetadata = "botMetricsMetadata";
            }
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) {
                object.botLinkedAccountsMetadata = $root.AICommon.BotLinkedAccountsMetadata.toObject(message.botLinkedAccountsMetadata, options);
                if (options.oneofs)
                    object._botLinkedAccountsMetadata = "botLinkedAccountsMetadata";
            }
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata")) {
                object.richResponseSourcesMetadata = $root.AICommon.BotSourcesMetadata.toObject(message.richResponseSourcesMetadata, options);
                if (options.oneofs)
                    object._richResponseSourcesMetadata = "richResponseSourcesMetadata";
            }
            if (message.aiConversationContext != null && message.hasOwnProperty("aiConversationContext")) {
                object.aiConversationContext = options.bytes === String ? $util.base64.encode(message.aiConversationContext, 0, message.aiConversationContext.length) : options.bytes === Array ? Array.prototype.slice.call(message.aiConversationContext) : message.aiConversationContext;
                if (options.oneofs)
                    object._aiConversationContext = "aiConversationContext";
            }
            if (message.botPromotionMessageMetadata != null && message.hasOwnProperty("botPromotionMessageMetadata")) {
                object.botPromotionMessageMetadata = $root.AICommon.BotPromotionMessageMetadata.toObject(message.botPromotionMessageMetadata, options);
                if (options.oneofs)
                    object._botPromotionMessageMetadata = "botPromotionMessageMetadata";
            }
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata")) {
                object.botModeSelectionMetadata = $root.AICommon.BotModeSelectionMetadata.toObject(message.botModeSelectionMetadata, options);
                if (options.oneofs)
                    object._botModeSelectionMetadata = "botModeSelectionMetadata";
            }
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata")) {
                object.botQuotaMetadata = $root.AICommon.BotQuotaMetadata.toObject(message.botQuotaMetadata, options);
                if (options.oneofs)
                    object._botQuotaMetadata = "botQuotaMetadata";
            }
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata")) {
                object.botAgeCollectionMetadata = $root.AICommon.BotAgeCollectionMetadata.toObject(message.botAgeCollectionMetadata, options);
                if (options.oneofs)
                    object._botAgeCollectionMetadata = "botAgeCollectionMetadata";
            }
            if (message.conversationStarterPromptId != null && message.hasOwnProperty("conversationStarterPromptId")) {
                object.conversationStarterPromptId = message.conversationStarterPromptId;
                if (options.oneofs)
                    object._conversationStarterPromptId = "conversationStarterPromptId";
            }
            if (message.botResponseId != null && message.hasOwnProperty("botResponseId")) {
                object.botResponseId = message.botResponseId;
                if (options.oneofs)
                    object._botResponseId = "botResponseId";
            }
            if (message.verificationMetadata != null && message.hasOwnProperty("verificationMetadata")) {
                object.verificationMetadata = $root.AICommon.BotSignatureVerificationMetadata.toObject(message.verificationMetadata, options);
                if (options.oneofs)
                    object._verificationMetadata = "verificationMetadata";
            }
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation")) {
                object.unifiedResponseMutation = $root.AICommon.BotUnifiedResponseMutation.toObject(message.unifiedResponseMutation, options);
                if (options.oneofs)
                    object._unifiedResponseMutation = "unifiedResponseMutation";
            }
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata")) {
                object.botMessageOriginMetadata = $root.AICommon.BotMessageOriginMetadata.toObject(message.botMessageOriginMetadata, options);
                if (options.oneofs)
                    object._botMessageOriginMetadata = "botMessageOriginMetadata";
            }
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata")) {
                object.inThreadSurveyMetadata = $root.AICommon.InThreadSurveyMetadata.toObject(message.inThreadSurveyMetadata, options);
                if (options.oneofs)
                    object._inThreadSurveyMetadata = "inThreadSurveyMetadata";
            }
            if (message.botThreadInfo != null && message.hasOwnProperty("botThreadInfo")) {
                object.botThreadInfo = $root.AICommon.AIThreadInfo.toObject(message.botThreadInfo, options);
                if (options.oneofs)
                    object._botThreadInfo = "botThreadInfo";
            }
            if (message.internalMetadata != null && message.hasOwnProperty("internalMetadata")) {
                object.internalMetadata = options.bytes === String ? $util.base64.encode(message.internalMetadata, 0, message.internalMetadata.length) : options.bytes === Array ? Array.prototype.slice.call(message.internalMetadata) : message.internalMetadata;
                if (options.oneofs)
                    object._internalMetadata = "internalMetadata";
            }
            return object;
        };

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

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

        return BotMetadata;
    })();

    AICommon.AIThreadInfo = (function() {

        /**
         * Properties of a AIThreadInfo.
         * @memberof AICommon
         * @interface IAIThreadInfo
         * @property {AICommon.AIThreadInfo.IAIThreadServerInfo|null} [serverInfo] AIThreadInfo serverInfo
         * @property {AICommon.AIThreadInfo.IAIThreadClientInfo|null} [clientInfo] AIThreadInfo clientInfo
         */

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

        /**
         * AIThreadInfo serverInfo.
         * @member {AICommon.AIThreadInfo.IAIThreadServerInfo|null|undefined} serverInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        AIThreadInfo.prototype.serverInfo = null;

        /**
         * AIThreadInfo clientInfo.
         * @member {AICommon.AIThreadInfo.IAIThreadClientInfo|null|undefined} clientInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        AIThreadInfo.prototype.clientInfo = null;

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

        /**
         * AIThreadInfo _serverInfo.
         * @member {"serverInfo"|undefined} _serverInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        Object.defineProperty(AIThreadInfo.prototype, "_serverInfo", {
            get: $util.oneOfGetter($oneOfFields = ["serverInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIThreadInfo _clientInfo.
         * @member {"clientInfo"|undefined} _clientInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        Object.defineProperty(AIThreadInfo.prototype, "_clientInfo", {
            get: $util.oneOfGetter($oneOfFields = ["clientInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

        /**
         * Verifies a AIThreadInfo message.
         * @function verify
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIThreadInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.serverInfo != null && message.hasOwnProperty("serverInfo")) {
                properties._serverInfo = 1;
                {
                    var error = $root.AICommon.AIThreadInfo.AIThreadServerInfo.verify(message.serverInfo);
                    if (error)
                        return "serverInfo." + error;
                }
            }
            if (message.clientInfo != null && message.hasOwnProperty("clientInfo")) {
                properties._clientInfo = 1;
                {
                    var error = $root.AICommon.AIThreadInfo.AIThreadClientInfo.verify(message.clientInfo);
                    if (error)
                        return "clientInfo." + error;
                }
            }
            return null;
        };

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

        /**
         * Creates a plain object from a AIThreadInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {AICommon.AIThreadInfo} message AIThreadInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIThreadInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.serverInfo != null && message.hasOwnProperty("serverInfo")) {
                object.serverInfo = $root.AICommon.AIThreadInfo.AIThreadServerInfo.toObject(message.serverInfo, options);
                if (options.oneofs)
                    object._serverInfo = "serverInfo";
            }
            if (message.clientInfo != null && message.hasOwnProperty("clientInfo")) {
                object.clientInfo = $root.AICommon.AIThreadInfo.AIThreadClientInfo.toObject(message.clientInfo, options);
                if (options.oneofs)
                    object._clientInfo = "clientInfo";
            }
            return object;
        };

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

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

        AIThreadInfo.AIThreadClientInfo = (function() {

            /**
             * Properties of a AIThreadClientInfo.
             * @memberof AICommon.AIThreadInfo
             * @interface IAIThreadClientInfo
             * @property {AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType|null} [type] AIThreadClientInfo type
             */

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

            /**
             * AIThreadClientInfo type.
             * @member {AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType|null|undefined} type
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @instance
             */
            AIThreadClientInfo.prototype.type = null;

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

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

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

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

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

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

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

            /**
             * Verifies a AIThreadClientInfo message.
             * @function verify
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIThreadClientInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a AIThreadClientInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIThreadInfo.AIThreadClientInfo} AIThreadClientInfo
             */
            AIThreadClientInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIThreadInfo.AIThreadClientInfo)
                    return object;
                var message = new $root.AICommon.AIThreadInfo.AIThreadClientInfo();
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.type = 0;
                    break;
                case "DEFAULT":
                case 1:
                    message.type = 1;
                    break;
                case "INCOGNITO":
                case 2:
                    message.type = 2;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a AIThreadClientInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {AICommon.AIThreadInfo.AIThreadClientInfo} message AIThreadClientInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIThreadClientInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType[message.type] === undefined ? message.type : $root.AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                return object;
            };

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

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

            /**
             * AIThreadType enum.
             * @name AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} DEFAULT=1 DEFAULT value
             * @property {number} INCOGNITO=2 INCOGNITO value
             */
            AIThreadClientInfo.AIThreadType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "DEFAULT"] = 1;
                values[valuesById[2] = "INCOGNITO"] = 2;
                return values;
            })();

            return AIThreadClientInfo;
        })();

        AIThreadInfo.AIThreadServerInfo = (function() {

            /**
             * Properties of a AIThreadServerInfo.
             * @memberof AICommon.AIThreadInfo
             * @interface IAIThreadServerInfo
             * @property {string|null} [title] AIThreadServerInfo title
             */

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

            /**
             * AIThreadServerInfo title.
             * @member {string|null|undefined} title
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @instance
             */
            AIThreadServerInfo.prototype.title = null;

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

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

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

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

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

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

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

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

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

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

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

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

            return AIThreadServerInfo;
        })();

        return AIThreadInfo;
    })();

    AICommon.BotUnifiedResponseMutation = (function() {

        /**
         * Properties of a BotUnifiedResponseMutation.
         * @memberof AICommon
         * @interface IBotUnifiedResponseMutation
         * @property {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata|null} [sbsMetadata] BotUnifiedResponseMutation sbsMetadata
         * @property {Array.<AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata>|null} [mediaDetailsMetadataList] BotUnifiedResponseMutation mediaDetailsMetadataList
         */

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

        /**
         * BotUnifiedResponseMutation sbsMetadata.
         * @member {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata|null|undefined} sbsMetadata
         * @memberof AICommon.BotUnifiedResponseMutation
         * @instance
         */
        BotUnifiedResponseMutation.prototype.sbsMetadata = null;

        /**
         * BotUnifiedResponseMutation mediaDetailsMetadataList.
         * @member {Array.<AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata>} mediaDetailsMetadataList
         * @memberof AICommon.BotUnifiedResponseMutation
         * @instance
         */
        BotUnifiedResponseMutation.prototype.mediaDetailsMetadataList = $util.emptyArray;

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

        /**
         * BotUnifiedResponseMutation _sbsMetadata.
         * @member {"sbsMetadata"|undefined} _sbsMetadata
         * @memberof AICommon.BotUnifiedResponseMutation
         * @instance
         */
        Object.defineProperty(BotUnifiedResponseMutation.prototype, "_sbsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["sbsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotUnifiedResponseMutation message. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {AICommon.IBotUnifiedResponseMutation} message BotUnifiedResponseMutation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotUnifiedResponseMutation.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sbsMetadata != null && Object.hasOwnProperty.call(message, "sbsMetadata"))
                $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.encode(message.sbsMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.mediaDetailsMetadataList != null && message.mediaDetailsMetadataList.length)
                for (var i = 0; i < message.mediaDetailsMetadataList.length; ++i)
                    $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.encode(message.mediaDetailsMetadataList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

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

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

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

        /**
         * Verifies a BotUnifiedResponseMutation message.
         * @function verify
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotUnifiedResponseMutation.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sbsMetadata != null && message.hasOwnProperty("sbsMetadata")) {
                properties._sbsMetadata = 1;
                {
                    var error = $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.verify(message.sbsMetadata);
                    if (error)
                        return "sbsMetadata." + error;
                }
            }
            if (message.mediaDetailsMetadataList != null && message.hasOwnProperty("mediaDetailsMetadataList")) {
                if (!Array.isArray(message.mediaDetailsMetadataList))
                    return "mediaDetailsMetadataList: array expected";
                for (var i = 0; i < message.mediaDetailsMetadataList.length; ++i) {
                    var error = $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.verify(message.mediaDetailsMetadataList[i]);
                    if (error)
                        return "mediaDetailsMetadataList." + error;
                }
            }
            return null;
        };

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

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

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

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

        BotUnifiedResponseMutation.MediaDetailsMetadata = (function() {

            /**
             * Properties of a MediaDetailsMetadata.
             * @memberof AICommon.BotUnifiedResponseMutation
             * @interface IMediaDetailsMetadata
             * @property {string|null} [id] MediaDetailsMetadata id
             * @property {AICommon.IBotMediaMetadata|null} [highResMedia] MediaDetailsMetadata highResMedia
             * @property {AICommon.IBotMediaMetadata|null} [previewMedia] MediaDetailsMetadata previewMedia
             */

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

            /**
             * MediaDetailsMetadata id.
             * @member {string|null|undefined} id
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            MediaDetailsMetadata.prototype.id = null;

            /**
             * MediaDetailsMetadata highResMedia.
             * @member {AICommon.IBotMediaMetadata|null|undefined} highResMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            MediaDetailsMetadata.prototype.highResMedia = null;

            /**
             * MediaDetailsMetadata previewMedia.
             * @member {AICommon.IBotMediaMetadata|null|undefined} previewMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            MediaDetailsMetadata.prototype.previewMedia = null;

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

            /**
             * MediaDetailsMetadata _id.
             * @member {"id"|undefined} _id
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            Object.defineProperty(MediaDetailsMetadata.prototype, "_id", {
                get: $util.oneOfGetter($oneOfFields = ["id"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaDetailsMetadata _highResMedia.
             * @member {"highResMedia"|undefined} _highResMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            Object.defineProperty(MediaDetailsMetadata.prototype, "_highResMedia", {
                get: $util.oneOfGetter($oneOfFields = ["highResMedia"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaDetailsMetadata _previewMedia.
             * @member {"previewMedia"|undefined} _previewMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            Object.defineProperty(MediaDetailsMetadata.prototype, "_previewMedia", {
                get: $util.oneOfGetter($oneOfFields = ["previewMedia"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified MediaDetailsMetadata message. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata} message MediaDetailsMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MediaDetailsMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
                if (message.highResMedia != null && Object.hasOwnProperty.call(message, "highResMedia"))
                    $root.AICommon.BotMediaMetadata.encode(message.highResMedia, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.previewMedia != null && Object.hasOwnProperty.call(message, "previewMedia"))
                    $root.AICommon.BotMediaMetadata.encode(message.previewMedia, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

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

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

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

            /**
             * Verifies a MediaDetailsMetadata message.
             * @function verify
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MediaDetailsMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.id != null && message.hasOwnProperty("id")) {
                    properties._id = 1;
                    if (!$util.isString(message.id))
                        return "id: string expected";
                }
                if (message.highResMedia != null && message.hasOwnProperty("highResMedia")) {
                    properties._highResMedia = 1;
                    {
                        var error = $root.AICommon.BotMediaMetadata.verify(message.highResMedia);
                        if (error)
                            return "highResMedia." + error;
                    }
                }
                if (message.previewMedia != null && message.hasOwnProperty("previewMedia")) {
                    properties._previewMedia = 1;
                    {
                        var error = $root.AICommon.BotMediaMetadata.verify(message.previewMedia);
                        if (error)
                            return "previewMedia." + error;
                    }
                }
                return null;
            };

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

            /**
             * Creates a plain object from a MediaDetailsMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata} message MediaDetailsMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MediaDetailsMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.id != null && message.hasOwnProperty("id")) {
                    object.id = message.id;
                    if (options.oneofs)
                        object._id = "id";
                }
                if (message.highResMedia != null && message.hasOwnProperty("highResMedia")) {
                    object.highResMedia = $root.AICommon.BotMediaMetadata.toObject(message.highResMedia, options);
                    if (options.oneofs)
                        object._highResMedia = "highResMedia";
                }
                if (message.previewMedia != null && message.hasOwnProperty("previewMedia")) {
                    object.previewMedia = $root.AICommon.BotMediaMetadata.toObject(message.previewMedia, options);
                    if (options.oneofs)
                        object._previewMedia = "previewMedia";
                }
                return object;
            };

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

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

            return MediaDetailsMetadata;
        })();

        BotUnifiedResponseMutation.SideBySideMetadata = (function() {

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

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

            /**
             * SideBySideMetadata primaryResponseId.
             * @member {string|null|undefined} primaryResponseId
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            SideBySideMetadata.prototype.primaryResponseId = null;

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

            /**
             * SideBySideMetadata _primaryResponseId.
             * @member {"primaryResponseId"|undefined} _primaryResponseId
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            Object.defineProperty(SideBySideMetadata.prototype, "_primaryResponseId", {
                get: $util.oneOfGetter($oneOfFields = ["primaryResponseId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

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

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

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

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

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

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

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

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

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

            return SideBySideMetadata;
        })();

        return BotUnifiedResponseMutation;
    })();

    AICommon.BotMessageOrigin = (function() {

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

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

        /**
         * BotMessageOrigin type.
         * @member {AICommon.BotMessageOrigin.BotMessageOriginType|null|undefined} type
         * @memberof AICommon.BotMessageOrigin
         * @instance
         */
        BotMessageOrigin.prototype.type = null;

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

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

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

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

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

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

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

        /**
         * Verifies a BotMessageOrigin message.
         * @function verify
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMessageOrigin.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotMessageOrigin message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMessageOrigin} BotMessageOrigin
         */
        BotMessageOrigin.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMessageOrigin)
                return object;
            var message = new $root.AICommon.BotMessageOrigin();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED":
            case 0:
                message.type = 0;
                break;
            }
            return message;
        };

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

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

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

        /**
         * BotMessageOriginType enum.
         * @name AICommon.BotMessageOrigin.BotMessageOriginType
         * @enum {number}
         * @property {number} BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED=0 BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED value
         */
        BotMessageOrigin.BotMessageOriginType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED"] = 0;
            return values;
        })();

        return BotMessageOrigin;
    })();

    AICommon.BotMessageOriginMetadata = (function() {

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

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

        /**
         * BotMessageOriginMetadata origins.
         * @member {Array.<AICommon.IBotMessageOrigin>} origins
         * @memberof AICommon.BotMessageOriginMetadata
         * @instance
         */
        BotMessageOriginMetadata.prototype.origins = $util.emptyArray;

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

        /**
         * Encodes the specified BotMessageOriginMetadata message. Does not implicitly {@link AICommon.BotMessageOriginMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {AICommon.IBotMessageOriginMetadata} message BotMessageOriginMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMessageOriginMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.origins != null && message.origins.length)
                for (var i = 0; i < message.origins.length; ++i)
                    $root.AICommon.BotMessageOrigin.encode(message.origins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        return BotMessageOriginMetadata;
    })();

    AICommon.InThreadSurveyMetadata = (function() {

        /**
         * Properties of an InThreadSurveyMetadata.
         * @memberof AICommon
         * @interface IInThreadSurveyMetadata
         * @property {string|null} [tessaSessionId] InThreadSurveyMetadata tessaSessionId
         * @property {string|null} [simonSessionId] InThreadSurveyMetadata simonSessionId
         * @property {string|null} [simonSurveyId] InThreadSurveyMetadata simonSurveyId
         * @property {string|null} [tessaRootId] InThreadSurveyMetadata tessaRootId
         * @property {string|null} [requestId] InThreadSurveyMetadata requestId
         * @property {string|null} [tessaEvent] InThreadSurveyMetadata tessaEvent
         * @property {string|null} [invitationHeaderText] InThreadSurveyMetadata invitationHeaderText
         * @property {string|null} [invitationBodyText] InThreadSurveyMetadata invitationBodyText
         * @property {string|null} [invitationCtaText] InThreadSurveyMetadata invitationCtaText
         * @property {string|null} [invitationCtaUrl] InThreadSurveyMetadata invitationCtaUrl
         * @property {string|null} [surveyTitle] InThreadSurveyMetadata surveyTitle
         * @property {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion>|null} [questions] InThreadSurveyMetadata questions
         * @property {string|null} [surveyContinueButtonText] InThreadSurveyMetadata surveyContinueButtonText
         * @property {string|null} [surveySubmitButtonText] InThreadSurveyMetadata surveySubmitButtonText
         * @property {string|null} [privacyStatementFull] InThreadSurveyMetadata privacyStatementFull
         * @property {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart>|null} [privacyStatementParts] InThreadSurveyMetadata privacyStatementParts
         * @property {string|null} [feedbackToastText] InThreadSurveyMetadata feedbackToastText
         */

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

        /**
         * InThreadSurveyMetadata tessaSessionId.
         * @member {string|null|undefined} tessaSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaSessionId = null;

        /**
         * InThreadSurveyMetadata simonSessionId.
         * @member {string|null|undefined} simonSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSessionId = null;

        /**
         * InThreadSurveyMetadata simonSurveyId.
         * @member {string|null|undefined} simonSurveyId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSurveyId = null;

        /**
         * InThreadSurveyMetadata tessaRootId.
         * @member {string|null|undefined} tessaRootId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaRootId = null;

        /**
         * InThreadSurveyMetadata requestId.
         * @member {string|null|undefined} requestId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.requestId = null;

        /**
         * InThreadSurveyMetadata tessaEvent.
         * @member {string|null|undefined} tessaEvent
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaEvent = null;

        /**
         * InThreadSurveyMetadata invitationHeaderText.
         * @member {string|null|undefined} invitationHeaderText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationHeaderText = null;

        /**
         * InThreadSurveyMetadata invitationBodyText.
         * @member {string|null|undefined} invitationBodyText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationBodyText = null;

        /**
         * InThreadSurveyMetadata invitationCtaText.
         * @member {string|null|undefined} invitationCtaText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaText = null;

        /**
         * InThreadSurveyMetadata invitationCtaUrl.
         * @member {string|null|undefined} invitationCtaUrl
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaUrl = null;

        /**
         * InThreadSurveyMetadata surveyTitle.
         * @member {string|null|undefined} surveyTitle
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyTitle = null;

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

        /**
         * InThreadSurveyMetadata surveyContinueButtonText.
         * @member {string|null|undefined} surveyContinueButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyContinueButtonText = null;

        /**
         * InThreadSurveyMetadata surveySubmitButtonText.
         * @member {string|null|undefined} surveySubmitButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveySubmitButtonText = null;

        /**
         * InThreadSurveyMetadata privacyStatementFull.
         * @member {string|null|undefined} privacyStatementFull
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.privacyStatementFull = null;

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

        /**
         * InThreadSurveyMetadata feedbackToastText.
         * @member {string|null|undefined} feedbackToastText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.feedbackToastText = null;

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

        /**
         * InThreadSurveyMetadata _tessaSessionId.
         * @member {"tessaSessionId"|undefined} _tessaSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaSessionId", {
            get: $util.oneOfGetter($oneOfFields = ["tessaSessionId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _simonSessionId.
         * @member {"simonSessionId"|undefined} _simonSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_simonSessionId", {
            get: $util.oneOfGetter($oneOfFields = ["simonSessionId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _simonSurveyId.
         * @member {"simonSurveyId"|undefined} _simonSurveyId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_simonSurveyId", {
            get: $util.oneOfGetter($oneOfFields = ["simonSurveyId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _tessaRootId.
         * @member {"tessaRootId"|undefined} _tessaRootId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaRootId", {
            get: $util.oneOfGetter($oneOfFields = ["tessaRootId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _requestId.
         * @member {"requestId"|undefined} _requestId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_requestId", {
            get: $util.oneOfGetter($oneOfFields = ["requestId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _tessaEvent.
         * @member {"tessaEvent"|undefined} _tessaEvent
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaEvent", {
            get: $util.oneOfGetter($oneOfFields = ["tessaEvent"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationHeaderText.
         * @member {"invitationHeaderText"|undefined} _invitationHeaderText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationHeaderText", {
            get: $util.oneOfGetter($oneOfFields = ["invitationHeaderText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationBodyText.
         * @member {"invitationBodyText"|undefined} _invitationBodyText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationBodyText", {
            get: $util.oneOfGetter($oneOfFields = ["invitationBodyText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationCtaText.
         * @member {"invitationCtaText"|undefined} _invitationCtaText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationCtaText", {
            get: $util.oneOfGetter($oneOfFields = ["invitationCtaText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationCtaUrl.
         * @member {"invitationCtaUrl"|undefined} _invitationCtaUrl
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationCtaUrl", {
            get: $util.oneOfGetter($oneOfFields = ["invitationCtaUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _surveyTitle.
         * @member {"surveyTitle"|undefined} _surveyTitle
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveyTitle", {
            get: $util.oneOfGetter($oneOfFields = ["surveyTitle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _surveyContinueButtonText.
         * @member {"surveyContinueButtonText"|undefined} _surveyContinueButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveyContinueButtonText", {
            get: $util.oneOfGetter($oneOfFields = ["surveyContinueButtonText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _surveySubmitButtonText.
         * @member {"surveySubmitButtonText"|undefined} _surveySubmitButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveySubmitButtonText", {
            get: $util.oneOfGetter($oneOfFields = ["surveySubmitButtonText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _privacyStatementFull.
         * @member {"privacyStatementFull"|undefined} _privacyStatementFull
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_privacyStatementFull", {
            get: $util.oneOfGetter($oneOfFields = ["privacyStatementFull"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _feedbackToastText.
         * @member {"feedbackToastText"|undefined} _feedbackToastText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_feedbackToastText", {
            get: $util.oneOfGetter($oneOfFields = ["feedbackToastText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified InThreadSurveyMetadata message. Does not implicitly {@link AICommon.InThreadSurveyMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {AICommon.IInThreadSurveyMetadata} message InThreadSurveyMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        InThreadSurveyMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.tessaSessionId != null && Object.hasOwnProperty.call(message, "tessaSessionId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.tessaSessionId);
            if (message.simonSessionId != null && Object.hasOwnProperty.call(message, "simonSessionId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.simonSessionId);
            if (message.simonSurveyId != null && Object.hasOwnProperty.call(message, "simonSurveyId"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.simonSurveyId);
            if (message.tessaRootId != null && Object.hasOwnProperty.call(message, "tessaRootId"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.tessaRootId);
            if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.requestId);
            if (message.tessaEvent != null && Object.hasOwnProperty.call(message, "tessaEvent"))
                writer.uint32(/* id 6, wireType 2 =*/50).string(message.tessaEvent);
            if (message.invitationHeaderText != null && Object.hasOwnProperty.call(message, "invitationHeaderText"))
                writer.uint32(/* id 7, wireType 2 =*/58).string(message.invitationHeaderText);
            if (message.invitationBodyText != null && Object.hasOwnProperty.call(message, "invitationBodyText"))
                writer.uint32(/* id 8, wireType 2 =*/66).string(message.invitationBodyText);
            if (message.invitationCtaText != null && Object.hasOwnProperty.call(message, "invitationCtaText"))
                writer.uint32(/* id 9, wireType 2 =*/74).string(message.invitationCtaText);
            if (message.invitationCtaUrl != null && Object.hasOwnProperty.call(message, "invitationCtaUrl"))
                writer.uint32(/* id 10, wireType 2 =*/82).string(message.invitationCtaUrl);
            if (message.surveyTitle != null && Object.hasOwnProperty.call(message, "surveyTitle"))
                writer.uint32(/* id 11, wireType 2 =*/90).string(message.surveyTitle);
            if (message.questions != null && message.questions.length)
                for (var i = 0; i < message.questions.length; ++i)
                    $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.encode(message.questions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.surveyContinueButtonText != null && Object.hasOwnProperty.call(message, "surveyContinueButtonText"))
                writer.uint32(/* id 13, wireType 2 =*/106).string(message.surveyContinueButtonText);
            if (message.surveySubmitButtonText != null && Object.hasOwnProperty.call(message, "surveySubmitButtonText"))
                writer.uint32(/* id 14, wireType 2 =*/114).string(message.surveySubmitButtonText);
            if (message.privacyStatementFull != null && Object.hasOwnProperty.call(message, "privacyStatementFull"))
                writer.uint32(/* id 15, wireType 2 =*/122).string(message.privacyStatementFull);
            if (message.privacyStatementParts != null && message.privacyStatementParts.length)
                for (var i = 0; i < message.privacyStatementParts.length; ++i)
                    $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.encode(message.privacyStatementParts[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.feedbackToastText != null && Object.hasOwnProperty.call(message, "feedbackToastText"))
                writer.uint32(/* id 17, wireType 2 =*/138).string(message.feedbackToastText);
            return writer;
        };

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

        /**
         * Decodes an InThreadSurveyMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.InThreadSurveyMetadata} InThreadSurveyMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        InThreadSurveyMetadata.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AICommon.InThreadSurveyMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.tessaSessionId = reader.string();
                        break;
                    }
                case 2: {
                        message.simonSessionId = reader.string();
                        break;
                    }
                case 3: {
                        message.simonSurveyId = reader.string();
                        break;
                    }
                case 4: {
                        message.tessaRootId = reader.string();
                        break;
                    }
                case 5: {
                        message.requestId = reader.string();
                        break;
                    }
                case 6: {
                        message.tessaEvent = reader.string();
                        break;
                    }
                case 7: {
                        message.invitationHeaderText = reader.string();
                        break;
                    }
                case 8: {
                        message.invitationBodyText = reader.string();
                        break;
                    }
                case 9: {
                        message.invitationCtaText = reader.string();
                        break;
                    }
                case 10: {
                        message.invitationCtaUrl = reader.string();
                        break;
                    }
                case 11: {
                        message.surveyTitle = reader.string();
                        break;
                    }
                case 12: {
                        if (!(message.questions && message.questions.length))
                            message.questions = [];
                        message.questions.push($root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.decode(reader, reader.uint32()));
                        break;
                    }
                case 13: {
                        message.surveyContinueButtonText = reader.string();
                        break;
                    }
                case 14: {
                        message.surveySubmitButtonText = reader.string();
                        break;
                    }
                case 15: {
                        message.privacyStatementFull = reader.string();
                        break;
                    }
                case 16: {
                        if (!(message.privacyStatementParts && message.privacyStatementParts.length))
                            message.privacyStatementParts = [];
                        message.privacyStatementParts.push($root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.decode(reader, reader.uint32()));
                        break;
                    }
                case 17: {
                        message.feedbackToastText = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies an InThreadSurveyMetadata message.
         * @function verify
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        InThreadSurveyMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.tessaSessionId != null && message.hasOwnProperty("tessaSessionId")) {
                properties._tessaSessionId = 1;
                if (!$util.isString(message.tessaSessionId))
                    return "tessaSessionId: string expected";
            }
            if (message.simonSessionId != null && message.hasOwnProperty("simonSessionId")) {
                properties._simonSessionId = 1;
                if (!$util.isString(message.simonSessionId))
                    return "simonSessionId: string expected";
            }
            if (message.simonSurveyId != null && message.hasOwnProperty("simonSurveyId")) {
                properties._simonSurveyId = 1;
                if (!$util.isString(message.simonSurveyId))
                    return "simonSurveyId: string expected";
            }
            if (message.tessaRootId != null && message.hasOwnProperty("tessaRootId")) {
                properties._tessaRootId = 1;
                if (!$util.isString(message.tessaRootId))
                    return "tessaRootId: string expected";
            }
            if (message.requestId != null && message.hasOwnProperty("requestId")) {
                properties._requestId = 1;
                if (!$util.isString(message.requestId))
                    return "requestId: string expected";
            }
            if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent")) {
                properties._tessaEvent = 1;
                if (!$util.isString(message.tessaEvent))
                    return "tessaEvent: string expected";
            }
            if (message.invitationHeaderText != null && message.hasOwnProperty("invitationHeaderText")) {
                properties._invitationHeaderText = 1;
                if (!$util.isString(message.invitationHeaderText))
                    return "invitationHeaderText: string expected";
            }
            if (message.invitationBodyText != null && message.hasOwnProperty("invitationBodyText")) {
                properties._invitationBodyText = 1;
                if (!$util.isString(message.invitationBodyText))
                    return "invitationBodyText: string expected";
            }
            if (message.invitationCtaText != null && message.hasOwnProperty("invitationCtaText")) {
                properties._invitationCtaText = 1;
                if (!$util.isString(message.invitationCtaText))
                    return "invitationCtaText: string expected";
            }
            if (message.invitationCtaUrl != null && message.hasOwnProperty("invitationCtaUrl")) {
                properties._invitationCtaUrl = 1;
                if (!$util.isString(message.invitationCtaUrl))
                    return "invitationCtaUrl: string expected";
            }
            if (message.surveyTitle != null && message.hasOwnProperty("surveyTitle")) {
                properties._surveyTitle = 1;
                if (!$util.isString(message.surveyTitle))
                    return "surveyTitle: string expected";
            }
            if (message.questions != null && message.hasOwnProperty("questions")) {
                if (!Array.isArray(message.questions))
                    return "questions: array expected";
                for (var i = 0; i < message.questions.length; ++i) {
                    var error = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.verify(message.questions[i]);
                    if (error)
                        return "questions." + error;
                }
            }
            if (message.surveyContinueButtonText != null && message.hasOwnProperty("surveyContinueButtonText")) {
                properties._surveyContinueButtonText = 1;
                if (!$util.isString(message.surveyContinueButtonText))
                    return "surveyContinueButtonText: string expected";
            }
            if (message.surveySubmitButtonText != null && message.hasOwnProperty("surveySubmitButtonText")) {
                properties._surveySubmitButtonText = 1;
                if (!$util.isString(message.surveySubmitButtonText))
                    return "surveySubmitButtonText: string expected";
            }
            if (message.privacyStatementFull != null && message.hasOwnProperty("privacyStatementFull")) {
                properties._privacyStatementFull = 1;
                if (!$util.isString(message.privacyStatementFull))
                    return "privacyStatementFull: string expected";
            }
            if (message.privacyStatementParts != null && message.hasOwnProperty("privacyStatementParts")) {
                if (!Array.isArray(message.privacyStatementParts))
                    return "privacyStatementParts: array expected";
                for (var i = 0; i < message.privacyStatementParts.length; ++i) {
                    var error = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.verify(message.privacyStatementParts[i]);
                    if (error)
                        return "privacyStatementParts." + error;
                }
            }
            if (message.feedbackToastText != null && message.hasOwnProperty("feedbackToastText")) {
                properties._feedbackToastText = 1;
                if (!$util.isString(message.feedbackToastText))
                    return "feedbackToastText: string expected";
            }
            return null;
        };

        /**
         * Creates an InThreadSurveyMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.InThreadSurveyMetadata} InThreadSurveyMetadata
         */
        InThreadSurveyMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.InThreadSurveyMetadata)
                return object;
            var message = new $root.AICommon.InThreadSurveyMetadata();
            if (object.tessaSessionId != null)
                message.tessaSessionId = String(object.tessaSessionId);
            if (object.simonSessionId != null)
                message.simonSessionId = String(object.simonSessionId);
            if (object.simonSurveyId != null)
                message.simonSurveyId = String(object.simonSurveyId);
            if (object.tessaRootId != null)
                message.tessaRootId = String(object.tessaRootId);
            if (object.requestId != null)
                message.requestId = String(object.requestId);
            if (object.tessaEvent != null)
                message.tessaEvent = String(object.tessaEvent);
            if (object.invitationHeaderText != null)
                message.invitationHeaderText = String(object.invitationHeaderText);
            if (object.invitationBodyText != null)
                message.invitationBodyText = String(object.invitationBodyText);
            if (object.invitationCtaText != null)
                message.invitationCtaText = String(object.invitationCtaText);
            if (object.invitationCtaUrl != null)
                message.invitationCtaUrl = String(object.invitationCtaUrl);
            if (object.surveyTitle != null)
                message.surveyTitle = String(object.surveyTitle);
            if (object.questions) {
                if (!Array.isArray(object.questions))
                    throw TypeError(".AICommon.InThreadSurveyMetadata.questions: array expected");
                message.questions = [];
                for (var i = 0; i < object.questions.length; ++i) {
                    if (typeof object.questions[i] !== "object")
                        throw TypeError(".AICommon.InThreadSurveyMetadata.questions: object expected");
                    message.questions[i] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.fromObject(object.questions[i]);
                }
            }
            if (object.surveyContinueButtonText != null)
                message.surveyContinueButtonText = String(object.surveyContinueButtonText);
            if (object.surveySubmitButtonText != null)
                message.surveySubmitButtonText = String(object.surveySubmitButtonText);
            if (object.privacyStatementFull != null)
                message.privacyStatementFull = String(object.privacyStatementFull);
            if (object.privacyStatementParts) {
                if (!Array.isArray(object.privacyStatementParts))
                    throw TypeError(".AICommon.InThreadSurveyMetadata.privacyStatementParts: array expected");
                message.privacyStatementParts = [];
                for (var i = 0; i < object.privacyStatementParts.length; ++i) {
                    if (typeof object.privacyStatementParts[i] !== "object")
                        throw TypeError(".AICommon.InThreadSurveyMetadata.privacyStatementParts: object expected");
                    message.privacyStatementParts[i] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.fromObject(object.privacyStatementParts[i]);
                }
            }
            if (object.feedbackToastText != null)
                message.feedbackToastText = String(object.feedbackToastText);
            return message;
        };

        /**
         * Creates a plain object from an InThreadSurveyMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {AICommon.InThreadSurveyMetadata} message InThreadSurveyMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        InThreadSurveyMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.questions = [];
                object.privacyStatementParts = [];
            }
            if (message.tessaSessionId != null && message.hasOwnProperty("tessaSessionId")) {
                object.tessaSessionId = message.tessaSessionId;
                if (options.oneofs)
                    object._tessaSessionId = "tessaSessionId";
            }
            if (message.simonSessionId != null && message.hasOwnProperty("simonSessionId")) {
                object.simonSessionId = message.simonSessionId;
                if (options.oneofs)
                    object._simonSessionId = "simonSessionId";
            }
            if (message.simonSurveyId != null && message.hasOwnProperty("simonSurveyId")) {
                object.simonSurveyId = message.simonSurveyId;
                if (options.oneofs)
                    object._simonSurveyId = "simonSurveyId";
            }
            if (message.tessaRootId != null && message.hasOwnProperty("tessaRootId")) {
                object.tessaRootId = message.tessaRootId;
                if (options.oneofs)
                    object._tessaRootId = "tessaRootId";
            }
            if (message.requestId != null && message.hasOwnProperty("requestId")) {
                object.requestId = message.requestId;
                if (options.oneofs)
                    object._requestId = "requestId";
            }
            if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent")) {
                object.tessaEvent = message.tessaEvent;
                if (options.oneofs)
                    object._tessaEvent = "tessaEvent";
            }
            if (message.invitationHeaderText != null && message.hasOwnProperty("invitationHeaderText")) {
                object.invitationHeaderText = message.invitationHeaderText;
                if (options.oneofs)
                    object._invitationHeaderText = "invitationHeaderText";
            }
            if (message.invitationBodyText != null && message.hasOwnProperty("invitationBodyText")) {
                object.invitationBodyText = message.invitationBodyText;
                if (options.oneofs)
                    object._invitationBodyText = "invitationBodyText";
            }
            if (message.invitationCtaText != null && message.hasOwnProperty("invitationCtaText")) {
                object.invitationCtaText = message.invitationCtaText;
                if (options.oneofs)
                    object._invitationCtaText = "invitationCtaText";
            }
            if (message.invitationCtaUrl != null && message.hasOwnProperty("invitationCtaUrl")) {
                object.invitationCtaUrl = message.invitationCtaUrl;
                if (options.oneofs)
                    object._invitationCtaUrl = "invitationCtaUrl";
            }
            if (message.surveyTitle != null && message.hasOwnProperty("surveyTitle")) {
                object.surveyTitle = message.surveyTitle;
                if (options.oneofs)
                    object._surveyTitle = "surveyTitle";
            }
            if (message.questions && message.questions.length) {
                object.questions = [];
                for (var j = 0; j < message.questions.length; ++j)
                    object.questions[j] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.toObject(message.questions[j], options);
            }
            if (message.surveyContinueButtonText != null && message.hasOwnProperty("surveyContinueButtonText")) {
                object.surveyContinueButtonText = message.surveyContinueButtonText;
                if (options.oneofs)
                    object._surveyContinueButtonText = "surveyContinueButtonText";
            }
            if (message.surveySubmitButtonText != null && message.hasOwnProperty("surveySubmitButtonText")) {
                object.surveySubmitButtonText = message.surveySubmitButtonText;
                if (options.oneofs)
                    object._surveySubmitButtonText = "surveySubmitButtonText";
            }
            if (message.privacyStatementFull != null && message.hasOwnProperty("privacyStatementFull")) {
                object.privacyStatementFull = message.privacyStatementFull;
                if (options.oneofs)
                    object._privacyStatementFull = "privacyStatementFull";
            }
            if (message.privacyStatementParts && message.privacyStatementParts.length) {
                object.privacyStatementParts = [];
                for (var j = 0; j < message.privacyStatementParts.length; ++j)
                    object.privacyStatementParts[j] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.toObject(message.privacyStatementParts[j], options);
            }
            if (message.feedbackToastText != null && message.hasOwnProperty("feedbackToastText")) {
                object.feedbackToastText = message.feedbackToastText;
                if (options.oneofs)
                    object._feedbackToastText = "feedbackToastText";
            }
            return object;
        };

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

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

        InThreadSurveyMetadata.InThreadSurveyOption = (function() {

            /**
             * Properties of an InThreadSurveyOption.
             * @memberof AICommon.InThreadSurveyMetadata
             * @interface IInThreadSurveyOption
             * @property {string|null} [stringValue] InThreadSurveyOption stringValue
             * @property {number|null} [numericValue] InThreadSurveyOption numericValue
             * @property {string|null} [textTranslated] InThreadSurveyOption textTranslated
             */

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

            /**
             * InThreadSurveyOption stringValue.
             * @member {string|null|undefined} stringValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.stringValue = null;

            /**
             * InThreadSurveyOption numericValue.
             * @member {number|null|undefined} numericValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.numericValue = null;

            /**
             * InThreadSurveyOption textTranslated.
             * @member {string|null|undefined} textTranslated
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.textTranslated = null;

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

            /**
             * InThreadSurveyOption _stringValue.
             * @member {"stringValue"|undefined} _stringValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            Object.defineProperty(InThreadSurveyOption.prototype, "_stringValue", {
                get: $util.oneOfGetter($oneOfFields = ["stringValue"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InThreadSurveyOption _numericValue.
             * @member {"numericValue"|undefined} _numericValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            Object.defineProperty(InThreadSurveyOption.prototype, "_numericValue", {
                get: $util.oneOfGetter($oneOfFields = ["numericValue"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InThreadSurveyOption _textTranslated.
             * @member {"textTranslated"|undefined} _textTranslated
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            Object.defineProperty(InThreadSurveyOption.prototype, "_textTranslated", {
                get: $util.oneOfGetter($oneOfFields = ["textTranslated"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified InThreadSurveyOption message. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyOption.verify|verify} messages.
             * @function encode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyOption} message InThreadSurveyOption message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyOption.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue);
                if (message.numericValue != null && Object.hasOwnProperty.call(message, "numericValue"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.numericValue);
                if (message.textTranslated != null && Object.hasOwnProperty.call(message, "textTranslated"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.textTranslated);
                return writer;
            };

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

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

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

            /**
             * Verifies an InThreadSurveyOption message.
             * @function verify
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InThreadSurveyOption.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
                    properties._stringValue = 1;
                    if (!$util.isString(message.stringValue))
                        return "stringValue: string expected";
                }
                if (message.numericValue != null && message.hasOwnProperty("numericValue")) {
                    properties._numericValue = 1;
                    if (!$util.isInteger(message.numericValue))
                        return "numericValue: integer expected";
                }
                if (message.textTranslated != null && message.hasOwnProperty("textTranslated")) {
                    properties._textTranslated = 1;
                    if (!$util.isString(message.textTranslated))
                        return "textTranslated: string expected";
                }
                return null;
            };

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

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

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

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

            return InThreadSurveyOption;
        })();

        InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart = (function() {

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

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

            /**
             * InThreadSurveyPrivacyStatementPart text.
             * @member {string|null|undefined} text
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.text = null;

            /**
             * InThreadSurveyPrivacyStatementPart url.
             * @member {string|null|undefined} url
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.url = null;

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

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

            /**
             * InThreadSurveyPrivacyStatementPart _url.
             * @member {"url"|undefined} _url
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            Object.defineProperty(InThreadSurveyPrivacyStatementPart.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

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

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

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

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

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

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

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

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

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

            return InThreadSurveyPrivacyStatementPart;
        })();

        InThreadSurveyMetadata.InThreadSurveyQuestion = (function() {

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

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

            /**
             * InThreadSurveyQuestion questionText.
             * @member {string|null|undefined} questionText
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionText = null;

            /**
             * InThreadSurveyQuestion questionId.
             * @member {string|null|undefined} questionId
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionId = null;

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

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

            /**
             * InThreadSurveyQuestion _questionText.
             * @member {"questionText"|undefined} _questionText
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            Object.defineProperty(InThreadSurveyQuestion.prototype, "_questionText", {
                get: $util.oneOfGetter($oneOfFields = ["questionText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InThreadSurveyQuestion _questionId.
             * @member {"questionId"|undefined} _questionId
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            Object.defineProperty(InThreadSurveyQuestion.prototype, "_questionId", {
                get: $util.oneOfGetter($oneOfFields = ["questionId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified InThreadSurveyQuestion message. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.verify|verify} messages.
             * @function encode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion} message InThreadSurveyQuestion message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyQuestion.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.questionText != null && Object.hasOwnProperty.call(message, "questionText"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.questionText);
                if (message.questionId != null && Object.hasOwnProperty.call(message, "questionId"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.questionId);
                if (message.questionOptions != null && message.questionOptions.length)
                    for (var i = 0; i < message.questionOptions.length; ++i)
                        $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.encode(message.questionOptions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

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

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

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

            /**
             * Verifies an InThreadSurveyQuestion message.
             * @function verify
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InThreadSurveyQuestion.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.questionText != null && message.hasOwnProperty("questionText")) {
                    properties._questionText = 1;
                    if (!$util.isString(message.questionText))
                        return "questionText: string expected";
                }
                if (message.questionId != null && message.hasOwnProperty("questionId")) {
                    properties._questionId = 1;
                    if (!$util.isString(message.questionId))
                        return "questionId: string expected";
                }
                if (message.questionOptions != null && message.hasOwnProperty("questionOptions")) {
                    if (!Array.isArray(message.questionOptions))
                        return "questionOptions: array expected";
                    for (var i = 0; i < message.questionOptions.length; ++i) {
                        var error = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.verify(message.questionOptions[i]);
                        if (error)
                            return "questionOptions." + error;
                    }
                }
                return null;
            };

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

            /**
             * Creates a plain object from an InThreadSurveyQuestion message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion} message InThreadSurveyQuestion
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InThreadSurveyQuestion.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.questionOptions = [];
                if (message.questionText != null && message.hasOwnProperty("questionText")) {
                    object.questionText = message.questionText;
                    if (options.oneofs)
                        object._questionText = "questionText";
                }
                if (message.questionId != null && message.hasOwnProperty("questionId")) {
                    object.questionId = message.questionId;
                    if (options.oneofs)
                        object._questionId = "questionId";
                }
                if (message.questionOptions && message.questionOptions.length) {
                    object.questionOptions = [];
                    for (var j = 0; j < message.questionOptions.length; ++j)
                        object.questionOptions[j] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.toObject(message.questionOptions[j], options);
                }
                return object;
            };

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

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

            return InThreadSurveyQuestion;
        })();

        return InThreadSurveyMetadata;
    })();

    AICommon.BotSourcesMetadata = (function() {

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

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

        /**
         * BotSourcesMetadata sources.
         * @member {Array.<AICommon.BotSourcesMetadata.IBotSourceItem>} sources
         * @memberof AICommon.BotSourcesMetadata
         * @instance
         */
        BotSourcesMetadata.prototype.sources = $util.emptyArray;

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

        /**
         * Encodes the specified BotSourcesMetadata message. Does not implicitly {@link AICommon.BotSourcesMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {AICommon.IBotSourcesMetadata} message BotSourcesMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSourcesMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sources != null && message.sources.length)
                for (var i = 0; i < message.sources.length; ++i)
                    $root.AICommon.BotSourcesMetadata.BotSourceItem.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        BotSourcesMetadata.BotSourceItem = (function() {

            /**
             * Properties of a BotSourceItem.
             * @memberof AICommon.BotSourcesMetadata
             * @interface IBotSourceItem
             * @property {AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider|null} [provider] BotSourceItem provider
             * @property {string|null} [thumbnailCdnUrl] BotSourceItem thumbnailCdnUrl
             * @property {string|null} [sourceProviderUrl] BotSourceItem sourceProviderUrl
             * @property {string|null} [sourceQuery] BotSourceItem sourceQuery
             * @property {string|null} [faviconCdnUrl] BotSourceItem faviconCdnUrl
             * @property {number|null} [citationNumber] BotSourceItem citationNumber
             * @property {string|null} [sourceTitle] BotSourceItem sourceTitle
             */

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

            /**
             * BotSourceItem provider.
             * @member {AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider|null|undefined} provider
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.provider = null;

            /**
             * BotSourceItem thumbnailCdnUrl.
             * @member {string|null|undefined} thumbnailCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.thumbnailCdnUrl = null;

            /**
             * BotSourceItem sourceProviderUrl.
             * @member {string|null|undefined} sourceProviderUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceProviderUrl = null;

            /**
             * BotSourceItem sourceQuery.
             * @member {string|null|undefined} sourceQuery
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceQuery = null;

            /**
             * BotSourceItem faviconCdnUrl.
             * @member {string|null|undefined} faviconCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.faviconCdnUrl = null;

            /**
             * BotSourceItem citationNumber.
             * @member {number|null|undefined} citationNumber
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.citationNumber = null;

            /**
             * BotSourceItem sourceTitle.
             * @member {string|null|undefined} sourceTitle
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceTitle = null;

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

            /**
             * BotSourceItem _provider.
             * @member {"provider"|undefined} _provider
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_provider", {
                get: $util.oneOfGetter($oneOfFields = ["provider"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _thumbnailCdnUrl.
             * @member {"thumbnailCdnUrl"|undefined} _thumbnailCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_thumbnailCdnUrl", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailCdnUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _sourceProviderUrl.
             * @member {"sourceProviderUrl"|undefined} _sourceProviderUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_sourceProviderUrl", {
                get: $util.oneOfGetter($oneOfFields = ["sourceProviderUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _sourceQuery.
             * @member {"sourceQuery"|undefined} _sourceQuery
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_sourceQuery", {
                get: $util.oneOfGetter($oneOfFields = ["sourceQuery"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _faviconCdnUrl.
             * @member {"faviconCdnUrl"|undefined} _faviconCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_faviconCdnUrl", {
                get: $util.oneOfGetter($oneOfFields = ["faviconCdnUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _citationNumber.
             * @member {"citationNumber"|undefined} _citationNumber
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_citationNumber", {
                get: $util.oneOfGetter($oneOfFields = ["citationNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _sourceTitle.
             * @member {"sourceTitle"|undefined} _sourceTitle
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_sourceTitle", {
                get: $util.oneOfGetter($oneOfFields = ["sourceTitle"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified BotSourceItem message. Does not implicitly {@link AICommon.BotSourcesMetadata.BotSourceItem.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {AICommon.BotSourcesMetadata.IBotSourceItem} message BotSourceItem message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotSourceItem.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider);
                if (message.thumbnailCdnUrl != null && Object.hasOwnProperty.call(message, "thumbnailCdnUrl"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.thumbnailCdnUrl);
                if (message.sourceProviderUrl != null && Object.hasOwnProperty.call(message, "sourceProviderUrl"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceProviderUrl);
                if (message.sourceQuery != null && Object.hasOwnProperty.call(message, "sourceQuery"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceQuery);
                if (message.faviconCdnUrl != null && Object.hasOwnProperty.call(message, "faviconCdnUrl"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.faviconCdnUrl);
                if (message.citationNumber != null && Object.hasOwnProperty.call(message, "citationNumber"))
                    writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.citationNumber);
                if (message.sourceTitle != null && Object.hasOwnProperty.call(message, "sourceTitle"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceTitle);
                return writer;
            };

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

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

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

            /**
             * Verifies a BotSourceItem message.
             * @function verify
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BotSourceItem.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.provider != null && message.hasOwnProperty("provider")) {
                    properties._provider = 1;
                    switch (message.provider) {
                    default:
                        return "provider: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                    properties._thumbnailCdnUrl = 1;
                    if (!$util.isString(message.thumbnailCdnUrl))
                        return "thumbnailCdnUrl: string expected";
                }
                if (message.sourceProviderUrl != null && message.hasOwnProperty("sourceProviderUrl")) {
                    properties._sourceProviderUrl = 1;
                    if (!$util.isString(message.sourceProviderUrl))
                        return "sourceProviderUrl: string expected";
                }
                if (message.sourceQuery != null && message.hasOwnProperty("sourceQuery")) {
                    properties._sourceQuery = 1;
                    if (!$util.isString(message.sourceQuery))
                        return "sourceQuery: string expected";
                }
                if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                    properties._faviconCdnUrl = 1;
                    if (!$util.isString(message.faviconCdnUrl))
                        return "faviconCdnUrl: string expected";
                }
                if (message.citationNumber != null && message.hasOwnProperty("citationNumber")) {
                    properties._citationNumber = 1;
                    if (!$util.isInteger(message.citationNumber))
                        return "citationNumber: integer expected";
                }
                if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                    properties._sourceTitle = 1;
                    if (!$util.isString(message.sourceTitle))
                        return "sourceTitle: string expected";
                }
                return null;
            };

            /**
             * Creates a BotSourceItem message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotSourcesMetadata.BotSourceItem} BotSourceItem
             */
            BotSourceItem.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotSourcesMetadata.BotSourceItem)
                    return object;
                var message = new $root.AICommon.BotSourcesMetadata.BotSourceItem();
                switch (object.provider) {
                default:
                    if (typeof object.provider === "number") {
                        message.provider = object.provider;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.provider = 0;
                    break;
                case "BING":
                case 1:
                    message.provider = 1;
                    break;
                case "GOOGLE":
                case 2:
                    message.provider = 2;
                    break;
                case "SUPPORT":
                case 3:
                    message.provider = 3;
                    break;
                case "OTHER":
                case 4:
                    message.provider = 4;
                    break;
                }
                if (object.thumbnailCdnUrl != null)
                    message.thumbnailCdnUrl = String(object.thumbnailCdnUrl);
                if (object.sourceProviderUrl != null)
                    message.sourceProviderUrl = String(object.sourceProviderUrl);
                if (object.sourceQuery != null)
                    message.sourceQuery = String(object.sourceQuery);
                if (object.faviconCdnUrl != null)
                    message.faviconCdnUrl = String(object.faviconCdnUrl);
                if (object.citationNumber != null)
                    message.citationNumber = object.citationNumber >>> 0;
                if (object.sourceTitle != null)
                    message.sourceTitle = String(object.sourceTitle);
                return message;
            };

            /**
             * Creates a plain object from a BotSourceItem message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {AICommon.BotSourcesMetadata.BotSourceItem} message BotSourceItem
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BotSourceItem.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.provider != null && message.hasOwnProperty("provider")) {
                    object.provider = options.enums === String ? $root.AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider[message.provider] : message.provider;
                    if (options.oneofs)
                        object._provider = "provider";
                }
                if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                    object.thumbnailCdnUrl = message.thumbnailCdnUrl;
                    if (options.oneofs)
                        object._thumbnailCdnUrl = "thumbnailCdnUrl";
                }
                if (message.sourceProviderUrl != null && message.hasOwnProperty("sourceProviderUrl")) {
                    object.sourceProviderUrl = message.sourceProviderUrl;
                    if (options.oneofs)
                        object._sourceProviderUrl = "sourceProviderUrl";
                }
                if (message.sourceQuery != null && message.hasOwnProperty("sourceQuery")) {
                    object.sourceQuery = message.sourceQuery;
                    if (options.oneofs)
                        object._sourceQuery = "sourceQuery";
                }
                if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                    object.faviconCdnUrl = message.faviconCdnUrl;
                    if (options.oneofs)
                        object._faviconCdnUrl = "faviconCdnUrl";
                }
                if (message.citationNumber != null && message.hasOwnProperty("citationNumber")) {
                    object.citationNumber = message.citationNumber;
                    if (options.oneofs)
                        object._citationNumber = "citationNumber";
                }
                if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                    object.sourceTitle = message.sourceTitle;
                    if (options.oneofs)
                        object._sourceTitle = "sourceTitle";
                }
                return object;
            };

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

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

            /**
             * SourceProvider enum.
             * @name AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} BING=1 BING value
             * @property {number} GOOGLE=2 GOOGLE value
             * @property {number} SUPPORT=3 SUPPORT value
             * @property {number} OTHER=4 OTHER value
             */
            BotSourceItem.SourceProvider = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "BING"] = 1;
                values[valuesById[2] = "GOOGLE"] = 2;
                values[valuesById[3] = "SUPPORT"] = 3;
                values[valuesById[4] = "OTHER"] = 4;
                return values;
            })();

            return BotSourceItem;
        })();

        return BotSourcesMetadata;
    })();

    AICommon.BotAgeCollectionMetadata = (function() {

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

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

        /**
         * BotAgeCollectionMetadata ageCollectionEligible.
         * @member {boolean|null|undefined} ageCollectionEligible
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.ageCollectionEligible = null;

        /**
         * BotAgeCollectionMetadata shouldTriggerAgeCollectionOnClient.
         * @member {boolean|null|undefined} shouldTriggerAgeCollectionOnClient
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.shouldTriggerAgeCollectionOnClient = null;

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

        /**
         * BotAgeCollectionMetadata _ageCollectionEligible.
         * @member {"ageCollectionEligible"|undefined} _ageCollectionEligible
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        Object.defineProperty(BotAgeCollectionMetadata.prototype, "_ageCollectionEligible", {
            get: $util.oneOfGetter($oneOfFields = ["ageCollectionEligible"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAgeCollectionMetadata _shouldTriggerAgeCollectionOnClient.
         * @member {"shouldTriggerAgeCollectionOnClient"|undefined} _shouldTriggerAgeCollectionOnClient
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        Object.defineProperty(BotAgeCollectionMetadata.prototype, "_shouldTriggerAgeCollectionOnClient", {
            get: $util.oneOfGetter($oneOfFields = ["shouldTriggerAgeCollectionOnClient"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

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

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

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

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

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

        return BotAgeCollectionMetadata;
    })();

    AICommon.BotImagineMetadata = (function() {

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

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

        /**
         * BotImagineMetadata imagineType.
         * @member {AICommon.BotImagineMetadata.ImagineType|null|undefined} imagineType
         * @memberof AICommon.BotImagineMetadata
         * @instance
         */
        BotImagineMetadata.prototype.imagineType = null;

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

        /**
         * BotImagineMetadata _imagineType.
         * @member {"imagineType"|undefined} _imagineType
         * @memberof AICommon.BotImagineMetadata
         * @instance
         */
        Object.defineProperty(BotImagineMetadata.prototype, "_imagineType", {
            get: $util.oneOfGetter($oneOfFields = ["imagineType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

        /**
         * Verifies a BotImagineMetadata message.
         * @function verify
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotImagineMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.imagineType != null && message.hasOwnProperty("imagineType")) {
                properties._imagineType = 1;
                switch (message.imagineType) {
                default:
                    return "imagineType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotImagineMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotImagineMetadata} BotImagineMetadata
         */
        BotImagineMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotImagineMetadata)
                return object;
            var message = new $root.AICommon.BotImagineMetadata();
            switch (object.imagineType) {
            default:
                if (typeof object.imagineType === "number") {
                    message.imagineType = object.imagineType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.imagineType = 0;
                break;
            case "IMAGINE":
            case 1:
                message.imagineType = 1;
                break;
            case "MEMU":
            case 2:
                message.imagineType = 2;
                break;
            case "FLASH":
            case 3:
                message.imagineType = 3;
                break;
            case "EDIT":
            case 4:
                message.imagineType = 4;
                break;
            }
            return message;
        };

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

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

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

        /**
         * ImagineType enum.
         * @name AICommon.BotImagineMetadata.ImagineType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} IMAGINE=1 IMAGINE value
         * @property {number} MEMU=2 MEMU value
         * @property {number} FLASH=3 FLASH value
         * @property {number} EDIT=4 EDIT value
         */
        BotImagineMetadata.ImagineType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "IMAGINE"] = 1;
            values[valuesById[2] = "MEMU"] = 2;
            values[valuesById[3] = "FLASH"] = 3;
            values[valuesById[4] = "EDIT"] = 4;
            return values;
        })();

        return BotImagineMetadata;
    })();

    AICommon.BotQuotaMetadata = (function() {

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

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

        /**
         * BotQuotaMetadata botFeatureQuotaMetadata.
         * @member {Array.<AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata>} botFeatureQuotaMetadata
         * @memberof AICommon.BotQuotaMetadata
         * @instance
         */
        BotQuotaMetadata.prototype.botFeatureQuotaMetadata = $util.emptyArray;

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

        /**
         * Encodes the specified BotQuotaMetadata message. Does not implicitly {@link AICommon.BotQuotaMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {AICommon.IBotQuotaMetadata} message BotQuotaMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotQuotaMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.botFeatureQuotaMetadata != null && message.botFeatureQuotaMetadata.length)
                for (var i = 0; i < message.botFeatureQuotaMetadata.length; ++i)
                    $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.encode(message.botFeatureQuotaMetadata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        BotQuotaMetadata.BotFeatureQuotaMetadata = (function() {

            /**
             * Properties of a BotFeatureQuotaMetadata.
             * @memberof AICommon.BotQuotaMetadata
             * @interface IBotFeatureQuotaMetadata
             * @property {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType|null} [featureType] BotFeatureQuotaMetadata featureType
             * @property {number|null} [remainingQuota] BotFeatureQuotaMetadata remainingQuota
             * @property {number|Long|null} [expirationTimestamp] BotFeatureQuotaMetadata expirationTimestamp
             */

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

            /**
             * BotFeatureQuotaMetadata featureType.
             * @member {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType|null|undefined} featureType
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.featureType = null;

            /**
             * BotFeatureQuotaMetadata remainingQuota.
             * @member {number|null|undefined} remainingQuota
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.remainingQuota = null;

            /**
             * BotFeatureQuotaMetadata expirationTimestamp.
             * @member {number|Long|null|undefined} expirationTimestamp
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.expirationTimestamp = null;

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

            /**
             * BotFeatureQuotaMetadata _featureType.
             * @member {"featureType"|undefined} _featureType
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_featureType", {
                get: $util.oneOfGetter($oneOfFields = ["featureType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotFeatureQuotaMetadata _remainingQuota.
             * @member {"remainingQuota"|undefined} _remainingQuota
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_remainingQuota", {
                get: $util.oneOfGetter($oneOfFields = ["remainingQuota"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotFeatureQuotaMetadata _expirationTimestamp.
             * @member {"expirationTimestamp"|undefined} _expirationTimestamp
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_expirationTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["expirationTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified BotFeatureQuotaMetadata message. Does not implicitly {@link AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata} message BotFeatureQuotaMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotFeatureQuotaMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.featureType != null && Object.hasOwnProperty.call(message, "featureType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.featureType);
                if (message.remainingQuota != null && Object.hasOwnProperty.call(message, "remainingQuota"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.remainingQuota);
                if (message.expirationTimestamp != null && Object.hasOwnProperty.call(message, "expirationTimestamp"))
                    writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.expirationTimestamp);
                return writer;
            };

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

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

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

            /**
             * Verifies a BotFeatureQuotaMetadata message.
             * @function verify
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BotFeatureQuotaMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.featureType != null && message.hasOwnProperty("featureType")) {
                    properties._featureType = 1;
                    switch (message.featureType) {
                    default:
                        return "featureType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.remainingQuota != null && message.hasOwnProperty("remainingQuota")) {
                    properties._remainingQuota = 1;
                    if (!$util.isInteger(message.remainingQuota))
                        return "remainingQuota: integer expected";
                }
                if (message.expirationTimestamp != null && message.hasOwnProperty("expirationTimestamp")) {
                    properties._expirationTimestamp = 1;
                    if (!$util.isInteger(message.expirationTimestamp) && !(message.expirationTimestamp && $util.isInteger(message.expirationTimestamp.low) && $util.isInteger(message.expirationTimestamp.high)))
                        return "expirationTimestamp: integer|Long expected";
                }
                return null;
            };

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

            /**
             * Creates a plain object from a BotFeatureQuotaMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata} message BotFeatureQuotaMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BotFeatureQuotaMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.featureType != null && message.hasOwnProperty("featureType")) {
                    object.featureType = options.enums === String ? $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType[message.featureType] === undefined ? message.featureType : $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType[message.featureType] : message.featureType;
                    if (options.oneofs)
                        object._featureType = "featureType";
                }
                if (message.remainingQuota != null && message.hasOwnProperty("remainingQuota")) {
                    object.remainingQuota = message.remainingQuota;
                    if (options.oneofs)
                        object._remainingQuota = "remainingQuota";
                }
                if (message.expirationTimestamp != null && message.hasOwnProperty("expirationTimestamp")) {
                    if (typeof message.expirationTimestamp === "number")
                        object.expirationTimestamp = options.longs === String ? String(message.expirationTimestamp) : message.expirationTimestamp;
                    else
                        object.expirationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expirationTimestamp) : options.longs === Number ? new $util.LongBits(message.expirationTimestamp.low >>> 0, message.expirationTimestamp.high >>> 0).toNumber(true) : message.expirationTimestamp;
                    if (options.oneofs)
                        object._expirationTimestamp = "expirationTimestamp";
                }
                return object;
            };

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

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

            /**
             * BotFeatureType enum.
             * @name AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType
             * @enum {number}
             * @property {number} UNKNOWN_FEATURE=0 UNKNOWN_FEATURE value
             * @property {number} REASONING_FEATURE=1 REASONING_FEATURE value
             */
            BotFeatureQuotaMetadata.BotFeatureType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN_FEATURE"] = 0;
                values[valuesById[1] = "REASONING_FEATURE"] = 1;
                return values;
            })();

            return BotFeatureQuotaMetadata;
        })();

        return BotQuotaMetadata;
    })();

    AICommon.BotModeSelectionMetadata = (function() {

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

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

        /**
         * BotModeSelectionMetadata mode.
         * @member {Array.<AICommon.BotModeSelectionMetadata.BotUserSelectionMode>} mode
         * @memberof AICommon.BotModeSelectionMetadata
         * @instance
         */
        BotModeSelectionMetadata.prototype.mode = $util.emptyArray;

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

        /**
         * Encodes the specified BotModeSelectionMetadata message. Does not implicitly {@link AICommon.BotModeSelectionMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {AICommon.IBotModeSelectionMetadata} message BotModeSelectionMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotModeSelectionMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.mode != null && message.mode.length) {
                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                for (var i = 0; i < message.mode.length; ++i)
                    writer.int32(message.mode[i]);
                writer.ldelim();
            }
            return writer;
        };

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

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

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

        /**
         * Verifies a BotModeSelectionMetadata message.
         * @function verify
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotModeSelectionMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.mode != null && message.hasOwnProperty("mode")) {
                if (!Array.isArray(message.mode))
                    return "mode: array expected";
                for (var i = 0; i < message.mode.length; ++i)
                    switch (message.mode[i]) {
                    default:
                        return "mode: enum value[] expected";
                    case 0:
                    case 1:
                        break;
                    }
            }
            return null;
        };

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

        /**
         * Creates a plain object from a BotModeSelectionMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {AICommon.BotModeSelectionMetadata} message BotModeSelectionMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotModeSelectionMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.mode = [];
            if (message.mode && message.mode.length) {
                object.mode = [];
                for (var j = 0; j < message.mode.length; ++j)
                    object.mode[j] = options.enums === String ? $root.AICommon.BotModeSelectionMetadata.BotUserSelectionMode[message.mode[j]] === undefined ? message.mode[j] : $root.AICommon.BotModeSelectionMetadata.BotUserSelectionMode[message.mode[j]] : message.mode[j];
            }
            return object;
        };

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

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

        /**
         * BotUserSelectionMode enum.
         * @name AICommon.BotModeSelectionMetadata.BotUserSelectionMode
         * @enum {number}
         * @property {number} UNKNOWN_MODE=0 UNKNOWN_MODE value
         * @property {number} REASONING_MODE=1 REASONING_MODE value
         */
        BotModeSelectionMetadata.BotUserSelectionMode = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_MODE"] = 0;
            values[valuesById[1] = "REASONING_MODE"] = 1;
            return values;
        })();

        return BotModeSelectionMetadata;
    })();

    AICommon.BotCapabilityMetadata = (function() {

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

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

        /**
         * BotCapabilityMetadata capabilities.
         * @member {Array.<AICommon.BotCapabilityMetadata.BotCapabilityType>} capabilities
         * @memberof AICommon.BotCapabilityMetadata
         * @instance
         */
        BotCapabilityMetadata.prototype.capabilities = $util.emptyArray;

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

        /**
         * Encodes the specified BotCapabilityMetadata message. Does not implicitly {@link AICommon.BotCapabilityMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {AICommon.IBotCapabilityMetadata} message BotCapabilityMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotCapabilityMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.capabilities != null && message.capabilities.length) {
                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                for (var i = 0; i < message.capabilities.length; ++i)
                    writer.int32(message.capabilities[i]);
                writer.ldelim();
            }
            return writer;
        };

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

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

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

        /**
         * Verifies a BotCapabilityMetadata message.
         * @function verify
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotCapabilityMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.capabilities != null && message.hasOwnProperty("capabilities")) {
                if (!Array.isArray(message.capabilities))
                    return "capabilities: array expected";
                for (var i = 0; i < message.capabilities.length; ++i)
                    switch (message.capabilities[i]) {
                    default:
                        return "capabilities: enum value[] expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                    case 24:
                    case 25:
                    case 26:
                    case 27:
                    case 28:
                    case 29:
                    case 30:
                    case 31:
                    case 32:
                    case 33:
                    case 34:
                    case 35:
                    case 36:
                    case 37:
                    case 38:
                    case 39:
                    case 40:
                    case 41:
                    case 42:
                    case 43:
                    case 44:
                    case 45:
                        break;
                    }
            }
            return null;
        };

        /**
         * Creates a BotCapabilityMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotCapabilityMetadata} BotCapabilityMetadata
         */
        BotCapabilityMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotCapabilityMetadata)
                return object;
            var message = new $root.AICommon.BotCapabilityMetadata();
            if (object.capabilities) {
                if (!Array.isArray(object.capabilities))
                    throw TypeError(".AICommon.BotCapabilityMetadata.capabilities: array expected");
                message.capabilities = [];
                for (var i = 0; i < object.capabilities.length; ++i)
                    switch (object.capabilities[i]) {
                    default:
                        if (typeof object.capabilities[i] === "number") {
                            message.capabilities[i] = object.capabilities[i];
                            break;
                        }
                    case "UNKNOWN":
                    case 0:
                        message.capabilities[i] = 0;
                        break;
                    case "PROGRESS_INDICATOR":
                    case 1:
                        message.capabilities[i] = 1;
                        break;
                    case "RICH_RESPONSE_HEADING":
                    case 2:
                        message.capabilities[i] = 2;
                        break;
                    case "RICH_RESPONSE_NESTED_LIST":
                    case 3:
                        message.capabilities[i] = 3;
                        break;
                    case "AI_MEMORY":
                    case 4:
                        message.capabilities[i] = 4;
                        break;
                    case "RICH_RESPONSE_THREAD_SURFING":
                    case 5:
                        message.capabilities[i] = 5;
                        break;
                    case "RICH_RESPONSE_TABLE":
                    case 6:
                        message.capabilities[i] = 6;
                        break;
                    case "RICH_RESPONSE_CODE":
                    case 7:
                        message.capabilities[i] = 7;
                        break;
                    case "RICH_RESPONSE_STRUCTURED_RESPONSE":
                    case 8:
                        message.capabilities[i] = 8;
                        break;
                    case "RICH_RESPONSE_INLINE_IMAGE":
                    case 9:
                        message.capabilities[i] = 9;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_CONTROL":
                    case 10:
                        message.capabilities[i] = 10;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_1":
                    case 11:
                        message.capabilities[i] = 11;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_2":
                    case 12:
                        message.capabilities[i] = 12;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_3":
                    case 13:
                        message.capabilities[i] = 13;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_4":
                    case 14:
                        message.capabilities[i] = 14;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_5":
                    case 15:
                        message.capabilities[i] = 15;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_6":
                    case 16:
                        message.capabilities[i] = 16;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_7":
                    case 17:
                        message.capabilities[i] = 17;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_8":
                    case 18:
                        message.capabilities[i] = 18;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_9":
                    case 19:
                        message.capabilities[i] = 19;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_10":
                    case 20:
                        message.capabilities[i] = 20;
                        break;
                    case "RICH_RESPONSE_SUB_HEADING":
                    case 21:
                        message.capabilities[i] = 21;
                        break;
                    case "RICH_RESPONSE_GRID_IMAGE":
                    case 22:
                        message.capabilities[i] = 22;
                        break;
                    case "AI_STUDIO_UGC_MEMORY":
                    case 23:
                        message.capabilities[i] = 23;
                        break;
                    case "RICH_RESPONSE_LATEX":
                    case 24:
                        message.capabilities[i] = 24;
                        break;
                    case "RICH_RESPONSE_MAPS":
                    case 25:
                        message.capabilities[i] = 25;
                        break;
                    case "RICH_RESPONSE_INLINE_REELS":
                    case 26:
                        message.capabilities[i] = 26;
                        break;
                    case "AGENTIC_PLANNING":
                    case 27:
                        message.capabilities[i] = 27;
                        break;
                    case "ACCOUNT_LINKING":
                    case 28:
                        message.capabilities[i] = 28;
                        break;
                    case "STREAMING_DISAGGREGATION":
                    case 29:
                        message.capabilities[i] = 29;
                        break;
                    case "RICH_RESPONSE_GRID_IMAGE_3P":
                    case 30:
                        message.capabilities[i] = 30;
                        break;
                    case "RICH_RESPONSE_LATEX_INLINE":
                    case 31:
                        message.capabilities[i] = 31;
                        break;
                    case "QUERY_PLAN":
                    case 32:
                        message.capabilities[i] = 32;
                        break;
                    case "PROACTIVE_MESSAGE":
                    case 33:
                        message.capabilities[i] = 33;
                        break;
                    case "RICH_RESPONSE_UNIFIED_RESPONSE":
                    case 34:
                        message.capabilities[i] = 34;
                        break;
                    case "PROMOTION_MESSAGE":
                    case 35:
                        message.capabilities[i] = 35;
                        break;
                    case "SIMPLIFIED_PROFILE_PAGE":
                    case 36:
                        message.capabilities[i] = 36;
                        break;
                    case "RICH_RESPONSE_SOURCES_IN_MESSAGE":
                    case 37:
                        message.capabilities[i] = 37;
                        break;
                    case "RICH_RESPONSE_SIDE_BY_SIDE_SURVEY":
                    case 38:
                        message.capabilities[i] = 38;
                        break;
                    case "RICH_RESPONSE_UNIFIED_TEXT_COMPONENT":
                    case 39:
                        message.capabilities[i] = 39;
                        break;
                    case "AI_SHARED_MEMORY":
                    case 40:
                        message.capabilities[i] = 40;
                        break;
                    case "RICH_RESPONSE_UNIFIED_SOURCES":
                    case 41:
                        message.capabilities[i] = 41;
                        break;
                    case "RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS":
                    case 42:
                        message.capabilities[i] = 42;
                        break;
                    case "RICH_RESPONSE_UR_INLINE_REELS_ENABLED":
                    case 43:
                        message.capabilities[i] = 43;
                        break;
                    case "RICH_RESPONSE_UR_MEDIA_GRID_ENABLED":
                    case 44:
                        message.capabilities[i] = 44;
                        break;
                    case "RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER":
                    case 45:
                        message.capabilities[i] = 45;
                        break;
                    }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotCapabilityMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {AICommon.BotCapabilityMetadata} message BotCapabilityMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotCapabilityMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.capabilities = [];
            if (message.capabilities && message.capabilities.length) {
                object.capabilities = [];
                for (var j = 0; j < message.capabilities.length; ++j)
                    object.capabilities[j] = options.enums === String ? $root.AICommon.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] === undefined ? message.capabilities[j] : $root.AICommon.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] : message.capabilities[j];
            }
            return object;
        };

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

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

        /**
         * BotCapabilityType enum.
         * @name AICommon.BotCapabilityMetadata.BotCapabilityType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} PROGRESS_INDICATOR=1 PROGRESS_INDICATOR value
         * @property {number} RICH_RESPONSE_HEADING=2 RICH_RESPONSE_HEADING value
         * @property {number} RICH_RESPONSE_NESTED_LIST=3 RICH_RESPONSE_NESTED_LIST value
         * @property {number} AI_MEMORY=4 AI_MEMORY value
         * @property {number} RICH_RESPONSE_THREAD_SURFING=5 RICH_RESPONSE_THREAD_SURFING value
         * @property {number} RICH_RESPONSE_TABLE=6 RICH_RESPONSE_TABLE value
         * @property {number} RICH_RESPONSE_CODE=7 RICH_RESPONSE_CODE value
         * @property {number} RICH_RESPONSE_STRUCTURED_RESPONSE=8 RICH_RESPONSE_STRUCTURED_RESPONSE value
         * @property {number} RICH_RESPONSE_INLINE_IMAGE=9 RICH_RESPONSE_INLINE_IMAGE value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_CONTROL=10 WA_IG_1P_PLUGIN_RANKING_CONTROL value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_1=11 WA_IG_1P_PLUGIN_RANKING_UPDATE_1 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_2=12 WA_IG_1P_PLUGIN_RANKING_UPDATE_2 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_3=13 WA_IG_1P_PLUGIN_RANKING_UPDATE_3 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_4=14 WA_IG_1P_PLUGIN_RANKING_UPDATE_4 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_5=15 WA_IG_1P_PLUGIN_RANKING_UPDATE_5 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_6=16 WA_IG_1P_PLUGIN_RANKING_UPDATE_6 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_7=17 WA_IG_1P_PLUGIN_RANKING_UPDATE_7 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_8=18 WA_IG_1P_PLUGIN_RANKING_UPDATE_8 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_9=19 WA_IG_1P_PLUGIN_RANKING_UPDATE_9 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_10=20 WA_IG_1P_PLUGIN_RANKING_UPDATE_10 value
         * @property {number} RICH_RESPONSE_SUB_HEADING=21 RICH_RESPONSE_SUB_HEADING value
         * @property {number} RICH_RESPONSE_GRID_IMAGE=22 RICH_RESPONSE_GRID_IMAGE value
         * @property {number} AI_STUDIO_UGC_MEMORY=23 AI_STUDIO_UGC_MEMORY value
         * @property {number} RICH_RESPONSE_LATEX=24 RICH_RESPONSE_LATEX value
         * @property {number} RICH_RESPONSE_MAPS=25 RICH_RESPONSE_MAPS value
         * @property {number} RICH_RESPONSE_INLINE_REELS=26 RICH_RESPONSE_INLINE_REELS value
         * @property {number} AGENTIC_PLANNING=27 AGENTIC_PLANNING value
         * @property {number} ACCOUNT_LINKING=28 ACCOUNT_LINKING value
         * @property {number} STREAMING_DISAGGREGATION=29 STREAMING_DISAGGREGATION value
         * @property {number} RICH_RESPONSE_GRID_IMAGE_3P=30 RICH_RESPONSE_GRID_IMAGE_3P value
         * @property {number} RICH_RESPONSE_LATEX_INLINE=31 RICH_RESPONSE_LATEX_INLINE value
         * @property {number} QUERY_PLAN=32 QUERY_PLAN value
         * @property {number} PROACTIVE_MESSAGE=33 PROACTIVE_MESSAGE value
         * @property {number} RICH_RESPONSE_UNIFIED_RESPONSE=34 RICH_RESPONSE_UNIFIED_RESPONSE value
         * @property {number} PROMOTION_MESSAGE=35 PROMOTION_MESSAGE value
         * @property {number} SIMPLIFIED_PROFILE_PAGE=36 SIMPLIFIED_PROFILE_PAGE value
         * @property {number} RICH_RESPONSE_SOURCES_IN_MESSAGE=37 RICH_RESPONSE_SOURCES_IN_MESSAGE value
         * @property {number} RICH_RESPONSE_SIDE_BY_SIDE_SURVEY=38 RICH_RESPONSE_SIDE_BY_SIDE_SURVEY value
         * @property {number} RICH_RESPONSE_UNIFIED_TEXT_COMPONENT=39 RICH_RESPONSE_UNIFIED_TEXT_COMPONENT value
         * @property {number} AI_SHARED_MEMORY=40 AI_SHARED_MEMORY value
         * @property {number} RICH_RESPONSE_UNIFIED_SOURCES=41 RICH_RESPONSE_UNIFIED_SOURCES value
         * @property {number} RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS=42 RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS value
         * @property {number} RICH_RESPONSE_UR_INLINE_REELS_ENABLED=43 RICH_RESPONSE_UR_INLINE_REELS_ENABLED value
         * @property {number} RICH_RESPONSE_UR_MEDIA_GRID_ENABLED=44 RICH_RESPONSE_UR_MEDIA_GRID_ENABLED value
         * @property {number} RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER=45 RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER value
         */
        BotCapabilityMetadata.BotCapabilityType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "PROGRESS_INDICATOR"] = 1;
            values[valuesById[2] = "RICH_RESPONSE_HEADING"] = 2;
            values[valuesById[3] = "RICH_RESPONSE_NESTED_LIST"] = 3;
            values[valuesById[4] = "AI_MEMORY"] = 4;
            values[valuesById[5] = "RICH_RESPONSE_THREAD_SURFING"] = 5;
            values[valuesById[6] = "RICH_RESPONSE_TABLE"] = 6;
            values[valuesById[7] = "RICH_RESPONSE_CODE"] = 7;
            values[valuesById[8] = "RICH_RESPONSE_STRUCTURED_RESPONSE"] = 8;
            values[valuesById[9] = "RICH_RESPONSE_INLINE_IMAGE"] = 9;
            values[valuesById[10] = "WA_IG_1P_PLUGIN_RANKING_CONTROL"] = 10;
            values[valuesById[11] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_1"] = 11;
            values[valuesById[12] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_2"] = 12;
            values[valuesById[13] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_3"] = 13;
            values[valuesById[14] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_4"] = 14;
            values[valuesById[15] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_5"] = 15;
            values[valuesById[16] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_6"] = 16;
            values[valuesById[17] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_7"] = 17;
            values[valuesById[18] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_8"] = 18;
            values[valuesById[19] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_9"] = 19;
            values[valuesById[20] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_10"] = 20;
            values[valuesById[21] = "RICH_RESPONSE_SUB_HEADING"] = 21;
            values[valuesById[22] = "RICH_RESPONSE_GRID_IMAGE"] = 22;
            values[valuesById[23] = "AI_STUDIO_UGC_MEMORY"] = 23;
            values[valuesById[24] = "RICH_RESPONSE_LATEX"] = 24;
            values[valuesById[25] = "RICH_RESPONSE_MAPS"] = 25;
            values[valuesById[26] = "RICH_RESPONSE_INLINE_REELS"] = 26;
            values[valuesById[27] = "AGENTIC_PLANNING"] = 27;
            values[valuesById[28] = "ACCOUNT_LINKING"] = 28;
            values[valuesById[29] = "STREAMING_DISAGGREGATION"] = 29;
            values[valuesById[30] = "RICH_RESPONSE_GRID_IMAGE_3P"] = 30;
            values[valuesById[31] = "RICH_RESPONSE_LATEX_INLINE"] = 31;
            values[valuesById[32] = "QUERY_PLAN"] = 32;
            values[valuesById[33] = "PROACTIVE_MESSAGE"] = 33;
            values[valuesById[34] = "RICH_RESPONSE_UNIFIED_RESPONSE"] = 34;
            values[valuesById[35] = "PROMOTION_MESSAGE"] = 35;
            values[valuesById[36] = "SIMPLIFIED_PROFILE_PAGE"] = 36;
            values[valuesById[37] = "RICH_RESPONSE_SOURCES_IN_MESSAGE"] = 37;
            values[valuesById[38] = "RICH_RESPONSE_SIDE_BY_SIDE_SURVEY"] = 38;
            values[valuesById[39] = "RICH_RESPONSE_UNIFIED_TEXT_COMPONENT"] = 39;
            values[valuesById[40] = "AI_SHARED_MEMORY"] = 40;
            values[valuesById[41] = "RICH_RESPONSE_UNIFIED_SOURCES"] = 41;
            values[valuesById[42] = "RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS"] = 42;
            values[valuesById[43] = "RICH_RESPONSE_UR_INLINE_REELS_ENABLED"] = 43;
            values[valuesById[44] = "RICH_RESPONSE_UR_MEDIA_GRID_ENABLED"] = 44;
            values[valuesById[45] = "RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER"] = 45;
            return values;
        })();

        return BotCapabilityMetadata;
    })();

    AICommon.BotProgressIndicatorMetadata = (function() {

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

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

        /**
         * BotProgressIndicatorMetadata progressDescription.
         * @member {string|null|undefined} progressDescription
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         */
        BotProgressIndicatorMetadata.prototype.progressDescription = null;

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

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

        /**
         * BotProgressIndicatorMetadata _progressDescription.
         * @member {"progressDescription"|undefined} _progressDescription
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         */
        Object.defineProperty(BotProgressIndicatorMetadata.prototype, "_progressDescription", {
            get: $util.oneOfGetter($oneOfFields = ["progressDescription"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotProgressIndicatorMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {AICommon.IBotProgressIndicatorMetadata} message BotProgressIndicatorMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotProgressIndicatorMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.progressDescription != null && Object.hasOwnProperty.call(message, "progressDescription"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.progressDescription);
            if (message.stepsMetadata != null && message.stepsMetadata.length)
                for (var i = 0; i < message.stepsMetadata.length; ++i)
                    $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.encode(message.stepsMetadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        BotProgressIndicatorMetadata.BotPlanningStepMetadata = (function() {

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

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

            /**
             * BotPlanningStepMetadata statusTitle.
             * @member {string|null|undefined} statusTitle
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusTitle = null;

            /**
             * BotPlanningStepMetadata statusBody.
             * @member {string|null|undefined} statusBody
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusBody = null;

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

            /**
             * BotPlanningStepMetadata status.
             * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null|undefined} status
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.status = null;

            /**
             * BotPlanningStepMetadata isReasoning.
             * @member {boolean|null|undefined} isReasoning
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isReasoning = null;

            /**
             * BotPlanningStepMetadata isEnhancedSearch.
             * @member {boolean|null|undefined} isEnhancedSearch
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isEnhancedSearch = null;

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

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

            /**
             * BotPlanningStepMetadata _statusTitle.
             * @member {"statusTitle"|undefined} _statusTitle
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_statusTitle", {
                get: $util.oneOfGetter($oneOfFields = ["statusTitle"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotPlanningStepMetadata _statusBody.
             * @member {"statusBody"|undefined} _statusBody
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_statusBody", {
                get: $util.oneOfGetter($oneOfFields = ["statusBody"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * BotPlanningStepMetadata _isReasoning.
             * @member {"isReasoning"|undefined} _isReasoning
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_isReasoning", {
                get: $util.oneOfGetter($oneOfFields = ["isReasoning"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotPlanningStepMetadata _isEnhancedSearch.
             * @member {"isEnhancedSearch"|undefined} _isEnhancedSearch
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_isEnhancedSearch", {
                get: $util.oneOfGetter($oneOfFields = ["isEnhancedSearch"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified BotPlanningStepMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata} message BotPlanningStepMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotPlanningStepMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.statusTitle != null && Object.hasOwnProperty.call(message, "statusTitle"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.statusTitle);
                if (message.statusBody != null && Object.hasOwnProperty.call(message, "statusBody"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.statusBody);
                if (message.sourcesMetadata != null && message.sourcesMetadata.length)
                    for (var i = 0; i < message.sourcesMetadata.length; ++i)
                        $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.encode(message.sourcesMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.status != null && Object.hasOwnProperty.call(message, "status"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status);
                if (message.isReasoning != null && Object.hasOwnProperty.call(message, "isReasoning"))
                    writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isReasoning);
                if (message.isEnhancedSearch != null && Object.hasOwnProperty.call(message, "isEnhancedSearch"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isEnhancedSearch);
                if (message.sections != null && message.sections.length)
                    for (var i = 0; i < message.sections.length; ++i)
                        $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.encode(message.sections[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                return writer;
            };

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

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

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

            /**
             * Verifies a BotPlanningStepMetadata message.
             * @function verify
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BotPlanningStepMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.statusTitle != null && message.hasOwnProperty("statusTitle")) {
                    properties._statusTitle = 1;
                    if (!$util.isString(message.statusTitle))
                        return "statusTitle: string expected";
                }
                if (message.statusBody != null && message.hasOwnProperty("statusBody")) {
                    properties._statusBody = 1;
                    if (!$util.isString(message.statusBody))
                        return "statusBody: string expected";
                }
                if (message.sourcesMetadata != null && message.hasOwnProperty("sourcesMetadata")) {
                    if (!Array.isArray(message.sourcesMetadata))
                        return "sourcesMetadata: array expected";
                    for (var i = 0; i < message.sourcesMetadata.length; ++i) {
                        var error = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify(message.sourcesMetadata[i]);
                        if (error)
                            return "sourcesMetadata." + error;
                    }
                }
                if (message.status != null && message.hasOwnProperty("status")) {
                    properties._status = 1;
                    switch (message.status) {
                    default:
                        return "status: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.isReasoning != null && message.hasOwnProperty("isReasoning")) {
                    properties._isReasoning = 1;
                    if (typeof message.isReasoning !== "boolean")
                        return "isReasoning: boolean expected";
                }
                if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch")) {
                    properties._isEnhancedSearch = 1;
                    if (typeof message.isEnhancedSearch !== "boolean")
                        return "isEnhancedSearch: boolean expected";
                }
                if (message.sections != null && message.hasOwnProperty("sections")) {
                    if (!Array.isArray(message.sections))
                        return "sections: array expected";
                    for (var i = 0; i < message.sections.length; ++i) {
                        var error = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.verify(message.sections[i]);
                        if (error)
                            return "sections." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a BotPlanningStepMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata
             */
            BotPlanningStepMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata)
                    return object;
                var message = new $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata();
                if (object.statusTitle != null)
                    message.statusTitle = String(object.statusTitle);
                if (object.statusBody != null)
                    message.statusBody = String(object.statusBody);
                if (object.sourcesMetadata) {
                    if (!Array.isArray(object.sourcesMetadata))
                        throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: array expected");
                    message.sourcesMetadata = [];
                    for (var i = 0; i < object.sourcesMetadata.length; ++i) {
                        if (typeof object.sourcesMetadata[i] !== "object")
                            throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: object expected");
                        message.sourcesMetadata[i] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.fromObject(object.sourcesMetadata[i]);
                    }
                }
                switch (object.status) {
                default:
                    if (typeof object.status === "number") {
                        message.status = object.status;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.status = 0;
                    break;
                case "PLANNED":
                case 1:
                    message.status = 1;
                    break;
                case "EXECUTING":
                case 2:
                    message.status = 2;
                    break;
                case "FINISHED":
                case 3:
                    message.status = 3;
                    break;
                }
                if (object.isReasoning != null)
                    message.isReasoning = Boolean(object.isReasoning);
                if (object.isEnhancedSearch != null)
                    message.isEnhancedSearch = Boolean(object.isEnhancedSearch);
                if (object.sections) {
                    if (!Array.isArray(object.sections))
                        throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sections: array expected");
                    message.sections = [];
                    for (var i = 0; i < object.sections.length; ++i) {
                        if (typeof object.sections[i] !== "object")
                            throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sections: object expected");
                        message.sections[i] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.fromObject(object.sections[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a BotPlanningStepMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata} message BotPlanningStepMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BotPlanningStepMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults) {
                    object.sourcesMetadata = [];
                    object.sections = [];
                }
                if (message.statusTitle != null && message.hasOwnProperty("statusTitle")) {
                    object.statusTitle = message.statusTitle;
                    if (options.oneofs)
                        object._statusTitle = "statusTitle";
                }
                if (message.statusBody != null && message.hasOwnProperty("statusBody")) {
                    object.statusBody = message.statusBody;
                    if (options.oneofs)
                        object._statusBody = "statusBody";
                }
                if (message.sourcesMetadata && message.sourcesMetadata.length) {
                    object.sourcesMetadata = [];
                    for (var j = 0; j < message.sourcesMetadata.length; ++j)
                        object.sourcesMetadata[j] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.toObject(message.sourcesMetadata[j], options);
                }
                if (message.status != null && message.hasOwnProperty("status")) {
                    object.status = options.enums === String ? $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[message.status] === undefined ? message.status : $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[message.status] : message.status;
                    if (options.oneofs)
                        object._status = "status";
                }
                if (message.isReasoning != null && message.hasOwnProperty("isReasoning")) {
                    object.isReasoning = message.isReasoning;
                    if (options.oneofs)
                        object._isReasoning = "isReasoning";
                }
                if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch")) {
                    object.isEnhancedSearch = message.isEnhancedSearch;
                    if (options.oneofs)
                        object._isEnhancedSearch = "isEnhancedSearch";
                }
                if (message.sections && message.sections.length) {
                    object.sections = [];
                    for (var j = 0; j < message.sections.length; ++j)
                        object.sections[j] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.toObject(message.sections[j], options);
                }
                return object;
            };

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

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

            BotPlanningStepMetadata.BotPlanningSearchSourceMetadata = (function() {

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

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

                /**
                 * BotPlanningSearchSourceMetadata title.
                 * @member {string|null|undefined} title
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.title = null;

                /**
                 * BotPlanningSearchSourceMetadata provider.
                 * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider|null|undefined} provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.provider = null;

                /**
                 * BotPlanningSearchSourceMetadata sourceUrl.
                 * @member {string|null|undefined} sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.sourceUrl = null;

                /**
                 * BotPlanningSearchSourceMetadata favIconUrl.
                 * @member {string|null|undefined} favIconUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.favIconUrl = null;

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

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

                /**
                 * BotPlanningSearchSourceMetadata _provider.
                 * @member {"provider"|undefined} _provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_provider", {
                    get: $util.oneOfGetter($oneOfFields = ["provider"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourceMetadata _sourceUrl.
                 * @member {"sourceUrl"|undefined} _sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_sourceUrl", {
                    get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourceMetadata _favIconUrl.
                 * @member {"favIconUrl"|undefined} _favIconUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_favIconUrl", {
                    get: $util.oneOfGetter($oneOfFields = ["favIconUrl"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

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

                /**
                 * Encodes the specified BotPlanningSearchSourceMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata} message BotPlanningSearchSourceMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningSearchSourceMetadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                    if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.provider);
                    if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl);
                    if (message.favIconUrl != null && Object.hasOwnProperty.call(message, "favIconUrl"))
                        writer.uint32(/* id 4, wireType 2 =*/34).string(message.favIconUrl);
                    return writer;
                };

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

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

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

                /**
                 * Verifies a BotPlanningSearchSourceMetadata message.
                 * @function verify
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BotPlanningSearchSourceMetadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        properties._title = 1;
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        properties._provider = 1;
                        switch (message.provider) {
                        default:
                            return "provider: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        properties._sourceUrl = 1;
                        if (!$util.isString(message.sourceUrl))
                            return "sourceUrl: string expected";
                    }
                    if (message.favIconUrl != null && message.hasOwnProperty("favIconUrl")) {
                        properties._favIconUrl = 1;
                        if (!$util.isString(message.favIconUrl))
                            return "favIconUrl: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a BotPlanningSearchSourceMetadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} BotPlanningSearchSourceMetadata
                 */
                BotPlanningSearchSourceMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata)
                        return object;
                    var message = new $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata();
                    if (object.title != null)
                        message.title = String(object.title);
                    switch (object.provider) {
                    default:
                        if (typeof object.provider === "number") {
                            message.provider = object.provider;
                            break;
                        }
                        break;
                    case "UNKNOWN_PROVIDER":
                    case 0:
                        message.provider = 0;
                        break;
                    case "OTHER":
                    case 1:
                        message.provider = 1;
                        break;
                    case "GOOGLE":
                    case 2:
                        message.provider = 2;
                        break;
                    case "BING":
                    case 3:
                        message.provider = 3;
                        break;
                    }
                    if (object.sourceUrl != null)
                        message.sourceUrl = String(object.sourceUrl);
                    if (object.favIconUrl != null)
                        message.favIconUrl = String(object.favIconUrl);
                    return message;
                };

                /**
                 * Creates a plain object from a BotPlanningSearchSourceMetadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} message BotPlanningSearchSourceMetadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BotPlanningSearchSourceMetadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        object.provider = options.enums === String ? $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider[message.provider] : message.provider;
                        if (options.oneofs)
                            object._provider = "provider";
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        object.sourceUrl = message.sourceUrl;
                        if (options.oneofs)
                            object._sourceUrl = "sourceUrl";
                    }
                    if (message.favIconUrl != null && message.hasOwnProperty("favIconUrl")) {
                        object.favIconUrl = message.favIconUrl;
                        if (options.oneofs)
                            object._favIconUrl = "favIconUrl";
                    }
                    return object;
                };

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

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

                return BotPlanningSearchSourceMetadata;
            })();

            BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata = (function() {

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

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

                /**
                 * BotPlanningSearchSourcesMetadata sourceTitle.
                 * @member {string|null|undefined} sourceTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceTitle = null;

                /**
                 * BotPlanningSearchSourcesMetadata provider.
                 * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null|undefined} provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.provider = null;

                /**
                 * BotPlanningSearchSourcesMetadata sourceUrl.
                 * @member {string|null|undefined} sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceUrl = null;

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

                /**
                 * BotPlanningSearchSourcesMetadata _sourceTitle.
                 * @member {"sourceTitle"|undefined} _sourceTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_sourceTitle", {
                    get: $util.oneOfGetter($oneOfFields = ["sourceTitle"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourcesMetadata _provider.
                 * @member {"provider"|undefined} _provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_provider", {
                    get: $util.oneOfGetter($oneOfFields = ["provider"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourcesMetadata _sourceUrl.
                 * @member {"sourceUrl"|undefined} _sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_sourceUrl", {
                    get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

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

                /**
                 * Encodes the specified BotPlanningSearchSourcesMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningSearchSourcesMetadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.sourceTitle != null && Object.hasOwnProperty.call(message, "sourceTitle"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceTitle);
                    if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.provider);
                    if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl);
                    return writer;
                };

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

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

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

                /**
                 * Verifies a BotPlanningSearchSourcesMetadata message.
                 * @function verify
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BotPlanningSearchSourcesMetadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                        properties._sourceTitle = 1;
                        if (!$util.isString(message.sourceTitle))
                            return "sourceTitle: string expected";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        properties._provider = 1;
                        switch (message.provider) {
                        default:
                            return "provider: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        properties._sourceUrl = 1;
                        if (!$util.isString(message.sourceUrl))
                            return "sourceUrl: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a BotPlanningSearchSourcesMetadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata
                 */
                BotPlanningSearchSourcesMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata)
                        return object;
                    var message = new $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata();
                    if (object.sourceTitle != null)
                        message.sourceTitle = String(object.sourceTitle);
                    switch (object.provider) {
                    default:
                        if (typeof object.provider === "number") {
                            message.provider = object.provider;
                            break;
                        }
                        break;
                    case "UNKNOWN":
                    case 0:
                        message.provider = 0;
                        break;
                    case "OTHER":
                    case 1:
                        message.provider = 1;
                        break;
                    case "GOOGLE":
                    case 2:
                        message.provider = 2;
                        break;
                    case "BING":
                    case 3:
                        message.provider = 3;
                        break;
                    }
                    if (object.sourceUrl != null)
                        message.sourceUrl = String(object.sourceUrl);
                    return message;
                };

                /**
                 * Creates a plain object from a BotPlanningSearchSourcesMetadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BotPlanningSearchSourcesMetadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                        object.sourceTitle = message.sourceTitle;
                        if (options.oneofs)
                            object._sourceTitle = "sourceTitle";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        object.provider = options.enums === String ? $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[message.provider] : message.provider;
                        if (options.oneofs)
                            object._provider = "provider";
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        object.sourceUrl = message.sourceUrl;
                        if (options.oneofs)
                            object._sourceUrl = "sourceUrl";
                    }
                    return object;
                };

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

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

                /**
                 * BotPlanningSearchSourceProvider enum.
                 * @name AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider
                 * @enum {number}
                 * @property {number} UNKNOWN=0 UNKNOWN value
                 * @property {number} OTHER=1 OTHER value
                 * @property {number} GOOGLE=2 GOOGLE value
                 * @property {number} BING=3 BING value
                 */
                BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNKNOWN"] = 0;
                    values[valuesById[1] = "OTHER"] = 1;
                    values[valuesById[2] = "GOOGLE"] = 2;
                    values[valuesById[3] = "BING"] = 3;
                    return values;
                })();

                return BotPlanningSearchSourcesMetadata;
            })();

            BotPlanningStepMetadata.BotPlanningStepSectionMetadata = (function() {

                /**
                 * Properties of a BotPlanningStepSectionMetadata.
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @interface IBotPlanningStepSectionMetadata
                 * @property {string|null} [sectionTitle] BotPlanningStepSectionMetadata sectionTitle
                 * @property {string|null} [sectionBody] BotPlanningStepSectionMetadata sectionBody
                 * @property {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata>|null} [sourcesMetadata] BotPlanningStepSectionMetadata sourcesMetadata
                 */

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

                /**
                 * BotPlanningStepSectionMetadata sectionTitle.
                 * @member {string|null|undefined} sectionTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionTitle = null;

                /**
                 * BotPlanningStepSectionMetadata sectionBody.
                 * @member {string|null|undefined} sectionBody
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionBody = null;

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

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

                /**
                 * BotPlanningStepSectionMetadata _sectionTitle.
                 * @member {"sectionTitle"|undefined} _sectionTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningStepSectionMetadata.prototype, "_sectionTitle", {
                    get: $util.oneOfGetter($oneOfFields = ["sectionTitle"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningStepSectionMetadata _sectionBody.
                 * @member {"sectionBody"|undefined} _sectionBody
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningStepSectionMetadata.prototype, "_sectionBody", {
                    get: $util.oneOfGetter($oneOfFields = ["sectionBody"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

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

                /**
                 * Encodes the specified BotPlanningStepSectionMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata} message BotPlanningStepSectionMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningStepSectionMetadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.sectionTitle != null && Object.hasOwnProperty.call(message, "sectionTitle"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.sectionTitle);
                    if (message.sectionBody != null && Object.hasOwnProperty.call(message, "sectionBody"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.sectionBody);
                    if (message.sourcesMetadata != null && message.sourcesMetadata.length)
                        for (var i = 0; i < message.sourcesMetadata.length; ++i)
                            $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.encode(message.sourcesMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    return writer;
                };

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

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

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

                /**
                 * Verifies a BotPlanningStepSectionMetadata message.
                 * @function verify
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BotPlanningStepSectionMetadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.sectionTitle != null && message.hasOwnProperty("sectionTitle")) {
                        properties._sectionTitle = 1;
                        if (!$util.isString(message.sectionTitle))
                            return "sectionTitle: string expected";
                    }
                    if (message.sectionBody != null && message.hasOwnProperty("sectionBody")) {
                        properties._sectionBody = 1;
                        if (!$util.isString(message.sectionBody))
                            return "sectionBody: string expected";
                    }
                    if (message.sourcesMetadata != null && message.hasOwnProperty("sourcesMetadata")) {
                        if (!Array.isArray(message.sourcesMetadata))
                            return "sourcesMetadata: array expected";
                        for (var i = 0; i < message.sourcesMetadata.length; ++i) {
                            var error = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.verify(message.sourcesMetadata[i]);
                            if (error)
                                return "sourcesMetadata." + error;
                        }
                    }
                    return null;
                };

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

                /**
                 * Creates a plain object from a BotPlanningStepSectionMetadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata} message BotPlanningStepSectionMetadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BotPlanningStepSectionMetadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.sourcesMetadata = [];
                    if (message.sectionTitle != null && message.hasOwnProperty("sectionTitle")) {
                        object.sectionTitle = message.sectionTitle;
                        if (options.oneofs)
                            object._sectionTitle = "sectionTitle";
                    }
                    if (message.sectionBody != null && message.hasOwnProperty("sectionBody")) {
                        object.sectionBody = message.sectionBody;
                        if (options.oneofs)
                            object._sectionBody = "sectionBody";
                    }
                    if (message.sourcesMetadata && message.sourcesMetadata.length) {
                        object.sourcesMetadata = [];
                        for (var j = 0; j < message.sourcesMetadata.length; ++j)
                            object.sourcesMetadata[j] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.toObject(message.sourcesMetadata[j], options);
                    }
                    return object;
                };

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

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

                return BotPlanningStepSectionMetadata;
            })();

            /**
             * BotSearchSourceProvider enum.
             * @name AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider
             * @enum {number}
             * @property {number} UNKNOWN_PROVIDER=0 UNKNOWN_PROVIDER value
             * @property {number} OTHER=1 OTHER value
             * @property {number} GOOGLE=2 GOOGLE value
             * @property {number} BING=3 BING value
             */
            BotPlanningStepMetadata.BotSearchSourceProvider = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN_PROVIDER"] = 0;
                values[valuesById[1] = "OTHER"] = 1;
                values[valuesById[2] = "GOOGLE"] = 2;
                values[valuesById[3] = "BING"] = 3;
                return values;
            })();

            /**
             * PlanningStepStatus enum.
             * @name AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} PLANNED=1 PLANNED value
             * @property {number} EXECUTING=2 EXECUTING value
             * @property {number} FINISHED=3 FINISHED value
             */
            BotPlanningStepMetadata.PlanningStepStatus = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "PLANNED"] = 1;
                values[valuesById[2] = "EXECUTING"] = 2;
                values[valuesById[3] = "FINISHED"] = 3;
                return values;
            })();

            return BotPlanningStepMetadata;
        })();

        return BotProgressIndicatorMetadata;
    })();

    AICommon.BotModelMetadata = (function() {

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

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

        /**
         * BotModelMetadata modelType.
         * @member {AICommon.BotModelMetadata.ModelType|null|undefined} modelType
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.modelType = null;

        /**
         * BotModelMetadata premiumModelStatus.
         * @member {AICommon.BotModelMetadata.PremiumModelStatus|null|undefined} premiumModelStatus
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.premiumModelStatus = null;

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

        /**
         * BotModelMetadata _modelType.
         * @member {"modelType"|undefined} _modelType
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        Object.defineProperty(BotModelMetadata.prototype, "_modelType", {
            get: $util.oneOfGetter($oneOfFields = ["modelType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotModelMetadata _premiumModelStatus.
         * @member {"premiumModelStatus"|undefined} _premiumModelStatus
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        Object.defineProperty(BotModelMetadata.prototype, "_premiumModelStatus", {
            get: $util.oneOfGetter($oneOfFields = ["premiumModelStatus"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

        /**
         * Verifies a BotModelMetadata message.
         * @function verify
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotModelMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.modelType != null && message.hasOwnProperty("modelType")) {
                properties._modelType = 1;
                switch (message.modelType) {
                default:
                    return "modelType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus")) {
                properties._premiumModelStatus = 1;
                switch (message.premiumModelStatus) {
                default:
                    return "premiumModelStatus: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotModelMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotModelMetadata} BotModelMetadata
         */
        BotModelMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotModelMetadata)
                return object;
            var message = new $root.AICommon.BotModelMetadata();
            switch (object.modelType) {
            default:
                if (typeof object.modelType === "number") {
                    message.modelType = object.modelType;
                    break;
                }
                break;
            case "UNKNOWN_TYPE":
            case 0:
                message.modelType = 0;
                break;
            case "LLAMA_PROD":
            case 1:
                message.modelType = 1;
                break;
            case "LLAMA_PROD_PREMIUM":
            case 2:
                message.modelType = 2;
                break;
            }
            switch (object.premiumModelStatus) {
            default:
                if (typeof object.premiumModelStatus === "number") {
                    message.premiumModelStatus = object.premiumModelStatus;
                    break;
                }
                break;
            case "UNKNOWN_STATUS":
            case 0:
                message.premiumModelStatus = 0;
                break;
            case "AVAILABLE":
            case 1:
                message.premiumModelStatus = 1;
                break;
            case "QUOTA_EXCEED_LIMIT":
            case 2:
                message.premiumModelStatus = 2;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotModelMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {AICommon.BotModelMetadata} message BotModelMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotModelMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.modelType != null && message.hasOwnProperty("modelType")) {
                object.modelType = options.enums === String ? $root.AICommon.BotModelMetadata.ModelType[message.modelType] === undefined ? message.modelType : $root.AICommon.BotModelMetadata.ModelType[message.modelType] : message.modelType;
                if (options.oneofs)
                    object._modelType = "modelType";
            }
            if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus")) {
                object.premiumModelStatus = options.enums === String ? $root.AICommon.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] === undefined ? message.premiumModelStatus : $root.AICommon.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] : message.premiumModelStatus;
                if (options.oneofs)
                    object._premiumModelStatus = "premiumModelStatus";
            }
            return object;
        };

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

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

        /**
         * ModelType enum.
         * @name AICommon.BotModelMetadata.ModelType
         * @enum {number}
         * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value
         * @property {number} LLAMA_PROD=1 LLAMA_PROD value
         * @property {number} LLAMA_PROD_PREMIUM=2 LLAMA_PROD_PREMIUM value
         */
        BotModelMetadata.ModelType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_TYPE"] = 0;
            values[valuesById[1] = "LLAMA_PROD"] = 1;
            values[valuesById[2] = "LLAMA_PROD_PREMIUM"] = 2;
            return values;
        })();

        /**
         * PremiumModelStatus enum.
         * @name AICommon.BotModelMetadata.PremiumModelStatus
         * @enum {number}
         * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value
         * @property {number} AVAILABLE=1 AVAILABLE value
         * @property {number} QUOTA_EXCEED_LIMIT=2 QUOTA_EXCEED_LIMIT value
         */
        BotModelMetadata.PremiumModelStatus = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_STATUS"] = 0;
            values[valuesById[1] = "AVAILABLE"] = 1;
            values[valuesById[2] = "QUOTA_EXCEED_LIMIT"] = 2;
            return values;
        })();

        return BotModelMetadata;
    })();

    AICommon.BotReminderMetadata = (function() {

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

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

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

        /**
         * BotReminderMetadata action.
         * @member {AICommon.BotReminderMetadata.ReminderAction|null|undefined} action
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.action = null;

        /**
         * BotReminderMetadata name.
         * @member {string|null|undefined} name
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.name = null;

        /**
         * BotReminderMetadata nextTriggerTimestamp.
         * @member {number|Long|null|undefined} nextTriggerTimestamp
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.nextTriggerTimestamp = null;

        /**
         * BotReminderMetadata frequency.
         * @member {AICommon.BotReminderMetadata.ReminderFrequency|null|undefined} frequency
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.frequency = null;

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

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

        /**
         * BotReminderMetadata _action.
         * @member {"action"|undefined} _action
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_action", {
            get: $util.oneOfGetter($oneOfFields = ["action"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotReminderMetadata _name.
         * @member {"name"|undefined} _name
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_name", {
            get: $util.oneOfGetter($oneOfFields = ["name"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotReminderMetadata _nextTriggerTimestamp.
         * @member {"nextTriggerTimestamp"|undefined} _nextTriggerTimestamp
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_nextTriggerTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["nextTriggerTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotReminderMetadata _frequency.
         * @member {"frequency"|undefined} _frequency
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_frequency", {
            get: $util.oneOfGetter($oneOfFields = ["frequency"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotReminderMetadata message. Does not implicitly {@link AICommon.BotReminderMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {AICommon.IBotReminderMetadata} message BotReminderMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotReminderMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey"))
                $root.Protocol.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.action != null && Object.hasOwnProperty.call(message, "action"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
            if (message.nextTriggerTimestamp != null && Object.hasOwnProperty.call(message, "nextTriggerTimestamp"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.nextTriggerTimestamp);
            if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency);
            return writer;
        };

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

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

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

        /**
         * Verifies a BotReminderMetadata message.
         * @function verify
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotReminderMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                properties._requestMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.requestMessageKey);
                    if (error)
                        return "requestMessageKey." + error;
                }
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                properties._action = 1;
                switch (message.action) {
                default:
                    return "action: enum value expected";
                case 1:
                case 2:
                case 3:
                case 4:
                    break;
                }
            }
            if (message.name != null && message.hasOwnProperty("name")) {
                properties._name = 1;
                if (!$util.isString(message.name))
                    return "name: string expected";
            }
            if (message.nextTriggerTimestamp != null && message.hasOwnProperty("nextTriggerTimestamp")) {
                properties._nextTriggerTimestamp = 1;
                if (!$util.isInteger(message.nextTriggerTimestamp) && !(message.nextTriggerTimestamp && $util.isInteger(message.nextTriggerTimestamp.low) && $util.isInteger(message.nextTriggerTimestamp.high)))
                    return "nextTriggerTimestamp: integer|Long expected";
            }
            if (message.frequency != null && message.hasOwnProperty("frequency")) {
                properties._frequency = 1;
                switch (message.frequency) {
                default:
                    return "frequency: enum value expected";
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotReminderMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotReminderMetadata} BotReminderMetadata
         */
        BotReminderMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotReminderMetadata)
                return object;
            var message = new $root.AICommon.BotReminderMetadata();
            if (object.requestMessageKey != null) {
                if (typeof object.requestMessageKey !== "object")
                    throw TypeError(".AICommon.BotReminderMetadata.requestMessageKey: object expected");
                message.requestMessageKey = $root.Protocol.MessageKey.fromObject(object.requestMessageKey);
            }
            switch (object.action) {
            default:
                if (typeof object.action === "number") {
                    message.action = object.action;
                    break;
                }
                break;
            case "NOTIFY":
            case 1:
                message.action = 1;
                break;
            case "CREATE":
            case 2:
                message.action = 2;
                break;
            case "DELETE":
            case 3:
                message.action = 3;
                break;
            case "UPDATE":
            case 4:
                message.action = 4;
                break;
            }
            if (object.name != null)
                message.name = String(object.name);
            if (object.nextTriggerTimestamp != null)
                if ($util.Long)
                    (message.nextTriggerTimestamp = $util.Long.fromValue(object.nextTriggerTimestamp)).unsigned = true;
                else if (typeof object.nextTriggerTimestamp === "string")
                    message.nextTriggerTimestamp = parseInt(object.nextTriggerTimestamp, 10);
                else if (typeof object.nextTriggerTimestamp === "number")
                    message.nextTriggerTimestamp = object.nextTriggerTimestamp;
                else if (typeof object.nextTriggerTimestamp === "object")
                    message.nextTriggerTimestamp = new $util.LongBits(object.nextTriggerTimestamp.low >>> 0, object.nextTriggerTimestamp.high >>> 0).toNumber(true);
            switch (object.frequency) {
            default:
                if (typeof object.frequency === "number") {
                    message.frequency = object.frequency;
                    break;
                }
                break;
            case "ONCE":
            case 1:
                message.frequency = 1;
                break;
            case "DAILY":
            case 2:
                message.frequency = 2;
                break;
            case "WEEKLY":
            case 3:
                message.frequency = 3;
                break;
            case "BIWEEKLY":
            case 4:
                message.frequency = 4;
                break;
            case "MONTHLY":
            case 5:
                message.frequency = 5;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotReminderMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {AICommon.BotReminderMetadata} message BotReminderMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotReminderMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                object.requestMessageKey = $root.Protocol.MessageKey.toObject(message.requestMessageKey, options);
                if (options.oneofs)
                    object._requestMessageKey = "requestMessageKey";
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                object.action = options.enums === String ? $root.AICommon.BotReminderMetadata.ReminderAction[message.action] === undefined ? message.action : $root.AICommon.BotReminderMetadata.ReminderAction[message.action] : message.action;
                if (options.oneofs)
                    object._action = "action";
            }
            if (message.name != null && message.hasOwnProperty("name")) {
                object.name = message.name;
                if (options.oneofs)
                    object._name = "name";
            }
            if (message.nextTriggerTimestamp != null && message.hasOwnProperty("nextTriggerTimestamp")) {
                if (typeof message.nextTriggerTimestamp === "number")
                    object.nextTriggerTimestamp = options.longs === String ? String(message.nextTriggerTimestamp) : message.nextTriggerTimestamp;
                else
                    object.nextTriggerTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.nextTriggerTimestamp) : options.longs === Number ? new $util.LongBits(message.nextTriggerTimestamp.low >>> 0, message.nextTriggerTimestamp.high >>> 0).toNumber(true) : message.nextTriggerTimestamp;
                if (options.oneofs)
                    object._nextTriggerTimestamp = "nextTriggerTimestamp";
            }
            if (message.frequency != null && message.hasOwnProperty("frequency")) {
                object.frequency = options.enums === String ? $root.AICommon.BotReminderMetadata.ReminderFrequency[message.frequency] === undefined ? message.frequency : $root.AICommon.BotReminderMetadata.ReminderFrequency[message.frequency] : message.frequency;
                if (options.oneofs)
                    object._frequency = "frequency";
            }
            return object;
        };

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

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

        /**
         * ReminderAction enum.
         * @name AICommon.BotReminderMetadata.ReminderAction
         * @enum {number}
         * @property {number} NOTIFY=1 NOTIFY value
         * @property {number} CREATE=2 CREATE value
         * @property {number} DELETE=3 DELETE value
         * @property {number} UPDATE=4 UPDATE value
         */
        BotReminderMetadata.ReminderAction = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "NOTIFY"] = 1;
            values[valuesById[2] = "CREATE"] = 2;
            values[valuesById[3] = "DELETE"] = 3;
            values[valuesById[4] = "UPDATE"] = 4;
            return values;
        })();

        /**
         * ReminderFrequency enum.
         * @name AICommon.BotReminderMetadata.ReminderFrequency
         * @enum {number}
         * @property {number} ONCE=1 ONCE value
         * @property {number} DAILY=2 DAILY value
         * @property {number} WEEKLY=3 WEEKLY value
         * @property {number} BIWEEKLY=4 BIWEEKLY value
         * @property {number} MONTHLY=5 MONTHLY value
         */
        BotReminderMetadata.ReminderFrequency = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "ONCE"] = 1;
            values[valuesById[2] = "DAILY"] = 2;
            values[valuesById[3] = "WEEKLY"] = 3;
            values[valuesById[4] = "BIWEEKLY"] = 4;
            values[valuesById[5] = "MONTHLY"] = 5;
            return values;
        })();

        return BotReminderMetadata;
    })();

    AICommon.BotMemuMetadata = (function() {

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

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

        /**
         * BotMemuMetadata faceImages.
         * @member {Array.<AICommon.IBotMediaMetadata>} faceImages
         * @memberof AICommon.BotMemuMetadata
         * @instance
         */
        BotMemuMetadata.prototype.faceImages = $util.emptyArray;

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

        /**
         * Encodes the specified BotMemuMetadata message. Does not implicitly {@link AICommon.BotMemuMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {AICommon.IBotMemuMetadata} message BotMemuMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemuMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.faceImages != null && message.faceImages.length)
                for (var i = 0; i < message.faceImages.length; ++i)
                    $root.AICommon.BotMediaMetadata.encode(message.faceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        return BotMemuMetadata;
    })();

    AICommon.BotMediaMetadata = (function() {

        /**
         * Properties of a BotMediaMetadata.
         * @memberof AICommon
         * @interface IBotMediaMetadata
         * @property {string|null} [fileSha256] BotMediaMetadata fileSha256
         * @property {string|null} [mediaKey] BotMediaMetadata mediaKey
         * @property {string|null} [fileEncSha256] BotMediaMetadata fileEncSha256
         * @property {string|null} [directPath] BotMediaMetadata directPath
         * @property {number|Long|null} [mediaKeyTimestamp] BotMediaMetadata mediaKeyTimestamp
         * @property {string|null} [mimetype] BotMediaMetadata mimetype
         * @property {AICommon.BotMediaMetadata.OrientationType|null} [orientationType] BotMediaMetadata orientationType
         */

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

        /**
         * BotMediaMetadata fileSha256.
         * @member {string|null|undefined} fileSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileSha256 = null;

        /**
         * BotMediaMetadata mediaKey.
         * @member {string|null|undefined} mediaKey
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mediaKey = null;

        /**
         * BotMediaMetadata fileEncSha256.
         * @member {string|null|undefined} fileEncSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileEncSha256 = null;

        /**
         * BotMediaMetadata directPath.
         * @member {string|null|undefined} directPath
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.directPath = null;

        /**
         * BotMediaMetadata mediaKeyTimestamp.
         * @member {number|Long|null|undefined} mediaKeyTimestamp
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mediaKeyTimestamp = null;

        /**
         * BotMediaMetadata mimetype.
         * @member {string|null|undefined} mimetype
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mimetype = null;

        /**
         * BotMediaMetadata orientationType.
         * @member {AICommon.BotMediaMetadata.OrientationType|null|undefined} orientationType
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.orientationType = null;

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

        /**
         * BotMediaMetadata _fileSha256.
         * @member {"fileSha256"|undefined} _fileSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_fileSha256", {
            get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _mediaKey.
         * @member {"mediaKey"|undefined} _mediaKey
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_mediaKey", {
            get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _fileEncSha256.
         * @member {"fileEncSha256"|undefined} _fileEncSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_fileEncSha256", {
            get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _directPath.
         * @member {"directPath"|undefined} _directPath
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_directPath", {
            get: $util.oneOfGetter($oneOfFields = ["directPath"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _mediaKeyTimestamp.
         * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_mediaKeyTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _mimetype.
         * @member {"mimetype"|undefined} _mimetype
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_mimetype", {
            get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _orientationType.
         * @member {"orientationType"|undefined} _orientationType
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_orientationType", {
            get: $util.oneOfGetter($oneOfFields = ["orientationType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotMediaMetadata message. Does not implicitly {@link AICommon.BotMediaMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {AICommon.IBotMediaMetadata} message BotMediaMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMediaMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileSha256);
            if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.mediaKey);
            if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileEncSha256);
            if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.directPath);
            if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp);
            if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                writer.uint32(/* id 6, wireType 2 =*/50).string(message.mimetype);
            if (message.orientationType != null && Object.hasOwnProperty.call(message, "orientationType"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.orientationType);
            return writer;
        };

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

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

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

        /**
         * Verifies a BotMediaMetadata message.
         * @function verify
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMediaMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                properties._fileSha256 = 1;
                if (!$util.isString(message.fileSha256))
                    return "fileSha256: string expected";
            }
            if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                properties._mediaKey = 1;
                if (!$util.isString(message.mediaKey))
                    return "mediaKey: string expected";
            }
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                properties._fileEncSha256 = 1;
                if (!$util.isString(message.fileEncSha256))
                    return "fileEncSha256: string expected";
            }
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                properties._directPath = 1;
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            }
            if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                properties._mediaKeyTimestamp = 1;
                if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                    return "mediaKeyTimestamp: integer|Long expected";
            }
            if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                properties._mimetype = 1;
                if (!$util.isString(message.mimetype))
                    return "mimetype: string expected";
            }
            if (message.orientationType != null && message.hasOwnProperty("orientationType")) {
                properties._orientationType = 1;
                switch (message.orientationType) {
                default:
                    return "orientationType: enum value expected";
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotMediaMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMediaMetadata} BotMediaMetadata
         */
        BotMediaMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMediaMetadata)
                return object;
            var message = new $root.AICommon.BotMediaMetadata();
            if (object.fileSha256 != null)
                message.fileSha256 = String(object.fileSha256);
            if (object.mediaKey != null)
                message.mediaKey = String(object.mediaKey);
            if (object.fileEncSha256 != null)
                message.fileEncSha256 = String(object.fileEncSha256);
            if (object.directPath != null)
                message.directPath = String(object.directPath);
            if (object.mediaKeyTimestamp != null)
                if ($util.Long)
                    (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                else if (typeof object.mediaKeyTimestamp === "string")
                    message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                else if (typeof object.mediaKeyTimestamp === "number")
                    message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                else if (typeof object.mediaKeyTimestamp === "object")
                    message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
            if (object.mimetype != null)
                message.mimetype = String(object.mimetype);
            switch (object.orientationType) {
            default:
                if (typeof object.orientationType === "number") {
                    message.orientationType = object.orientationType;
                    break;
                }
                break;
            case "CENTER":
            case 1:
                message.orientationType = 1;
                break;
            case "LEFT":
            case 2:
                message.orientationType = 2;
                break;
            case "RIGHT":
            case 3:
                message.orientationType = 3;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMediaMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {AICommon.BotMediaMetadata} message BotMediaMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMediaMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                object.fileSha256 = message.fileSha256;
                if (options.oneofs)
                    object._fileSha256 = "fileSha256";
            }
            if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                object.mediaKey = message.mediaKey;
                if (options.oneofs)
                    object._mediaKey = "mediaKey";
            }
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                object.fileEncSha256 = message.fileEncSha256;
                if (options.oneofs)
                    object._fileEncSha256 = "fileEncSha256";
            }
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                object.directPath = message.directPath;
                if (options.oneofs)
                    object._directPath = "directPath";
            }
            if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                if (typeof message.mediaKeyTimestamp === "number")
                    object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                else
                    object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                if (options.oneofs)
                    object._mediaKeyTimestamp = "mediaKeyTimestamp";
            }
            if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                object.mimetype = message.mimetype;
                if (options.oneofs)
                    object._mimetype = "mimetype";
            }
            if (message.orientationType != null && message.hasOwnProperty("orientationType")) {
                object.orientationType = options.enums === String ? $root.AICommon.BotMediaMetadata.OrientationType[message.orientationType] === undefined ? message.orientationType : $root.AICommon.BotMediaMetadata.OrientationType[message.orientationType] : message.orientationType;
                if (options.oneofs)
                    object._orientationType = "orientationType";
            }
            return object;
        };

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

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

        /**
         * OrientationType enum.
         * @name AICommon.BotMediaMetadata.OrientationType
         * @enum {number}
         * @property {number} CENTER=1 CENTER value
         * @property {number} LEFT=2 LEFT value
         * @property {number} RIGHT=3 RIGHT value
         */
        BotMediaMetadata.OrientationType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "CENTER"] = 1;
            values[valuesById[2] = "LEFT"] = 2;
            values[valuesById[3] = "RIGHT"] = 3;
            return values;
        })();

        return BotMediaMetadata;
    })();

    AICommon.BotSessionMetadata = (function() {

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

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

        /**
         * BotSessionMetadata sessionId.
         * @member {string|null|undefined} sessionId
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionId = null;

        /**
         * BotSessionMetadata sessionSource.
         * @member {AICommon.BotSessionSource|null|undefined} sessionSource
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionSource = null;

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

        /**
         * BotSessionMetadata _sessionId.
         * @member {"sessionId"|undefined} _sessionId
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        Object.defineProperty(BotSessionMetadata.prototype, "_sessionId", {
            get: $util.oneOfGetter($oneOfFields = ["sessionId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSessionMetadata _sessionSource.
         * @member {"sessionSource"|undefined} _sessionSource
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        Object.defineProperty(BotSessionMetadata.prototype, "_sessionSource", {
            get: $util.oneOfGetter($oneOfFields = ["sessionSource"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

        /**
         * Verifies a BotSessionMetadata message.
         * @function verify
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSessionMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                properties._sessionId = 1;
                if (!$util.isString(message.sessionId))
                    return "sessionId: string expected";
            }
            if (message.sessionSource != null && message.hasOwnProperty("sessionSource")) {
                properties._sessionSource = 1;
                switch (message.sessionSource) {
                default:
                    return "sessionSource: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotSessionMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotSessionMetadata} BotSessionMetadata
         */
        BotSessionMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotSessionMetadata)
                return object;
            var message = new $root.AICommon.BotSessionMetadata();
            if (object.sessionId != null)
                message.sessionId = String(object.sessionId);
            switch (object.sessionSource) {
            default:
                if (typeof object.sessionSource === "number") {
                    message.sessionSource = object.sessionSource;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.sessionSource = 0;
                break;
            case "NULL_STATE":
            case 1:
                message.sessionSource = 1;
                break;
            case "TYPEAHEAD":
            case 2:
                message.sessionSource = 2;
                break;
            case "USER_INPUT":
            case 3:
                message.sessionSource = 3;
                break;
            case "EMU_FLASH":
            case 4:
                message.sessionSource = 4;
                break;
            case "EMU_FLASH_FOLLOWUP":
            case 5:
                message.sessionSource = 5;
                break;
            case "VOICE":
            case 6:
                message.sessionSource = 6;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotSessionMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {AICommon.BotSessionMetadata} message BotSessionMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSessionMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                object.sessionId = message.sessionId;
                if (options.oneofs)
                    object._sessionId = "sessionId";
            }
            if (message.sessionSource != null && message.hasOwnProperty("sessionSource")) {
                object.sessionSource = options.enums === String ? $root.AICommon.BotSessionSource[message.sessionSource] === undefined ? message.sessionSource : $root.AICommon.BotSessionSource[message.sessionSource] : message.sessionSource;
                if (options.oneofs)
                    object._sessionSource = "sessionSource";
            }
            return object;
        };

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

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

        return BotSessionMetadata;
    })();

    AICommon.BotMetricsMetadata = (function() {

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

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

        /**
         * BotMetricsMetadata destinationId.
         * @member {string|null|undefined} destinationId
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationId = null;

        /**
         * BotMetricsMetadata destinationEntryPoint.
         * @member {AICommon.BotMetricsEntryPoint|null|undefined} destinationEntryPoint
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationEntryPoint = null;

        /**
         * BotMetricsMetadata threadOrigin.
         * @member {AICommon.BotMetricsThreadEntryPoint|null|undefined} threadOrigin
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.threadOrigin = null;

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

        /**
         * BotMetricsMetadata _destinationId.
         * @member {"destinationId"|undefined} _destinationId
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        Object.defineProperty(BotMetricsMetadata.prototype, "_destinationId", {
            get: $util.oneOfGetter($oneOfFields = ["destinationId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetricsMetadata _destinationEntryPoint.
         * @member {"destinationEntryPoint"|undefined} _destinationEntryPoint
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        Object.defineProperty(BotMetricsMetadata.prototype, "_destinationEntryPoint", {
            get: $util.oneOfGetter($oneOfFields = ["destinationEntryPoint"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetricsMetadata _threadOrigin.
         * @member {"threadOrigin"|undefined} _threadOrigin
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        Object.defineProperty(BotMetricsMetadata.prototype, "_threadOrigin", {
            get: $util.oneOfGetter($oneOfFields = ["threadOrigin"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotMetricsMetadata message. Does not implicitly {@link AICommon.BotMetricsMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {AICommon.IBotMetricsMetadata} message BotMetricsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMetricsMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.destinationId != null && Object.hasOwnProperty.call(message, "destinationId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationId);
            if (message.destinationEntryPoint != null && Object.hasOwnProperty.call(message, "destinationEntryPoint"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.destinationEntryPoint);
            if (message.threadOrigin != null && Object.hasOwnProperty.call(message, "threadOrigin"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.threadOrigin);
            return writer;
        };

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

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

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

        /**
         * Verifies a BotMetricsMetadata message.
         * @function verify
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMetricsMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.destinationId != null && message.hasOwnProperty("destinationId")) {
                properties._destinationId = 1;
                if (!$util.isString(message.destinationId))
                    return "destinationId: string expected";
            }
            if (message.destinationEntryPoint != null && message.hasOwnProperty("destinationEntryPoint")) {
                properties._destinationEntryPoint = 1;
                switch (message.destinationEntryPoint) {
                default:
                    return "destinationEntryPoint: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                case 32:
                case 33:
                case 34:
                    break;
                }
            }
            if (message.threadOrigin != null && message.hasOwnProperty("threadOrigin")) {
                properties._threadOrigin = 1;
                switch (message.threadOrigin) {
                default:
                    return "threadOrigin: enum value expected";
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotMetricsMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMetricsMetadata} BotMetricsMetadata
         */
        BotMetricsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMetricsMetadata)
                return object;
            var message = new $root.AICommon.BotMetricsMetadata();
            if (object.destinationId != null)
                message.destinationId = String(object.destinationId);
            switch (object.destinationEntryPoint) {
            default:
                if (typeof object.destinationEntryPoint === "number") {
                    message.destinationEntryPoint = object.destinationEntryPoint;
                    break;
                }
                break;
            case "UNDEFINED_ENTRY_POINT":
            case 0:
                message.destinationEntryPoint = 0;
                break;
            case "FAVICON":
            case 1:
                message.destinationEntryPoint = 1;
                break;
            case "CHATLIST":
            case 2:
                message.destinationEntryPoint = 2;
                break;
            case "AISEARCH_NULL_STATE_PAPER_PLANE":
            case 3:
                message.destinationEntryPoint = 3;
                break;
            case "AISEARCH_NULL_STATE_SUGGESTION":
            case 4:
                message.destinationEntryPoint = 4;
                break;
            case "AISEARCH_TYPE_AHEAD_SUGGESTION":
            case 5:
                message.destinationEntryPoint = 5;
                break;
            case "AISEARCH_TYPE_AHEAD_PAPER_PLANE":
            case 6:
                message.destinationEntryPoint = 6;
                break;
            case "AISEARCH_TYPE_AHEAD_RESULT_CHATLIST":
            case 7:
                message.destinationEntryPoint = 7;
                break;
            case "AISEARCH_TYPE_AHEAD_RESULT_MESSAGES":
            case 8:
                message.destinationEntryPoint = 8;
                break;
            case "AIVOICE_SEARCH_BAR":
            case 9:
                message.destinationEntryPoint = 9;
                break;
            case "AIVOICE_FAVICON":
            case 10:
                message.destinationEntryPoint = 10;
                break;
            case "AISTUDIO":
            case 11:
                message.destinationEntryPoint = 11;
                break;
            case "DEEPLINK":
            case 12:
                message.destinationEntryPoint = 12;
                break;
            case "NOTIFICATION":
            case 13:
                message.destinationEntryPoint = 13;
                break;
            case "PROFILE_MESSAGE_BUTTON":
            case 14:
                message.destinationEntryPoint = 14;
                break;
            case "FORWARD":
            case 15:
                message.destinationEntryPoint = 15;
                break;
            case "APP_SHORTCUT":
            case 16:
                message.destinationEntryPoint = 16;
                break;
            case "FF_FAMILY":
            case 17:
                message.destinationEntryPoint = 17;
                break;
            case "AI_TAB":
            case 18:
                message.destinationEntryPoint = 18;
                break;
            case "AI_HOME":
            case 19:
                message.destinationEntryPoint = 19;
                break;
            case "AI_DEEPLINK_IMMERSIVE":
            case 20:
                message.destinationEntryPoint = 20;
                break;
            case "AI_DEEPLINK":
            case 21:
                message.destinationEntryPoint = 21;
                break;
            case "META_AI_CHAT_SHORTCUT_AI_STUDIO":
            case 22:
                message.destinationEntryPoint = 22;
                break;
            case "UGC_CHAT_SHORTCUT_AI_STUDIO":
            case 23:
                message.destinationEntryPoint = 23;
                break;
            case "NEW_CHAT_AI_STUDIO":
            case 24:
                message.destinationEntryPoint = 24;
                break;
            case "AIVOICE_FAVICON_CALL_HISTORY":
            case 25:
                message.destinationEntryPoint = 25;
                break;
            case "ASK_META_AI_CONTEXT_MENU":
            case 26:
                message.destinationEntryPoint = 26;
                break;
            case "ASK_META_AI_CONTEXT_MENU_1ON1":
            case 27:
                message.destinationEntryPoint = 27;
                break;
            case "ASK_META_AI_CONTEXT_MENU_GROUP":
            case 28:
                message.destinationEntryPoint = 28;
                break;
            case "INVOKE_META_AI_1ON1":
            case 29:
                message.destinationEntryPoint = 29;
                break;
            case "INVOKE_META_AI_GROUP":
            case 30:
                message.destinationEntryPoint = 30;
                break;
            case "META_AI_FORWARD":
            case 31:
                message.destinationEntryPoint = 31;
                break;
            case "NEW_CHAT_AI_CONTACT":
            case 32:
                message.destinationEntryPoint = 32;
                break;
            case "MESSAGE_QUICK_ACTION":
            case 33:
                message.destinationEntryPoint = 33;
                break;
            case "ATTACHMENT_TRAY":
            case 34:
                message.destinationEntryPoint = 34;
                break;
            }
            switch (object.threadOrigin) {
            default:
                if (typeof object.threadOrigin === "number") {
                    message.threadOrigin = object.threadOrigin;
                    break;
                }
                break;
            case "AI_TAB_THREAD":
            case 1:
                message.threadOrigin = 1;
                break;
            case "AI_HOME_THREAD":
            case 2:
                message.threadOrigin = 2;
                break;
            case "AI_DEEPLINK_IMMERSIVE_THREAD":
            case 3:
                message.threadOrigin = 3;
                break;
            case "AI_DEEPLINK_THREAD":
            case 4:
                message.threadOrigin = 4;
                break;
            case "ASK_META_AI_CONTEXT_MENU_THREAD":
            case 5:
                message.threadOrigin = 5;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMetricsMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {AICommon.BotMetricsMetadata} message BotMetricsMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMetricsMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.destinationId != null && message.hasOwnProperty("destinationId")) {
                object.destinationId = message.destinationId;
                if (options.oneofs)
                    object._destinationId = "destinationId";
            }
            if (message.destinationEntryPoint != null && message.hasOwnProperty("destinationEntryPoint")) {
                object.destinationEntryPoint = options.enums === String ? $root.AICommon.BotMetricsEntryPoint[message.destinationEntryPoint] === undefined ? message.destinationEntryPoint : $root.AICommon.BotMetricsEntryPoint[message.destinationEntryPoint] : message.destinationEntryPoint;
                if (options.oneofs)
                    object._destinationEntryPoint = "destinationEntryPoint";
            }
            if (message.threadOrigin != null && message.hasOwnProperty("threadOrigin")) {
                object.threadOrigin = options.enums === String ? $root.AICommon.BotMetricsThreadEntryPoint[message.threadOrigin] === undefined ? message.threadOrigin : $root.AICommon.BotMetricsThreadEntryPoint[message.threadOrigin] : message.threadOrigin;
                if (options.oneofs)
                    object._threadOrigin = "threadOrigin";
            }
            return object;
        };

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

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

        return BotMetricsMetadata;
    })();

    AICommon.BotRenderingMetadata = (function() {

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

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

        /**
         * BotRenderingMetadata keywords.
         * @member {Array.<AICommon.BotRenderingMetadata.IKeyword>} keywords
         * @memberof AICommon.BotRenderingMetadata
         * @instance
         */
        BotRenderingMetadata.prototype.keywords = $util.emptyArray;

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

        /**
         * Encodes the specified BotRenderingMetadata message. Does not implicitly {@link AICommon.BotRenderingMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {AICommon.IBotRenderingMetadata} message BotRenderingMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotRenderingMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.keywords != null && message.keywords.length)
                for (var i = 0; i < message.keywords.length; ++i)
                    $root.AICommon.BotRenderingMetadata.Keyword.encode(message.keywords[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        BotRenderingMetadata.Keyword = (function() {

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

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

            /**
             * Keyword value.
             * @member {string|null|undefined} value
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             */
            Keyword.prototype.value = null;

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

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

            /**
             * Keyword _value.
             * @member {"value"|undefined} _value
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             */
            Object.defineProperty(Keyword.prototype, "_value", {
                get: $util.oneOfGetter($oneOfFields = ["value"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified Keyword message. Does not implicitly {@link AICommon.BotRenderingMetadata.Keyword.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {AICommon.BotRenderingMetadata.IKeyword} message Keyword message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Keyword.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.value);
                if (message.associatedPrompts != null && message.associatedPrompts.length)
                    for (var i = 0; i < message.associatedPrompts.length; ++i)
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.associatedPrompts[i]);
                return writer;
            };

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

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

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

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

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

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

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

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

            return Keyword;
        })();

        return BotRenderingMetadata;
    })();

    AICommon.BotPromotionMessageMetadata = (function() {

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

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

        /**
         * BotPromotionMessageMetadata promotionType.
         * @member {AICommon.BotPromotionMessageMetadata.BotPromotionType|null|undefined} promotionType
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.promotionType = null;

        /**
         * BotPromotionMessageMetadata buttonTitle.
         * @member {string|null|undefined} buttonTitle
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.buttonTitle = null;

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

        /**
         * BotPromotionMessageMetadata _promotionType.
         * @member {"promotionType"|undefined} _promotionType
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        Object.defineProperty(BotPromotionMessageMetadata.prototype, "_promotionType", {
            get: $util.oneOfGetter($oneOfFields = ["promotionType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPromotionMessageMetadata _buttonTitle.
         * @member {"buttonTitle"|undefined} _buttonTitle
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        Object.defineProperty(BotPromotionMessageMetadata.prototype, "_buttonTitle", {
            get: $util.oneOfGetter($oneOfFields = ["buttonTitle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

        /**
         * Verifies a BotPromotionMessageMetadata message.
         * @function verify
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotPromotionMessageMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.promotionType != null && message.hasOwnProperty("promotionType")) {
                properties._promotionType = 1;
                switch (message.promotionType) {
                default:
                    return "promotionType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) {
                properties._buttonTitle = 1;
                if (!$util.isString(message.buttonTitle))
                    return "buttonTitle: string expected";
            }
            return null;
        };

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

        /**
         * Creates a plain object from a BotPromotionMessageMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {AICommon.BotPromotionMessageMetadata} message BotPromotionMessageMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotPromotionMessageMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.promotionType != null && message.hasOwnProperty("promotionType")) {
                object.promotionType = options.enums === String ? $root.AICommon.BotPromotionMessageMetadata.BotPromotionType[message.promotionType] === undefined ? message.promotionType : $root.AICommon.BotPromotionMessageMetadata.BotPromotionType[message.promotionType] : message.promotionType;
                if (options.oneofs)
                    object._promotionType = "promotionType";
            }
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) {
                object.buttonTitle = message.buttonTitle;
                if (options.oneofs)
                    object._buttonTitle = "buttonTitle";
            }
            return object;
        };

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

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

        /**
         * BotPromotionType enum.
         * @name AICommon.BotPromotionMessageMetadata.BotPromotionType
         * @enum {number}
         * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value
         * @property {number} C50=1 C50 value
         * @property {number} SURVEY_PLATFORM=2 SURVEY_PLATFORM value
         */
        BotPromotionMessageMetadata.BotPromotionType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_TYPE"] = 0;
            values[valuesById[1] = "C50"] = 1;
            values[valuesById[2] = "SURVEY_PLATFORM"] = 2;
            return values;
        })();

        return BotPromotionMessageMetadata;
    })();

    AICommon.BotSignatureVerificationUseCaseProof = (function() {

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

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

        /**
         * BotSignatureVerificationUseCaseProof version.
         * @member {number|null|undefined} version
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.version = null;

        /**
         * BotSignatureVerificationUseCaseProof useCase.
         * @member {AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase|null|undefined} useCase
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.useCase = null;

        /**
         * BotSignatureVerificationUseCaseProof signature.
         * @member {Uint8Array|null|undefined} signature
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.signature = null;

        /**
         * BotSignatureVerificationUseCaseProof certificateChain.
         * @member {Array.<Uint8Array>} certificateChain
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.certificateChain = $util.emptyArray;

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

        /**
         * BotSignatureVerificationUseCaseProof _version.
         * @member {"version"|undefined} _version
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_version", {
            get: $util.oneOfGetter($oneOfFields = ["version"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSignatureVerificationUseCaseProof _useCase.
         * @member {"useCase"|undefined} _useCase
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_useCase", {
            get: $util.oneOfGetter($oneOfFields = ["useCase"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSignatureVerificationUseCaseProof _signature.
         * @member {"signature"|undefined} _signature
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_signature", {
            get: $util.oneOfGetter($oneOfFields = ["signature"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

        /**
         * Verifies a BotSignatureVerificationUseCaseProof message.
         * @function verify
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSignatureVerificationUseCaseProof.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.version != null && message.hasOwnProperty("version")) {
                properties._version = 1;
                if (!$util.isInteger(message.version))
                    return "version: integer expected";
            }
            if (message.useCase != null && message.hasOwnProperty("useCase")) {
                properties._useCase = 1;
                switch (message.useCase) {
                default:
                    return "useCase: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.signature != null && message.hasOwnProperty("signature")) {
                properties._signature = 1;
                if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
                    return "signature: buffer expected";
            }
            if (message.certificateChain != null && message.hasOwnProperty("certificateChain")) {
                if (!Array.isArray(message.certificateChain))
                    return "certificateChain: array expected";
                for (var i = 0; i < message.certificateChain.length; ++i)
                    if (!(message.certificateChain[i] && typeof message.certificateChain[i].length === "number" || $util.isString(message.certificateChain[i])))
                        return "certificateChain: buffer[] expected";
            }
            return null;
        };

        /**
         * Creates a BotSignatureVerificationUseCaseProof message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotSignatureVerificationUseCaseProof} BotSignatureVerificationUseCaseProof
         */
        BotSignatureVerificationUseCaseProof.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotSignatureVerificationUseCaseProof)
                return object;
            var message = new $root.AICommon.BotSignatureVerificationUseCaseProof();
            if (object.version != null)
                message.version = object.version | 0;
            switch (object.useCase) {
            default:
                if (typeof object.useCase === "number") {
                    message.useCase = object.useCase;
                    break;
                }
                break;
            case "UNSPECIFIED":
            case 0:
                message.useCase = 0;
                break;
            case "WA_BOT_MSG":
            case 1:
                message.useCase = 1;
                break;
            }
            if (object.signature != null)
                if (typeof object.signature === "string")
                    $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
                else if (object.signature.length >= 0)
                    message.signature = object.signature;
            if (object.certificateChain) {
                if (!Array.isArray(object.certificateChain))
                    throw TypeError(".AICommon.BotSignatureVerificationUseCaseProof.certificateChain: array expected");
                message.certificateChain = [];
                for (var i = 0; i < object.certificateChain.length; ++i)
                    if (typeof object.certificateChain[i] === "string")
                        $util.base64.decode(object.certificateChain[i], message.certificateChain[i] = $util.newBuffer($util.base64.length(object.certificateChain[i])), 0);
                    else if (object.certificateChain[i].length >= 0)
                        message.certificateChain[i] = object.certificateChain[i];
            }
            return message;
        };

        /**
         * Creates a plain object from a BotSignatureVerificationUseCaseProof message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {AICommon.BotSignatureVerificationUseCaseProof} message BotSignatureVerificationUseCaseProof
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSignatureVerificationUseCaseProof.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.certificateChain = [];
            if (message.version != null && message.hasOwnProperty("version")) {
                object.version = message.version;
                if (options.oneofs)
                    object._version = "version";
            }
            if (message.useCase != null && message.hasOwnProperty("useCase")) {
                object.useCase = options.enums === String ? $root.AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[message.useCase] === undefined ? message.useCase : $root.AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[message.useCase] : message.useCase;
                if (options.oneofs)
                    object._useCase = "useCase";
            }
            if (message.signature != null && message.hasOwnProperty("signature")) {
                object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature;
                if (options.oneofs)
                    object._signature = "signature";
            }
            if (message.certificateChain && message.certificateChain.length) {
                object.certificateChain = [];
                for (var j = 0; j < message.certificateChain.length; ++j)
                    object.certificateChain[j] = options.bytes === String ? $util.base64.encode(message.certificateChain[j], 0, message.certificateChain[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.certificateChain[j]) : message.certificateChain[j];
            }
            return object;
        };

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

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

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

        return BotSignatureVerificationUseCaseProof;
    })();

    AICommon.BotSignatureVerificationMetadata = (function() {

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

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

        /**
         * BotSignatureVerificationMetadata proofs.
         * @member {Array.<AICommon.IBotSignatureVerificationUseCaseProof>} proofs
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @instance
         */
        BotSignatureVerificationMetadata.prototype.proofs = $util.emptyArray;

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

        /**
         * Encodes the specified BotSignatureVerificationMetadata message. Does not implicitly {@link AICommon.BotSignatureVerificationMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {AICommon.IBotSignatureVerificationMetadata} message BotSignatureVerificationMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSignatureVerificationMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.proofs != null && message.proofs.length)
                for (var i = 0; i < message.proofs.length; ++i)
                    $root.AICommon.BotSignatureVerificationUseCaseProof.encode(message.proofs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        return BotSignatureVerificationMetadata;
    })();

    AICommon.BotMemoryFact = (function() {

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

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

        /**
         * BotMemoryFact fact.
         * @member {string|null|undefined} fact
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.fact = null;

        /**
         * BotMemoryFact factId.
         * @member {string|null|undefined} factId
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.factId = null;

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

        /**
         * BotMemoryFact _fact.
         * @member {"fact"|undefined} _fact
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        Object.defineProperty(BotMemoryFact.prototype, "_fact", {
            get: $util.oneOfGetter($oneOfFields = ["fact"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMemoryFact _factId.
         * @member {"factId"|undefined} _factId
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        Object.defineProperty(BotMemoryFact.prototype, "_factId", {
            get: $util.oneOfGetter($oneOfFields = ["factId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

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

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

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

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

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

        return BotMemoryFact;
    })();

    AICommon.BotMemoryMetadata = (function() {

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

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

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

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

        /**
         * BotMemoryMetadata disclaimer.
         * @member {string|null|undefined} disclaimer
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.disclaimer = null;

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

        /**
         * BotMemoryMetadata _disclaimer.
         * @member {"disclaimer"|undefined} _disclaimer
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         */
        Object.defineProperty(BotMemoryMetadata.prototype, "_disclaimer", {
            get: $util.oneOfGetter($oneOfFields = ["disclaimer"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotMemoryMetadata message. Does not implicitly {@link AICommon.BotMemoryMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {AICommon.IBotMemoryMetadata} message BotMemoryMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemoryMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.addedFacts != null && message.addedFacts.length)
                for (var i = 0; i < message.addedFacts.length; ++i)
                    $root.AICommon.BotMemoryFact.encode(message.addedFacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.removedFacts != null && message.removedFacts.length)
                for (var i = 0; i < message.removedFacts.length; ++i)
                    $root.AICommon.BotMemoryFact.encode(message.removedFacts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.disclaimer != null && Object.hasOwnProperty.call(message, "disclaimer"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.disclaimer);
            return writer;
        };

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

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

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

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

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

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

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

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

        return BotMemoryMetadata;
    })();

    AICommon.BotLinkedAccount = (function() {

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

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

        /**
         * BotLinkedAccount type.
         * @member {AICommon.BotLinkedAccount.BotLinkedAccountType|null|undefined} type
         * @memberof AICommon.BotLinkedAccount
         * @instance
         */
        BotLinkedAccount.prototype.type = null;

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

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

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

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

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

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

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

        /**
         * Verifies a BotLinkedAccount message.
         * @function verify
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotLinkedAccount.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotLinkedAccount message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotLinkedAccount} BotLinkedAccount
         */
        BotLinkedAccount.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotLinkedAccount)
                return object;
            var message = new $root.AICommon.BotLinkedAccount();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "BOT_LINKED_ACCOUNT_TYPE_1P":
            case 0:
                message.type = 0;
                break;
            }
            return message;
        };

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

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

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

        /**
         * BotLinkedAccountType enum.
         * @name AICommon.BotLinkedAccount.BotLinkedAccountType
         * @enum {number}
         * @property {number} BOT_LINKED_ACCOUNT_TYPE_1P=0 BOT_LINKED_ACCOUNT_TYPE_1P value
         */
        BotLinkedAccount.BotLinkedAccountType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "BOT_LINKED_ACCOUNT_TYPE_1P"] = 0;
            return values;
        })();

        return BotLinkedAccount;
    })();

    AICommon.BotLinkedAccountsMetadata = (function() {

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

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

        /**
         * BotLinkedAccountsMetadata accounts.
         * @member {Array.<AICommon.IBotLinkedAccount>} accounts
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.accounts = $util.emptyArray;

        /**
         * BotLinkedAccountsMetadata acAuthTokens.
         * @member {Uint8Array|null|undefined} acAuthTokens
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.acAuthTokens = null;

        /**
         * BotLinkedAccountsMetadata acErrorCode.
         * @member {number|null|undefined} acErrorCode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.acErrorCode = null;

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

        /**
         * BotLinkedAccountsMetadata _acAuthTokens.
         * @member {"acAuthTokens"|undefined} _acAuthTokens
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        Object.defineProperty(BotLinkedAccountsMetadata.prototype, "_acAuthTokens", {
            get: $util.oneOfGetter($oneOfFields = ["acAuthTokens"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotLinkedAccountsMetadata _acErrorCode.
         * @member {"acErrorCode"|undefined} _acErrorCode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        Object.defineProperty(BotLinkedAccountsMetadata.prototype, "_acErrorCode", {
            get: $util.oneOfGetter($oneOfFields = ["acErrorCode"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotLinkedAccountsMetadata message. Does not implicitly {@link AICommon.BotLinkedAccountsMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {AICommon.IBotLinkedAccountsMetadata} message BotLinkedAccountsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotLinkedAccountsMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.accounts != null && message.accounts.length)
                for (var i = 0; i < message.accounts.length; ++i)
                    $root.AICommon.BotLinkedAccount.encode(message.accounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.acAuthTokens != null && Object.hasOwnProperty.call(message, "acAuthTokens"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acAuthTokens);
            if (message.acErrorCode != null && Object.hasOwnProperty.call(message, "acErrorCode"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.acErrorCode);
            return writer;
        };

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

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

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

        /**
         * Verifies a BotLinkedAccountsMetadata message.
         * @function verify
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotLinkedAccountsMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.accounts != null && message.hasOwnProperty("accounts")) {
                if (!Array.isArray(message.accounts))
                    return "accounts: array expected";
                for (var i = 0; i < message.accounts.length; ++i) {
                    var error = $root.AICommon.BotLinkedAccount.verify(message.accounts[i]);
                    if (error)
                        return "accounts." + error;
                }
            }
            if (message.acAuthTokens != null && message.hasOwnProperty("acAuthTokens")) {
                properties._acAuthTokens = 1;
                if (!(message.acAuthTokens && typeof message.acAuthTokens.length === "number" || $util.isString(message.acAuthTokens)))
                    return "acAuthTokens: buffer expected";
            }
            if (message.acErrorCode != null && message.hasOwnProperty("acErrorCode")) {
                properties._acErrorCode = 1;
                if (!$util.isInteger(message.acErrorCode))
                    return "acErrorCode: integer expected";
            }
            return null;
        };

        /**
         * Creates a BotLinkedAccountsMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata
         */
        BotLinkedAccountsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotLinkedAccountsMetadata)
                return object;
            var message = new $root.AICommon.BotLinkedAccountsMetadata();
            if (object.accounts) {
                if (!Array.isArray(object.accounts))
                    throw TypeError(".AICommon.BotLinkedAccountsMetadata.accounts: array expected");
                message.accounts = [];
                for (var i = 0; i < object.accounts.length; ++i) {
                    if (typeof object.accounts[i] !== "object")
                        throw TypeError(".AICommon.BotLinkedAccountsMetadata.accounts: object expected");
                    message.accounts[i] = $root.AICommon.BotLinkedAccount.fromObject(object.accounts[i]);
                }
            }
            if (object.acAuthTokens != null)
                if (typeof object.acAuthTokens === "string")
                    $util.base64.decode(object.acAuthTokens, message.acAuthTokens = $util.newBuffer($util.base64.length(object.acAuthTokens)), 0);
                else if (object.acAuthTokens.length >= 0)
                    message.acAuthTokens = object.acAuthTokens;
            if (object.acErrorCode != null)
                message.acErrorCode = object.acErrorCode | 0;
            return message;
        };

        /**
         * Creates a plain object from a BotLinkedAccountsMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {AICommon.BotLinkedAccountsMetadata} message BotLinkedAccountsMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotLinkedAccountsMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.accounts = [];
            if (message.accounts && message.accounts.length) {
                object.accounts = [];
                for (var j = 0; j < message.accounts.length; ++j)
                    object.accounts[j] = $root.AICommon.BotLinkedAccount.toObject(message.accounts[j], options);
            }
            if (message.acAuthTokens != null && message.hasOwnProperty("acAuthTokens")) {
                object.acAuthTokens = options.bytes === String ? $util.base64.encode(message.acAuthTokens, 0, message.acAuthTokens.length) : options.bytes === Array ? Array.prototype.slice.call(message.acAuthTokens) : message.acAuthTokens;
                if (options.oneofs)
                    object._acAuthTokens = "acAuthTokens";
            }
            if (message.acErrorCode != null && message.hasOwnProperty("acErrorCode")) {
                object.acErrorCode = message.acErrorCode;
                if (options.oneofs)
                    object._acErrorCode = "acErrorCode";
            }
            return object;
        };

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

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

        return BotLinkedAccountsMetadata;
    })();

    AICommon.BotPromptSuggestion = (function() {

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

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

        /**
         * BotPromptSuggestion prompt.
         * @member {string|null|undefined} prompt
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.prompt = null;

        /**
         * BotPromptSuggestion promptId.
         * @member {string|null|undefined} promptId
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.promptId = null;

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

        /**
         * BotPromptSuggestion _prompt.
         * @member {"prompt"|undefined} _prompt
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        Object.defineProperty(BotPromptSuggestion.prototype, "_prompt", {
            get: $util.oneOfGetter($oneOfFields = ["prompt"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPromptSuggestion _promptId.
         * @member {"promptId"|undefined} _promptId
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        Object.defineProperty(BotPromptSuggestion.prototype, "_promptId", {
            get: $util.oneOfGetter($oneOfFields = ["promptId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

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

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

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

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

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

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

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

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

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

        return BotPromptSuggestion;
    })();

    AICommon.BotPromptSuggestions = (function() {

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

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

        /**
         * BotPromptSuggestions suggestions.
         * @member {Array.<AICommon.IBotPromptSuggestion>} suggestions
         * @memberof AICommon.BotPromptSuggestions
         * @instance
         */
        BotPromptSuggestions.prototype.suggestions = $util.emptyArray;

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

        /**
         * Encodes the specified BotPromptSuggestions message. Does not implicitly {@link AICommon.BotPromptSuggestions.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {AICommon.IBotPromptSuggestions} message BotPromptSuggestions message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPromptSuggestions.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.suggestions != null && message.suggestions.length)
                for (var i = 0; i < message.suggestions.length; ++i)
                    $root.AICommon.BotPromptSuggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

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

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

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

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

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

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

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

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

        return BotPromptSuggestions;
    })();

    AICommon.BotSuggestedPromptMetadata = (function() {

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

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

        /**
         * BotSuggestedPromptMetadata suggestedPrompts.
         * @member {Array.<string>} suggestedPrompts
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.suggestedPrompts = $util.emptyArray;

        /**
         * BotSuggestedPromptMetadata selectedPromptIndex.
         * @member {number|null|undefined} selectedPromptIndex
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptIndex = null;

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

        /**
         * BotSuggestedPromptMetadata selectedPromptId.
         * @member {string|null|undefined} selectedPromptId
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptId = null;

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

        /**
         * BotSuggestedPromptMetadata _selectedPromptIndex.
         * @member {"selectedPromptIndex"|undefined} _selectedPromptIndex
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_selectedPromptIndex", {
            get: $util.oneOfGetter($oneOfFields = ["selectedPromptIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSuggestedPromptMetadata _promptSuggestions.
         * @member {"promptSuggestions"|undefined} _promptSuggestions
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_promptSuggestions", {
            get: $util.oneOfGetter($oneOfFields = ["promptSuggestions"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSuggestedPromptMetadata _selectedPromptId.
         * @member {"selectedPromptId"|undefined} _selectedPromptId
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_selectedPromptId", {
            get: $util.oneOfGetter($oneOfFields = ["selectedPromptId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotSuggestedPromptMetadata message. Does not implicitly {@link AICommon.BotSuggestedPromptMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {AICommon.IBotSuggestedPromptMetadata} message BotSuggestedPromptMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSuggestedPromptMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.suggestedPrompts != null && message.suggestedPrompts.length)
                for (var i = 0; i < message.suggestedPrompts.length; ++i)
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestedPrompts[i]);
            if (message.selectedPromptIndex != null && Object.hasOwnProperty.call(message, "selectedPromptIndex"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedPromptIndex);
            if (message.promptSuggestions != null && Object.hasOwnProperty.call(message, "promptSuggestions"))
                $root.AICommon.BotPromptSuggestions.encode(message.promptSuggestions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.selectedPromptId != null && Object.hasOwnProperty.call(message, "selectedPromptId"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectedPromptId);
            return writer;
        };

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

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

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

        /**
         * Verifies a BotSuggestedPromptMetadata message.
         * @function verify
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSuggestedPromptMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.suggestedPrompts != null && message.hasOwnProperty("suggestedPrompts")) {
                if (!Array.isArray(message.suggestedPrompts))
                    return "suggestedPrompts: array expected";
                for (var i = 0; i < message.suggestedPrompts.length; ++i)
                    if (!$util.isString(message.suggestedPrompts[i]))
                        return "suggestedPrompts: string[] expected";
            }
            if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) {
                properties._selectedPromptIndex = 1;
                if (!$util.isInteger(message.selectedPromptIndex))
                    return "selectedPromptIndex: integer expected";
            }
            if (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions")) {
                properties._promptSuggestions = 1;
                {
                    var error = $root.AICommon.BotPromptSuggestions.verify(message.promptSuggestions);
                    if (error)
                        return "promptSuggestions." + error;
                }
            }
            if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId")) {
                properties._selectedPromptId = 1;
                if (!$util.isString(message.selectedPromptId))
                    return "selectedPromptId: string expected";
            }
            return null;
        };

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

        /**
         * Creates a plain object from a BotSuggestedPromptMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {AICommon.BotSuggestedPromptMetadata} message BotSuggestedPromptMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSuggestedPromptMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.suggestedPrompts = [];
            if (message.suggestedPrompts && message.suggestedPrompts.length) {
                object.suggestedPrompts = [];
                for (var j = 0; j < message.suggestedPrompts.length; ++j)
                    object.suggestedPrompts[j] = message.suggestedPrompts[j];
            }
            if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) {
                object.selectedPromptIndex = message.selectedPromptIndex;
                if (options.oneofs)
                    object._selectedPromptIndex = "selectedPromptIndex";
            }
            if (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions")) {
                object.promptSuggestions = $root.AICommon.BotPromptSuggestions.toObject(message.promptSuggestions, options);
                if (options.oneofs)
                    object._promptSuggestions = "promptSuggestions";
            }
            if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId")) {
                object.selectedPromptId = message.selectedPromptId;
                if (options.oneofs)
                    object._selectedPromptId = "selectedPromptId";
            }
            return object;
        };

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

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

        return BotSuggestedPromptMetadata;
    })();

    AICommon.BotPluginMetadata = (function() {

        /**
         * Properties of a BotPluginMetadata.
         * @memberof AICommon
         * @interface IBotPluginMetadata
         * @property {AICommon.BotPluginMetadata.SearchProvider|null} [provider] BotPluginMetadata provider
         * @property {AICommon.BotPluginMetadata.PluginType|null} [pluginType] BotPluginMetadata pluginType
         * @property {string|null} [thumbnailCdnUrl] BotPluginMetadata thumbnailCdnUrl
         * @property {string|null} [profilePhotoCdnUrl] BotPluginMetadata profilePhotoCdnUrl
         * @property {string|null} [searchProviderUrl] BotPluginMetadata searchProviderUrl
         * @property {number|null} [referenceIndex] BotPluginMetadata referenceIndex
         * @property {number|null} [expectedLinksCount] BotPluginMetadata expectedLinksCount
         * @property {string|null} [searchQuery] BotPluginMetadata searchQuery
         * @property {Protocol.IMessageKey|null} [parentPluginMessageKey] BotPluginMetadata parentPluginMessageKey
         * @property {AICommon.BotPluginMetadata.PluginType|null} [deprecatedField] BotPluginMetadata deprecatedField
         * @property {AICommon.BotPluginMetadata.PluginType|null} [parentPluginType] BotPluginMetadata parentPluginType
         * @property {string|null} [faviconCdnUrl] BotPluginMetadata faviconCdnUrl
         */

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

        /**
         * BotPluginMetadata provider.
         * @member {AICommon.BotPluginMetadata.SearchProvider|null|undefined} provider
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.provider = null;

        /**
         * BotPluginMetadata pluginType.
         * @member {AICommon.BotPluginMetadata.PluginType|null|undefined} pluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.pluginType = null;

        /**
         * BotPluginMetadata thumbnailCdnUrl.
         * @member {string|null|undefined} thumbnailCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.thumbnailCdnUrl = null;

        /**
         * BotPluginMetadata profilePhotoCdnUrl.
         * @member {string|null|undefined} profilePhotoCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.profilePhotoCdnUrl = null;

        /**
         * BotPluginMetadata searchProviderUrl.
         * @member {string|null|undefined} searchProviderUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchProviderUrl = null;

        /**
         * BotPluginMetadata referenceIndex.
         * @member {number|null|undefined} referenceIndex
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.referenceIndex = null;

        /**
         * BotPluginMetadata expectedLinksCount.
         * @member {number|null|undefined} expectedLinksCount
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.expectedLinksCount = null;

        /**
         * BotPluginMetadata searchQuery.
         * @member {string|null|undefined} searchQuery
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchQuery = null;

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

        /**
         * BotPluginMetadata deprecatedField.
         * @member {AICommon.BotPluginMetadata.PluginType|null|undefined} deprecatedField
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.deprecatedField = null;

        /**
         * BotPluginMetadata parentPluginType.
         * @member {AICommon.BotPluginMetadata.PluginType|null|undefined} parentPluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.parentPluginType = null;

        /**
         * BotPluginMetadata faviconCdnUrl.
         * @member {string|null|undefined} faviconCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.faviconCdnUrl = null;

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

        /**
         * BotPluginMetadata _provider.
         * @member {"provider"|undefined} _provider
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_provider", {
            get: $util.oneOfGetter($oneOfFields = ["provider"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _pluginType.
         * @member {"pluginType"|undefined} _pluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_pluginType", {
            get: $util.oneOfGetter($oneOfFields = ["pluginType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _thumbnailCdnUrl.
         * @member {"thumbnailCdnUrl"|undefined} _thumbnailCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_thumbnailCdnUrl", {
            get: $util.oneOfGetter($oneOfFields = ["thumbnailCdnUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _profilePhotoCdnUrl.
         * @member {"profilePhotoCdnUrl"|undefined} _profilePhotoCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_profilePhotoCdnUrl", {
            get: $util.oneOfGetter($oneOfFields = ["profilePhotoCdnUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _searchProviderUrl.
         * @member {"searchProviderUrl"|undefined} _searchProviderUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_searchProviderUrl", {
            get: $util.oneOfGetter($oneOfFields = ["searchProviderUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _referenceIndex.
         * @member {"referenceIndex"|undefined} _referenceIndex
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_referenceIndex", {
            get: $util.oneOfGetter($oneOfFields = ["referenceIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _expectedLinksCount.
         * @member {"expectedLinksCount"|undefined} _expectedLinksCount
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_expectedLinksCount", {
            get: $util.oneOfGetter($oneOfFields = ["expectedLinksCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _searchQuery.
         * @member {"searchQuery"|undefined} _searchQuery
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_searchQuery", {
            get: $util.oneOfGetter($oneOfFields = ["searchQuery"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _parentPluginMessageKey.
         * @member {"parentPluginMessageKey"|undefined} _parentPluginMessageKey
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_parentPluginMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["parentPluginMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _deprecatedField.
         * @member {"deprecatedField"|undefined} _deprecatedField
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_deprecatedField", {
            get: $util.oneOfGetter($oneOfFields = ["deprecatedField"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _parentPluginType.
         * @member {"parentPluginType"|undefined} _parentPluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_parentPluginType", {
            get: $util.oneOfGetter($oneOfFields = ["parentPluginType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _faviconCdnUrl.
         * @member {"faviconCdnUrl"|undefined} _faviconCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_faviconCdnUrl", {
            get: $util.oneOfGetter($oneOfFields = ["faviconCdnUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotPluginMetadata message. Does not implicitly {@link AICommon.BotPluginMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {AICommon.IBotPluginMetadata} message BotPluginMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPluginMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider);
            if (message.pluginType != null && Object.hasOwnProperty.call(message, "pluginType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pluginType);
            if (message.thumbnailCdnUrl != null && Object.hasOwnProperty.call(message, "thumbnailCdnUrl"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.thumbnailCdnUrl);
            if (message.profilePhotoCdnUrl != null && Object.hasOwnProperty.call(message, "profilePhotoCdnUrl"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.profilePhotoCdnUrl);
            if (message.searchProviderUrl != null && Object.hasOwnProperty.call(message, "searchProviderUrl"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.searchProviderUrl);
            if (message.referenceIndex != null && Object.hasOwnProperty.call(message, "referenceIndex"))
                writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.referenceIndex);
            if (message.expectedLinksCount != null && Object.hasOwnProperty.call(message, "expectedLinksCount"))
                writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.expectedLinksCount);
            if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery"))
                writer.uint32(/* id 9, wireType 2 =*/74).string(message.searchQuery);
            if (message.parentPluginMessageKey != null && Object.hasOwnProperty.call(message, "parentPluginMessageKey"))
                $root.Protocol.MessageKey.encode(message.parentPluginMessageKey, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            if (message.deprecatedField != null && Object.hasOwnProperty.call(message, "deprecatedField"))
                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.deprecatedField);
            if (message.parentPluginType != null && Object.hasOwnProperty.call(message, "parentPluginType"))
                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.parentPluginType);
            if (message.faviconCdnUrl != null && Object.hasOwnProperty.call(message, "faviconCdnUrl"))
                writer.uint32(/* id 13, wireType 2 =*/106).string(message.faviconCdnUrl);
            return writer;
        };

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

        /**
         * Decodes a BotPluginMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotPluginMetadata} BotPluginMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPluginMetadata.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AICommon.BotPluginMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.provider = reader.int32();
                        break;
                    }
                case 2: {
                        message.pluginType = reader.int32();
                        break;
                    }
                case 3: {
                        message.thumbnailCdnUrl = reader.string();
                        break;
                    }
                case 4: {
                        message.profilePhotoCdnUrl = reader.string();
                        break;
                    }
                case 5: {
                        message.searchProviderUrl = reader.string();
                        break;
                    }
                case 6: {
                        message.referenceIndex = reader.uint32();
                        break;
                    }
                case 7: {
                        message.expectedLinksCount = reader.uint32();
                        break;
                    }
                case 9: {
                        message.searchQuery = reader.string();
                        break;
                    }
                case 10: {
                        message.parentPluginMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.deprecatedField = reader.int32();
                        break;
                    }
                case 12: {
                        message.parentPluginType = reader.int32();
                        break;
                    }
                case 13: {
                        message.faviconCdnUrl = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a BotPluginMetadata message.
         * @function verify
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotPluginMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.provider != null && message.hasOwnProperty("provider")) {
                properties._provider = 1;
                switch (message.provider) {
                default:
                    return "provider: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.pluginType != null && message.hasOwnProperty("pluginType")) {
                properties._pluginType = 1;
                switch (message.pluginType) {
                default:
                    return "pluginType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                properties._thumbnailCdnUrl = 1;
                if (!$util.isString(message.thumbnailCdnUrl))
                    return "thumbnailCdnUrl: string expected";
            }
            if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) {
                properties._profilePhotoCdnUrl = 1;
                if (!$util.isString(message.profilePhotoCdnUrl))
                    return "profilePhotoCdnUrl: string expected";
            }
            if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) {
                properties._searchProviderUrl = 1;
                if (!$util.isString(message.searchProviderUrl))
                    return "searchProviderUrl: string expected";
            }
            if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) {
                properties._referenceIndex = 1;
                if (!$util.isInteger(message.referenceIndex))
                    return "referenceIndex: integer expected";
            }
            if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) {
                properties._expectedLinksCount = 1;
                if (!$util.isInteger(message.expectedLinksCount))
                    return "expectedLinksCount: integer expected";
            }
            if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) {
                properties._searchQuery = 1;
                if (!$util.isString(message.searchQuery))
                    return "searchQuery: string expected";
            }
            if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey")) {
                properties._parentPluginMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.parentPluginMessageKey);
                    if (error)
                        return "parentPluginMessageKey." + error;
                }
            }
            if (message.deprecatedField != null && message.hasOwnProperty("deprecatedField")) {
                properties._deprecatedField = 1;
                switch (message.deprecatedField) {
                default:
                    return "deprecatedField: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType")) {
                properties._parentPluginType = 1;
                switch (message.parentPluginType) {
                default:
                    return "parentPluginType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                properties._faviconCdnUrl = 1;
                if (!$util.isString(message.faviconCdnUrl))
                    return "faviconCdnUrl: string expected";
            }
            return null;
        };

        /**
         * Creates a BotPluginMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotPluginMetadata} BotPluginMetadata
         */
        BotPluginMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotPluginMetadata)
                return object;
            var message = new $root.AICommon.BotPluginMetadata();
            switch (object.provider) {
            default:
                if (typeof object.provider === "number") {
                    message.provider = object.provider;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.provider = 0;
                break;
            case "BING":
            case 1:
                message.provider = 1;
                break;
            case "GOOGLE":
            case 2:
                message.provider = 2;
                break;
            case "SUPPORT":
            case 3:
                message.provider = 3;
                break;
            }
            switch (object.pluginType) {
            default:
                if (typeof object.pluginType === "number") {
                    message.pluginType = object.pluginType;
                    break;
                }
                break;
            case "UNKNOWN_PLUGIN":
            case 0:
                message.pluginType = 0;
                break;
            case "REELS":
            case 1:
                message.pluginType = 1;
                break;
            case "SEARCH":
            case 2:
                message.pluginType = 2;
                break;
            }
            if (object.thumbnailCdnUrl != null)
                message.thumbnailCdnUrl = String(object.thumbnailCdnUrl);
            if (object.profilePhotoCdnUrl != null)
                message.profilePhotoCdnUrl = String(object.profilePhotoCdnUrl);
            if (object.searchProviderUrl != null)
                message.searchProviderUrl = String(object.searchProviderUrl);
            if (object.referenceIndex != null)
                message.referenceIndex = object.referenceIndex >>> 0;
            if (object.expectedLinksCount != null)
                message.expectedLinksCount = object.expectedLinksCount >>> 0;
            if (object.searchQuery != null)
                message.searchQuery = String(object.searchQuery);
            if (object.parentPluginMessageKey != null) {
                if (typeof object.parentPluginMessageKey !== "object")
                    throw TypeError(".AICommon.BotPluginMetadata.parentPluginMessageKey: object expected");
                message.parentPluginMessageKey = $root.Protocol.MessageKey.fromObject(object.parentPluginMessageKey);
            }
            switch (object.deprecatedField) {
            default:
                if (typeof object.deprecatedField === "number") {
                    message.deprecatedField = object.deprecatedField;
                    break;
                }
                break;
            case "UNKNOWN_PLUGIN":
            case 0:
                message.deprecatedField = 0;
                break;
            case "REELS":
            case 1:
                message.deprecatedField = 1;
                break;
            case "SEARCH":
            case 2:
                message.deprecatedField = 2;
                break;
            }
            switch (object.parentPluginType) {
            default:
                if (typeof object.parentPluginType === "number") {
                    message.parentPluginType = object.parentPluginType;
                    break;
                }
                break;
            case "UNKNOWN_PLUGIN":
            case 0:
                message.parentPluginType = 0;
                break;
            case "REELS":
            case 1:
                message.parentPluginType = 1;
                break;
            case "SEARCH":
            case 2:
                message.parentPluginType = 2;
                break;
            }
            if (object.faviconCdnUrl != null)
                message.faviconCdnUrl = String(object.faviconCdnUrl);
            return message;
        };

        /**
         * Creates a plain object from a BotPluginMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {AICommon.BotPluginMetadata} message BotPluginMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotPluginMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.provider != null && message.hasOwnProperty("provider")) {
                object.provider = options.enums === String ? $root.AICommon.BotPluginMetadata.SearchProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotPluginMetadata.SearchProvider[message.provider] : message.provider;
                if (options.oneofs)
                    object._provider = "provider";
            }
            if (message.pluginType != null && message.hasOwnProperty("pluginType")) {
                object.pluginType = options.enums === String ? $root.AICommon.BotPluginMetadata.PluginType[message.pluginType] === undefined ? message.pluginType : $root.AICommon.BotPluginMetadata.PluginType[message.pluginType] : message.pluginType;
                if (options.oneofs)
                    object._pluginType = "pluginType";
            }
            if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                object.thumbnailCdnUrl = message.thumbnailCdnUrl;
                if (options.oneofs)
                    object._thumbnailCdnUrl = "thumbnailCdnUrl";
            }
            if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) {
                object.profilePhotoCdnUrl = message.profilePhotoCdnUrl;
                if (options.oneofs)
                    object._profilePhotoCdnUrl = "profilePhotoCdnUrl";
            }
            if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) {
                object.searchProviderUrl = message.searchProviderUrl;
                if (options.oneofs)
                    object._searchProviderUrl = "searchProviderUrl";
            }
            if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) {
                object.referenceIndex = message.referenceIndex;
                if (options.oneofs)
                    object._referenceIndex = "referenceIndex";
            }
            if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) {
                object.expectedLinksCount = message.expectedLinksCount;
                if (options.oneofs)
                    object._expectedLinksCount = "expectedLinksCount";
            }
            if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) {
                object.searchQuery = message.searchQuery;
                if (options.oneofs)
                    object._searchQuery = "searchQuery";
            }
            if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey")) {
                object.parentPluginMessageKey = $root.Protocol.MessageKey.toObject(message.parentPluginMessageKey, options);
                if (options.oneofs)
                    object._parentPluginMessageKey = "parentPluginMessageKey";
            }
            if (message.deprecatedField != null && message.hasOwnProperty("deprecatedField")) {
                object.deprecatedField = options.enums === String ? $root.AICommon.BotPluginMetadata.PluginType[message.deprecatedField] === undefined ? message.deprecatedField : $root.AICommon.BotPluginMetadata.PluginType[message.deprecatedField] : message.deprecatedField;
                if (options.oneofs)
                    object._deprecatedField = "deprecatedField";
            }
            if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType")) {
                object.parentPluginType = options.enums === String ? $root.AICommon.BotPluginMetadata.PluginType[message.parentPluginType] === undefined ? message.parentPluginType : $root.AICommon.BotPluginMetadata.PluginType[message.parentPluginType] : message.parentPluginType;
                if (options.oneofs)
                    object._parentPluginType = "parentPluginType";
            }
            if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                object.faviconCdnUrl = message.faviconCdnUrl;
                if (options.oneofs)
                    object._faviconCdnUrl = "faviconCdnUrl";
            }
            return object;
        };

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

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

        /**
         * PluginType enum.
         * @name AICommon.BotPluginMetadata.PluginType
         * @enum {number}
         * @property {number} UNKNOWN_PLUGIN=0 UNKNOWN_PLUGIN value
         * @property {number} REELS=1 REELS value
         * @property {number} SEARCH=2 SEARCH value
         */
        BotPluginMetadata.PluginType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_PLUGIN"] = 0;
            values[valuesById[1] = "REELS"] = 1;
            values[valuesById[2] = "SEARCH"] = 2;
            return values;
        })();

        /**
         * SearchProvider enum.
         * @name AICommon.BotPluginMetadata.SearchProvider
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} BING=1 BING value
         * @property {number} GOOGLE=2 GOOGLE value
         * @property {number} SUPPORT=3 SUPPORT value
         */
        BotPluginMetadata.SearchProvider = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "BING"] = 1;
            values[valuesById[2] = "GOOGLE"] = 2;
            values[valuesById[3] = "SUPPORT"] = 3;
            return values;
        })();

        return BotPluginMetadata;
    })();

    AICommon.BotAvatarMetadata = (function() {

        /**
         * Properties of a BotAvatarMetadata.
         * @memberof AICommon
         * @interface IBotAvatarMetadata
         * @property {number|null} [sentiment] BotAvatarMetadata sentiment
         * @property {string|null} [behaviorGraph] BotAvatarMetadata behaviorGraph
         * @property {number|null} [action] BotAvatarMetadata action
         * @property {number|null} [intensity] BotAvatarMetadata intensity
         * @property {number|null} [wordCount] BotAvatarMetadata wordCount
         */

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

        /**
         * BotAvatarMetadata sentiment.
         * @member {number|null|undefined} sentiment
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.sentiment = null;

        /**
         * BotAvatarMetadata behaviorGraph.
         * @member {string|null|undefined} behaviorGraph
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.behaviorGraph = null;

        /**
         * BotAvatarMetadata action.
         * @member {number|null|undefined} action
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.action = null;

        /**
         * BotAvatarMetadata intensity.
         * @member {number|null|undefined} intensity
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.intensity = null;

        /**
         * BotAvatarMetadata wordCount.
         * @member {number|null|undefined} wordCount
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.wordCount = null;

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

        /**
         * BotAvatarMetadata _sentiment.
         * @member {"sentiment"|undefined} _sentiment
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_sentiment", {
            get: $util.oneOfGetter($oneOfFields = ["sentiment"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _behaviorGraph.
         * @member {"behaviorGraph"|undefined} _behaviorGraph
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_behaviorGraph", {
            get: $util.oneOfGetter($oneOfFields = ["behaviorGraph"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _action.
         * @member {"action"|undefined} _action
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_action", {
            get: $util.oneOfGetter($oneOfFields = ["action"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _intensity.
         * @member {"intensity"|undefined} _intensity
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_intensity", {
            get: $util.oneOfGetter($oneOfFields = ["intensity"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _wordCount.
         * @member {"wordCount"|undefined} _wordCount
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_wordCount", {
            get: $util.oneOfGetter($oneOfFields = ["wordCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified BotAvatarMetadata message. Does not implicitly {@link AICommon.BotAvatarMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {AICommon.IBotAvatarMetadata} message BotAvatarMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotAvatarMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment"))
                writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sentiment);
            if (message.behaviorGraph != null && Object.hasOwnProperty.call(message, "behaviorGraph"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.behaviorGraph);
            if (message.action != null && Object.hasOwnProperty.call(message, "action"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.action);
            if (message.intensity != null && Object.hasOwnProperty.call(message, "intensity"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.intensity);
            if (message.wordCount != null && Object.hasOwnProperty.call(message, "wordCount"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wordCount);
            return writer;
        };

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

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

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

        /**
         * Verifies a BotAvatarMetadata message.
         * @function verify
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotAvatarMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sentiment != null && message.hasOwnProperty("sentiment")) {
                properties._sentiment = 1;
                if (!$util.isInteger(message.sentiment))
                    return "sentiment: integer expected";
            }
            if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) {
                properties._behaviorGraph = 1;
                if (!$util.isString(message.behaviorGraph))
                    return "behaviorGraph: string expected";
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                properties._action = 1;
                if (!$util.isInteger(message.action))
                    return "action: integer expected";
            }
            if (message.intensity != null && message.hasOwnProperty("intensity")) {
                properties._intensity = 1;
                if (!$util.isInteger(message.intensity))
                    return "intensity: integer expected";
            }
            if (message.wordCount != null && message.hasOwnProperty("wordCount")) {
                properties._wordCount = 1;
                if (!$util.isInteger(message.wordCount))
                    return "wordCount: integer expected";
            }
            return null;
        };

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

        /**
         * Creates a plain object from a BotAvatarMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {AICommon.BotAvatarMetadata} message BotAvatarMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotAvatarMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.sentiment != null && message.hasOwnProperty("sentiment")) {
                object.sentiment = message.sentiment;
                if (options.oneofs)
                    object._sentiment = "sentiment";
            }
            if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) {
                object.behaviorGraph = message.behaviorGraph;
                if (options.oneofs)
                    object._behaviorGraph = "behaviorGraph";
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                object.action = message.action;
                if (options.oneofs)
                    object._action = "action";
            }
            if (message.intensity != null && message.hasOwnProperty("intensity")) {
                object.intensity = message.intensity;
                if (options.oneofs)
                    object._intensity = "intensity";
            }
            if (message.wordCount != null && message.hasOwnProperty("wordCount")) {
                object.wordCount = message.wordCount;
                if (options.oneofs)
                    object._wordCount = "wordCount";
            }
            return object;
        };

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

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

        return BotAvatarMetadata;
    })();

    /**
     * AIRichResponseSubMessageType enum.
     * @name AICommon.AIRichResponseSubMessageType
     * @enum {number}
     * @property {number} AI_RICH_RESPONSE_UNKNOWN=0 AI_RICH_RESPONSE_UNKNOWN value
     * @property {number} AI_RICH_RESPONSE_GRID_IMAGE=1 AI_RICH_RESPONSE_GRID_IMAGE value
     * @property {number} AI_RICH_RESPONSE_TEXT=2 AI_RICH_RESPONSE_TEXT value
     * @property {number} AI_RICH_RESPONSE_INLINE_IMAGE=3 AI_RICH_RESPONSE_INLINE_IMAGE value
     * @property {number} AI_RICH_RESPONSE_TABLE=4 AI_RICH_RESPONSE_TABLE value
     * @property {number} AI_RICH_RESPONSE_CODE=5 AI_RICH_RESPONSE_CODE value
     * @property {number} AI_RICH_RESPONSE_DYNAMIC=6 AI_RICH_RESPONSE_DYNAMIC value
     * @property {number} AI_RICH_RESPONSE_MAP=7 AI_RICH_RESPONSE_MAP value
     * @property {number} AI_RICH_RESPONSE_LATEX=8 AI_RICH_RESPONSE_LATEX value
     * @property {number} AI_RICH_RESPONSE_CONTENT_ITEMS=9 AI_RICH_RESPONSE_CONTENT_ITEMS value
     */
    AICommon.AIRichResponseSubMessageType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "AI_RICH_RESPONSE_UNKNOWN"] = 0;
        values[valuesById[1] = "AI_RICH_RESPONSE_GRID_IMAGE"] = 1;
        values[valuesById[2] = "AI_RICH_RESPONSE_TEXT"] = 2;
        values[valuesById[3] = "AI_RICH_RESPONSE_INLINE_IMAGE"] = 3;
        values[valuesById[4] = "AI_RICH_RESPONSE_TABLE"] = 4;
        values[valuesById[5] = "AI_RICH_RESPONSE_CODE"] = 5;
        values[valuesById[6] = "AI_RICH_RESPONSE_DYNAMIC"] = 6;
        values[valuesById[7] = "AI_RICH_RESPONSE_MAP"] = 7;
        values[valuesById[8] = "AI_RICH_RESPONSE_LATEX"] = 8;
        values[valuesById[9] = "AI_RICH_RESPONSE_CONTENT_ITEMS"] = 9;
        return values;
    })();

    /**
     * AIRichResponseMessageType enum.
     * @name AICommon.AIRichResponseMessageType
     * @enum {number}
     * @property {number} AI_RICH_RESPONSE_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_TYPE_UNKNOWN value
     * @property {number} AI_RICH_RESPONSE_TYPE_STANDARD=1 AI_RICH_RESPONSE_TYPE_STANDARD value
     */
    AICommon.AIRichResponseMessageType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "AI_RICH_RESPONSE_TYPE_UNKNOWN"] = 0;
        values[valuesById[1] = "AI_RICH_RESPONSE_TYPE_STANDARD"] = 1;
        return values;
    })();

    /**
     * BotSessionSource enum.
     * @name AICommon.BotSessionSource
     * @enum {number}
     * @property {number} NONE=0 NONE value
     * @property {number} NULL_STATE=1 NULL_STATE value
     * @property {number} TYPEAHEAD=2 TYPEAHEAD value
     * @property {number} USER_INPUT=3 USER_INPUT value
     * @property {number} EMU_FLASH=4 EMU_FLASH value
     * @property {number} EMU_FLASH_FOLLOWUP=5 EMU_FLASH_FOLLOWUP value
     * @property {number} VOICE=6 VOICE value
     */
    AICommon.BotSessionSource = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "NONE"] = 0;
        values[valuesById[1] = "NULL_STATE"] = 1;
        values[valuesById[2] = "TYPEAHEAD"] = 2;
        values[valuesById[3] = "USER_INPUT"] = 3;
        values[valuesById[4] = "EMU_FLASH"] = 4;
        values[valuesById[5] = "EMU_FLASH_FOLLOWUP"] = 5;
        values[valuesById[6] = "VOICE"] = 6;
        return values;
    })();

    /**
     * BotMetricsThreadEntryPoint enum.
     * @name AICommon.BotMetricsThreadEntryPoint
     * @enum {number}
     * @property {number} AI_TAB_THREAD=1 AI_TAB_THREAD value
     * @property {number} AI_HOME_THREAD=2 AI_HOME_THREAD value
     * @property {number} AI_DEEPLINK_IMMERSIVE_THREAD=3 AI_DEEPLINK_IMMERSIVE_THREAD value
     * @property {number} AI_DEEPLINK_THREAD=4 AI_DEEPLINK_THREAD value
     * @property {number} ASK_META_AI_CONTEXT_MENU_THREAD=5 ASK_META_AI_CONTEXT_MENU_THREAD value
     */
    AICommon.BotMetricsThreadEntryPoint = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[1] = "AI_TAB_THREAD"] = 1;
        values[valuesById[2] = "AI_HOME_THREAD"] = 2;
        values[valuesById[3] = "AI_DEEPLINK_IMMERSIVE_THREAD"] = 3;
        values[valuesById[4] = "AI_DEEPLINK_THREAD"] = 4;
        values[valuesById[5] = "ASK_META_AI_CONTEXT_MENU_THREAD"] = 5;
        return values;
    })();

    /**
     * BotMetricsEntryPoint enum.
     * @name AICommon.BotMetricsEntryPoint
     * @enum {number}
     * @property {number} UNDEFINED_ENTRY_POINT=0 UNDEFINED_ENTRY_POINT value
     * @property {number} FAVICON=1 FAVICON value
     * @property {number} CHATLIST=2 CHATLIST value
     * @property {number} AISEARCH_NULL_STATE_PAPER_PLANE=3 AISEARCH_NULL_STATE_PAPER_PLANE value
     * @property {number} AISEARCH_NULL_STATE_SUGGESTION=4 AISEARCH_NULL_STATE_SUGGESTION value
     * @property {number} AISEARCH_TYPE_AHEAD_SUGGESTION=5 AISEARCH_TYPE_AHEAD_SUGGESTION value
     * @property {number} AISEARCH_TYPE_AHEAD_PAPER_PLANE=6 AISEARCH_TYPE_AHEAD_PAPER_PLANE value
     * @property {number} AISEARCH_TYPE_AHEAD_RESULT_CHATLIST=7 AISEARCH_TYPE_AHEAD_RESULT_CHATLIST value
     * @property {number} AISEARCH_TYPE_AHEAD_RESULT_MESSAGES=8 AISEARCH_TYPE_AHEAD_RESULT_MESSAGES value
     * @property {number} AIVOICE_SEARCH_BAR=9 AIVOICE_SEARCH_BAR value
     * @property {number} AIVOICE_FAVICON=10 AIVOICE_FAVICON value
     * @property {number} AISTUDIO=11 AISTUDIO value
     * @property {number} DEEPLINK=12 DEEPLINK value
     * @property {number} NOTIFICATION=13 NOTIFICATION value
     * @property {number} PROFILE_MESSAGE_BUTTON=14 PROFILE_MESSAGE_BUTTON value
     * @property {number} FORWARD=15 FORWARD value
     * @property {number} APP_SHORTCUT=16 APP_SHORTCUT value
     * @property {number} FF_FAMILY=17 FF_FAMILY value
     * @property {number} AI_TAB=18 AI_TAB value
     * @property {number} AI_HOME=19 AI_HOME value
     * @property {number} AI_DEEPLINK_IMMERSIVE=20 AI_DEEPLINK_IMMERSIVE value
     * @property {number} AI_DEEPLINK=21 AI_DEEPLINK value
     * @property {number} META_AI_CHAT_SHORTCUT_AI_STUDIO=22 META_AI_CHAT_SHORTCUT_AI_STUDIO value
     * @property {number} UGC_CHAT_SHORTCUT_AI_STUDIO=23 UGC_CHAT_SHORTCUT_AI_STUDIO value
     * @property {number} NEW_CHAT_AI_STUDIO=24 NEW_CHAT_AI_STUDIO value
     * @property {number} AIVOICE_FAVICON_CALL_HISTORY=25 AIVOICE_FAVICON_CALL_HISTORY value
     * @property {number} ASK_META_AI_CONTEXT_MENU=26 ASK_META_AI_CONTEXT_MENU value
     * @property {number} ASK_META_AI_CONTEXT_MENU_1ON1=27 ASK_META_AI_CONTEXT_MENU_1ON1 value
     * @property {number} ASK_META_AI_CONTEXT_MENU_GROUP=28 ASK_META_AI_CONTEXT_MENU_GROUP value
     * @property {number} INVOKE_META_AI_1ON1=29 INVOKE_META_AI_1ON1 value
     * @property {number} INVOKE_META_AI_GROUP=30 INVOKE_META_AI_GROUP value
     * @property {number} META_AI_FORWARD=31 META_AI_FORWARD value
     * @property {number} NEW_CHAT_AI_CONTACT=32 NEW_CHAT_AI_CONTACT value
     * @property {number} MESSAGE_QUICK_ACTION=33 MESSAGE_QUICK_ACTION value
     * @property {number} ATTACHMENT_TRAY=34 ATTACHMENT_TRAY value
     */
    AICommon.BotMetricsEntryPoint = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "UNDEFINED_ENTRY_POINT"] = 0;
        values[valuesById[1] = "FAVICON"] = 1;
        values[valuesById[2] = "CHATLIST"] = 2;
        values[valuesById[3] = "AISEARCH_NULL_STATE_PAPER_PLANE"] = 3;
        values[valuesById[4] = "AISEARCH_NULL_STATE_SUGGESTION"] = 4;
        values[valuesById[5] = "AISEARCH_TYPE_AHEAD_SUGGESTION"] = 5;
        values[valuesById[6] = "AISEARCH_TYPE_AHEAD_PAPER_PLANE"] = 6;
        values[valuesById[7] = "AISEARCH_TYPE_AHEAD_RESULT_CHATLIST"] = 7;
        values[valuesById[8] = "AISEARCH_TYPE_AHEAD_RESULT_MESSAGES"] = 8;
        values[valuesById[9] = "AIVOICE_SEARCH_BAR"] = 9;
        values[valuesById[10] = "AIVOICE_FAVICON"] = 10;
        values[valuesById[11] = "AISTUDIO"] = 11;
        values[valuesById[12] = "DEEPLINK"] = 12;
        values[valuesById[13] = "NOTIFICATION"] = 13;
        values[valuesById[14] = "PROFILE_MESSAGE_BUTTON"] = 14;
        values[valuesById[15] = "FORWARD"] = 15;
        values[valuesById[16] = "APP_SHORTCUT"] = 16;
        values[valuesById[17] = "FF_FAMILY"] = 17;
        values[valuesById[18] = "AI_TAB"] = 18;
        values[valuesById[19] = "AI_HOME"] = 19;
        values[valuesById[20] = "AI_DEEPLINK_IMMERSIVE"] = 20;
        values[valuesById[21] = "AI_DEEPLINK"] = 21;
        values[valuesById[22] = "META_AI_CHAT_SHORTCUT_AI_STUDIO"] = 22;
        values[valuesById[23] = "UGC_CHAT_SHORTCUT_AI_STUDIO"] = 23;
        values[valuesById[24] = "NEW_CHAT_AI_STUDIO"] = 24;
        values[valuesById[25] = "AIVOICE_FAVICON_CALL_HISTORY"] = 25;
        values[valuesById[26] = "ASK_META_AI_CONTEXT_MENU"] = 26;
        values[valuesById[27] = "ASK_META_AI_CONTEXT_MENU_1ON1"] = 27;
        values[valuesById[28] = "ASK_META_AI_CONTEXT_MENU_GROUP"] = 28;
        values[valuesById[29] = "INVOKE_META_AI_1ON1"] = 29;
        values[valuesById[30] = "INVOKE_META_AI_GROUP"] = 30;
        values[valuesById[31] = "META_AI_FORWARD"] = 31;
        values[valuesById[32] = "NEW_CHAT_AI_CONTACT"] = 32;
        values[valuesById[33] = "MESSAGE_QUICK_ACTION"] = 33;
        values[valuesById[34] = "ATTACHMENT_TRAY"] = 34;
        return values;
    })();

    return AICommon;
})();

$root.StatusAttributions = (function() {

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

    StatusAttributions.StatusAttribution = (function() {

        /**
         * Properties of a StatusAttribution.
         * @memberof StatusAttributions
         * @interface IStatusAttribution
         * @property {StatusAttributions.StatusAttribution.Type|null} [type] StatusAttribution type
         * @property {string|null} [actionUrl] StatusAttribution actionUrl
         * @property {StatusAttributions.StatusAttribution.IStatusReshare|null} [statusReshare] StatusAttribution statusReshare
         * @property {StatusAttributions.StatusAttribution.IExternalShare|null} [externalShare] StatusAttribution externalShare
         * @property {StatusAttributions.StatusAttribution.IMusic|null} [music] StatusAttribution music
         * @property {StatusAttributions.StatusAttribution.IGroupStatus|null} [groupStatus] StatusAttribution groupStatus
         * @property {StatusAttributions.StatusAttribution.IRLAttribution|null} [rlAttribution] StatusAttribution rlAttribution
         * @property {StatusAttributions.StatusAttribution.IAiCreatedAttribution|null} [aiCreatedAttribution] StatusAttribution aiCreatedAttribution
         */

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

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

        /**
         * StatusAttribution actionUrl.
         * @member {string|null|undefined} actionUrl
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.actionUrl = null;

        /**
         * StatusAttribution statusReshare.
         * @member {StatusAttributions.StatusAttribution.IStatusReshare|null|undefined} statusReshare
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.statusReshare = null;

        /**
         * StatusAttribution externalShare.
         * @member {StatusAttributions.StatusAttribution.IExternalShare|null|undefined} externalShare
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.externalShare = null;

        /**
         * StatusAttribution music.
         * @member {StatusAttributions.StatusAttribution.IMusic|null|undefined} music
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.music = null;

        /**
         * StatusAttribution groupStatus.
         * @member {StatusAttributions.StatusAttribution.IGroupStatus|null|undefined} groupStatus
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.groupStatus = null;

        /**
         * StatusAttribution rlAttribution.
         * @member {StatusAttributions.StatusAttribution.IRLAttribution|null|undefined} rlAttribution
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.rlAttribution = null;

        /**
         * StatusAttribution aiCreatedAttribution.
         * @member {StatusAttributions.StatusAttribution.IAiCreatedAttribution|null|undefined} aiCreatedAttribution
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.aiCreatedAttribution = null;

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

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

        /**
         * StatusAttribution _actionUrl.
         * @member {"actionUrl"|undefined} _actionUrl
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        Object.defineProperty(StatusAttribution.prototype, "_actionUrl", {
            get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * StatusAttribution attributionData.
         * @member {"statusReshare"|"externalShare"|"music"|"groupStatus"|"rlAttribution"|"aiCreatedAttribution"|undefined} attributionData
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        Object.defineProperty(StatusAttribution.prototype, "attributionData", {
            get: $util.oneOfGetter($oneOfFields = ["statusReshare", "externalShare", "music", "groupStatus", "rlAttribution", "aiCreatedAttribution"]),
            set: $util.oneOfSetter($oneOfFields)
        });

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

        /**
         * Encodes the specified StatusAttribution message. Does not implicitly {@link StatusAttributions.StatusAttribution.verify|verify} messages.
         * @function encode
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {StatusAttributions.IStatusAttribution} message StatusAttribution message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StatusAttribution.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            if (message.actionUrl != null && Object.hasOwnProperty.call(message, "actionUrl"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.actionUrl);
            if (message.statusReshare != null && Object.hasOwnProperty.call(message, "statusReshare"))
                $root.StatusAttributions.StatusAttribution.StatusReshare.encode(message.statusReshare, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.externalShare != null && Object.hasOwnProperty.call(message, "externalShare"))
                $root.StatusAttributions.StatusAttribution.ExternalShare.encode(message.externalShare, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.music != null && Object.hasOwnProperty.call(message, "music"))
                $root.StatusAttributions.StatusAttribution.Music.encode(message.music, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.groupStatus != null && Object.hasOwnProperty.call(message, "groupStatus"))
                $root.StatusAttributions.StatusAttribution.GroupStatus.encode(message.groupStatus, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.rlAttribution != null && Object.hasOwnProperty.call(message, "rlAttribution"))
                $root.StatusAttributions.StatusAttribution.RLAttribution.encode(message.rlAttribution, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.aiCreatedAttribution != null && Object.hasOwnProperty.call(message, "aiCreatedAttribution"))
                $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.encode(message.aiCreatedAttribution, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            return writer;
        };

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

        /**
         * Decodes a StatusAttribution message from the specified reader or buffer.
         * @function decode
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {StatusAttributions.StatusAttribution} StatusAttribution
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StatusAttribution.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.type = reader.int32();
                        break;
                    }
                case 2: {
                        message.actionUrl = reader.string();
                        break;
                    }
                case 3: {
                        message.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.music = $root.StatusAttributions.StatusAttribution.Music.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.groupStatus = $root.StatusAttributions.StatusAttribution.GroupStatus.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.rlAttribution = $root.StatusAttributions.StatusAttribution.RLAttribution.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.aiCreatedAttribution = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

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

        /**
         * Verifies a StatusAttribution message.
         * @function verify
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        StatusAttribution.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                    break;
                }
            }
            if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                properties._actionUrl = 1;
                if (!$util.isString(message.actionUrl))
                    return "actionUrl: string expected";
            }
            if (message.statusReshare != null && message.hasOwnProperty("statusReshare")) {
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.StatusReshare.verify(message.statusReshare);
                    if (error)
                        return "statusReshare." + error;
                }
            }
            if (message.externalShare != null && message.hasOwnProperty("externalShare")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.ExternalShare.verify(message.externalShare);
                    if (error)
                        return "externalShare." + error;
                }
            }
            if (message.music != null && message.hasOwnProperty("music")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.Music.verify(message.music);
                    if (error)
                        return "music." + error;
                }
            }
            if (message.groupStatus != null && message.hasOwnProperty("groupStatus")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.GroupStatus.verify(message.groupStatus);
                    if (error)
                        return "groupStatus." + error;
                }
            }
            if (message.rlAttribution != null && message.hasOwnProperty("rlAttribution")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.RLAttribution.verify(message.rlAttribution);
                    if (error)
                        return "rlAttribution." + error;
                }
            }
            if (message.aiCreatedAttribution != null && message.hasOwnProperty("aiCreatedAttribution")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.verify(message.aiCreatedAttribution);
                    if (error)
                        return "aiCreatedAttribution." + error;
                }
            }
            return null;
        };

        /**
         * Creates a StatusAttribution message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {StatusAttributions.StatusAttribution} StatusAttribution
         */
        StatusAttribution.fromObject = function fromObject(object) {
            if (object instanceof $root.StatusAttributions.StatusAttribution)
                return object;
            var message = new $root.StatusAttributions.StatusAttribution();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.type = 0;
                break;
            case "RESHARE":
            case 1:
                message.type = 1;
                break;
            case "EXTERNAL_SHARE":
            case 2:
                message.type = 2;
                break;
            case "MUSIC":
            case 3:
                message.type = 3;
                break;
            case "STATUS_MENTION":
            case 4:
                message.type = 4;
                break;
            case "GROUP_STATUS":
            case 5:
                message.type = 5;
                break;
            case "RL_ATTRIBUTION":
            case 6:
                message.type = 6;
                break;
            case "AI_CREATED":
            case 7:
                message.type = 7;
                break;
            }
            if (object.actionUrl != null)
                message.actionUrl = String(object.actionUrl);
            if (object.statusReshare != null) {
                if (typeof object.statusReshare !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.statusReshare: object expected");
                message.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.fromObject(object.statusReshare);
            }
            if (object.externalShare != null) {
                if (typeof object.externalShare !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.externalShare: object expected");
                message.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.fromObject(object.externalShare);
            }
            if (object.music != null) {
                if (typeof object.music !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.music: object expected");
                message.music = $root.StatusAttributions.StatusAttribution.Music.fromObject(object.music);
            }
            if (object.groupStatus != null) {
                if (typeof object.groupStatus !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.groupStatus: object expected");
                message.groupStatus = $root.StatusAttributions.StatusAttribution.GroupStatus.fromObject(object.groupStatus);
            }
            if (object.rlAttribution != null) {
                if (typeof object.rlAttribution !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.rlAttribution: object expected");
                message.rlAttribution = $root.StatusAttributions.StatusAttribution.RLAttribution.fromObject(object.rlAttribution);
            }
            if (object.aiCreatedAttribution != null) {
                if (typeof object.aiCreatedAttribution !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.aiCreatedAttribution: object expected");
                message.aiCreatedAttribution = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.fromObject(object.aiCreatedAttribution);
            }
            return message;
        };

        /**
         * Creates a plain object from a StatusAttribution message. Also converts values to other types if specified.
         * @function toObject
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {StatusAttributions.StatusAttribution} message StatusAttribution
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        StatusAttribution.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.StatusAttributions.StatusAttribution.Type[message.type] === undefined ? message.type : $root.StatusAttributions.StatusAttribution.Type[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                object.actionUrl = message.actionUrl;
                if (options.oneofs)
                    object._actionUrl = "actionUrl";
            }
            if (message.statusReshare != null && message.hasOwnProperty("statusReshare")) {
                object.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.toObject(message.statusReshare, options);
                if (options.oneofs)
                    object.attributionData = "statusReshare";
            }
            if (message.externalShare != null && message.hasOwnProperty("externalShare")) {
                object.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.toObject(message.externalShare, options);
                if (options.oneofs)
                    object.attributionData = "externalShare";
            }
            if (message.music != null && message.hasOwnProperty("music")) {
                object.music = $root.StatusAttributions.StatusAttribution.Music.toObject(message.music, options);
                if (options.oneofs)
                    object.attributionData = "music";
            }
            if (message.groupStatus != null && message.hasOwnProperty("groupStatus")) {
                object.groupStatus = $root.StatusAttributions.StatusAttribution.GroupStatus.toObject(message.groupStatus, options);
                if (options.oneofs)
                    object.attributionData = "groupStatus";
            }
            if (message.rlAttribution != null && message.hasOwnProperty("rlAttribution")) {
                object.rlAttribution = $root.StatusAttributions.StatusAttribution.RLAttribution.toObject(message.rlAttribution, options);
                if (options.oneofs)
                    object.attributionData = "rlAttribution";
            }
            if (message.aiCreatedAttribution != null && message.hasOwnProperty("aiCreatedAttribution")) {
                object.aiCreatedAttribution = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.toObject(message.aiCreatedAttribution, options);
                if (options.oneofs)
                    object.attributionData = "aiCreatedAttribution";
            }
            return object;
        };

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

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

        StatusAttribution.AiCreatedAttribution = (function() {

            /**
             * Properties of an AiCreatedAttribution.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IAiCreatedAttribution
             * @property {StatusAttributions.StatusAttribution.AiCreatedAttribution.Source|null} [source] AiCreatedAttribution source
             */

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

            /**
             * AiCreatedAttribution source.
             * @member {StatusAttributions.StatusAttribution.AiCreatedAttribution.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @instance
             */
            AiCreatedAttribution.prototype.source = null;

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

            /**
             * AiCreatedAttribution _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @instance
             */
            Object.defineProperty(AiCreatedAttribution.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

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

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

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

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

            /**
             * Verifies an AiCreatedAttribution message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AiCreatedAttribution.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates an AiCreatedAttribution message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.AiCreatedAttribution} AiCreatedAttribution
             */
            AiCreatedAttribution.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.AiCreatedAttribution)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.AiCreatedAttribution();
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "STATUS_MIMICRY":
                case 1:
                    message.source = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from an AiCreatedAttribution message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.AiCreatedAttribution} message AiCreatedAttribution
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AiCreatedAttribution.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                return object;
            };

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

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

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.AiCreatedAttribution.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} STATUS_MIMICRY=1 STATUS_MIMICRY value
             */
            AiCreatedAttribution.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "STATUS_MIMICRY"] = 1;
                return values;
            })();

            return AiCreatedAttribution;
        })();

        StatusAttribution.ExternalShare = (function() {

            /**
             * Properties of an ExternalShare.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IExternalShare
             * @property {string|null} [actionUrl] ExternalShare actionUrl
             * @property {StatusAttributions.StatusAttribution.ExternalShare.Source|null} [source] ExternalShare source
             * @property {number|null} [duration] ExternalShare duration
             * @property {string|null} [actionFallbackUrl] ExternalShare actionFallbackUrl
             */

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

            /**
             * ExternalShare actionUrl.
             * @member {string|null|undefined} actionUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.actionUrl = null;

            /**
             * ExternalShare source.
             * @member {StatusAttributions.StatusAttribution.ExternalShare.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.source = null;

            /**
             * ExternalShare duration.
             * @member {number|null|undefined} duration
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.duration = null;

            /**
             * ExternalShare actionFallbackUrl.
             * @member {string|null|undefined} actionFallbackUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.actionFallbackUrl = null;

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

            /**
             * ExternalShare _actionUrl.
             * @member {"actionUrl"|undefined} _actionUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            Object.defineProperty(ExternalShare.prototype, "_actionUrl", {
                get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalShare _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            Object.defineProperty(ExternalShare.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * ExternalShare _actionFallbackUrl.
             * @member {"actionFallbackUrl"|undefined} _actionFallbackUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            Object.defineProperty(ExternalShare.prototype, "_actionFallbackUrl", {
                get: $util.oneOfGetter($oneOfFields = ["actionFallbackUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

            /**
             * Encodes the specified ExternalShare message. Does not implicitly {@link StatusAttributions.StatusAttribution.ExternalShare.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {StatusAttributions.StatusAttribution.IExternalShare} message ExternalShare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExternalShare.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.actionUrl != null && Object.hasOwnProperty.call(message, "actionUrl"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionUrl);
                if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.source);
                if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.duration);
                if (message.actionFallbackUrl != null && Object.hasOwnProperty.call(message, "actionFallbackUrl"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.actionFallbackUrl);
                return writer;
            };

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

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

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

            /**
             * Verifies an ExternalShare message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ExternalShare.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                    properties._actionUrl = 1;
                    if (!$util.isString(message.actionUrl))
                        return "actionUrl: string expected";
                }
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                        break;
                    }
                }
                if (message.duration != null && message.hasOwnProperty("duration")) {
                    properties._duration = 1;
                    if (!$util.isInteger(message.duration))
                        return "duration: integer expected";
                }
                if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl")) {
                    properties._actionFallbackUrl = 1;
                    if (!$util.isString(message.actionFallbackUrl))
                        return "actionFallbackUrl: string expected";
                }
                return null;
            };

            /**
             * Creates an ExternalShare message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare
             */
            ExternalShare.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.ExternalShare)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.ExternalShare();
                if (object.actionUrl != null)
                    message.actionUrl = String(object.actionUrl);
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "INSTAGRAM":
                case 1:
                    message.source = 1;
                    break;
                case "FACEBOOK":
                case 2:
                    message.source = 2;
                    break;
                case "MESSENGER":
                case 3:
                    message.source = 3;
                    break;
                case "SPOTIFY":
                case 4:
                    message.source = 4;
                    break;
                case "YOUTUBE":
                case 5:
                    message.source = 5;
                    break;
                case "PINTEREST":
                case 6:
                    message.source = 6;
                    break;
                case "THREADS":
                case 7:
                    message.source = 7;
                    break;
                case "APPLE_MUSIC":
                case 8:
                    message.source = 8;
                    break;
                }
                if (object.duration != null)
                    message.duration = object.duration | 0;
                if (object.actionFallbackUrl != null)
                    message.actionFallbackUrl = String(object.actionFallbackUrl);
                return message;
            };

            /**
             * Creates a plain object from an ExternalShare message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {StatusAttributions.StatusAttribution.ExternalShare} message ExternalShare
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ExternalShare.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                    object.actionUrl = message.actionUrl;
                    if (options.oneofs)
                        object._actionUrl = "actionUrl";
                }
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.ExternalShare.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.ExternalShare.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                if (message.duration != null && message.hasOwnProperty("duration")) {
                    object.duration = message.duration;
                    if (options.oneofs)
                        object._duration = "duration";
                }
                if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl")) {
                    object.actionFallbackUrl = message.actionFallbackUrl;
                    if (options.oneofs)
                        object._actionFallbackUrl = "actionFallbackUrl";
                }
                return object;
            };

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

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

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.ExternalShare.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} INSTAGRAM=1 INSTAGRAM value
             * @property {number} FACEBOOK=2 FACEBOOK value
             * @property {number} MESSENGER=3 MESSENGER value
             * @property {number} SPOTIFY=4 SPOTIFY value
             * @property {number} YOUTUBE=5 YOUTUBE value
             * @property {number} PINTEREST=6 PINTEREST value
             * @property {number} THREADS=7 THREADS value
             * @property {number} APPLE_MUSIC=8 APPLE_MUSIC value
             */
            ExternalShare.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "INSTAGRAM"] = 1;
                values[valuesById[2] = "FACEBOOK"] = 2;
                values[valuesById[3] = "MESSENGER"] = 3;
                values[valuesById[4] = "SPOTIFY"] = 4;
                values[valuesById[5] = "YOUTUBE"] = 5;
                values[valuesById[6] = "PINTEREST"] = 6;
                values[valuesById[7] = "THREADS"] = 7;
                values[valuesById[8] = "APPLE_MUSIC"] = 8;
                return values;
            })();

            return ExternalShare;
        })();

        StatusAttribution.GroupStatus = (function() {

            /**
             * Properties of a GroupStatus.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IGroupStatus
             * @property {string|null} [authorJid] GroupStatus authorJid
             */

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

            /**
             * GroupStatus authorJid.
             * @member {string|null|undefined} authorJid
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @instance
             */
            GroupStatus.prototype.authorJid = null;

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

            /**
             * GroupStatus _authorJid.
             * @member {"authorJid"|undefined} _authorJid
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @instance
             */
            Object.defineProperty(GroupStatus.prototype, "_authorJid", {
                get: $util.oneOfGetter($oneOfFields = ["authorJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

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

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

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

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

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

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

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

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

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

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

            return GroupStatus;
        })();

        StatusAttribution.Music = (function() {

            /**
             * Properties of a Music.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IMusic
             * @property {string|null} [authorName] Music authorName
             * @property {string|null} [songId] Music songId
             * @property {string|null} [title] Music title
             * @property {string|null} [author] Music author
             * @property {string|null} [artistAttribution] Music artistAttribution
             * @property {boolean|null} [isExplicit] Music isExplicit
             */

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

            /**
             * Music authorName.
             * @member {string|null|undefined} authorName
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.authorName = null;

            /**
             * Music songId.
             * @member {string|null|undefined} songId
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.songId = null;

            /**
             * Music title.
             * @member {string|null|undefined} title
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.title = null;

            /**
             * Music author.
             * @member {string|null|undefined} author
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.author = null;

            /**
             * Music artistAttribution.
             * @member {string|null|undefined} artistAttribution
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.artistAttribution = null;

            /**
             * Music isExplicit.
             * @member {boolean|null|undefined} isExplicit
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.isExplicit = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * Music _authorName.
             * @member {"authorName"|undefined} _authorName
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_authorName", {
                get: $util.oneOfGetter($oneOfFields = ["authorName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _songId.
             * @member {"songId"|undefined} _songId
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_songId", {
                get: $util.oneOfGetter($oneOfFields = ["songId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _title.
             * @member {"title"|undefined} _title
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _author.
             * @member {"author"|undefined} _author
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_author", {
                get: $util.oneOfGetter($oneOfFields = ["author"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _artistAttribution.
             * @member {"artistAttribution"|undefined} _artistAttribution
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_artistAttribution", {
                get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _isExplicit.
             * @member {"isExplicit"|undefined} _isExplicit
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_isExplicit", {
                get: $util.oneOfGetter($oneOfFields = ["isExplicit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new Music instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.IMusic=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.Music} Music instance
             */
            Music.create = function create(properties) {
                return new Music(properties);
            };

            /**
             * Encodes the specified Music message. Does not implicitly {@link StatusAttributions.StatusAttribution.Music.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.IMusic} message Music message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Music.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.authorName != null && Object.hasOwnProperty.call(message, "authorName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.authorName);
                if (message.songId != null && Object.hasOwnProperty.call(message, "songId"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.songId);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.title);
                if (message.author != null && Object.hasOwnProperty.call(message, "author"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.author);
                if (message.artistAttribution != null && Object.hasOwnProperty.call(message, "artistAttribution"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.artistAttribution);
                if (message.isExplicit != null && Object.hasOwnProperty.call(message, "isExplicit"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isExplicit);
                return writer;
            };

            /**
             * Encodes the specified Music message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.Music.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.IMusic} message Music message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Music.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Music message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.Music} Music
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Music.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.Music();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.authorName = reader.string();
                            break;
                        }
                    case 2: {
                            message.songId = reader.string();
                            break;
                        }
                    case 3: {
                            message.title = reader.string();
                            break;
                        }
                    case 4: {
                            message.author = reader.string();
                            break;
                        }
                    case 5: {
                            message.artistAttribution = reader.string();
                            break;
                        }
                    case 6: {
                            message.isExplicit = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a Music message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.Music} Music
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Music.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Music message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Music.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.authorName != null && message.hasOwnProperty("authorName")) {
                    properties._authorName = 1;
                    if (!$util.isString(message.authorName))
                        return "authorName: string expected";
                }
                if (message.songId != null && message.hasOwnProperty("songId")) {
                    properties._songId = 1;
                    if (!$util.isString(message.songId))
                        return "songId: string expected";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.author != null && message.hasOwnProperty("author")) {
                    properties._author = 1;
                    if (!$util.isString(message.author))
                        return "author: string expected";
                }
                if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
                    properties._artistAttribution = 1;
                    if (!$util.isString(message.artistAttribution))
                        return "artistAttribution: string expected";
                }
                if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
                    properties._isExplicit = 1;
                    if (typeof message.isExplicit !== "boolean")
                        return "isExplicit: boolean expected";
                }
                return null;
            };

            /**
             * Creates a Music message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.Music} Music
             */
            Music.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.Music)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.Music();
                if (object.authorName != null)
                    message.authorName = String(object.authorName);
                if (object.songId != null)
                    message.songId = String(object.songId);
                if (object.title != null)
                    message.title = String(object.title);
                if (object.author != null)
                    message.author = String(object.author);
                if (object.artistAttribution != null)
                    message.artistAttribution = String(object.artistAttribution);
                if (object.isExplicit != null)
                    message.isExplicit = Boolean(object.isExplicit);
                return message;
            };

            /**
             * Creates a plain object from a Music message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.Music} message Music
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Music.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.authorName != null && message.hasOwnProperty("authorName")) {
                    object.authorName = message.authorName;
                    if (options.oneofs)
                        object._authorName = "authorName";
                }
                if (message.songId != null && message.hasOwnProperty("songId")) {
                    object.songId = message.songId;
                    if (options.oneofs)
                        object._songId = "songId";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.author != null && message.hasOwnProperty("author")) {
                    object.author = message.author;
                    if (options.oneofs)
                        object._author = "author";
                }
                if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
                    object.artistAttribution = message.artistAttribution;
                    if (options.oneofs)
                        object._artistAttribution = "artistAttribution";
                }
                if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
                    object.isExplicit = message.isExplicit;
                    if (options.oneofs)
                        object._isExplicit = "isExplicit";
                }
                return object;
            };

            /**
             * Converts this Music to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Music.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for Music
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            Music.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.Music";
            };

            return Music;
        })();

        StatusAttribution.RLAttribution = (function() {

            /**
             * Properties of a RLAttribution.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IRLAttribution
             * @property {StatusAttributions.StatusAttribution.RLAttribution.Source|null} [source] RLAttribution source
             */

            /**
             * Constructs a new RLAttribution.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents a RLAttribution.
             * @implements IRLAttribution
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IRLAttribution=} [properties] Properties to set
             */
            function RLAttribution(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * RLAttribution source.
             * @member {StatusAttributions.StatusAttribution.RLAttribution.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @instance
             */
            RLAttribution.prototype.source = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * RLAttribution _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @instance
             */
            Object.defineProperty(RLAttribution.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new RLAttribution instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IRLAttribution=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution instance
             */
            RLAttribution.create = function create(properties) {
                return new RLAttribution(properties);
            };

            /**
             * Encodes the specified RLAttribution message. Does not implicitly {@link StatusAttributions.StatusAttribution.RLAttribution.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IRLAttribution} message RLAttribution message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RLAttribution.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.source);
                return writer;
            };

            /**
             * Encodes the specified RLAttribution message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.RLAttribution.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IRLAttribution} message RLAttribution message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RLAttribution.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RLAttribution message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RLAttribution.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.RLAttribution();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.source = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a RLAttribution message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RLAttribution.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RLAttribution message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RLAttribution.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a RLAttribution message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution
             */
            RLAttribution.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.RLAttribution)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.RLAttribution();
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "RAY_BAN_META_GLASSES":
                case 1:
                    message.source = 1;
                    break;
                case "OAKLEY_META_GLASSES":
                case 2:
                    message.source = 2;
                    break;
                case "HYPERNOVA_GLASSES":
                case 3:
                    message.source = 3;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a RLAttribution message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.RLAttribution} message RLAttribution
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RLAttribution.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.RLAttribution.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.RLAttribution.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                return object;
            };

            /**
             * Converts this RLAttribution to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RLAttribution.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for RLAttribution
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            RLAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.RLAttribution";
            };

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.RLAttribution.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} RAY_BAN_META_GLASSES=1 RAY_BAN_META_GLASSES value
             * @property {number} OAKLEY_META_GLASSES=2 OAKLEY_META_GLASSES value
             * @property {number} HYPERNOVA_GLASSES=3 HYPERNOVA_GLASSES value
             */
            RLAttribution.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "RAY_BAN_META_GLASSES"] = 1;
                values[valuesById[2] = "OAKLEY_META_GLASSES"] = 2;
                values[valuesById[3] = "HYPERNOVA_GLASSES"] = 3;
                return values;
            })();

            return RLAttribution;
        })();

        StatusAttribution.StatusReshare = (function() {

            /**
             * Properties of a StatusReshare.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IStatusReshare
             * @property {StatusAttributions.StatusAttribution.StatusReshare.Source|null} [source] StatusReshare source
             * @property {StatusAttributions.StatusAttribution.StatusReshare.IMetadata|null} [metadata] StatusReshare metadata
             */

            /**
             * Constructs a new StatusReshare.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents a StatusReshare.
             * @implements IStatusReshare
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IStatusReshare=} [properties] Properties to set
             */
            function StatusReshare(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * StatusReshare source.
             * @member {StatusAttributions.StatusAttribution.StatusReshare.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            StatusReshare.prototype.source = null;

            /**
             * StatusReshare metadata.
             * @member {StatusAttributions.StatusAttribution.StatusReshare.IMetadata|null|undefined} metadata
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            StatusReshare.prototype.metadata = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StatusReshare _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            Object.defineProperty(StatusReshare.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusReshare _metadata.
             * @member {"metadata"|undefined} _metadata
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            Object.defineProperty(StatusReshare.prototype, "_metadata", {
                get: $util.oneOfGetter($oneOfFields = ["metadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StatusReshare instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.IStatusReshare=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare instance
             */
            StatusReshare.create = function create(properties) {
                return new StatusReshare(properties);
            };

            /**
             * Encodes the specified StatusReshare message. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.IStatusReshare} message StatusReshare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusReshare.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.source);
                if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
                    $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified StatusReshare message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.IStatusReshare} message StatusReshare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusReshare.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusReshare message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusReshare.decode = function decode(reader, length, error) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.StatusReshare();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.source = reader.int32();
                            break;
                        }
                    case 2: {
                            message.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StatusReshare message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusReshare.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusReshare message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusReshare.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    properties._metadata = 1;
                    {
                        var error = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify(message.metadata);
                        if (error)
                            return "metadata." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a StatusReshare message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
             */
            StatusReshare.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.StatusReshare)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.StatusReshare();
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "INTERNAL_RESHARE":
                case 1:
                    message.source = 1;
                    break;
                case "MENTION_RESHARE":
                case 2:
                    message.source = 2;
                    break;
                case "CHANNEL_RESHARE":
                case 3:
                    message.source = 3;
                    break;
                case "FORWARD":
                case 4:
                    message.source = 4;
                    break;
                }
                if (object.metadata != null) {
                    if (typeof object.metadata !== "object")
                        throw TypeError(".StatusAttributions.StatusAttribution.StatusReshare.metadata: object expected");
                    message.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.fromObject(object.metadata);
                }
                return message;
            };

            /**
             * Creates a plain object from a StatusReshare message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.StatusReshare} message StatusReshare
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusReshare.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.StatusReshare.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.StatusReshare.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    object.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.toObject(message.metadata, options);
                    if (options.oneofs)
                        object._metadata = "metadata";
                }
                return object;
            };

            /**
             * Converts this StatusReshare to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusReshare.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StatusReshare
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StatusReshare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.StatusReshare";
            };

            StatusReshare.Metadata = (function() {

                /**
                 * Properties of a Metadata.
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare
                 * @interface IMetadata
                 * @property {number|null} [duration] Metadata duration
                 * @property {string|null} [channelJid] Metadata channelJid
                 * @property {number|null} [channelMessageId] Metadata channelMessageId
                 * @property {boolean|null} [hasMultipleReshares] Metadata hasMultipleReshares
                 */

                /**
                 * Constructs a new Metadata.
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare
                 * @classdesc Represents a Metadata.
                 * @implements IMetadata
                 * @constructor
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata=} [properties] Properties to set
                 */
                function Metadata(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }

                /**
                 * Metadata duration.
                 * @member {number|null|undefined} duration
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.duration = null;

                /**
                 * Metadata channelJid.
                 * @member {string|null|undefined} channelJid
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.channelJid = null;

                /**
                 * Metadata channelMessageId.
                 * @member {number|null|undefined} channelMessageId
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.channelMessageId = null;

                /**
                 * Metadata hasMultipleReshares.
                 * @member {boolean|null|undefined} hasMultipleReshares
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.hasMultipleReshares = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Metadata _duration.
                 * @member {"duration"|undefined} _duration
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_duration", {
                    get: $util.oneOfGetter($oneOfFields = ["duration"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Metadata _channelJid.
                 * @member {"channelJid"|undefined} _channelJid
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_channelJid", {
                    get: $util.oneOfGetter($oneOfFields = ["channelJid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Metadata _channelMessageId.
                 * @member {"channelMessageId"|undefined} _channelMessageId
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_channelMessageId", {
                    get: $util.oneOfGetter($oneOfFields = ["channelMessageId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Metadata _hasMultipleReshares.
                 * @member {"hasMultipleReshares"|undefined} _hasMultipleReshares
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_hasMultipleReshares", {
                    get: $util.oneOfGetter($oneOfFields = ["hasMultipleReshares"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Metadata instance using the specified properties.
                 * @function create
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata=} [properties] Properties to set
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata instance
                 */
                Metadata.create = function create(properties) {
                    return new Metadata(properties);
                };

                /**
                 * Encodes the specified Metadata message. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify|verify} messages.
                 * @function encode
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata} message Metadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.duration);
                    if (message.channelJid != null && Object.hasOwnProperty.call(message, "channelJid"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelJid);
                    if (message.channelMessageId != null && Object.hasOwnProperty.call(message, "channelMessageId"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channelMessageId);
                    if (message.hasMultipleReshares != null && Object.hasOwnProperty.call(message, "hasMultipleReshares"))
                        writer.uint32(/* id 4, wireType 0 =*/32).bool(message.hasMultipleReshares);
                    return writer;
                };

                /**
                 * Encodes the specified Metadata message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata} message Metadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metadata.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Metadata message from the specified reader or buffer.
                 * @function decode
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metadata.decode = function decode(reader, length, error) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.duration = reader.int32();
                                break;
                            }
                        case 2: {
                                message.channelJid = reader.string();
                                break;
                            }
                        case 3: {
                                message.channelMessageId = reader.int32();
                                break;
                            }
                        case 4: {
                                message.hasMultipleReshares = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Metadata message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metadata.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Metadata message.
                 * @function verify
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Metadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.duration != null && message.hasOwnProperty("duration")) {
                        properties._duration = 1;
                        if (!$util.isInteger(message.duration))
                            return "duration: integer expected";
                    }
                    if (message.channelJid != null && message.hasOwnProperty("channelJid")) {
                        properties._channelJid = 1;
                        if (!$util.isString(message.channelJid))
                            return "channelJid: string expected";
                    }
                    if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId")) {
                        properties._channelMessageId = 1;
                        if (!$util.isInteger(message.channelMessageId))
                            return "channelMessageId: integer expected";
                    }
                    if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares")) {
                        properties._hasMultipleReshares = 1;
                        if (typeof message.hasMultipleReshares !== "boolean")
                            return "hasMultipleReshares: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a Metadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
                 */
                Metadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata)
                        return object;
                    var message = new $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata();
                    if (object.duration != null)
                        message.duration = object.duration | 0;
                    if (object.channelJid != null)
                        message.channelJid = String(object.channelJid);
                    if (object.channelMessageId != null)
                        message.channelMessageId = object.channelMessageId | 0;
                    if (object.hasMultipleReshares != null)
                        message.hasMultipleReshares = Boolean(object.hasMultipleReshares);
                    return message;
                };

                /**
                 * Creates a plain object from a Metadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.Metadata} message Metadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Metadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.duration != null && message.hasOwnProperty("duration")) {
                        object.duration = message.duration;
                        if (options.oneofs)
                            object._duration = "duration";
                    }
                    if (message.channelJid != null && message.hasOwnProperty("channelJid")) {
                        object.channelJid = message.channelJid;
                        if (options.oneofs)
                            object._channelJid = "channelJid";
                    }
                    if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId")) {
                        object.channelMessageId = message.channelMessageId;
                        if (options.oneofs)
                            object._channelMessageId = "channelMessageId";
                    }
                    if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares")) {
                        object.hasMultipleReshares = message.hasMultipleReshares;
                        if (options.oneofs)
                            object._hasMultipleReshares = "hasMultipleReshares";
                    }
                    return object;
                };

                /**
                 * Converts this Metadata to JSON.
                 * @function toJSON
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Metadata.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Metadata
                 * @function getTypeUrl
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/StatusAttributions.StatusAttribution.StatusReshare.Metadata";
                };

                return Metadata;
            })();

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.StatusReshare.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} INTERNAL_RESHARE=1 INTERNAL_RESHARE value
             * @property {number} MENTION_RESHARE=2 MENTION_RESHARE value
             * @property {number} CHANNEL_RESHARE=3 CHANNEL_RESHARE value
             * @property {number} FORWARD=4 FORWARD value
             */
            StatusReshare.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "INTERNAL_RESHARE"] = 1;
                values[valuesById[2] = "MENTION_RESHARE"] = 2;
                values[valuesById[3] = "CHANNEL_RESHARE"] = 3;
                values[valuesById[4] = "FORWARD"] = 4;
                return values;
            })();

            return StatusReshare;
        })();

        /**
         * Type enum.
         * @name StatusAttributions.StatusAttribution.Type
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} RESHARE=1 RESHARE value
         * @property {number} EXTERNAL_SHARE=2 EXTERNAL_SHARE value
         * @property {number} MUSIC=3 MUSIC value
         * @property {number} STATUS_MENTION=4 STATUS_MENTION value
         * @property {number} GROUP_STATUS=5 GROUP_STATUS value
         * @property {number} RL_ATTRIBUTION=6 RL_ATTRIBUTION value
         * @property {number} AI_CREATED=7 AI_CREATED value
         */
        StatusAttribution.Type = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "RESHARE"] = 1;
            values[valuesById[2] = "EXTERNAL_SHARE"] = 2;
            values[valuesById[3] = "MUSIC"] = 3;
            values[valuesById[4] = "STATUS_MENTION"] = 4;
            values[valuesById[5] = "GROUP_STATUS"] = 5;
            values[valuesById[6] = "RL_ATTRIBUTION"] = 6;
            values[valuesById[7] = "AI_CREATED"] = 7;
            return values;
        })();

        return StatusAttribution;
    })();

    return StatusAttributions;
})();

$root.Protocol = (function() {

    /**
     * Namespace Protocol.
     * @exports Protocol
     * @namespace
     */
    var Protocol = {};

    Protocol.LimitSharing = (function() {

        /**
         * Properties of a LimitSharing.
         * @memberof Protocol
         * @interface ILimitSharing
         * @property {boolean|null} [sharingLimited] LimitSharing sharingLimited
         * @property {Protocol.LimitSharing.TriggerType|null} [trigger] LimitSharing trigger
         * @property {number|Long|null} [limitSharingSettingTimestamp] LimitSharing limitSharingSettingTimestamp
         * @property {boolean|null} [initiatedByMe] LimitSharing initiatedByMe
         */

        /**
         * Constructs a new LimitSharing.
         * @memberof Protocol
         * @classdesc Represents a LimitSharing.
         * @implements ILimitSharing
         * @constructor
         * @param {Protocol.ILimitSharing=} [properties] Properties to set
         */
        function LimitSharing(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * LimitSharing sharingLimited.
         * @member {boolean|null|undefined} sharingLimited
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.sharingLimited = null;

        /**
         * LimitSharing trigger.
         * @member {Protocol.LimitSharing.TriggerType|null|undefined} trigger
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.trigger = null;

        /**
         * LimitSharing limitSharingSettingTimestamp.
         * @member {number|Long|null|undefined} limitSharingSettingTimestamp
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.limitSharingSettingTimestamp = null;

        /**
         * LimitSharing initiatedByMe.
         * @member {boolean|null|undefined} initiatedByMe
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.initiatedByMe = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * LimitSharing _sharingLimited.
         * @member {"sharingLimited"|undefined} _sharingLimited
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_sharingLimited", {
            get: $util.oneOfGetter($oneOfFields = ["sharingLimited"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * LimitSharing _trigger.
         * @member {"trigger"|undefined} _trigger
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_trigger", {
            get: $util.oneOfGetter($oneOfFields = ["trigger"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * LimitSharing _limitSharingSettingTimestamp.
         * @member {"limitSharingSettingTimestamp"|undefined} _limitSharingSettingTimestamp
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_limitSharingSettingTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["limitSharingSettingTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * LimitSharing _initiatedByMe.
         * @member {"initiatedByMe"|undefined} _initiatedByMe
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_initiatedByMe", {
            get: $util.oneOfGetter($oneOfFields = ["initiatedByMe"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new LimitSharing instance using the specified properties.
         * @function create
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.ILimitSharing=} [properties] Properties to set
         * @returns {Protocol.LimitSharing} LimitSharing instance
         */
        LimitSharing.create = function create(properties) {
            return new LimitSharing(properties);
        };

        /**
         * Encodes the specified LimitSharing message. Does not implicitly {@link Protocol.LimitSharing.verify|verify} messages.
         * @function encode
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.ILimitSharing} message LimitSharing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LimitSharing.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sharingLimited != null && Object.hasOwnProperty.call(message, "sharingLimited"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sharingLimited);
            if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger);
            if (message.limitSharingSettingTimestamp != null && Object.hasOwnProperty.call(message, "limitSharingSettingTimestamp"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limitSharingSettingTimestamp);
            if (message.initiatedByMe != null && Object.hasOwnProperty.call(message, "initiatedByMe"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.initiatedByMe);
            return writer;
        };

        /**
         * Encodes the specified LimitSharing message, length delimited. Does not implicitly {@link Protocol.LimitSharing.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.ILimitSharing} message LimitSharing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LimitSharing.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LimitSharing message from the specified reader or buffer.
         * @function decode
         * @memberof Protocol.LimitSharing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Protocol.LimitSharing} LimitSharing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LimitSharing.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Protocol.LimitSharing();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.sharingLimited = reader.bool();
                        break;
                    }
                case 2: {
                        message.trigger = reader.int32();
                        break;
                    }
                case 3: {
                        message.limitSharingSettingTimestamp = reader.int64();
                        break;
                    }
                case 4: {
                        message.initiatedByMe = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LimitSharing message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Protocol.LimitSharing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Protocol.LimitSharing} LimitSharing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LimitSharing.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LimitSharing message.
         * @function verify
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LimitSharing.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) {
                properties._sharingLimited = 1;
                if (typeof message.sharingLimited !== "boolean")
                    return "sharingLimited: boolean expected";
            }
            if (message.trigger != null && message.hasOwnProperty("trigger")) {
                properties._trigger = 1;
                switch (message.trigger) {
                default:
                    return "trigger: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.limitSharingSettingTimestamp != null && message.hasOwnProperty("limitSharingSettingTimestamp")) {
                properties._limitSharingSettingTimestamp = 1;
                if (!$util.isInteger(message.limitSharingSettingTimestamp) && !(message.limitSharingSettingTimestamp && $util.isInteger(message.limitSharingSettingTimestamp.low) && $util.isInteger(message.limitSharingSettingTimestamp.high)))
                    return "limitSharingSettingTimestamp: integer|Long expected";
            }
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
                properties._initiatedByMe = 1;
                if (typeof message.initiatedByMe !== "boolean")
                    return "initiatedByMe: boolean expected";
            }
            return null;
        };

        /**
         * Creates a LimitSharing message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Protocol.LimitSharing} LimitSharing
         */
        LimitSharing.fromObject = function fromObject(object) {
            if (object instanceof $root.Protocol.LimitSharing)
                return object;
            var message = new $root.Protocol.LimitSharing();
            if (object.sharingLimited != null)
                message.sharingLimited = Boolean(object.sharingLimited);
            switch (object.trigger) {
            default:
                if (typeof object.trigger === "number") {
                    message.trigger = object.trigger;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.trigger = 0;
                break;
            case "CHAT_SETTING":
            case 1:
                message.trigger = 1;
                break;
            case "BIZ_SUPPORTS_FB_HOSTING":
            case 2:
                message.trigger = 2;
                break;
            case "UNKNOWN_GROUP":
            case 3:
                message.trigger = 3;
                break;
            }
            if (object.limitSharingSettingTimestamp != null)
                if ($util.Long)
                    (message.limitSharingSettingTimestamp = $util.Long.fromValue(object.limitSharingSettingTimestamp)).unsigned = false;
                else if (typeof object.limitSharingSettingTimestamp === "string")
                    message.limitSharingSettingTimestamp = parseInt(object.limitSharingSettingTimestamp, 10);
                else if (typeof object.limitSharingSettingTimestamp === "number")
                    message.limitSharingSettingTimestamp = object.limitSharingSettingTimestamp;
                else if (typeof object.limitSharingSettingTimestamp === "object")
                    message.limitSharingSettingTimestamp = new $util.LongBits(object.limitSharingSettingTimestamp.low >>> 0, object.limitSharingSettingTimestamp.high >>> 0).toNumber();
            if (object.initiatedByMe != null)
                message.initiatedByMe = Boolean(object.initiatedByMe);
            return message;
        };

        /**
         * Creates a plain object from a LimitSharing message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.LimitSharing} message LimitSharing
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        LimitSharing.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) {
                object.sharingLimited = message.sharingLimited;
                if (options.oneofs)
                    object._sharingLimited = "sharingLimited";
            }
            if (message.trigger != null && message.hasOwnProperty("trigger")) {
                object.trigger = options.enums === String ? $root.Protocol.LimitSharing.TriggerType[message.trigger] === undefined ? message.trigger : $root.Protocol.LimitSharing.TriggerType[message.trigger] : message.trigger;
                if (options.oneofs)
                    object._trigger = "trigger";
            }
            if (message.limitSharingSettingTimestamp != null && message.hasOwnProperty("limitSharingSettingTimestamp")) {
                if (typeof message.limitSharingSettingTimestamp === "number")
                    object.limitSharingSettingTimestamp = options.longs === String ? String(message.limitSharingSettingTimestamp) : message.limitSharingSettingTimestamp;
                else
                    object.limitSharingSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.limitSharingSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.limitSharingSettingTimestamp.low >>> 0, message.limitSharingSettingTimestamp.high >>> 0).toNumber() : message.limitSharingSettingTimestamp;
                if (options.oneofs)
                    object._limitSharingSettingTimestamp = "limitSharingSettingTimestamp";
            }
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
                object.initiatedByMe = message.initiatedByMe;
                if (options.oneofs)
                    object._initiatedByMe = "initiatedByMe";
            }
            return object;
        };

        /**
         * Converts this LimitSharing to JSON.
         * @function toJSON
         * @memberof Protocol.LimitSharing
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        LimitSharing.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for LimitSharing
         * @function getTypeUrl
         * @memberof Protocol.LimitSharing
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        LimitSharing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Protocol.LimitSharing";
        };

        /**
         * TriggerType enum.
         * @name Protocol.LimitSharing.TriggerType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} CHAT_SETTING=1 CHAT_SETTING value
         * @property {number} BIZ_SUPPORTS_FB_HOSTING=2 BIZ_SUPPORTS_FB_HOSTING value
         * @property {number} UNKNOWN_GROUP=3 UNKNOWN_GROUP value
         */
        LimitSharing.TriggerType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "CHAT_SETTING"] = 1;
            values[valuesById[2] = "BIZ_SUPPORTS_FB_HOSTING"] = 2;
            values[valuesById[3] = "UNKNOWN_GROUP"] = 3;
            return values;
        })();

        return LimitSharing;
    })();

    Protocol.MessageKey = (function() {

        /**
         * Properties of a MessageKey.
         * @memberof Protocol
         * @interface IMessageKey
         * @property {string|null} [remoteJid] MessageKey remoteJid
         * @property {boolean|null} [fromMe] MessageKey fromMe
         * @property {string|null} [id] MessageKey id
         * @property {string|null} [participant] MessageKey participant
         */

        /**
         * Constructs a new MessageKey.
         * @memberof Protocol
         * @classdesc Represents a MessageKey.
         * @implements IMessageKey
         * @constructor
         * @param {Protocol.IMessageKey=} [properties] Properties to set
         */
        function MessageKey(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * MessageKey remoteJid.
         * @member {string|null|undefined} remoteJid
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.remoteJid = null;

        /**
         * MessageKey fromMe.
         * @member {boolean|null|undefined} fromMe
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.fromMe = null;

        /**
         * MessageKey id.
         * @member {string|null|undefined} id
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.id = null;

        /**
         * MessageKey participant.
         * @member {string|null|undefined} participant
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.participant = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MessageKey _remoteJid.
         * @member {"remoteJid"|undefined} _remoteJid
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_remoteJid", {
            get: $util.oneOfGetter($oneOfFields = ["remoteJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageKey _fromMe.
         * @member {"fromMe"|undefined} _fromMe
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_fromMe", {
            get: $util.oneOfGetter($oneOfFields = ["fromMe"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageKey _id.
         * @member {"id"|undefined} _id
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_id", {
            get: $util.oneOfGetter($oneOfFields = ["id"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageKey _participant.
         * @member {"participant"|undefined} _participant
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_participant", {
            get: $util.oneOfGetter($oneOfFields = ["participant"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MessageKey instance using the specified properties.
         * @function create
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.IMessageKey=} [properties] Properties to set
         * @returns {Protocol.MessageKey} MessageKey instance
         */
        MessageKey.create = function create(properties) {
            return new MessageKey(properties);
        };

        /**
         * Encodes the specified MessageKey message. Does not implicitly {@link Protocol.MessageKey.verify|verify} messages.
         * @function encode
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.IMessageKey} message MessageKey message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageKey.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.remoteJid);
            if (message.fromMe != null && Object.hasOwnProperty.call(message, "fromMe"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fromMe);
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.id);
            if (message.participant != null && Object.hasOwnProperty.call(message, "participant"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant);
            return writer;
        };

        /**
         * Encodes the specified MessageKey message, length delimited. Does not implicitly {@link Protocol.MessageKey.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.IMessageKey} message MessageKey message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageKey.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MessageKey message from the specified reader or buffer.
         * @function decode
         * @memberof Protocol.MessageKey
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Protocol.MessageKey} MessageKey
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageKey.decode = function decode(reader, length, error) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Protocol.MessageKey();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.remoteJid = reader.string();
                        break;
                    }
                case 2: {
                        message.fromMe = reader.bool();
                        break;
                    }
                case 3: {
                        message.id = reader.string();
                        break;
                    }
                case 4: {
                        message.participant = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MessageKey message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Protocol.MessageKey
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Protocol.MessageKey} MessageKey
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageKey.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MessageKey message.
         * @function verify
         * @memberof Protocol.MessageKey
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MessageKey.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
                properties._remoteJid = 1;
                if (!$util.isString(message.remoteJid))
                    return "remoteJid: string expected";
            }
            if (message.fromMe != null && message.hasOwnProperty("fromMe")) {
                properties._fromMe = 1;
                if (typeof message.fromMe !== "boolean")
                    return "fromMe: boolean expected";
            }
            if (message.id != null && message.hasOwnProperty("id")) {
                properties._id = 1;
                if (!$util.isString(message.id))
                    return "id: string expected";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                properties._participant = 1;
                if (!$util.isString(message.participant))
                    return "participant: string expected";
            }
            return null;
        };

        /**
         * Creates a MessageKey message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Protocol.MessageKey
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Protocol.MessageKey} MessageKey
         */
        MessageKey.fromObject = function fromObject(object) {
            if (object instanceof $root.Protocol.MessageKey)
                return object;
            var message = new $root.Protocol.MessageKey();
            if (object.remoteJid != null)
                message.remoteJid = String(object.remoteJid);
            if (object.fromMe != null)
                message.fromMe = Boolean(object.fromMe);
            if (object.id != null)
                message.id = String(object.id);
            if (object.participant != null)
                message.participant = String(object.participant);
            return message;
        };

        /**
         * Creates a plain object from a MessageKey message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.MessageKey} message MessageKey
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MessageKey.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
                object.remoteJid = message.remoteJid;
                if (options.oneofs)
                    object._remoteJid = "remoteJid";
            }
            if (message.fromMe != null && message.hasOwnProperty("fromMe")) {
                object.fromMe = message.fromMe;
                if (options.oneofs)
                    object._fromMe = "fromMe";
            }
            if (message.id != null && message.hasOwnProperty("id")) {
                object.id = message.id;
                if (options.oneofs)
                    object._id = "id";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                object.participant = message.participant;
                if (options.oneofs)
                    object._participant = "participant";
            }
            return object;
        };

        /**
         * Converts this MessageKey to JSON.
         * @function toJSON
         * @memberof Protocol.MessageKey
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MessageKey.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MessageKey
         * @function getTypeUrl
         * @memberof Protocol.MessageKey
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MessageKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Protocol.MessageKey";
        };

        return MessageKey;
    })();

    return Protocol;
})();

module.exports = $root;
