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