import { AbstractCommand } from '../AbstractCommand'; import { Document } from '../../core/models/Document'; import { NodePath } from '../../core/models/NodePath'; import { OasOperation } from '../../openapi/models/OasOperation'; /** * A command used to create a new request body (parameter of an operation). * @author eric.wittmann@gmail.com * @extends AbstractCommand * @class */ export declare abstract class NewRequestBodyCommand extends AbstractCommand { _operationPath: NodePath; _created: boolean; constructor(operation?: any); /** * @see io.apicurio.datamodels.cmd.ICommand#execute(io.apicurio.datamodels.core.models.Document) * @param {Document} document */ execute(document: Document): void; /** * @see io.apicurio.datamodels.cmd.ICommand#undo(io.apicurio.datamodels.core.models.Document) * @param {Document} document */ undo(document: Document): void; /** * Returns true if the given operation already has a body parameter. * @param {OasOperation} operation * @return {boolean} */ abstract hasRequestBody(operation: OasOperation): boolean; /** * Creates an empty request body for the given operation. * @param {OasOperation} operation */ abstract doCreateRequestBody(operation: OasOperation): any; /** * Removes the request body. * @param {OasOperation} operation */ abstract doRemoveRequestBody(operation: OasOperation): any; }