aws-sdk-lex 1.18.0 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9ecb71a5d61319e7f17df16bf076ac3efff4b33
4
- data.tar.gz: 723e8c33777c10dcd91ca4799904e0633000289f
3
+ metadata.gz: cf72fa0f94f3ec88c1d92dd062b61cff64fd84eb
4
+ data.tar.gz: 22c3e48046955478e459a640433134d2e9eefb40
5
5
  SHA512:
6
- metadata.gz: c5bd41d4b95d561332b9062ea08073fbe9830b83fdce86a37c460119050f1cee1724be41830f4011402a7bab4e822c3de922ea88bd80a04e2f2e4a9b039eb34e
7
- data.tar.gz: 3d33d7b725e656c3d8446f38d38d243000ade238ad537f0d9c337910149706195b9c91d1bf1110da6079e3f60c0d4d09dc6f3ce0418a414c1fac7b97abd172ff
6
+ metadata.gz: 0250724a876ccbc2deb4c1b07d6ed242a8ef7153f21829a8cc7957b05db0503485d2ff2ecf51945c0f575a966a5424ad81bd54d863468fe2d210229d2a7034b8
7
+ data.tar.gz: 6a4779d026fd43556257cb9e2a8b6e07cb6002b74a28fdc3a79ed317a271f0a5fbf236c7f08afee563ac3f91d08048acf1afa133048748a7ceab005494892405
@@ -42,6 +42,6 @@ require_relative 'aws-sdk-lex/customizations'
42
42
  # @service
43
43
  module Aws::Lex
44
44
 
45
- GEM_VERSION = '1.18.0'
45
+ GEM_VERSION = '1.19.0'
46
46
 
47
47
  end
@@ -254,6 +254,106 @@ module Aws::Lex
254
254
 
255
255
  # @!group API Operations
256
256
 
257
+ # Removes session information for a specified bot, alias, and user ID.
258
+ #
259
+ # @option params [required, String] :bot_name
260
+ # The name of the bot that contains the session data.
261
+ #
262
+ # @option params [required, String] :bot_alias
263
+ # The alias in use for the bot that contains the session data.
264
+ #
265
+ # @option params [required, String] :user_id
266
+ # The identifier of the user associated with the session data.
267
+ #
268
+ # @return [Types::DeleteSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
269
+ #
270
+ # * {Types::DeleteSessionResponse#bot_name #bot_name} => String
271
+ # * {Types::DeleteSessionResponse#bot_alias #bot_alias} => String
272
+ # * {Types::DeleteSessionResponse#user_id #user_id} => String
273
+ # * {Types::DeleteSessionResponse#session_id #session_id} => String
274
+ #
275
+ # @example Request syntax with placeholder values
276
+ #
277
+ # resp = client.delete_session({
278
+ # bot_name: "BotName", # required
279
+ # bot_alias: "BotAlias", # required
280
+ # user_id: "UserId", # required
281
+ # })
282
+ #
283
+ # @example Response structure
284
+ #
285
+ # resp.bot_name #=> String
286
+ # resp.bot_alias #=> String
287
+ # resp.user_id #=> String
288
+ # resp.session_id #=> String
289
+ #
290
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/DeleteSession AWS API Documentation
291
+ #
292
+ # @overload delete_session(params = {})
293
+ # @param [Hash] params ({})
294
+ def delete_session(params = {}, options = {})
295
+ req = build_request(:delete_session, params)
296
+ req.send_request(options)
297
+ end
298
+
299
+ # Returns session information for a specified bot, alias, and user ID.
300
+ #
301
+ # @option params [required, String] :bot_name
302
+ # The name of the bot that contains the session data.
303
+ #
304
+ # @option params [required, String] :bot_alias
305
+ # The alias in use for the bot that contains the session data.
306
+ #
307
+ # @option params [required, String] :user_id
308
+ # The ID of the client application user. Amazon Lex uses this to
309
+ # identify a user's conversation with your bot.
310
+ #
311
+ # @return [Types::GetSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
312
+ #
313
+ # * {Types::GetSessionResponse#recent_intent_summary_view #recent_intent_summary_view} => Array<Types::IntentSummary>
314
+ # * {Types::GetSessionResponse#session_attributes #session_attributes} => Hash<String,String>
315
+ # * {Types::GetSessionResponse#session_id #session_id} => String
316
+ # * {Types::GetSessionResponse#dialog_action #dialog_action} => Types::DialogAction
317
+ #
318
+ # @example Request syntax with placeholder values
319
+ #
320
+ # resp = client.get_session({
321
+ # bot_name: "BotName", # required
322
+ # bot_alias: "BotAlias", # required
323
+ # user_id: "UserId", # required
324
+ # })
325
+ #
326
+ # @example Response structure
327
+ #
328
+ # resp.recent_intent_summary_view #=> Array
329
+ # resp.recent_intent_summary_view[0].intent_name #=> String
330
+ # resp.recent_intent_summary_view[0].slots #=> Hash
331
+ # resp.recent_intent_summary_view[0].slots["String"] #=> String
332
+ # resp.recent_intent_summary_view[0].confirmation_status #=> String, one of "None", "Confirmed", "Denied"
333
+ # resp.recent_intent_summary_view[0].dialog_action_type #=> String, one of "ElicitIntent", "ConfirmIntent", "ElicitSlot", "Close", "Delegate"
334
+ # resp.recent_intent_summary_view[0].fulfillment_state #=> String, one of "Fulfilled", "Failed", "ReadyForFulfillment"
335
+ # resp.recent_intent_summary_view[0].slot_to_elicit #=> String
336
+ # resp.session_attributes #=> Hash
337
+ # resp.session_attributes["String"] #=> String
338
+ # resp.session_id #=> String
339
+ # resp.dialog_action.type #=> String, one of "ElicitIntent", "ConfirmIntent", "ElicitSlot", "Close", "Delegate"
340
+ # resp.dialog_action.intent_name #=> String
341
+ # resp.dialog_action.slots #=> Hash
342
+ # resp.dialog_action.slots["String"] #=> String
343
+ # resp.dialog_action.slot_to_elicit #=> String
344
+ # resp.dialog_action.fulfillment_state #=> String, one of "Fulfilled", "Failed", "ReadyForFulfillment"
345
+ # resp.dialog_action.message #=> String
346
+ # resp.dialog_action.message_format #=> String, one of "PlainText", "CustomPayload", "SSML", "Composite"
347
+ #
348
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSession AWS API Documentation
349
+ #
350
+ # @overload get_session(params = {})
351
+ # @param [Hash] params ({})
352
+ def get_session(params = {}, options = {})
353
+ req = build_request(:get_session, params)
354
+ req.send_request(options)
355
+ end
356
+
257
357
  # Sends user input (text or speech) to Amazon Lex. Clients use this API
