@aws-sdk/client-lex-runtime-service
Version:
AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native
53 lines • 2.5 kB
JavaScript
import { __extends } from "tslib";
import { PutSessionRequest, PutSessionResponse } from "../models/models_0";
import { deserializeAws_restJson1PutSessionCommand, serializeAws_restJson1PutSessionCommand, } from "../protocols/Aws_restJson1";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { Command as $Command } from "@aws-sdk/smithy-client";
/**
* <p>Creates a new session or modifies an existing session with an Amazon Lex bot. Use this
* operation to enable your application to set the state of the bot.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/how-session-api.html">Managing Sessions</a>.</p>
*/
var PutSessionCommand = /** @class */ (function (_super) {
__extends(PutSessionCommand, _super);
// Start section: command_properties
// End section: command_properties
function PutSessionCommand(input) {
var _this =
// Start section: command_constructor
_super.call(this) || this;
_this.input = input;
return _this;
// End section: command_constructor
}
/**
* @internal
*/
PutSessionCommand.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 = "LexRuntimeServiceClient";
var commandName = "PutSessionCommand";
var handlerExecutionContext = {
logger: logger,
clientName: clientName,
commandName: commandName,
inputFilterSensitiveLog: PutSessionRequest.filterSensitiveLog,
outputFilterSensitiveLog: PutSessionResponse.filterSensitiveLog,
};
var requestHandler = configuration.requestHandler;
return stack.resolve(function (request) {
return requestHandler.handle(request.request, options || {});
}, handlerExecutionContext);
};
PutSessionCommand.prototype.serialize = function (input, context) {
return serializeAws_restJson1PutSessionCommand(input, context);
};
PutSessionCommand.prototype.deserialize = function (output, context) {
return deserializeAws_restJson1PutSessionCommand(output, context);
};
return PutSessionCommand;
}($Command));
export { PutSessionCommand };
//# sourceMappingURL=PutSessionCommand.js.map