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 { OasOperation } from '../../openapi/models/OasOperation';
import { NewRequestBodyCommand } from './NewRequestBodyCommand';
/**
 * @author eric.wittmann@gmail.com
 * @extends NewRequestBodyCommand
 * @class
 */
var NewRequestBodyCommand_30 = /** @class */ (function (_super) {
    __extends(NewRequestBodyCommand_30, _super);
    function NewRequestBodyCommand_30(operation) {
        var _this = this;
        if (((operation != null && operation instanceof OasOperation) || operation === null)) {
            var __args = arguments;
            _this = _super.call(this, operation) || this;
        }
        else if (operation === undefined) {
            var __args = arguments;
            _this = _super.call(this) || this;
        }
        else
            throw new Error('invalid overload');
        return _this;
    }
    /**
     * @see io.apicurio.datamodels.cmd.commands.NewRequestBodyCommand#hasRequestBody(io.apicurio.datamodels.openapi.models.OasOperation)
     * @param {OasOperation} operation
     * @return {boolean}
     */
    NewRequestBodyCommand_30.prototype.hasRequestBody = function (operation) {
        var op30 = operation;
        return !this.isNullOrUndefined(op30.requestBody);
    };
    /**
     * @see io.apicurio.datamodels.cmd.commands.NewRequestBodyCommand#doCreateRequestBody(io.apicurio.datamodels.openapi.models.OasOperation)
     * @param {OasOperation} operation
     */
    NewRequestBodyCommand_30.prototype.doCreateRequestBody = function (operation) {
        var op30 = operation;
        op30.requestBody = op30.createRequestBody();
    };
    /**
     * @see io.apicurio.datamodels.cmd.commands.NewRequestBodyCommand#doRemoveRequestBody(io.apicurio.datamodels.openapi.models.OasOperation)
     * @param {OasOperation} operation
     */
    NewRequestBodyCommand_30.prototype.doRemoveRequestBody = function (operation) {
        var op30 = operation;
        op30.requestBody = null;
    };
    return NewRequestBodyCommand_30;
}(NewRequestBodyCommand));
export { NewRequestBodyCommand_30 };
NewRequestBodyCommand_30["__class"] = "io.apicurio.datamodels.cmd.commands.NewRequestBodyCommand_30";
NewRequestBodyCommand_30["__interfaces"] = ["io.apicurio.datamodels.cmd.ICommand"];
//# sourceMappingURL=NewRequestBodyCommand_30.js.map