258
358
  # to send text and audio requests to Amazon Lex at runtime. Amazon Lex
259
359
  # interprets the user input using the machine learning model that it
@@ -315,7 +415,7 @@ module Aws::Lex
315
415
  #
316
416
  #
317
417
  #
318
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html
418
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html
319
419
  #
320
420
  # @option params [required, String] :bot_name
321
421
  # Name of the Amazon Lex bot.
@@ -366,7 +466,7 @@ module Aws::Lex
366
466
  #
367
467
  #
368
468
  #
369
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
469
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
370
470
  #
371
471
  # @option params [String] :request_attributes
372
472
  # You pass this value as the `x-amz-lex-request-attributes` HTTP header.
@@ -388,7 +488,7 @@ module Aws::Lex
388
488
  #
389
489
  #
390
490
  #
391
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
491
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
392
492
  #
393
493
  # @option params [required, String] :content_type
394
494
  # You pass this value as the `Content-Type` HTTP header.
@@ -433,7 +533,10 @@ module Aws::Lex
433
533
  # example, if you specify `audio/mpeg` as the value, Amazon Lex
434
534
  # returns speech in the MPEG format.
435
535
  #
436
- # The following are the accepted values:
536
+ # * If the value is `audio/pcm`, the speech returned is `audio/pcm` in
537
+ # 16-bit, little endian format.
538
+ #
539
+ # * The following are the accepted values:
437
540
  #
438
541
  # * audio/mpeg
439
542
  #
@@ -502,7 +605,7 @@ module Aws::Lex
502
605
  req.send_request(options, &block)
503
606
  end
504
607
 
505
- # Sends user input (text-only) to Amazon Lex. Client applications can
608
+ # Sends user input (text or SSML) to Amazon Lex. Client applications can
506
609
  # use this API to send requests to Amazon Lex at runtime. Amazon Lex
507
610
  # then interprets the user input using the machine learning model it
508
611
  # built for the bot.
@@ -558,7 +661,7 @@ module Aws::Lex
558
661
  #
559
662
  #
560
663
  #
561
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html
664
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html
562
665
  #
563
666
  # @option params [required, String] :bot_name
564
667
  # The name of the Amazon Lex bot.
@@ -600,7 +703,7 @@ module Aws::Lex
600
703
  #
601
704
  #
602
705
  #
603
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
706
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
604
707
  #
605
708
  # @option params [Hash<String,String>] :request_attributes
606
709
  # Request-specific information passed between Amazon Lex and a client
@@ -613,7 +716,7 @@ module Aws::Lex
613
716
  #
614
717
  #
615
718
  #
616
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
719
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
617
720
  #
618
721
  # @option params [required, String] :input_text
619
722
  # The text that the user entered (Amazon Lex interprets this text).
@@ -675,6 +778,121 @@ module Aws::Lex
675
778
  req.send_request(options)
676
779
  end
677
780
 
781
+ # Creates a new session or modifies an existing session with an Amazon
782
+ # Lex bot. Use this operation to enable your application to set the
783
+ # state of the bot.
784
+ #
785
+ # For more information, see [Managing Sessions][1].
786
+ #
787
+ #
788
+ #
789
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/how-session-api.html
790
+ #
791
+ # @option params [required, String] :bot_name
792
+ # The name of the bot that contains the session data.
793
+ #
794
+ # @option params [required, String] :bot_alias
795
+ # The alias in use for the bot that contains the session data.
796
+ #
797
+ # @option params [required, String] :user_id
798
+ # The ID of the client application user. Amazon Lex uses this to
799
+ # identify a user's conversation with your bot.
800
+ #
801
+ # @option params [Hash<String,String>] :session_attributes
802
+ # Map of key/value pairs representing the session-specific context
803
+ # information. It contains application information passed between Amazon
804
+ # Lex and a client application.
805
+ #
806
+ # @option params [Types::DialogAction] :dialog_action
807
+ # Sets the next action that the bot should take to fulfill the
808
+ # conversation.
809
+ #
810
+ # @option params [String] :accept
811
+ # The message that Amazon Lex returns in the response can be either text
812
+ # or speech based depending on the value of this field.
813
+ #
814
+ # * If the value is `text/plain; charset=utf-8`, Amazon Lex returns text
815
+ # in the response.
816
+ #
817
+ # * If the value begins with `audio/`, Amazon Lex returns speech in the
818
+ # response. Amazon Lex uses Amazon Polly to generate the speech in the
819
+ # configuration that you specify. For example, if you specify
820
+ # `audio/mpeg` as the value, Amazon Lex returns speech in the MPEG
821
+ # format.
822
+ #
823
+ # * If the value is `audio/pcm`, the speech is returned as `audio/pcm`
824
+ # in 16-bit, little endian format.
825
+ #
826
+ # * The following are the accepted values:
827
+ #
828
+ # * `audio/mpeg`
829
+ #
830
+ # * `audio/ogg`
831
+ #
832
+ # * `audio/pcm`
833
+ #
834
+ # * `audio/*` (defaults to mpeg)
835
+ #
836
+ # * `text/plain; charset=utf-8`
837
+ #
838
+ # @return [Types::PutSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
839
+ #
840
+ # * {Types::PutSessionResponse#content_type #content_type} => String
841
+ # * {Types::PutSessionResponse#intent_name #intent_name} => String
842
+ # * {Types::PutSessionResponse#slots #slots} => String
843
+ # * {Types::PutSessionResponse#session_attributes #session_attributes} => String
844
+ # * {Types::PutSessionResponse#message #message} => String
845
+ # * {Types::PutSessionResponse#message_format #message_format} => String
846
+ # * {Types::PutSessionResponse#dialog_state #dialog_state} => String
847
+ # * {Types::PutSessionResponse#slot_to_elicit #slot_to_elicit} => String
848
+ # * {Types::PutSessionResponse#audio_stream #audio_stream} => IO
849
+ # * {Types::PutSessionResponse#session_id #session_id} => String
850
+ #
851
+ # @example Request syntax with placeholder values
852
+ #
853
+ # resp = client.put_session({
854
+ # bot_name: "BotName", # required
855
+ # bot_alias: "BotAlias", # required
856
+ # user_id: "UserId", # required
857
+ # session_attributes: {
858
+ # "String" => "String",
859
+ # },
860
+ # dialog_action: {
861
+ # type: "ElicitIntent", # required, accepts ElicitIntent, ConfirmIntent, ElicitSlot, Close, Delegate
862
+ # intent_name: "IntentName",
863
+ # slots: {
864
+ # "String" => "String",
865
+ # },
866
+ # slot_to_elicit: "String",
867
+ # fulfillment_state: "Fulfilled", # accepts Fulfilled, Failed, ReadyForFulfillment
868
+ # message: "Text",
869
+ # message_format: "PlainText", # accepts PlainText, CustomPayload, SSML, Composite
870
+ # },
871
+ # accept: "Accept",
872
+ # })
873
+ #
874
+ # @example Response structure
875
+ #
876
+ # resp.content_type #=> String
877
+ # resp.intent_name #=> String
878
+ # resp.slots #=> String
879
+ # resp.session_attributes #=> String
880
+ # resp.message #=> String
881
+ # resp.message_format #=> String, one of "PlainText", "CustomPayload", "SSML", "Composite"
882
+ # resp.dialog_state #=> String, one of "ElicitIntent", "ConfirmIntent", "ElicitSlot", "Fulfilled", "ReadyForFulfillment", "Failed"
883
+ # resp.slot_to_elicit #=> String
884
+ # resp.audio_stream #=> IO
885
+ # resp.session_id #=> String
886
+ #
887
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSession AWS API Documentation
888
+ #
889
+ # @overload put_session(params = {})
890
+ # @param [Hash] params ({})
891
+ def put_session(params = {}, options = {}, &block)
892
+ req = build_request(:put_session, params)
893
+ req.send_request(options, &block)
894
+ end
895
+
678
896
  # @!endgroup
