import { __extends } from "tslib";
import { DisableImageDeprecationRequest, DisableImageDeprecationResult } from "../models/models_4";
import { deserializeAws_ec2DisableImageDeprecationCommand, serializeAws_ec2DisableImageDeprecationCommand, } from "../protocols/Aws_ec2";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { Command as $Command } from "@aws-sdk/smithy-client";
/**
 * <p>Cancels the deprecation of the specified AMI.</p>
 *          <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html">Deprecate an AMI</a> in the
 *         <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
 * @example
 * Use a bare-bones client and the command you need to make an API call.
 * ```javascript
 * import { EC2Client, DisableImageDeprecationCommand } from "@aws-sdk/client-ec2"; // ES Modules import
 * // const { EC2Client, DisableImageDeprecationCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
 * const client = new EC2Client(config);
 * const command = new DisableImageDeprecationCommand(input);
 * const response = await client.send(command);
 * ```
 *
 * @see {@link DisableImageDeprecationCommandInput} for command's `input` shape.
 * @see {@link DisableImageDeprecationCommandOutput} for command's `response` shape.
 * @see {@link EC2ClientResolvedConfig | config} for command's `input` shape.
 *
 */
var DisableImageDeprecationCommand = /** @class */ (function (_super) {
    __extends(DisableImageDeprecationCommand, _super);
    // Start section: command_properties
    // End section: command_properties
    function DisableImageDeprecationCommand(input) {
        var _this = 
        // Start section: command_constructor
        _super.call(this) || this;
        _this.input = input;
        return _this;
        // End section: command_constructor
    }
    /**
     * @internal
     */
    DisableImageDeprecationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
        this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
        var stack = clientStack.concat(this.middlewareStack);
        var logger = configuration.logger;
        var clientName = "EC2Client";
        var commandName = "DisableImageDeprecationCommand";
        var handlerExecutionContext = {
            logger: logger,
            clientName: clientName,
            commandName: commandName,
            inputFilterSensitiveLog: DisableImageDeprecationRequest.filterSensitiveLog,
            outputFilterSensitiveLog: DisableImageDeprecationResult.filterSensitiveLog,
        };
        var requestHandler = configuration.requestHandler;
        return stack.resolve(function (request) {
            return requestHandler.handle(request.request, options || {});
        }, handlerExecutionContext);
    };
    DisableImageDeprecationCommand.prototype.serialize = function (input, context) {
        return serializeAws_ec2DisableImageDeprecationCommand(input, context);
    };
    DisableImageDeprecationCommand.prototype.deserialize = function (output, context) {
        return deserializeAws_ec2DisableImageDeprecationCommand(output, context);
    };
    return DisableImageDeprecationCommand;
}($Command));
export { DisableImageDeprecationCommand };
//# sourceMappingURL=DisableImageDeprecationCommand.js.map