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 { Node } from '../../core/models/Node';
import { SecurityScheme } from '../../core/models/common/SecurityScheme';
/**
 * @author Jakub Senko <jsenko@redhat.com>
 * @param {Node} parent
 * @param {string} name
 * @class
 * @extends SecurityScheme
 */
var AaiSecurityScheme = /** @class */ (function (_super) {
    __extends(AaiSecurityScheme, _super);
    function AaiSecurityScheme(parent, name) {
        var _this = this;
        if (((parent != null && parent instanceof Node) || parent === null) && ((typeof name === 'string') || name === null)) {
            var __args = arguments;
            _this = _super.call(this, name) || this;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.scheme === undefined)
                _this.scheme = null;
            if (_this.flows === undefined)
                _this.flows = null;
            if (_this.openIdConnectUrl === undefined)
                _this.openIdConnectUrl = null;
            if (_this.bearerFormat === undefined)
                _this.bearerFormat = null;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.scheme === undefined)
                _this.scheme = null;
            if (_this.flows === undefined)
                _this.flows = null;
            if (_this.openIdConnectUrl === undefined)
                _this.openIdConnectUrl = null;
            if (_this.bearerFormat === undefined)
                _this.bearerFormat = null;
            (function () {
                if (parent != null) {
                    _this._parent = parent;
                    _this._ownerDocument = parent.ownerDocument();
                }
            })();
        }
        else if (((typeof parent === 'string') || parent === null) && name === undefined) {
            var __args = arguments;
            var name_1 = __args[0];
            _this = _super.call(this, name_1) || this;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.scheme === undefined)
                _this.scheme = null;
            if (_this.flows === undefined)
                _this.flows = null;
            if (_this.openIdConnectUrl === undefined)
                _this.openIdConnectUrl = null;
            if (_this.bearerFormat === undefined)
                _this.bearerFormat = null;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.scheme === undefined)
                _this.scheme = null;
            if (_this.flows === undefined)
                _this.flows = null;
            if (_this.openIdConnectUrl === undefined)
                _this.openIdConnectUrl = null;
            if (_this.bearerFormat === undefined)
                _this.bearerFormat = null;
        }
        else if (((parent != null && parent instanceof Node) || parent === null) && name === undefined) {
            var __args = arguments;
            {
                var __args_1 = arguments;
                var name_2 = null;
                _this = _super.call(this, name_2) || this;
                if (_this.$ref === undefined)
                    _this.$ref = null;
                if (_this.scheme === undefined)
                    _this.scheme = null;
                if (_this.flows === undefined)
                    _this.flows = null;
                if (_this.openIdConnectUrl === undefined)
                    _this.openIdConnectUrl = null;
                if (_this.bearerFormat === undefined)
                    _this.bearerFormat = null;
                if (_this.$ref === undefined)
                    _this.$ref = null;
                if (_this.scheme === undefined)
                    _this.scheme = null;
                if (_this.flows === undefined)
                    _this.flows = null;
                if (_this.openIdConnectUrl === undefined)
                    _this.openIdConnectUrl = null;
                if (_this.bearerFormat === undefined)
                    _this.bearerFormat = null;
                (function () {
                    if (parent != null) {
                        _this._parent = parent;
                        _this._ownerDocument = parent.ownerDocument();
                    }
                })();
            }
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    /**
     *
     * @return {string}
     */
    AaiSecurityScheme.prototype.getReference = function () {
        return this.$ref;
    };
    /**
     *
     * @param {string} reference
     */
    AaiSecurityScheme.prototype.setReference = function (reference) {
        this.$ref = reference;
    };
    return AaiSecurityScheme;
}(SecurityScheme));
export { AaiSecurityScheme };
AaiSecurityScheme["__class"] = "io.apicurio.datamodels.asyncapi.models.AaiSecurityScheme";
AaiSecurityScheme["__interfaces"] = ["io.apicurio.datamodels.core.models.common.IDefinition", "io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.core.models.IReferenceNode", "io.apicurio.datamodels.core.models.common.INamed"];
//# sourceMappingURL=AaiSecurityScheme.js.map