679
897
 
680
898
  # @param params ({})
@@ -688,7 +906,7 @@ module Aws::Lex
688
906
  params: params,
689
907
  config: config)
690
908
  context[:gem_name] = 'aws-sdk-lex'
691
- context[:gem_version] = '1.18.0'
909
+ context[:gem_version] = '1.19.0'
692
910
  Seahorse::Client::Request.new(handlers, context)
693
911
  end
694
912
 
@@ -21,14 +21,24 @@ module Aws::Lex
21
21
  Button = Shapes::StructureShape.new(name: 'Button')
22
22
  ButtonTextStringWithLength = Shapes::StringShape.new(name: 'ButtonTextStringWithLength')
23
23
  ButtonValueStringWithLength = Shapes::StringShape.new(name: 'ButtonValueStringWithLength')
24
+ ConfirmationStatus = Shapes::StringShape.new(name: 'ConfirmationStatus')
24
25
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
25
26
  ContentType = Shapes::StringShape.new(name: 'ContentType')
27
+ DeleteSessionRequest = Shapes::StructureShape.new(name: 'DeleteSessionRequest')
28
+ DeleteSessionResponse = Shapes::StructureShape.new(name: 'DeleteSessionResponse')
26
29
  DependencyFailedException = Shapes::StructureShape.new(name: 'DependencyFailedException')
30
+ DialogAction = Shapes::StructureShape.new(name: 'DialogAction')
31
+ DialogActionType = Shapes::StringShape.new(name: 'DialogActionType')
27
32
  DialogState = Shapes::StringShape.new(name: 'DialogState')
28
33
  ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
34
+ FulfillmentState = Shapes::StringShape.new(name: 'FulfillmentState')
29
35
  GenericAttachment = Shapes::StructureShape.new(name: 'GenericAttachment')
36
+ GetSessionRequest = Shapes::StructureShape.new(name: 'GetSessionRequest')
37
+ GetSessionResponse = Shapes::StructureShape.new(name: 'GetSessionResponse')
30
38
  HttpContentType = Shapes::StringShape.new(name: 'HttpContentType')
31
39
  IntentName = Shapes::StringShape.new(name: 'IntentName')
40
+ IntentSummary = Shapes::StructureShape.new(name: 'IntentSummary')
41
+ IntentSummaryList = Shapes::ListShape.new(name: 'IntentSummaryList')
32
42
  InternalFailureException = Shapes::StructureShape.new(name: 'InternalFailureException')
33
43
  LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
34
44
  LoopDetectedException = Shapes::StructureShape.new(name: 'LoopDetectedException')
@@ -39,6 +49,8 @@ module Aws::Lex
39
49
  PostContentResponse = Shapes::StructureShape.new(name: 'PostContentResponse')
40
50
  PostTextRequest = Shapes::StructureShape.new(name: 'PostTextRequest')
41
51
  PostTextResponse = Shapes::StructureShape.new(name: 'PostTextResponse')
52
+ PutSessionRequest = Shapes::StructureShape.new(name: 'PutSessionRequest')
53
+ PutSessionResponse = Shapes::StructureShape.new(name: 'PutSessionResponse')
42
54
  RequestTimeoutException = Shapes::StructureShape.new(name: 'RequestTimeoutException')
43
55
  ResponseCard = Shapes::StructureShape.new(name: 'ResponseCard')
44
56
  String = Shapes::StringShape.new(name: 'String')
@@ -64,9 +76,29 @@ module Aws::Lex
64
76
  ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "message"))
65
77
  ConflictException.struct_class = Types::ConflictException
66
78
 
79
+ DeleteSessionRequest.add_member(:bot_name, Shapes::ShapeRef.new(shape: BotName, required: true, location: "uri", location_name: "botName"))
80
+ DeleteSessionRequest.add_member(:bot_alias, Shapes::ShapeRef.new(shape: BotAlias, required: true, location: "uri", location_name: "botAlias"))
81
+ DeleteSessionRequest.add_member(:user_id, Shapes::ShapeRef.new(shape: UserId, required: true, location: "uri", location_name: "userId"))
82
+ DeleteSessionRequest.struct_class = Types::DeleteSessionRequest
83
+
84
+ DeleteSessionResponse.add_member(:bot_name, Shapes::ShapeRef.new(shape: BotName, location_name: "botName"))
85
+ DeleteSessionResponse.add_member(:bot_alias, Shapes::ShapeRef.new(shape: BotAlias, location_name: "botAlias"))
86
+ DeleteSessionResponse.add_member(:user_id, Shapes::ShapeRef.new(shape: UserId, location_name: "userId"))
87
+ DeleteSessionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location_name: "sessionId"))
88
+ DeleteSessionResponse.struct_class = Types::DeleteSessionResponse
89
+
67
90
  DependencyFailedException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
