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 { AaiChannelBindings } from './AaiChannelBindings';
/**
 * Constructor.
 * @param {Node} parent
 * @param {string} name
 * @class
 * @extends AaiChannelBindings
 * @author eric.wittmann@gmail.com
 */
var AaiChannelBindingsDefinition = /** @class */ (function (_super) {
    __extends(AaiChannelBindingsDefinition, _super);
    function AaiChannelBindingsDefinition(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, parent) || this;
            if (_this._name === undefined)
                _this._name = null;
            if (_this._name === undefined)
                _this._name = null;
            (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._name === undefined)
                _this._name = null;
            (function () {
                _this._name = name_1;
            })();
        }
        else if (((parent != null && parent instanceof Node) || parent === null) && name === undefined) {
            var __args = arguments;
            _this = _super.call(this, parent) || this;
            if (_this._name === undefined)
                _this._name = null;
            if (_this._name === undefined)
                _this._name = null;
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.openapi.models.OasHeader#accept(io.apicurio.datamodels.core.visitors.IVisitor)
     * @param {*} visitor
     */
    AaiChannelBindingsDefinition.prototype.accept = function (visitor) {
        var viz = visitor;
        viz.visitChannelBindingsDefinition(this);
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#getName()
     * @return {string}
     */
    AaiChannelBindingsDefinition.prototype.getName = function () {
        return this._name;
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#rename(java.lang.String)
     * @param {string} newName
     */
    AaiChannelBindingsDefinition.prototype.rename = function (newName) {
        this._name = newName;
    };
    return AaiChannelBindingsDefinition;
}(AaiChannelBindings));
export { AaiChannelBindingsDefinition };
AaiChannelBindingsDefinition["__class"] = "io.apicurio.datamodels.asyncapi.models.AaiChannelBindingsDefinition";
AaiChannelBindingsDefinition["__interfaces"] = ["io.apicurio.datamodels.core.models.common.IDefinition", "io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.core.models.common.INamed"];
//# sourceMappingURL=AaiChannelBindingsDefinition.js.map