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 { PasswordOAuthFlow } from '../../../core/models/common/PasswordOAuthFlow';
/**
 * Constructor.
 * @param {Node} parent
 * @class
 * @extends PasswordOAuthFlow
 * @author Jakub Senko<jsenko@redhat.com>
 */
var Aai20PasswordOAuthFlow = /** @class */ (function (_super) {
    __extends(Aai20PasswordOAuthFlow, _super);
    function Aai20PasswordOAuthFlow(parent) {
        var _this = this;
        if (((parent != null && parent instanceof Node) || parent === null)) {
            var __args = arguments;
            _this = _super.call(this) || this;
            (function () {
                /* requireNonNull */ if (parent == null) {
                    throw new Error('cannot be null');
                }
                ;
                _this._parent = parent;
                _this._ownerDocument = parent.ownerDocument();
            })();
        }
        else if (parent === undefined) {
            var __args = arguments;
            _this = _super.call(this) || this;
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.core.models.Node#accept(io.apicurio.datamodels.core.visitors.IVisitor)
     * @param {*} visitor
     */
    Aai20PasswordOAuthFlow.prototype.accept = function (visitor) {
        var v = visitor;
        v.visitPasswordOAuthFlow(this);
    };
    return Aai20PasswordOAuthFlow;
}(PasswordOAuthFlow));
export { Aai20PasswordOAuthFlow };
Aai20PasswordOAuthFlow["__class"] = "io.apicurio.datamodels.asyncapi.v2.models.Aai20PasswordOAuthFlow";
Aai20PasswordOAuthFlow["__interfaces"] = ["io.apicurio.datamodels.core.models.IVisitable"];
//# sourceMappingURL=Aai20PasswordOAuthFlow.js.map