import { AbstractCommand } from '../AbstractCommand'; import { Document } from '../../core/models/Document'; import { NodePath } from '../../core/models/NodePath'; import { IServerParent } from '../../core/models/common/IServerParent'; import { Server } from '../../core/models/common/Server'; /** * A command used to create a new server in a document. * @author eric.wittmann@gmail.com * @extends AbstractCommand * @class */ export declare class NewServerCommand extends AbstractCommand { _parentPath: NodePath; _server: any; _serverExisted: boolean; constructor(parent?: any, server?: 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 a server with the same url already exists in the parent. * @param {*} parent * @param {Server} server * @return {boolean} * @private */ serverAlreadyExists(parent: IServerParent, server: Server): boolean; }