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 { OasOperation } from '../../models/OasOperation';
/**
 * Constructor.
 * @param {string} method
 * @class
 * @extends OasOperation
 * @author eric.wittmann@gmail.com
 */
var Oas20Operation = /** @class */ (function (_super) {
    __extends(Oas20Operation, _super);
    function Oas20Operation(method) {
        var _this = _super.call(this, method) || this;
        if (_this.consumes === undefined)
            _this.consumes = null;
        if (_this.produces === undefined)
            _this.produces = null;
        if (_this.schemes === undefined)
            _this.schemes = null;
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.openapi.models.OasOperation#createParameter()
     * @return {OasParameter}
     */
    Oas20Operation.prototype.createParameter = function () {
        var param = new Oas20Parameter();
        param._ownerDocument = this.ownerDocument();
        param._parent = this;
        return param;
    };
    /**
     * @see io.apicurio.datamodels.openapi.models.OasOperation#createResponses()
     * @return {OasResponses}
     */
    Oas20Operation.prototype.createResponses = function () {
        var responses = new Oas20Responses();
        responses._ownerDocument = this.ownerDocument();
        responses._parent = this;
        return responses;
    };
    /**
     * @see io.apicurio.datamodels.openapi.models.OasOperation#createSecurityRequirement()
     * @return {OasSecurityRequirement}
     */
    Oas20Operation.prototype.createSecurityRequirement = function () {
        var requirement = new Oas20SecurityRequirement();
        requirement._ownerDocument = this.ownerDocument();
        requirement._parent = this;
        return requirement;
    };
    /**
     * @see io.apicurio.datamodels.core.models.common.Operation#createExternalDocumentation()
     * @return {ExternalDocumentation}
     */
    Oas20Operation.prototype.createExternalDocumentation = function () {
        var externalDocs = new Oas20ExternalDocumentation();
        externalDocs._ownerDocument = this.ownerDocument();
        externalDocs._parent = this;
        return externalDocs;
    };
    return Oas20Operation;
}(OasOperation));
export { Oas20Operation };
Oas20Operation["__class"] = "io.apicurio.datamodels.openapi.v2.models.Oas20Operation";
Oas20Operation["__interfaces"] = ["io.apicurio.datamodels.core.models.common.ISecurityRequirementParent", "io.apicurio.datamodels.core.models.IVisitable", "io.apicurio.datamodels.openapi.models.IOasParameterParent", "io.apicurio.datamodels.core.models.common.IExternalDocumentationParent"];
import { Oas20ExternalDocumentation } from './Oas20ExternalDocumentation';
import { Oas20SecurityRequirement } from './Oas20SecurityRequirement';
import { Oas20Responses } from './Oas20Responses';
import { Oas20Parameter } from './Oas20Parameter';
//# sourceMappingURL=Oas20Operation.js.map