/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Message = (function () {
    function Message(type) {
        this.seq = 0;
        this.type = type;
    }
    return Message;
}());
exports.Message = Message;
var Response = (function (_super) {
    __extends(Response, _super);
    function Response(request, message) {
        _super.call(this, 'response');
        this.request_seq = request.seq;
        this.command = request.command;
        if (message) {
            this.success = false;
            this.message = message;
        }
        else {
            this.success = true;
        }
    }
    return Response;
}(Message));
exports.Response = Response;
var Event = (function (_super) {
    __extends(Event, _super);
    function Event(event, body) {
        _super.call(this, 'event');
        this.event = event;
        if (body) {
            this.body = body;
        }
    }
    return Event;
}(Message));
exports.Event = Event;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbWVzc2FnZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztnR0FHZ0c7Ozs7Ozs7QUFLaEc7SUFJQyxpQkFBbUIsSUFBWTtRQUM5QixJQUFJLENBQUMsR0FBRyxHQUFHLENBQUMsQ0FBQztRQUNiLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO0lBQ2xCLENBQUM7SUFDRixjQUFDO0FBQUQsQ0FBQyxBQVJELElBUUM7QUFSWSxlQUFPLFVBUW5CLENBQUE7QUFFRDtJQUE4Qiw0QkFBTztJQUtwQyxrQkFBbUIsT0FBOEIsRUFBRSxPQUFnQjtRQUNsRSxrQkFBTSxVQUFVLENBQUMsQ0FBQztRQUNsQixJQUFJLENBQUMsV0FBVyxHQUFHLE9BQ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