68
91
  DependencyFailedException.struct_class = Types::DependencyFailedException
69
92
 
93
+ DialogAction.add_member(:type, Shapes::ShapeRef.new(shape: DialogActionType, required: true, location_name: "type"))
94
+ DialogAction.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location_name: "intentName"))
95
+ DialogAction.add_member(:slots, Shapes::ShapeRef.new(shape: StringMap, location_name: "slots"))
96
+ DialogAction.add_member(:slot_to_elicit, Shapes::ShapeRef.new(shape: String, location_name: "slotToElicit"))
97
+ DialogAction.add_member(:fulfillment_state, Shapes::ShapeRef.new(shape: FulfillmentState, location_name: "fulfillmentState"))
98
+ DialogAction.add_member(:message, Shapes::ShapeRef.new(shape: Text, location_name: "message"))
99
+ DialogAction.add_member(:message_format, Shapes::ShapeRef.new(shape: MessageFormatType, location_name: "messageFormat"))
100
+ DialogAction.struct_class = Types::DialogAction
101
+
70
102
  GenericAttachment.add_member(:title, Shapes::ShapeRef.new(shape: StringWithLength, location_name: "title"))
71
103
  GenericAttachment.add_member(:sub_title, Shapes::ShapeRef.new(shape: StringWithLength, location_name: "subTitle"))
72
104
  GenericAttachment.add_member(:attachment_link_url, Shapes::ShapeRef.new(shape: StringUrlWithLength, location_name: "attachmentLinkUrl"))
@@ -74,6 +106,27 @@ module Aws::Lex
74
106
  GenericAttachment.add_member(:buttons, Shapes::ShapeRef.new(shape: listOfButtons, location_name: "buttons"))
75
107
  GenericAttachment.struct_class = Types::GenericAttachment
76
108
 
109
+ GetSessionRequest.add_member(:bot_name, Shapes::ShapeRef.new(shape: BotName, required: true, location: "uri", location_name: "botName"))
110
+ GetSessionRequest.add_member(:bot_alias, Shapes::ShapeRef.new(shape: BotAlias, required: true, location: "uri", location_name: "botAlias"))
111
+ GetSessionRequest.add_member(:user_id, Shapes::ShapeRef.new(shape: UserId, required: true, location: "uri", location_name: "userId"))
112
+ GetSessionRequest.struct_class = Types::GetSessionRequest
113
+
114
+ GetSessionResponse.add_member(:recent_intent_summary_view, Shapes::ShapeRef.new(shape: IntentSummaryList, location_name: "recentIntentSummaryView"))
115
+ GetSessionResponse.add_member(:session_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "sessionAttributes"))
116
+ GetSessionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location_name: "sessionId"))
117
+ GetSessionResponse.add_member(:dialog_action, Shapes::ShapeRef.new(shape: DialogAction, location_name: "dialogAction"))
118
+ GetSessionResponse.struct_class = Types::GetSessionResponse
119
+
120
+ IntentSummary.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location_name: "intentName"))
121
+ IntentSummary.add_member(:slots, Shapes::ShapeRef.new(shape: StringMap, location_name: "slots"))
122
+ IntentSummary.add_member(:confirmation_status, Shapes::ShapeRef.new(shape: ConfirmationStatus, location_name: "confirmationStatus"))
123
+ IntentSummary.add_member(:dialog_action_type, Shapes::ShapeRef.new(shape: DialogActionType, required: true, location_name: "dialogActionType"))
124
+ IntentSummary.add_member(:fulfillment_state, Shapes::ShapeRef.new(shape: FulfillmentState, location_name: "fulfillmentState"))
125
+ IntentSummary.add_member(:slot_to_elicit, Shapes::ShapeRef.new(shape: String, location_name: "slotToElicit"))
126
+ IntentSummary.struct_class = Types::IntentSummary
127
+
128
+ IntentSummaryList.member = Shapes::ShapeRef.new(shape: IntentSummary)
129
+
77
130
  InternalFailureException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "message"))
78
131
  InternalFailureException.struct_class = Types::InternalFailureException
79
132
 
@@ -134,6 +187,28 @@ module Aws::Lex
134
187
  PostTextResponse.add_member(:response_card, Shapes::ShapeRef.new(shape: ResponseCard, location_name: "responseCard"))
135
188
  PostTextResponse.struct_class = Types::PostTextResponse
136
189
 
190
+ PutSessionRequest.add_member(:bot_name, Shapes::ShapeRef.new(shape: BotName, required: true, location: "uri", location_name: "botName"))
191
+ PutSessionRequest.add_member(:bot_alias, Shapes::ShapeRef.new(shape: BotAlias, required: true, location: "uri", location_name: "botAlias"))
192
+ PutSessionRequest.add_member(:user_id, Shapes::ShapeRef.new(shape: UserId, required: true, location: "uri", location_name: "userId"))
193
+ PutSessionRequest.add_member(:session_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "sessionAttributes"))
194
+ PutSessionRequest.add_member(:dialog_action, Shapes::ShapeRef.new(shape: DialogAction, location_name: "dialogAction"))
195
+ PutSessionRequest.add_member(:accept, Shapes::ShapeRef.new(shape: Accept, location: "header", location_name: "Accept"))
196
+ PutSessionRequest.struct_class = Types::PutSessionRequest
197
+
198
+ PutSessionResponse.add_member(:content_type, Shapes::ShapeRef.new(shape: HttpContentType, location: "header", location_name: "Content-Type"))
199
+ PutSessionResponse.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location: "header", location_name: "x-amz-lex-intent-name"))
200
+ PutSessionResponse.add_member(:slots, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-slots", metadata: {"jsonvalue"=>true}))
201
+ PutSessionResponse.add_member(:session_attributes, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-attributes", metadata: {"jsonvalue"=>true}))
202
+ PutSessionResponse.add_member(:message, Shapes::ShapeRef.new(shape: Text, location: "header", location_name: "x-amz-lex-message"))
203
+ PutSessionResponse.add_member(:message_format, Shapes::ShapeRef.new(shape: MessageFormatType, location: "header", location_name: "x-amz-lex-message-format"))
204
+ PutSessionResponse.add_member(:dialog_state, Shapes::ShapeRef.new(shape: DialogState, location: "header", location_name: "x-amz-lex-dialog-state"))
205
+ PutSessionResponse.add_member(:slot_to_elicit, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-slot-to-elicit"))
206
+ PutSessionResponse.add_member(:audio_stream, Shapes::ShapeRef.new(shape: BlobStream, location_name: "audioStream"))
207
+ PutSessionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-id"))
208
+ PutSessionResponse.struct_class = Types::PutSessionResponse
209
+ PutSessionResponse[:payload] = :audio_stream
210
+ PutSessionResponse[:payload_member] = PutSessionResponse.member(:audio_stream)
211
+
137
212
  RequestTimeoutException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "message"))
138
213
  RequestTimeoutException.struct_class = Types::RequestTimeoutException
139
214
 
@@ -170,6 +245,31 @@ module Aws::Lex
170
245
  "uid" => "runtime.lex-2016-11-28",
171
246
  }
