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 { AaiServerBindings } from './AaiServerBindings';
/**
 * Constructor.
 * @param {Node} parent
 * @param {string} name
 * @class
 * @extends AaiServerBindings
 * @author eric.wittmann@gmail.com
 */
var AaiServerBindingsDefinition = /** @class */ (function (_super) {
    __extends(AaiServerBindingsDefinition, _super);
    function AaiServerBindingsDefinition(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
     */
    AaiServerBindingsDefinition.prototype.accept = function (visitor) {
        var viz = visitor;
        viz.visitServerBindingsDefinition(this);
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#getName()
     * @return {string}
     */
    AaiServerBindingsDefinition.prototype.getName = function () {
        return this._name;
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#rename(java.lang.String)
     * @param {string} newName
     */
    AaiServerBindingsDefinition.prototype.rename = function (newName) {
        this._name = newName;
    };
    return AaiServerBindingsDefinition;
}(AaiServerBindings));
export { AaiServerBindingsDefinition };
AaiServerBindingsDefinition["__class"] = "io.apicurio.datamodels.asyncapi.models.AaiServerBindingsDefinition";
AaiServerBindingsDefinition["__interfaces"] = ["io.apicurio.datamodels.core.models.common.IDefinition", "io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.core.models.common.INamed"];
//# sourceMappingURL=AaiServerBindingsDefinition.js.map