/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
import * as $protobuf from "protobufjs/minimal";

// Common aliases
const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

export const info = $root.info = (() => {

    /**
     * Properties of an info.
     * @exports Iinfo
     * @interface Iinfo
     * @property {IBasicinfo|null} [basicinfo] info basicinfo
     * @property {IHostinfo|null} [hostinfo] info hostinfo
     * @property {IMeminfo|null} [meminfo] info meminfo
     * @property {Array.<IDiskinfo>|null} [diskinfo] info diskinfo
     * @property {Array.<INetinfo>|null} [netinfo] info netinfo
     */

    /**
     * Constructs a new info.
     * @exports info
     * @classdesc Represents an info.
     * @implements Iinfo
     * @constructor
     * @param {Iinfo=} [properties] Properties to set
     */
    function info(properties) {
        this.diskinfo = [];
        this.netinfo = [];
        if (properties)
            for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * info basicinfo.
     * @member {IBasicinfo|null|undefined} basicinfo
     * @memberof info
     * @instance
     */
    info.prototype.basicinfo = null;

    /**
     * info hostinfo.
     * @member {IHostinfo|null|undefined} hostinfo
     * @memberof info
     * @instance
     */
    info.prototype.hostinfo = null;

    /**
     * info meminfo.
     * @member {IMeminfo|null|undefined} meminfo
     * @memberof info
     * @instance
     */
    info.prototype.meminfo = null;

    /**
     * info diskinfo.
     * @member {Array.<IDiskinfo>} diskinfo
     * @memberof info
     * @instance
     */
    info.prototype.diskinfo = $util.emptyArray;

    /**
     * info netinfo.
     * @member {Array.<INetinfo>} netinfo
     * @memberof info
     * @instance
     */
    info.prototype.netinfo = $util.emptyArray;

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

    /**
     * Encodes the specified info message. Does not implicitly {@link info.verify|verify} messages.
     * @function encode
     * @memberof info
     * @static
     * @param {Iinfo} message info message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    info.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.basicinfo != null && Object.hasOwnProperty.call(message, "basicinfo"))
            $root.Basicinfo.encode(message.basicinfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        if (message.hostinfo != null && Object.hasOwnProperty.call(message, "hostinfo"))
            $root.Hostinfo.encode(message.hostinfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
        if (message.meminfo != null && Object.hasOwnProperty.call(message, "meminfo"))
            $root.Meminfo.encode(message.meminfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
        if (message.diskinfo != null && message.diskinfo.length)
            for (let i = 0; i < message.diskinfo.length; ++i)
                $root.Diskinfo.encode(message.diskinfo[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
        if (message.netinfo != null && message.netinfo.length)
            for (let i = 0; i < message.netinfo.length; ++i)
                $root.Netinfo.encode(message.netinfo[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
        return writer;
    };

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

    /**
     * Decodes an info message from the specified reader or buffer.
     * @function decode
     * @memberof info
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {info} info
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    info.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        let end = length === undefined ? reader.len : reader.pos + length, message = new $root.info();
        while (reader.pos < end) {
            let tag = reader.uint32();
            switch (tag >>> 3) {
            case 1: {
                    message.basicinfo = $root.Basicinfo.decode(reader, reader.uint32());
                    break;
                }
            case 2: {
                    message.hostinfo = $root.Hostinfo.decode(reader, reader.uint32());
                    break;
                }
            case 3: {
                    message.meminfo = $root.Meminfo.decode(reader, reader.uint32());
                    break;
                }
            case 4: {
                    if (!(message.diskinfo && message.diskinfo.length))
                        message.diskinfo = [];
                    message.diskinfo.push($root.Diskinfo.decode(reader, reader.uint32()));
                    break;
                }
            case 5: {
                    if (!(message.netinfo && message.netinfo.length))
                        message.netinfo = [];
                    message.netinfo.push($root.Netinfo.decode(reader, reader.uint32()));
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

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

    /**
     * Verifies an info message.
     * @function verify
     * @memberof info
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    info.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.basicinfo != null && message.hasOwnProperty("basicinfo")) {
            let error = $root.Basicinfo.verify(message.basicinfo);
            if (error)
                return "basicinfo." + error;
        }
        if (message.hostinfo != null && message.hasOwnProperty("hostinfo")) {
            let error = $root.Hostinfo.verify(message.hostinfo);
            if (error)
                return "hostinfo." + error;
        }
        if (message.meminfo != null && message.hasOwnProperty("meminfo")) {
            let error = $root.Meminfo.verify(message.meminfo);
            if (error)
                return "meminfo." + error;
        }
        if (message.diskinfo != null && message.hasOwnProperty("diskinfo")) {
            if (!Array.isArray(message.diskinfo))
                return "diskinfo: array expected";
            for (let i = 0; i < message.diskinfo.length; ++i) {
                let error = $root.Diskinfo.verify(message.diskinfo[i]);
                if (error)
                    return "diskinfo." + error;
            }
        }
        if (message.netinfo != null && message.hasOwnProperty("netinfo")) {
            if (!Array.isArray(message.netinfo))
                return "netinfo: array expected";
            for (let i = 0; i < message.netinfo.length; ++i) {
                let error = $root.Netinfo.verify(message.netinfo[i]);
                if (error)
                    return "netinfo." + error;
            }
        }
        return null;
    };

    /**
     * Creates an info message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof info
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {info} info
     */
    info.fromObject = function fromObject(object) {
        if (object instanceof $root.info)
            return object;
        let message = new $root.info();
        if (object.basicinfo != null) {
            if (typeof object.basicinfo !== "object")
                throw TypeError(".info.basicinfo: object expected");
            message.basicinfo = $root.Basicinfo.fromObject(object.basicinfo);
        }
        if (object.hostinfo != null) {
            if (typeof object.hostinfo !== "object")
                throw TypeError(".info.hostinfo: object expected");
            message.hostinfo = $root.Hostinfo.fromObject(object.hostinfo);
        }
        if (object.meminfo != null) {
            if (typeof object.meminfo !== "object")
                throw TypeError(".info.meminfo: object expected");
            message.meminfo = $root.Meminfo.fromObject(object.meminfo);
        }
        if (object.diskinfo) {
            if (!Array.isArray(object.diskinfo))
                throw TypeError(".info.diskinfo: array expected");
            message.diskinfo = [];
            for (let i = 0; i < object.diskinfo.length; ++i) {
                if (typeof object.diskinfo[i] !== "object")
                    throw TypeError(".info.diskinfo: object expected");
                message.diskinfo[i] = $root.Diskinfo.fromObject(object.diskinfo[i]);
            }
        }
        if (object.netinfo) {
            if (!Array.isArray(object.netinfo))
                throw TypeError(".info.netinfo: array expected");
            message.netinfo = [];
            for (let i = 0; i < object.netinfo.length; ++i) {
                if (typeof object.netinfo[i] !== "object")
                    throw TypeError(".info.netinfo: object expected");
                message.netinfo[i] = $root.Netinfo.fromObject(object.netinfo[i]);
            }
        }
        return message;
    };

    /**
     * Creates a plain object from an info message. Also converts values to other types if specified.
     * @function toObject
     * @memberof info
     * @static
     * @param {info} message info
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    info.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        let object = {};
        if (options.arrays || options.defaults) {
            object.diskinfo = [];
            object.netinfo = [];
        }
        if (options.defaults) {
            object.basicinfo = null;
            object.hostinfo = null;
            object.meminfo = null;
        }
        if (message.basicinfo != null && message.hasOwnProperty("basicinfo"))
            object.basicinfo = $root.Basicinfo.toObject(message.basicinfo, options);
        if (message.hostinfo != null && message.hasOwnProperty("hostinfo"))
            object.hostinfo = $root.Hostinfo.toObject(message.hostinfo, options);
        if (message.meminfo != null && message.hasOwnProperty("meminfo"))
            object.meminfo = $root.Meminfo.toObject(message.meminfo, options);
        if (message.diskinfo && message.diskinfo.length) {
            object.diskinfo = [];
            for (let j = 0; j < message.diskinfo.length; ++j)
                object.diskinfo[j] = $root.Diskinfo.toObject(message.diskinfo[j], options);
        }
        if (message.netinfo && message.netinfo.length) {
            object.netinfo = [];
            for (let j = 0; j < message.netinfo.length; ++j)
                object.netinfo[j] = $root.Netinfo.toObject(message.netinfo[j], options);
        }
        return object;
    };

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

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

    return info;
})();

export const Basicinfo = $root.Basicinfo = (() => {

    /**
     * Properties of a Basicinfo.
     * @exports IBasicinfo
     * @interface IBasicinfo
     * @property {string|null} [model] Basicinfo model
     * @property {string|null} [id] Basicinfo id
     * @property {string|null} [sn] Basicinfo sn
     * @property {string|null} [factory] Basicinfo factory
     */

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

    /**
     * Basicinfo model.
     * @member {string} model
     * @memberof Basicinfo
     * @instance
     */
    Basicinfo.prototype.model = "";

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

    /**
     * Basicinfo sn.
     * @member {string} sn
     * @memberof Basicinfo
     * @instance
     */
    Basicinfo.prototype.sn = "";

    /**
     * Basicinfo factory.
     * @member {string} factory
     * @memberof Basicinfo
     * @instance
     */
    Basicinfo.prototype.factory = "";

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

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

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

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

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

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

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

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

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

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

    return Basicinfo;
})();

export const Hostinfo = $root.Hostinfo = (() => {

    /**
     * Properties of a Hostinfo.
     * @exports IHostinfo
     * @interface IHostinfo
     * @property {number|null} [cpu] Hostinfo cpu
     * @property {string|null} [uptime] Hostinfo uptime
     * @property {string|null} [boottime] Hostinfo boottime
     */

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

    /**
     * Hostinfo cpu.
     * @member {number} cpu
     * @memberof Hostinfo
     * @instance
     */
    Hostinfo.prototype.cpu = 0;

    /**
     * Hostinfo uptime.
     * @member {string} uptime
     * @memberof Hostinfo
     * @instance
     */
    Hostinfo.prototype.uptime = "";

    /**
     * Hostinfo boottime.
     * @member {string} boottime
     * @memberof Hostinfo
     * @instance
     */
    Hostinfo.prototype.boottime = "";

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

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

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

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

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

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

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

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

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

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

    return Hostinfo;
})();

export const Meminfo = $root.Meminfo = (() => {

    /**
     * Properties of a Meminfo.
     * @exports IMeminfo
     * @interface IMeminfo
     * @property {number|null} [total] Meminfo total
     * @property {number|null} [available] Meminfo available
     * @property {number|null} [used] Meminfo used
     * @property {number|null} [usedPercent] Meminfo usedPercent
     * @property {number|null} [free] Meminfo free
     * @property {number|null} [buffers] Meminfo buffers
     * @property {number|null} [cached] Meminfo cached
     */

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

    /**
     * Meminfo total.
     * @member {number} total
     * @memberof Meminfo
     * @instance
     */
    Meminfo.prototype.total = 0;

    /**
     * Meminfo available.
     * @member {number} available
     * @memberof Meminfo
     * @instance
     */
    Meminfo.prototype.available = 0;

    /**
     * Meminfo used.
     * @member {number} used
     * @memberof Meminfo
     * @instance
     */
    Meminfo.prototype.used = 0;

    /**
     * Meminfo usedPercent.
     * @member {number} usedPercent
     * @memberof Meminfo
     * @instance
     */
    Meminfo.prototype.usedPercent = 0;

    /**
     * Meminfo free.
     * @member {number} free
     * @memberof Meminfo
     * @instance
     */
    Meminfo.prototype.free = 0;

    /**
     * Meminfo buffers.
     * @member {number} buffers
     * @memberof Meminfo
     * @instance
     */
    Meminfo.prototype.buffers = 0;

    /**
     * Meminfo cached.
     * @member {number} cached
     * @memberof Meminfo
     * @instance
     */
    Meminfo.prototype.cached = 0;

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

    /**
     * Encodes the specified Meminfo message. Does not implicitly {@link Meminfo.verify|verify} messages.
     * @function encode
     * @memberof Meminfo
     * @static
     * @param {IMeminfo} message Meminfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Meminfo.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.total != null && Object.hasOwnProperty.call(message, "total"))
            writer.uint32(/* id 1, wireType 1 =*/9).double(message.total);
        if (message.available != null && Object.hasOwnProperty.call(message, "available"))
            writer.uint32(/* id 2, wireType 1 =*/17).double(message.available);
        if (message.used != null && Object.hasOwnProperty.call(message, "used"))
            writer.uint32(/* id 3, wireType 1 =*/25).double(message.used);
        if (message.usedPercent != null && Object.hasOwnProperty.call(message, "usedPercent"))
            writer.uint32(/* id 4, wireType 1 =*/33).double(message.usedPercent);
        if (message.free != null && Object.hasOwnProperty.call(message, "free"))
            writer.uint32(/* id 5, wireType 1 =*/41).double(message.free);
        if (message.buffers != null && Object.hasOwnProperty.call(message, "buffers"))
            writer.uint32(/* id 6, wireType 1 =*/49).double(message.buffers);
        if (message.cached != null && Object.hasOwnProperty.call(message, "cached"))
            writer.uint32(/* id 7, wireType 1 =*/57).double(message.cached);
        return writer;
    };

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

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

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

    /**
     * Verifies a Meminfo message.
     * @function verify
     * @memberof Meminfo
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Meminfo.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.total != null && message.hasOwnProperty("total"))
            if (typeof message.total !== "number")
                return "total: number expected";
        if (message.available != null && message.hasOwnProperty("available"))
            if (typeof message.available !== "number")
                return "available: number expected";
        if (message.used != null && message.hasOwnProperty("used"))
            if (typeof message.used !== "number")
                return "used: number expected";
        if (message.usedPercent != null && message.hasOwnProperty("usedPercent"))
            if (typeof message.usedPercent !== "number")
                return "usedPercent: number expected";
        if (message.free != null && message.hasOwnProperty("free"))
            if (typeof message.free !== "number")
                return "free: number expected";
        if (message.buffers != null && message.hasOwnProperty("buffers"))
            if (typeof message.buffers !== "number")
                return "buffers: number expected";
        if (message.cached != null && message.hasOwnProperty("cached"))
            if (typeof message.cached !== "number")
                return "cached: number expected";
        return null;
    };

    /**
     * Creates a Meminfo message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Meminfo
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Meminfo} Meminfo
     */
    Meminfo.fromObject = function fromObject(object) {
        if (object instanceof $root.Meminfo)
            return object;
        let message = new $root.Meminfo();
        if (object.total != null)
            message.total = Number(object.total);
        if (object.available != null)
            message.available = Number(object.available);
        if (object.used != null)
            message.used = Number(object.used);
        if (object.usedPercent != null)
            message.usedPercent = Number(object.usedPercent);
        if (object.free != null)
            message.free = Number(object.free);
        if (object.buffers != null)
            message.buffers = Number(object.buffers);
        if (object.cached != null)
            message.cached = Number(object.cached);
        return message;
    };

    /**
     * Creates a plain object from a Meminfo message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Meminfo
     * @static
     * @param {Meminfo} message Meminfo
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Meminfo.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        let object = {};
        if (options.defaults) {
            object.total = 0;
            object.available = 0;
            object.used = 0;
            object.usedPercent = 0;
            object.free = 0;
            object.buffers = 0;
            object.cached = 0;
        }
        if (message.total != null && message.hasOwnProperty("total"))
            object.total = options.json && !isFinite(message.total) ? String(message.total) : message.total;
        if (message.available != null && message.hasOwnProperty("available"))
            object.available = options.json && !isFinite(message.available) ? String(message.available) : message.available;
        if (message.used != null && message.hasOwnProperty("used"))
            object.used = options.json && !isFinite(message.used) ? String(message.used) : message.used;
        if (message.usedPercent != null && message.hasOwnProperty("usedPercent"))
            object.usedPercent = options.json && !isFinite(message.usedPercent) ? String(message.usedPercent) : message.usedPercent;
        if (message.free != null && message.hasOwnProperty("free"))
            object.free = options.json && !isFinite(message.free) ? String(message.free) : message.free;
        if (message.buffers != null && message.hasOwnProperty("buffers"))
            object.buffers = options.json && !isFinite(message.buffers) ? String(message.buffers) : message.buffers;
        if (message.cached != null && message.hasOwnProperty("cached"))
            object.cached = options.json && !isFinite(message.cached) ? String(message.cached) : message.cached;
        return object;
    };

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

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

    return Meminfo;
})();

export const Diskinfo = $root.Diskinfo = (() => {

    /**
     * Properties of a Diskinfo.
     * @exports IDiskinfo
     * @interface IDiskinfo
     * @property {string|null} [name] Diskinfo name
     * @property {string|null} [path] Diskinfo path
     * @property {number|null} [total] Diskinfo total
     * @property {number|null} [free] Diskinfo free
     * @property {number|null} [used] Diskinfo used
     * @property {number|null} [usedPercent] Diskinfo usedPercent
     */

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

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

    /**
     * Diskinfo path.
     * @member {string} path
     * @memberof Diskinfo
     * @instance
     */
    Diskinfo.prototype.path = "";

    /**
     * Diskinfo total.
     * @member {number} total
     * @memberof Diskinfo
     * @instance
     */
    Diskinfo.prototype.total = 0;

    /**
     * Diskinfo free.
     * @member {number} free
     * @memberof Diskinfo
     * @instance
     */
    Diskinfo.prototype.free = 0;

    /**
     * Diskinfo used.
     * @member {number} used
     * @memberof Diskinfo
     * @instance
     */
    Diskinfo.prototype.used = 0;

    /**
     * Diskinfo usedPercent.
     * @member {number} usedPercent
     * @memberof Diskinfo
     * @instance
     */
    Diskinfo.prototype.usedPercent = 0;

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

    /**
     * Encodes the specified Diskinfo message. Does not implicitly {@link Diskinfo.verify|verify} messages.
     * @function encode
     * @memberof Diskinfo
     * @static
     * @param {IDiskinfo} message Diskinfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Diskinfo.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.name != null && Object.hasOwnProperty.call(message, "name"))
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
        if (message.path != null && Object.hasOwnProperty.call(message, "path"))
            writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
        if (message.total != null && Object.hasOwnProperty.call(message, "total"))
            writer.uint32(/* id 3, wireType 1 =*/25).double(message.total);
        if (message.free != null && Object.hasOwnProperty.call(message, "free"))
            writer.uint32(/* id 4, wireType 1 =*/33).double(message.free);
        if (message.used != null && Object.hasOwnProperty.call(message, "used"))
            writer.uint32(/* id 5, wireType 1 =*/41).double(message.used);
        if (message.usedPercent != null && Object.hasOwnProperty.call(message, "usedPercent"))
            writer.uint32(/* id 6, wireType 1 =*/49).double(message.usedPercent);
        return writer;
    };

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

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

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

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

    /**
     * Creates a Diskinfo message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Diskinfo
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Diskinfo} Diskinfo
     */
    Diskinfo.fromObject = function fromObject(object) {
        if (object instanceof $root.Diskinfo)
            return object;
        let message = new $root.Diskinfo();
        if (object.name != null)
            message.name = String(object.name);
        if (object.path != null)
            message.path = String(object.path);
        if (object.total != null)
            message.total = Number(object.total);
        if (object.free != null)
            message.free = Number(object.free);
        if (object.used != null)
            message.used = Number(object.used);
        if (object.usedPercent != null)
            message.usedPercent = Number(object.usedPercent);
        return message;
    };

    /**
     * Creates a plain object from a Diskinfo message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Diskinfo
     * @static
     * @param {Diskinfo} message Diskinfo
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Diskinfo.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        let object = {};
        if (options.defaults) {
            object.name = "";
            object.path = "";
            object.total = 0;
            object.free = 0;
            object.used = 0;
            object.usedPercent = 0;
        }
        if (message.name != null && message.hasOwnProperty("name"))
            object.name = message.name;
        if (message.path != null && message.hasOwnProperty("path"))
            object.path = message.path;
        if (message.total != null && message.hasOwnProperty("total"))
            object.total = options.json && !isFinite(message.total) ? String(message.total) : message.total;
        if (message.free != null && message.hasOwnProperty("free"))
            object.free = options.json && !isFinite(message.free) ? String(message.free) : message.free;
        if (message.used != null && message.hasOwnProperty("used"))
            object.used = options.json && !isFinite(message.used) ? String(message.used) : message.used;
        if (message.usedPercent != null && message.hasOwnProperty("usedPercent"))
            object.usedPercent = options.json && !isFinite(message.usedPercent) ? String(message.usedPercent) : message.usedPercent;
        return object;
    };

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

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

    return Diskinfo;
})();

export const Netinfo = $root.Netinfo = (() => {

    /**
     * Properties of a Netinfo.
     * @exports INetinfo
     * @interface INetinfo
     * @property {string|null} [name] Netinfo name
     * @property {number|Long|null} [bytesSent] Netinfo bytesSent
     * @property {number|Long|null} [bytesRecv] Netinfo bytesRecv
     * @property {number|Long|null} [packetsSent] Netinfo packetsSent
     * @property {number|Long|null} [packetsRecv] Netinfo packetsRecv
     */

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

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

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

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

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

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

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

    /**
     * Encodes the specified Netinfo message. Does not implicitly {@link Netinfo.verify|verify} messages.
     * @function encode
     * @memberof Netinfo
     * @static
     * @param {INetinfo} message Netinfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Netinfo.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.name != null && Object.hasOwnProperty.call(message, "name"))
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
        if (message.bytesSent != null && Object.hasOwnProperty.call(message, "bytesSent"))
            writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.bytesSent);
        if (message.bytesRecv != null && Object.hasOwnProperty.call(message, "bytesRecv"))
            writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.bytesRecv);
        if (message.packetsSent != null && Object.hasOwnProperty.call(message, "packetsSent"))
            writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.packetsSent);
        if (message.packetsRecv != null && Object.hasOwnProperty.call(message, "packetsRecv"))
            writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.packetsRecv);
        return writer;
    };

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

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

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

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

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

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

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

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

    return Netinfo;
})();

export const response = $root.response = (() => {

    /**
     * Properties of a response.
     * @exports Iresponse
     * @interface Iresponse
     * @property {number|null} [code] response code
     * @property {Uint8Array|null} [data] response data
     * @property {string|null} [message] response message
     */

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

    /**
     * response code.
     * @member {number} code
     * @memberof response
     * @instance
     */
    response.prototype.code = 0;

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

    /**
     * response message.
     * @member {string} message
     * @memberof response
     * @instance
     */
    response.prototype.message = "";

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

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

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

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

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

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

    /**
     * Creates a response message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof response
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {response} response
     */
    response.fromObject = function fromObject(object) {
        if (object instanceof $root.response)
            return object;
        let message = new $root.response();
        if (object.code != null)
            message.code = object.code >>> 0;
        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;
        if (object.message != null)
            message.message = String(object.message);
        return message;
    };

    /**
     * Creates a plain object from a response message. Also converts values to other types if specified.
     * @function toObject
     * @memberof response
     * @static
     * @param {response} message response
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    response.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        let object = {};
        if (options.defaults) {
            object.code = 0;
            if (options.bytes === String)
                object.data = "";
            else {
                object.data = [];
                if (options.bytes !== Array)
                    object.data = $util.newBuffer(object.data);
            }
            object.message = "";
        }
        if (message.code != null && message.hasOwnProperty("code"))
            object.code = message.code;
        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 (message.message != null && message.hasOwnProperty("message"))
            object.message = message.message;
        return object;
    };

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

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

    return response;
})();

export const user = $root.user = (() => {

    /**
     * Properties of a user.
     * @exports Iuser
     * @interface Iuser
     * @property {string|null} [name] user name
     * @property {string|null} [password] user password
     * @property {string|null} [newPassword] user newPassword
     */

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

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

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

    /**
     * user newPassword.
     * @member {string} newPassword
     * @memberof user
     * @instance
     */
    user.prototype.newPassword = "";

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

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

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

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

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

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

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

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

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

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

    return user;
})();

export const token = $root.token = (() => {

    /**
     * Properties of a token.
     * @exports Itoken
     * @interface Itoken
     * @property {string|null} [name] token name
     * @property {number|Long|null} [expiresTime] token expiresTime
     * @property {string|null} [value] token value
     */

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

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

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

    /**
     * token value.
     * @member {string} value
     * @memberof token
     * @instance
     */
    token.prototype.value = "";

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

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

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

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

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

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

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

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

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

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

    return token;
})();

export { $root as default };