172
247
 
248
+ api.add_operation(:delete_session, Seahorse::Model::Operation.new.tap do |o|
249
+ o.name = "DeleteSession"
250
+ o.http_method = "DELETE"
251
+ o.http_request_uri = "/bot/{botName}/alias/{botAlias}/user/{userId}/session"
252
+ o.input = Shapes::ShapeRef.new(shape: DeleteSessionRequest)
253
+ o.output = Shapes::ShapeRef.new(shape: DeleteSessionResponse)
254
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
255
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
256
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
257
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
258
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
259
+ end)
260
+
261
+ api.add_operation(:get_session, Seahorse::Model::Operation.new.tap do |o|
262
+ o.name = "GetSession"
263
+ o.http_method = "GET"
264
+ o.http_request_uri = "/bot/{botName}/alias/{botAlias}/user/{userId}/session"
265
+ o.input = Shapes::ShapeRef.new(shape: GetSessionRequest)
266
+ o.output = Shapes::ShapeRef.new(shape: GetSessionResponse)
267
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
268
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
269
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
270
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
271
+ end)
272
+
173
273
  api.add_operation(:post_content, Seahorse::Model::Operation.new.tap do |o|
174
274
  o.name = "PostContent"
175
275
  o.http_method = "POST"
@@ -205,6 +305,22 @@ module Aws::Lex
205
305
  o.errors << Shapes::ShapeRef.new(shape: BadGatewayException)
206
306
  o.errors << Shapes::ShapeRef.new(shape: LoopDetectedException)
207
307
  end)
308
+
309
+ api.add_operation(:put_session, Seahorse::Model::Operation.new.tap do |o|
310
+ o.name = "PutSession"
311
+ o.http_method = "POST"
312
+ o.http_request_uri = "/bot/{botName}/alias/{botAlias}/user/{userId}/session"
313
+ o.input = Shapes::ShapeRef.new(shape: PutSessionRequest)
314
+ o.output = Shapes::ShapeRef.new(shape: PutSessionResponse)
315
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
316
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
317
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
318
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
319
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
320
+ o.errors << Shapes::ShapeRef.new(shape: NotAcceptableException)
321
+ o.errors << Shapes::ShapeRef.new(shape: DependencyFailedException)
322
+ o.errors << Shapes::ShapeRef.new(shape: BadGatewayException)
323
+ end)
208
324
  end
209
325
 
210
326
  end
@@ -70,6 +70,62 @@ module Aws::Lex
70
70
  include Aws::Structure
71
71
  end
72
72
 
73
+ # @note When making an API call, you may pass DeleteSessionRequest
74
+ # data as a hash:
75
+ #
76
+ # {
77
+ # bot_name: "BotName", # required
78
+ # bot_alias: "BotAlias", # required
79
+ # user_id: "UserId", # required
80
+ # }
81
+ #
82
+ # @!attribute [rw] bot_name
83
+ # The name of the bot that contains the session data.
84
+ # @return [String]
85
+ #
86
+ # @!attribute [rw] bot_alias
87
+ # The alias in use for the bot that contains the session data.
88
+ # @return [String]
89
+ #
90
+ # @!attribute [rw] user_id
91
+ # The identifier of the user associated with the session data.
92
+ # @return [String]
93
+ #
94
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/DeleteSessionRequest AWS API Documentation
95
+ #
96
+ class DeleteSessionRequest < Struct.new(
97
+ :bot_name,
98
+ :bot_alias,
99
+ :user_id)
100
+ include Aws::Structure
101
+ end
102
+
103
+ # @!attribute [rw] bot_name
104
+ # The name of the bot associated with the session data.
105
+ # @return [String]
106
+ #
107
+ # @!attribute [rw] bot_alias
108
+ # The alias in use for the bot associated with the session data.
109
+ # @return [String]
110
+ #
111
+ # @!attribute [rw] user_id
112
+ # The ID of the client application user.
113
+ # @return [String]
114
+ #
115
+ # @!attribute [rw] session_id
116
+ # The unique identifier for the session.
117
+ # @return [String]
118
+ #
119
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/DeleteSessionResponse AWS API Documentation
120
+ #
121
+ class DeleteSessionResponse < Struct.new(
122
+ :bot_name,
123
+ :bot_alias,
124
+ :user_id,
125
+ :session_id)
126
+ include Aws::Structure
127
+ end
128
+
73
129
  # One of the dependencies, such as AWS Lambda or Amazon Polly, threw an
74
130
  # exception. For example,
75
131
  #
@@ -91,6 +147,109 @@ module Aws::Lex
91
147
  include Aws::Structure
92
148
  end
93
149
 
