text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.DeleteDocumentClassifierCommand = void 0;
  const models_0_1 = require("../models/models_0");
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
  const middleware_serde_1 = require("@aws-sdk/middleware-serde");
  const smithy_client_1 = require("@aws-sdk/smithy-client");
  /**
   * <p>Deletes a previously created document classifier</p>
   *          <p>Only those classifiers that are in terminated states (IN_ERROR, TRAINED) will be deleted.
   *       If an active inference job is using the model, a <code>ResourceInUseException</code> will be
   *       returned.</p>
   *          <p>This is an asynchronous action that puts the classifier into a DELETING state, and it is
   *       then removed by a background job. Once removed, the classifier disappears from your account
   *       and is no longer available for use. </p>
   */
  class DeleteDocumentClassifierCommand extends smithy_client_1.Command {
      // Start section: command_properties
      // End section: command_properties
      constructor(input) {
          // Start section: command_constructor
          super();
          this.input = input;
          // End section: command_constructor
      }
      /**
       * @internal
       */
      resolveMiddleware(clientStack, configuration, options) {
          this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
          const stack = clientStack.concat(this.middlewareStack);
          const { logger } = configuration;
          const clientName = "ComprehendClient";
          const commandName = "DeleteDocumentClassifierCommand";
          const handlerExecutionContext = {
              logger,
              clientName,
              commandName,
              inputFilterSensitiveLog: models_0_1.DeleteDocumentClassifierRequest.filterSensitiveLog,
              outputFilterSensitiveLog: models_0_1.DeleteDocumentClassifierResponse.filterSensitiveLog,
          };
          const { requestHandler } = configuration;
          return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
      }
      serialize(input, context) {
          return Aws_json1_1_1.serializeAws_json1_1DeleteDocumentClassifierCommand(input, context);
      }
      deserialize(output, context) {
          return Aws_json1_1_1.deserializeAws_json1_1DeleteDocumentClassifierCommand(output, context);
      }
  }
  exports.DeleteDocumentClassifierCommand = DeleteDocumentClassifierCommand;
  //# sourceMappingURL=DeleteDocumentClassifierCommand.js.map