var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/* Generated from Java with JSweet 2.3.7 - http://www.jsweet.org */
import { Library } from '../../Library';
import { Constants } from '../../core/Constants';
import { Info } from '../../core/models/common/Info';
import { DeleteNodeCommand } from './DeleteNodeCommand';
/**
 * A command used to delete the license.
 *
 * @author eric.wittmann@gmail.com
 * @extends DeleteNodeCommand
 * @class
 */
var DeleteLicenseCommand = /** @class */ (function (_super) {
    __extends(DeleteLicenseCommand, _super);
    function DeleteLicenseCommand(info) {
        var _this = this;
        if (((info != null && info instanceof Info) || info === null)) {
            var __args = arguments;
            _this = _super.call(this, Constants.PROP_LICENSE, info) || this;
        }
        else if (info === undefined) {
            var __args = arguments;
            _this = _super.call(this) || this;
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.cmd.commands.DeleteNodeCommand#readNode(io.apicurio.datamodels.core.models.Document, java.lang.Object)
     * @param {Document} doc
     * @param {*} node
     * @return {License}
     */
    DeleteLicenseCommand.prototype.readNode = function (doc, node) {
        var license = doc.info.createLicense();
        Library.readNode(node, license);
        return license;
    };
    return DeleteLicenseCommand;
}(DeleteNodeCommand));
export { DeleteLicenseCommand };
DeleteLicenseCommand["__class"] = "io.apicurio.datamodels.cmd.commands.DeleteLicenseCommand";
DeleteLicenseCommand["__interfaces"] = ["io.apicurio.datamodels.cmd.ICommand"];
//# sourceMappingURL=DeleteLicenseCommand.js.map