150
+ # Describes the next action that the bot should take in its interaction
151
+ # with the user and provides information about the context in which the
152
+ # action takes place. Use the `DialogAction` data type to set the
153
+ # interaction to a specific state, or to return the interaction to a
154
+ # previous state.
155
+ #
156
+ # @note When making an API call, you may pass DialogAction
157
+ # data as a hash:
158
+ #
159
+ # {
160
+ # type: "ElicitIntent", # required, accepts ElicitIntent, ConfirmIntent, ElicitSlot, Close, Delegate
161
+ # intent_name: "IntentName",
162
+ # slots: {
163
+ # "String" => "String",
164
+ # },
165
+ # slot_to_elicit: "String",
166
+ # fulfillment_state: "Fulfilled", # accepts Fulfilled, Failed, ReadyForFulfillment
167
+ # message: "Text",
168
+ # message_format: "PlainText", # accepts PlainText, CustomPayload, SSML, Composite
169
+ # }
170
+ #
171
+ # @!attribute [rw] type
172
+ # The next action that the bot should take in its interaction with the
173
+ # user. The possible values are:
174
+ #
175
+ # * `ConfirmIntent` - The next action is asking the user if the intent
176
+ # is complete and ready to be fulfilled. This is a yes/no question
177
+ # such as "Place the order?"
178
+ #
179
+ # * `Close` - Indicates that the there will not be a response from the
180
+ # user. For example, the statement "Your order has been placed"
181
+ # does not require a response.
182
+ #
183
+ # * `Delegate` - The next action is determined by Amazon Lex.
184
+ #
185
+ # * `ElicitIntent` - The next action is to determine the intent that
186
+ # the user wants to fulfill.
187
+ #
188
+ # * `ElicitSlot` - The next action is to elicit a slot value from the
189
+ # user.
190
+ # @return [String]
191
+ #
192
+ # @!attribute [rw] intent_name
193
+ # The name of the intent.
194
+ # @return [String]
195
+ #
196
+ # @!attribute [rw] slots
197
+ # Map of the slots that have been gathered and their values.
198
+ # @return [Hash<String,String>]
199
+ #
200
+ # @!attribute [rw] slot_to_elicit
201
+ # The name of the slot that should be elicited from the user.
202
+ # @return [String]
203
+ #
204
+ # @!attribute [rw] fulfillment_state
205
+ # The fulfillment state of the intent. The possible values are:
206
+ #
207
+ # * `Failed` - The Lambda function associated with the intent failed
208
+ # to fulfill the intent.
209
+ #
210
+ # * `Fulfilled` - The intent has fulfilled by the Lambda function
211
+ # associated with the intent.
212
+ #
213
+ # * `ReadyForFulfillment` - All of the information necessary for the
214
+ # intent is present and the intent ready to be fulfilled by the
215
+ # client application.
216
+ # @return [String]
217
+ #
218
+ # @!attribute [rw] message
219
+ # The message that should be shown to the user. If you don't specify
220
+ # a message, Amazon Lex will use the message configured for the
221
+ # intent.
222
+ # @return [String]
223
+ #
224
+ # @!attribute [rw] message_format
225
+ # * `PlainText` - The message contains plain UTF-8 text.
226
+ #
227
+ # * `CustomPayload` - The message is a custom format for the client.
228
+ #
229
+ # * `SSML` - The message contains text formatted for voice output.
230
+ #
231
+ # * `Composite` - The message contains an escaped JSON object
232
+ # containing one or more messages. For more information, see
233
+ # [Message Groups][1].
234
+ #
235
+ #
236
+ #
237
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html
238
+ # @return [String]
239
+ #
240
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/DialogAction AWS API Documentation
241
+ #
242
+ class DialogAction < Struct.new(
243
+ :type,
244
+ :intent_name,
245
+ :slots,
246
+ :slot_to_elicit,
247
+ :fulfillment_state,
248
+ :message,
249
+ :message_format)
250
+ include Aws::Structure
251
+ end
252
+
94
253
  # Represents an option rendered to the user when a prompt is shown. It
95
254
  # could be an image, a button, a link, or text.
96
255
  #
@@ -125,6 +284,148 @@ module Aws::Lex
125
284
  include Aws::Structure
126
285
  end
127
286
 
287
+ # @note When making an API call, you may pass GetSessionRequest
288
+ # data as a hash:
289
+ #
290
+ # {
291
+ # bot_name: "BotName", # required
292
+ # bot_alias: "BotAlias", # required
293
+ # user_id: "UserId", # required
294
+ # }
295
+ #
296
+ # @!attribute [rw] bot_name
297
+ # The name of the bot that contains the session data.
298
+ # @return [String]
299
+ #
300
+ # @!attribute [rw] bot_alias
301
+ # The alias in use for the bot that contains the session data.
302
+ # @return [String]
303
+ #
304
+ # @!attribute [rw] user_id
305
+ # The ID of the client application user. Amazon Lex uses this to
306
+ # identify a user's conversation with your bot.
307
+ # @return [String]
308
+ #
309
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSessionRequest AWS API Documentation
310
+ #
311
+ class GetSessionRequest < Struct.new(
312
+ :bot_name,
313
+ :bot_alias,
314
+ :user_id)
315
+ include Aws::Structure
316
+ end
317
+
318
+ # @!attribute [rw] recent_intent_summary_view
319
+ # An array of information about the intents used in the session. The
320
+ # array can contain a maximum of three summaries. If more than three
321
+ # intents are used in the session, the `recentIntentSummaryView`
322
+ # operation contains information about the last three intents used.
323
+ # @return [Array<Types::IntentSummary>]
324
+ #
325
+ # @!attribute [rw] session_attributes
326
+ # Map of key/value pairs representing the session-specific context
327
+ # information. It contains application information passed between
328
+ # Amazon Lex and a client application.
329
+ # @return [Hash<String,String>]
330
+ #
331
+ # @!attribute [rw] session_id
332
+ # A unique identifier for the session.
333
+ # @return [String]
334
+ #
335
+ # @!attribute [rw] dialog_action
336
+ # Describes the current state of the bot.
337
+ # @return [Types::DialogAction]
338
+ #
339
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSessionResponse AWS API Documentation
340
+ #
341
+ class GetSessionResponse < Struct.new(
342
+ :recent_intent_summary_view,
343
+ :session_attributes,
344
+ :session_id,
345
+ :dialog_action)
346
+ include Aws::Structure
347
+ end
348
+
349
+ # Provides information about the state of an intent. You can use this
350
+ # information to get the current state of an intent so that you can
351
+ # process the intent, or so that you can return the intent to its
352
+ # previous state.
353
+ #
354
+ # @!attribute [rw] intent_name
355
+ # The name of the intent.
356
+ # @return [String]
357
+ #
358
+ # @!attribute [rw] slots
359
+ # Map of the slots that have been gathered and their values.
360
+ # @return [Hash<String,String>]
361
+ #
362
+ # @!attribute [rw] confirmation_status
363
+ # The status of the intent after the user responds to the confirmation
364
+ # prompt. If the user confirms the intent, Amazon Lex sets this field
365
+ # to `Confirmed`. If the user denies the intent, Amazon Lex sets this
366
+ # value to `Denied`. The possible values are:
367
+ #
368
+ # * `Confirmed` - The user has responded "Yes" to the confirmation
369
+ # prompt, confirming that the intent is complete and that it is
370
+ # ready to be fulfilled.
371
+ #
372
+ # * `Denied` - The user has responded "No" to the confirmation
373
+ # prompt.
374
+ #
375
+ # * `None` - The user has never been prompted for confirmation; or,
376
+ # the user was prompted but did not confirm or deny the prompt.
377
+ # @return [String]
378
+ #
379
+ # @!attribute [rw] dialog_action_type
380
+ # The next action that the bot should take in its interaction with the
381
+ # user. The possible values are:
382
+ #
383
+ # * `ConfirmIntent` - The next action is asking the user if the intent
384
+ # is complete and ready to be fulfilled. This is a yes/no question
385
+ # such as "Place the order?"
386
+ #
387
+ # * `Close` - Indicates that the there will not be a response from the
388
+ # user. For example, the statement "Your order has been placed"
389
+ # does not require a response.
390
+ #
391
+ # * `ElicitIntent` - The next action is to determine the intent that
392
+ # the user wants to fulfill.
393
+ #
394
+ # * `ElicitSlot` - The next action is to elicit a slot value from the
395
+ # user.
396
+ # @return [String]
397
+ #
398
+ # @!attribute [rw] fulfillment_state
399
+ # The fulfillment state of the intent. The possible values are:
400
+ #
401
+ # * `Failed` - The Lambda function associated with the intent failed
402
+ # to fulfill the intent.
403
+ #
404
+ # * `Fulfilled` - The intent has fulfilled by the Lambda function
405
+ # associated with the intent.
406
+ #
407
+ # * `ReadyForFulfillment` - All of the information necessary for the
408
+ # intent is present and the intent ready to be fulfilled by the
409
+ # client application.
410
+ # @return [String]
411
+ #
412
+ # @!attribute [rw] slot_to_elicit
413
+ # The next slot to elicit from the user. If there is not slot to
414
+ # elicit, the field is blank.
415
+ # @return [String]
416
+ #
417
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/IntentSummary AWS API Documentation
418
+ #
419
+ class IntentSummary < Struct.new(
420
+ :intent_name,
421
+ :slots,
422
+ :confirmation_status,
423
+ :dialog_action_type,
424
+ :fulfillment_state,
425
+ :slot_to_elicit)
426
+ include Aws::Structure
427
+ end
428
+
128
429
  # Internal service error. Retry the call.
