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 { ExtensibleNode } from '../../core/models/ExtensibleNode';
import { Node } from '../../core/models/Node';
/**
 * Constructor.
 * @param {Node} parent
 * @param {string} name
 * @class
 * @extends ExtensibleNode
 * @author Jakub Senko <jsenko@redhat.com>
 */
var AaiMessageBase = /** @class */ (function (_super) {
    __extends(AaiMessageBase, _super);
    function AaiMessageBase(parent, name) {
        var _this = this;
        if (((parent != null && parent instanceof Node) || parent === null) && ((typeof name === 'string') || name === null)) {
            var __args = arguments;
            {
                var __args_1 = arguments;
                _this = _super.call(this) || this;
                if (_this._name === undefined)
                    _this._name = null;
                if (_this.$ref === undefined)
                    _this.$ref = null;
                if (_this.headers === undefined)
                    _this.headers = null;
                if (_this.correlationId === undefined)
                    _this.correlationId = null;
                if (_this.schemaFormat === undefined)
                    _this.schemaFormat = null;
                if (_this.contentType === undefined)
                    _this.contentType = null;
                if (_this.name === undefined)
                    _this.name = null;
                if (_this.title === undefined)
                    _this.title = null;
                if (_this.summary === undefined)
                    _this.summary = null;
                if (_this.description === undefined)
                    _this.description = null;
                if (_this.tags === undefined)
                    _this.tags = null;
                if (_this.externalDocs === undefined)
                    _this.externalDocs = null;
                if (_this.bindings === undefined)
                    _this.bindings = null;
                if (_this.examples === undefined)
                    _this.examples = null;
                if (_this._name === undefined)
                    _this._name = null;
                if (_this.$ref === undefined)
                    _this.$ref = null;
                if (_this.headers === undefined)
                    _this.headers = null;
                if (_this.correlationId === undefined)
                    _this.correlationId = null;
                if (_this.schemaFormat === undefined)
                    _this.schemaFormat = null;
                if (_this.contentType === undefined)
                    _this.contentType = null;
                if (_this.name === undefined)
                    _this.name = null;
                if (_this.title === undefined)
                    _this.title = null;
                if (_this.summary === undefined)
                    _this.summary = null;
                if (_this.description === undefined)
                    _this.description = null;
                if (_this.tags === undefined)
                    _this.tags = null;
                if (_this.externalDocs === undefined)
                    _this.externalDocs = null;
                if (_this.bindings === undefined)
                    _this.bindings = null;
                if (_this.examples === undefined)
                    _this.examples = null;
                (function () {
                    if (parent != null) {
                        _this._parent = parent;
                        _this._ownerDocument = parent.ownerDocument();
                    }
                })();
            }
            (function () {
                _this._name = name;
            })();
        }
        else if (((typeof parent === 'string') || parent === null) && name === undefined) {
            var __args = arguments;
            var name_1 = __args[0];
            _this = _super.call(this) || this;
            if (_this._name === undefined)
                _this._name = null;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.headers === undefined)
                _this.headers = null;
            if (_this.correlationId === undefined)
                _this.correlationId = null;
            if (_this.schemaFormat === undefined)
                _this.schemaFormat = null;
            if (_this.contentType === undefined)
                _this.contentType = null;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.title === undefined)
                _this.title = null;
            if (_this.summary === undefined)
                _this.summary = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.tags === undefined)
                _this.tags = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = null;
            if (_this.bindings === undefined)
                _this.bindings = null;
            if (_this.examples === undefined)
                _this.examples = null;
            if (_this._name === undefined)
                _this._name = null;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.headers === undefined)
                _this.headers = null;
            if (_this.correlationId === undefined)
                _this.correlationId = null;
            if (_this.schemaFormat === undefined)
                _this.schemaFormat = null;
            if (_this.contentType === undefined)
                _this.contentType = null;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.title === undefined)
                _this.title = null;
            if (_this.summary === undefined)
                _this.summary = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.tags === undefined)
                _this.tags = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = null;
            if (_this.bindings === undefined)
                _this.bindings = null;
            if (_this.examples === undefined)
                _this.examples = null;
            (function () {
                _this._name = name_1;
            })();
        }
        else if (((parent != null && parent instanceof Node) || parent === null) && name === undefined) {
            var __args = arguments;
            _this = _super.call(this) || this;
            if (_this._name === undefined)
                _this._name = null;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.headers === undefined)
                _this.headers = null;
            if (_this.correlationId === undefined)
                _this.correlationId = null;
            if (_this.schemaFormat === undefined)
                _this.schemaFormat = null;
            if (_this.contentType === undefined)
                _this.contentType = null;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.title === undefined)
                _this.title = null;
            if (_this.summary === undefined)
                _this.summary = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.tags === undefined)
                _this.tags = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = null;
            if (_this.bindings === undefined)
                _this.bindings = null;
            if (_this.examples === undefined)
                _this.examples = null;
            if (_this._name === undefined)
                _this._name = null;
            if (_this.$ref === undefined)
                _this.$ref = null;
            if (_this.headers === undefined)
                _this.headers = null;
            if (_this.correlationId === undefined)
                _this.correlationId = null;
            if (_this.schemaFormat === undefined)
                _this.schemaFormat = null;
            if (_this.contentType === undefined)
                _this.contentType = null;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.title === undefined)
                _this.title = null;
            if (_this.summary === undefined)
                _this.summary = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.tags === undefined)
                _this.tags = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = null;
            if (_this.bindings === undefined)
                _this.bindings = null;
            if (_this.examples === undefined)
                _this.examples = null;
            (function () {
                if (parent != null) {
                    _this._parent = parent;
                    _this._ownerDocument = parent.ownerDocument();
                }
            })();
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#getName()
     * @return {string}
     */
    AaiMessageBase.prototype.getName = function () {
        return this._name;
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#rename(java.lang.String)
     * @param {string} newName
     */
    AaiMessageBase.prototype.rename = function (newName) {
        this._name = newName;
    };
    /**
     *
     * @return {string}
     */
    AaiMessageBase.prototype.getReference = function () {
        return this.$ref;
    };
    /**
     *
     * @param {string} reference
     */
    AaiMessageBase.prototype.setReference = function (reference) {
        this.$ref = reference;
    };
    return AaiMessageBase;
}(ExtensibleNode));
export { AaiMessageBase };
AaiMessageBase["__class"] = "io.apicurio.datamodels.asyncapi.models.AaiMessageBase";
AaiMessageBase["__interfaces"] = ["io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.core.models.IReferenceNode", "io.apicurio.datamodels.core.models.common.INamed"];
//# sourceMappingURL=AaiMessageBase.js.map