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 { AaiDocument } from '../../models/AaiDocument';
import { Constants } from '../../../core/Constants';
import { DocumentType } from '../../../core/models/DocumentType';
/**
 * Constructor.
 * @class
 * @extends AaiDocument
 * @author eric.wittmann@gmail.com
 */
var Aai20Document = /** @class */ (function (_super) {
    __extends(Aai20Document, _super);
    function Aai20Document() {
        var _this = _super.call(this) || this;
        _this.asyncapi = Constants.ASYNC_API_20_DEFAULT_VERSION;
        return _this;
    }
    /**
     * @see Document#getDocumentType()
     * @return {DocumentType}
     */
    Aai20Document.prototype.getDocumentType = function () {
        return DocumentType.asyncapi2;
    };
    /**
     * @see Document#createInfo()
     * @return {Aai20Info}
     */
    Aai20Document.prototype.createInfo = function () {
        return new Aai20Info(this);
    };
    /**
     * @see Document#createTag()
     * @return {Aai20Tag}
     */
    Aai20Document.prototype.createTag = function () {
        return new Aai20Tag(this);
    };
    /**
     * @see Document#createExternalDocumentation()
     * @return {Aai20ExternalDocumentation}
     */
    Aai20Document.prototype.createExternalDocumentation = function () {
        return new Aai20ExternalDocumentation(this);
    };
    Aai20Document.prototype.createServer$java_lang_String = function (name) {
        return new Aai20Server(this, name);
    };
    Aai20Document.prototype.createServer$java_lang_String$java_lang_String$java_lang_String = function (name, url, description) {
        var server = new Aai20Server(this, name);
        server.url = url;
        server.description = description;
        return server;
    };
    /**
     * @see io.apicurio.datamodels.asyncapi.models.AaiDocument#createServer(java.lang.String, java.lang.String, java.lang.String)
     * @param {string} name
     * @param {string} url
     * @param {string} description
     * @return {AaiServer}
     */
    Aai20Document.prototype.createServer = function (name, url, description) {
        if (((typeof name === 'string') || name === null) && ((typeof url === 'string') || url === null) && ((typeof description === 'string') || description === null)) {
            return this.createServer$java_lang_String$java_lang_String$java_lang_String(name, url, description);
        }
        else if (((typeof name === 'string') || name === null) && url === undefined && description === undefined) {
            return this.createServer$java_lang_String(name);
        }
        else
            throw new Error('invalid overload');
    };
    /**
     *
     * @param {string} name
     * @return {Aai20ChannelItem}
     */
    Aai20Document.prototype.createChannelItem = function (name) {
        return new Aai20ChannelItem(this, name);
    };
    /**
     *
     * @return {Aai20Components}
     */
    Aai20Document.prototype.createComponents = function () {
        return new Aai20Components(this);
    };
    return Aai20Document;
}(AaiDocument));
export { Aai20Document };
Aai20Document["__class"] = "io.apicurio.datamodels.asyncapi.v2.models.Aai20Document";
Aai20Document["__interfaces"] = ["io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.core.models.common.IExternalDocumentationParent"];
import { Aai20Components } from './Aai20Components';
import { Aai20ChannelItem } from './Aai20ChannelItem';
import { Aai20Server } from './Aai20Server';
import { Aai20ExternalDocumentation } from './Aai20ExternalDocumentation';
import { Aai20Tag } from './Aai20Tag';
import { Aai20Info } from './Aai20Info';
//# sourceMappingURL=Aai20Document.js.map