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 '../ExtensibleNode';
/**
 * Constructor.
 * @param {string} name
 * @class
 * @extends ExtensibleNode
 * @author eric.wittmann@gmail.com
 */
var Tag = /** @class */ (function (_super) {
    __extends(Tag, _super);
    function Tag(name) {
        var _this = this;
        if (((typeof name === 'string') || name === null)) {
            var __args = arguments;
            _this = _super.call(this) || this;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = null;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = null;
            (function () {
                _this.name = name;
            })();
        }
        else if (name === undefined) {
            var __args = arguments;
            _this = _super.call(this) || this;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = null;
            if (_this.name === undefined)
                _this.name = null;
            if (_this.description === undefined)
                _this.description = null;
            if (_this.externalDocs === undefined)
                _this.externalDocs = 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
     */
    Tag.prototype.accept = function (visitor) {
        visitor.visitTag(this);
    };
    Tag.prototype.setExternalDocumentation$io_apicurio_datamodels_core_models_common_ExternalDocumentation = function (externalDocs) {
        this.externalDocs = externalDocs;
    };
    Tag.prototype.setExternalDocumentation$java_lang_String$java_lang_String = function (description, url) {
        var ed = this.createExternalDocumentation();
        ed.description = description;
        ed.url = url;
        this.externalDocs = ed;
        return ed;
    };
    /**
     * Sets the external documentation information.
     * @param {string} description
     * @param {string} url
     * @return {ExternalDocumentation}
     */
    Tag.prototype.setExternalDocumentation = function (description, url) {
        if (((typeof description === 'string') || description === null) && ((typeof url === 'string') || url === null)) {
            return this.setExternalDocumentation$java_lang_String$java_lang_String(description, url);
        }
        else if (((description != null && description instanceof ExternalDocumentation) || description === null) && url === undefined) {
            return this.setExternalDocumentation$io_apicurio_datamodels_core_models_common_ExternalDocumentation(description);
        }
        else
            throw new Error('invalid overload');
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#getName()
     * @return {string}
     */
    Tag.prototype.getName = function () {
        return this.name;
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.INamed#rename(java.lang.String)
     * @param {string} newName
     */
    Tag.prototype.rename = function (newName) {
        this.name = newName;
    };
    return Tag;
}(ExtensibleNode));
export { Tag };
Tag["__class"] = "io.apicurio.datamodels.core.models.common.Tag";
Tag["__interfaces"] = ["io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.core.models.common.IExternalDocumentationParent", "io.apicurio.datamodels.core.models.common.INamed"];
import { ExternalDocumentation } from './ExternalDocumentation';
//# sourceMappingURL=Tag.js.map