@@ -373,6 +373,105 @@ private static ClientConfiguration adjustClientConfiguration(ClientConfiguration
373373 return config ;
374374 }
375375
376+ /**
377+ * <p>
378+ * Removes session information for a specified bot, alias, and user ID.
379+ * </p>
380+ *
381+ * @param deleteSessionRequest
382+ * @return deleteSessionResult The response from the DeleteSession service
383+ * method, as returned by Amazon Lex Runtime Service.
384+ * @throws NotFoundException
385+ * @throws BadRequestException
386+ * @throws LimitExceededException
387+ * @throws InternalFailureException
388+ * @throws ConflictException
389+ * @throws AmazonClientException If any internal errors are encountered
390+ * inside the client while attempting to make the request or
391+ * handle the response. For example if a network connection is
392+ * not available.
393+ * @throws AmazonServiceException If an error response is returned by Amazon
394+ * Lex Runtime Service indicating either a problem with the data
395+ * in the request, or a server side issue.
396+ */
397+ public DeleteSessionResult deleteSession (DeleteSessionRequest deleteSessionRequest )
398+ throws AmazonServiceException , AmazonClientException {
399+ ExecutionContext executionContext = createExecutionContext (deleteSessionRequest );
400+ AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics ();
401+ awsRequestMetrics .startEvent (Field .ClientExecuteTime );
402+ Request <DeleteSessionRequest > request = null ;
403+ Response <DeleteSessionResult > response = null ;
404+ try {
405+ awsRequestMetrics .startEvent (Field .RequestMarshallTime );
406+ try {
407+ request = new DeleteSessionRequestMarshaller ().marshall (deleteSessionRequest );
408+ // Binds the request metrics to the current request.
409+ request .setAWSRequestMetrics (awsRequestMetrics );
410+ } finally {
411+ awsRequestMetrics .endEvent (Field .RequestMarshallTime );
412+ }
413+ Unmarshaller <DeleteSessionResult , JsonUnmarshallerContext > unmarshaller = new DeleteSessionResultJsonUnmarshaller ();
414+ JsonResponseHandler <DeleteSessionResult > responseHandler = new JsonResponseHandler <DeleteSessionResult >(
415+ unmarshaller );
416+
417+ response = invoke (request , responseHandler , executionContext );
418+
419+ return response .getAwsResponse ();
420+ } finally {
421+ awsRequestMetrics .endEvent (Field .ClientExecuteTime );
422+ endClientExecution (awsRequestMetrics , request , response , LOGGING_AWS_REQUEST_METRIC );
423+ }
424+ }
425+
426+ /**
427+ * <p>
428+ * Returns session information for a specified bot, alias, and user ID.
429+ * </p>
430+ *
431+ * @param getSessionRequest
432+ * @return getSessionResult The response from the GetSession service method,
433+ * as returned by Amazon Lex Runtime Service.
434+ * @throws NotFoundException
435+ * @throws BadRequestException
436+ * @throws LimitExceededException
437+ * @throws InternalFailureException
438+ * @throws AmazonClientException If any internal errors are encountered
439+ * inside the client while attempting to make the request or
440+ * handle the response. For example if a network connection is
441+ * not available.
442+ * @throws AmazonServiceException If an error response is returned by Amazon
443+ * Lex Runtime Service indicating either a problem with the data
444+ * in the request, or a server side issue.
445+ */
446+ public GetSessionResult getSession (GetSessionRequest getSessionRequest )
447+ throws AmazonServiceException , AmazonClientException {
448+ ExecutionContext executionContext = createExecutionContext (getSessionRequest );
449+ AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics ();
450+ awsRequestMetrics .startEvent (Field .ClientExecuteTime );
451+ Request <GetSessionRequest > request = null ;
452+ Response <GetSessionResult > response = null ;
453+ try {
454+ awsRequestMetrics .startEvent (Field .RequestMarshallTime );
455+ try {
456+ request = new GetSessionRequestMarshaller ().marshall (getSessionRequest );
457+ // Binds the request metrics to the current request.
458+ request .setAWSRequestMetrics (awsRequestMetrics );
459+ } finally {
460+ awsRequestMetrics .endEvent (Field .RequestMarshallTime );
461+ }
462+ Unmarshaller <GetSessionResult , JsonUnmarshallerContext > unmarshaller = new GetSessionResultJsonUnmarshaller ();
463+ JsonResponseHandler <GetSessionResult > responseHandler = new JsonResponseHandler <GetSessionResult >(
464+ unmarshaller );
465+
466+ response = invoke (request , responseHandler , executionContext );
467+
468+ return response .getAwsResponse ();
469+ } finally {
470+ awsRequestMetrics .endEvent (Field .ClientExecuteTime );
471+ endClientExecution (awsRequestMetrics , request , response , LOGGING_AWS_REQUEST_METRIC );
472+ }
473+ }
474+
376475 /**
377476 * <p>
378477 * Sends user input (text or speech) to Amazon Lex. Clients use this API to
@@ -474,7 +573,7 @@ private static ClientConfiguration adjustClientConfiguration(ClientConfiguration
474573 * <p>
475574 * In addition, Amazon Lex also returns your application-specific
476575 * <code>sessionAttributes</code>. For more information, see <a
477- * href="http ://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html"
576+ * href="https ://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html"
478577 * >Managing Conversation Context</a>.
479578 * </p>
480579 *
@@ -531,8 +630,8 @@ public PostContentResult postContent(PostContentRequest postContentRequest)
531630
532631 /**
533632 * <p>
534- * Sends user input (text-only ) to Amazon Lex. Client applications can use
535- * this API to send requests to Amazon Lex at runtime. Amazon Lex then
633+ * Sends user input (text or SSML ) to Amazon Lex. Client applications can
634+ * use this API to send requests to Amazon Lex at runtime. Amazon Lex then
536635 * interprets the user input using the machine learning model it built for
537636 * the bot.
538637 * </p>
@@ -624,7 +723,7 @@ public PostContentResult postContent(PostContentRequest postContentRequest)
624723 * <p>
625724 * In addition, Amazon Lex also returns your application-specific
626725 * <code>sessionAttributes</code>. For more information, see <a
627- * href="http ://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html"
726+ * href="https ://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html"
628727 * >Managing Conversation Context</a>.
629728 * </p>
630729 *
@@ -676,6 +775,66 @@ public PostTextResult postText(PostTextRequest postTextRequest)
676775 }
677776 }
678777
778+ /**
779+ * <p>
780+ * Creates a new session or modifies an existing session with an Amazon Lex
781+ * bot. Use this operation to enable your application to set the state of
782+ * the bot.
783+ * </p>
784+ * <p>
785+ * For more information, see <a
786+ * href="https://docs.aws.amazon.com/lex/latest/dg/how-session-api.html"
787+ * >Managing Sessions</a>.
788+ * </p>
789+ *
790+ * @param putSessionRequest
791+ * @return putSessionResult The response from the PutSession service method,
792+ * as returned by Amazon Lex Runtime Service.
793+ * @throws NotFoundException
794+ * @throws BadRequestException
795+ * @throws LimitExceededException
796+ * @throws InternalFailureException
797+ * @throws ConflictException
798+ * @throws NotAcceptableException
799+ * @throws DependencyFailedException
800+ * @throws BadGatewayException
801+ * @throws AmazonClientException If any internal errors are encountered
802+ * inside the client while attempting to make the request or
803+ * handle the response. For example if a network connection is
804+ * not available.
805+ * @throws AmazonServiceException If an error response is returned by Amazon
806+ * Lex Runtime Service indicating either a problem with the data
807+ * in the request, or a server side issue.
808+ */
809+ public PutSessionResult putSession (PutSessionRequest putSessionRequest )
810+ throws AmazonServiceException , AmazonClientException {
811+ ExecutionContext executionContext = createExecutionContext (putSessionRequest );
812+ AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics ();
813+ awsRequestMetrics .startEvent (Field .ClientExecuteTime );
814+ Request <PutSessionRequest > request = null ;
815+ Response <PutSessionResult > response = null ;
816+ try {
817+ awsRequestMetrics .startEvent (Field .RequestMarshallTime );
818+ try {
819+ request = new PutSessionRequestMarshaller ().marshall (putSessionRequest );
820+ // Binds the request metrics to the current request.
821+ request .setAWSRequestMetrics (awsRequestMetrics );
822+ } finally {
823+ awsRequestMetrics .endEvent (Field .RequestMarshallTime );
824+ }
825+ Unmarshaller <PutSessionResult , JsonUnmarshallerContext > unmarshaller = new PutSessionResultJsonUnmarshaller ();
826+ JsonResponseHandler <PutSessionResult > responseHandler = new JsonResponseHandler <PutSessionResult >(
827+ unmarshaller );
828+
829+ response = invoke (request , responseHandler , executionContext );
830+
831+ return response .getAwsResponse ();
832+ } finally {
833+ awsRequestMetrics .endEvent (Field .ClientExecuteTime );
834+ endClientExecution (awsRequestMetrics , request , response , LOGGING_AWS_REQUEST_METRIC );
835+ }
836+ }
837+
679838 /**
680839 * Returns additional metadata for a previously executed successful,
681840 * request, typically used for debugging issues where a service isn't acting
0 commit comments