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 __());
    };
})();
import { SecurityScheme } from '../../core/models/common/SecurityScheme';
import { ChangeSecuritySchemeCommand } from './ChangeSecuritySchemeCommand';
/**
 * @author eric.wittmann@gmail.com
 * @extends ChangeSecuritySchemeCommand
 * @class
 */
var ChangeSecuritySchemeCommand_30 = /** @class */ (function (_super) {
    __extends(ChangeSecuritySchemeCommand_30, _super);
    function ChangeSecuritySchemeCommand_30(scheme) {
        var _this = this;
        if (((scheme != null && scheme instanceof SecurityScheme) || scheme === null)) {
            var __args = arguments;
            _this = _super.call(this, scheme) || this;
        }
        else if (scheme === undefined) {
            var __args = arguments;
            _this = _super.call(this) || this;
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.cmd.commands.ChangeSecuritySchemeCommand#getSchemeFromDocument(io.apicurio.datamodels.core.models.Document)
     * @param {Document} document
     * @return {SecurityScheme}
     */
    ChangeSecuritySchemeCommand_30.prototype.getSchemeFromDocument = function (document) {
        var doc30 = document;
        if (this.isNullOrUndefined(doc30.components)) {
            return null;
        }
        return doc30.components.getSecurityScheme(this._schemeName);
    };
    /**
     * @see io.apicurio.datamodels.cmd.commands.ChangeSecuritySchemeCommand#nullScheme(io.apicurio.datamodels.core.models.common.SecurityScheme)
     * @param {SecurityScheme} scheme
     */
    ChangeSecuritySchemeCommand_30.prototype.nullScheme = function (scheme) {
        _super.prototype.nullScheme.call(this, scheme);
        var scheme30 = scheme;
        scheme30.$ref = null;
        scheme30.scheme = null;
        scheme30.bearerFormat = null;
        scheme30.flows = null;
        scheme30.openIdConnectUrl = null;
    };
    return ChangeSecuritySchemeCommand_30;
}(ChangeSecuritySchemeCommand));
export { ChangeSecuritySchemeCommand_30 };
ChangeSecuritySchemeCommand_30["__class"] = "io.apicurio.datamodels.cmd.commands.ChangeSecuritySchemeCommand_30";
ChangeSecuritySchemeCommand_30["__interfaces"] = ["io.apicurio.datamodels.cmd.ICommand"];
//# sourceMappingURL=ChangeSecuritySchemeCommand_30.js.map