129
430
  #
130
431
  # @!attribute [rw] message
@@ -253,7 +554,7 @@ module Aws::Lex
253
554
  #
254
555
  #
255
556
  #
256
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
557
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
257
558
  # @return [String]
258
559
  #
259
560
  # @!attribute [rw] request_attributes
@@ -273,7 +574,7 @@ module Aws::Lex
273
574
  #
274
575
  #
275
576
  #
276
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
577
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
277
578
  # @return [String]
278
579
  #
279
580
  # @!attribute [rw] content_type
@@ -320,7 +621,10 @@ module Aws::Lex
320
621
  # For example, if you specify `audio/mpeg` as the value, Amazon Lex
321
622
  # returns speech in the MPEG format.
322
623
  #
323
- # The following are the accepted values:
624
+ # * If the value is `audio/pcm`, the speech returned is `audio/pcm` in
625
+ # 16-bit, little endian format.
626
+ #
627
+ # * The following are the accepted values:
324
628
  #
325
629
  # * audio/mpeg
326
630
  #
@@ -368,7 +672,8 @@ module Aws::Lex
368
672
  #
369
673
  # @!attribute [rw] slots
370
674
  # Map of zero or more intent slots (name/value pairs) Amazon Lex
371
- # detected from the user input during the conversation.
675
+ # detected from the user input during the conversation. The field is
676
+ # base-64 encoded.
372
677
  #
373
678
  # Amazon Lex creates a resolution list containing likely values for a
374
679
  # slot. The value that it returns is determined by the
@@ -392,8 +697,8 @@ module Aws::Lex
392
697
  # bot's configuration or from a Lambda function.
393
698
  #
394
699
  # If the intent is not configured with a Lambda function, or if the
395
- # Lambda function returned `Delegate` as the `dialogAction.type` its
396
- # response, Amazon Lex decides on the next course of action and
700
+ # Lambda function returned `Delegate` as the `dialogAction.type` in
701
+ # its response, Amazon Lex decides on the next course of action and
397
702
  # selects an appropriate message from the bot's configuration based
398
703
  # on the current interaction context. For example, if Amazon Lex
399
704
  # isn't able to understand user input, it uses a clarification prompt
@@ -572,7 +877,7 @@ module Aws::Lex
572
877
  #
573
878
  #
574
879
  #
575
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
880
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
576
881
  # @return [Hash<String,String>]
577
882
  #
578
883
  # @!attribute [rw] request_attributes
@@ -586,7 +891,7 @@ module Aws::Lex
586
891
  #
587
892
  #
588
893
  #
589
- # [1]: http://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
894
+ # [1]: https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
590
895
  # @return [Hash<String,String>]
591
896
  #
592
897
  # @!attribute [rw] input_text
@@ -742,6 +1047,193 @@ module Aws::Lex
742
1047
  include Aws::Structure
743
1048
  end
744
1049
 
