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 { DocumentType } from '../../../core/models/DocumentType';
import { OasDocument } from '../../models/OasDocument';
/**
 * Models the root document of the OpenAPI 2.0 (aka Swagger) data model.
 * @author eric.wittmann@gmail.com
 * @class
 * @extends OasDocument
 */
var Oas20Document = /** @class */ (function (_super) {
    __extends(Oas20Document, _super);
    function Oas20Document() {
        var _this = _super.call(this) || this;
        _this.swagger = "2.0";
        if (_this.host === undefined)
            _this.host = null;
        if (_this.basePath === undefined)
            _this.basePath = null;
        if (_this.schemes === undefined)
            _this.schemes = null;
        if (_this.consumes === undefined)
            _this.consumes = null;
        if (_this.produces === undefined)
            _this.produces = null;
        if (_this.definitions === undefined)
            _this.definitions = null;
        if (_this.parameters === undefined)
            _this.parameters = null;
        if (_this.responses === undefined)
            _this.responses = null;
        if (_this.securityDefinitions === undefined)
            _this.securityDefinitions = null;
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.core.models.Document#getDocumentType()
     * @return {DocumentType}
     */
    Oas20Document.prototype.getDocumentType = function () {
        return DocumentType.openapi2;
    };
    /**
     * @see io.apicurio.datamodels.openapi.models.OasDocument#createPaths()
     * @return {OasPaths}
     */
    Oas20Document.prototype.createPaths = function () {
        var rval = new Oas20Paths();
        rval._ownerDocument = this;
        rval._parent = this;
        return rval;
    };
    /**
     * Creates an OAS 2.0 Definitions object.
     * @return {Oas20Definitions}
     */
    Oas20Document.prototype.createDefinitions = function () {
        var rval = new Oas20Definitions();
        rval._ownerDocument = this;
        rval._parent = this;
        return rval;
    };
    /**
     * @see io.apicurio.datamodels.openapi.models.OasDocument#createSecurityRequirement()
     * @return {OasSecurityRequirement}
     */
    Oas20Document.prototype.createSecurityRequirement = function () {
        var requirement = new Oas20SecurityRequirement();
        requirement._ownerDocument = this.ownerDocument();
        requirement._parent = this;
        return requirement;
    };
    /**
     * @see io.apicurio.datamodels.core.models.Document#createInfo()
     * @return {Info}
     */
    Oas20Document.prototype.createInfo = function () {
        var info = new Oas20Info();
        info._ownerDocument = this.ownerDocument();
        info._parent = this;
        return info;
    };
    /**
     * @see io.apicurio.datamodels.core.models.Document#createTag()
     * @return {Tag}
     */
    Oas20Document.prototype.createTag = function () {
        var tag = new Oas20Tag();
        tag._ownerDocument = this.ownerDocument();
        tag._parent = this;
        return tag;
    };
    /**
     * @see io.apicurio.datamodels.core.models.Document#createExternalDocumentation()
     * @return {ExternalDocumentation}
     */
    Oas20Document.prototype.createExternalDocumentation = function () {
        var ed = new Oas20ExternalDocumentation();
        ed._ownerDocument = this.ownerDocument();
        ed._parent = this;
        return ed;
    };
    /**
     * Creates a security definitions.
     * @return {Oas20SecurityDefinitions}
     */
    Oas20Document.prototype.createSecurityDefinitions = function () {
        var sd = new Oas20SecurityDefinitions();
        sd._ownerDocument = this.ownerDocument();
        sd._parent = this;
        return sd;
    };
    /**
     * Creates the parameter definitions model.
     * @return {Oas20ParameterDefinitions}
     */
    Oas20Document.prototype.createParameterDefinitions = function () {
        var rval = new Oas20ParameterDefinitions();
        rval._ownerDocument = this;
        rval._parent = this;
        return rval;
    };
    /**
     * Creates the parameter definitions model.
     * @return {Oas20ResponseDefinitions}
     */
    Oas20Document.prototype.createResponseDefinitions = function () {
        var rval = new Oas20ResponseDefinitions();
        rval._ownerDocument = this;
        rval._parent = this;
        return rval;
    };
    return Oas20Document;
}(OasDocument));
export { Oas20Document };
Oas20Document["__class"] = "io.apicurio.datamodels.openapi.v2.models.Oas20Document";
Oas20Document["__interfaces"] = ["io.apicurio.datamodels.core.models.common.ISecurityRequirementParent", "io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.core.models.common.IExternalDocumentationParent"];
import { Oas20ExternalDocumentation } from './Oas20ExternalDocumentation';
import { Oas20Tag } from './Oas20Tag';
import { Oas20Info } from './Oas20Info';
import { Oas20SecurityRequirement } from './Oas20SecurityRequirement';
import { Oas20Paths } from './Oas20Paths';
import { Oas20SecurityDefinitions } from './Oas20SecurityDefinitions';
import { Oas20ResponseDefinitions } from './Oas20ResponseDefinitions';
import { Oas20ParameterDefinitions } from './Oas20ParameterDefinitions';
import { Oas20Definitions } from './Oas20Definitions';
//# sourceMappingURL=Oas20Document.js.map