1050
+ # @note When making an API call, you may pass PutSessionRequest
1051
+ # data as a hash:
1052
+ #
1053
+ # {
1054
+ # bot_name: "BotName", # required
1055
+ # bot_alias: "BotAlias", # required
1056
+ # user_id: "UserId", # required
1057
+ # session_attributes: {
1058
+ # "String" => "String",
1059
+ # },
1060
+ # dialog_action: {
1061
+ # type: "ElicitIntent", # required, accepts ElicitIntent, ConfirmIntent, ElicitSlot, Close, Delegate
1062
+ # intent_name: "IntentName",
1063
+ # slots: {
1064
+ # "String" => "String",
1065
+ # },
1066
+ # slot_to_elicit: "String",
1067
+ # fulfillment_state: "Fulfilled", # accepts Fulfilled, Failed, ReadyForFulfillment
1068
+ # message: "Text",
1069
+ # message_format: "PlainText", # accepts PlainText, CustomPayload, SSML, Composite
1070
+ # },
1071
+ # accept: "Accept",
1072
+ # }
1073
+ #
1074
+ # @!attribute [rw] bot_name
1075
+ # The name of the bot that contains the session data.
1076
+ # @return [String]
1077
+ #
1078
+ # @!attribute [rw] bot_alias
1079
+ # The alias in use for the bot that contains the session data.
1080
+ # @return [String]
1081
+ #
1082
+ # @!attribute [rw] user_id
1083
+ # The ID of the client application user. Amazon Lex uses this to
1084
+ # identify a user's conversation with your bot.
1085
+ # @return [String]
1086
+ #
1087
+ # @!attribute [rw] session_attributes
1088
+ # Map of key/value pairs representing the session-specific context
1089
+ # information. It contains application information passed between
1090
+ # Amazon Lex and a client application.
1091
+ # @return [Hash<String,String>]
1092
+ #
1093
+ # @!attribute [rw] dialog_action
1094
+ # Sets the next action that the bot should take to fulfill the
1095
+ # conversation.
1096
+ # @return [Types::DialogAction]
1097
+ #
1098
+ # @!attribute [rw] accept
1099
+ # The message that Amazon Lex returns in the response can be either
1100
+ # text or speech based depending on the value of this field.
1101
+ #
1102
+ # * If the value is `text/plain; charset=utf-8`, Amazon Lex returns
1103
+ # text in the response.
1104
+ #
1105
+ # * If the value begins with `audio/`, Amazon Lex returns speech in
1106
+ # the response. Amazon Lex uses Amazon Polly to generate the speech
1107
+ # in the configuration that you specify. For example, if you specify
1108
+ # `audio/mpeg` as the value, Amazon Lex returns speech in the MPEG
1109
+ # format.
1110
+ #
1111
+ # * If the value is `audio/pcm`, the speech is returned as `audio/pcm`
1112
+ # in 16-bit, little endian format.
1113
+ #
1114
+ # * The following are the accepted values:
1115
+ #
1116
+ # * `audio/mpeg`
1117
+ #
1118
+ # * `audio/ogg`
1119
+ #
1120
+ # * `audio/pcm`
1121
+ #
1122
+ # * `audio/*` (defaults to mpeg)
1123
+ #
1124
+ # * `text/plain; charset=utf-8`
1125
+ # @return [String]
1126
+ #
1127
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSessionRequest AWS API Documentation
1128
+ #
1129
+ class PutSessionRequest < Struct.new(
1130
+ :bot_name,
1131
+ :bot_alias,
1132
+ :user_id,
1133
+ :session_attributes,
1134
+ :dialog_action,
1135
+ :accept)
1136
+ include Aws::Structure
1137
+ end
1138
+
1139
+ # @!attribute [rw] content_type
1140
+ # Content type as specified in the `Accept` HTTP header in the
1141
+ # request.
1142
+ # @return [String]
1143
+ #
1144
+ # @!attribute [rw] intent_name
1145
+ # The name of the current intent.
1146
+ # @return [String]
1147
+ #
1148
+ # @!attribute [rw] slots
1149
+ # Map of zero or more intent slots Amazon Lex detected from the user
1150
+ # input during the conversation.
1151
+ #
1152
+ # Amazon Lex creates a resolution list containing likely values for a
1153
+ # slot. The value that it returns is determined by the
1154
+ # `valueSelectionStrategy` selected when the slot type was created or
1155
+ # updated. If `valueSelectionStrategy` is set to `ORIGINAL_VALUE`, the
1156
+ # value provided by the user is returned, if the user value is similar
1157
+ # to the slot values. If `valueSelectionStrategy` is set to
1158
+ # `TOP_RESOLUTION` Amazon Lex returns the first value in the
1159
+ # resolution list or, if there is no resolution list, null. If you
1160
+ # don't specify a `valueSelectionStrategy` the default is
1161
+ # `ORIGINAL_VALUE`.
1162
+ # @return [String]
1163
+ #
1164
+ # @!attribute [rw] session_attributes
1165
+ # Map of key/value pairs representing session-specific context
1166
+ # information.
1167
+ # @return [String]
1168
+ #
1169
+ # @!attribute [rw] message
1170
+ # The next message that should be presented to the user.
1171
+ # @return [String]
1172
+ #
1173
+ # @!attribute [rw] message_format
1174
+ # The format of the response message. One of the following values:
1175
+ #
1176
+ # * `PlainText` - The message contains plain UTF-8 text.
1177
+ #
1178
+ # * `CustomPayload` - The message is a custom format for the client.
1179
+ #
1180
+ # * `SSML` - The message contains text formatted for voice output.
1181
+ #
1182
+ # * `Composite` - The message contains an escaped JSON object
1183
+ # containing one or more messages from the groups that messages were
1184
+ # assigned to when the intent was created.
1185
+ # @return [String]
1186
+ #
1187
+ # @!attribute [rw] dialog_state
1188
+ # * `ConfirmIntent` - Amazon Lex is expecting a "yes" or "no"
1189
+ # response to confirm the intent before fulfilling an intent.
1190
+ #
1191
+ # * `ElicitIntent` - Amazon Lex wants to elicit the user's intent.
1192
+ #
1193
+ # * `ElicitSlot` - Amazon Lex is expecting the value of a slot for the
1194
+ # current intent.
1195
+ #
1196
+ # * `Failed` - Conveys that the conversation with the user has failed.
1197
+ # This can happen for various reasons, including the user does not
1198
+ # provide an appropriate response to prompts from the service, or if
1199
+ # the Lambda function fails to fulfill the intent.
1200
+ #
1201
+ # * `Fulfilled` - Conveys that the Lambda function has sucessfully
1202
+ # fulfilled the intent.
1203
+ #
1204
+ # * `ReadyForFulfillment` - Conveys that the client has to fulfill the
1205
+ # intent.
1206
+ # @return [String]
1207
+ #
1208
+ # @!attribute [rw] slot_to_elicit
1209
+ # If the `dialogState` is `ElicitSlot`, returns the name of the slot
1210
+ # for which Amazon Lex is eliciting a value.
1211
+ # @return [String]
1212
+ #
1213
+ # @!attribute [rw] audio_stream
1214
+ # The audio version of the message to convey to the user.
1215
+ # @return [IO]
1216
+ #
1217
+ # @!attribute [rw] session_id
1218
+ # A unique identifier for the session.
1219
+ # @return [String]
1220
+ #
1221
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSessionResponse AWS API Documentation
1222
+ #
1223
+ class PutSessionResponse < Struct.new(
1224
+ :content_type,
1225
+ :intent_name,
1226
+ :slots,
1227
+ :session_attributes,
1228
+ :message,
1229
+ :message_format,
1230
+ :dialog_state,
1231
+ :slot_to_elicit,
1232
+ :audio_stream,
1233
+ :session_id)
1234
+ include Aws::Structure
1235
+ end
1236
+
745
1237
  # The input speech is too long.
746
1238
  #
747
1239
  # @!attribute [rw] message
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-lex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-25 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core