aws-sdk-lex 1.29.0 → 1.34.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
  SHA256:
3
- metadata.gz: b28bee0d35bf5a091371725fcf8ac4a402d920ab861d98fbb8b110312d8b7136
4
- data.tar.gz: ba1f14edd7b7ac969ead4508d77aa3f6dead33082a2a7174802f76471de5a71a
3
+ metadata.gz: 516f29b0aa65abd3c3fb768f6bef4942e932fc773c3ad1de3751b67d098fe550
4
+ data.tar.gz: c8f64474e0d304404c7101df919d490e61883fa677bd746e701769a45c1cf858
5
5
  SHA512:
6
- metadata.gz: 741ed15340125ddd7b41147b0c01b9308b1a224cdc70d676d746090c01f35cb9ea0193ca47e3e89c62a89c983e736b5633a108ae4619bc414bc03d7c38bcc778
7
- data.tar.gz: 82ac6af9f383dff0d5f250740d9d3d1b426c3860396897d629b14a2821c5c44e6989e6dc66ab942c5ac92e4180b4091e362e80065ddc9c99e3291758432b4f04
6
+ metadata.gz: 3b3be82e78e809b21e9741b4d570dbe3b046bfeae79243d595e7b77ceb743c01bd18851a1a301ce77e93a7d47b3b5a51ef14289490d39b17c991a6922d865988
7
+ data.tar.gz: 43280758f4fa759b3947f0ea3ac29dc5db9765dc89729740be4a33732b5cec5d6b5bdd99bd2760eedab21b28542e178ea2dd976d52f658b4cf35fc212c10b8fc
data/lib/aws-sdk-lex.rb CHANGED
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  require 'aws-sdk-core'
11
12
  require 'aws-sigv4'
12
13
 
@@ -44,9 +45,9 @@ require_relative 'aws-sdk-lex/customizations'
44
45
  #
45
46
  # See {Errors} for more information.
46
47
  #
47
- # @service
48
+ # @!group service
48
49
  module Aws::Lex
49
50
 
50
- GEM_VERSION = '1.29.0'
51
+ GEM_VERSION = '1.34.0'
51
52
 
52
53
  end
@@ -85,13 +85,28 @@ module Aws::Lex
85
85
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
86
86
  # credentials.
87
87
  #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
88
102
  # * `Aws::InstanceProfileCredentials` - Used for loading credentials
89
103
  # from an EC2 IMDS on an EC2 instance.
90
104
  #
91
- # * `Aws::SharedCredentials` - Used for loading credentials from a
92
- # shared file, such as `~/.aws/config`.
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
93
107
  #
94
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
95
110
  #
96
111
  # When `:credentials` are not configured directly, the following
97
112
  # locations will be searched for credentials:
@@ -101,10 +116,10 @@ module Aws::Lex
101
116
  # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
102
117
  # * `~/.aws/credentials`
103
118
  # * `~/.aws/config`
104
- # * EC2 IMDS instance profile - When used by default, the timeouts are
105
- # very aggressive. Construct and pass an instance of
106
- # `Aws::InstanceProfileCredentails` to enable retries and extended
107
- # timeouts.
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts.
108
123
  #
109
124
  # @option options [required, String] :region
110
125
  # The AWS region to connect to. The configured `:region` is
@@ -379,6 +394,7 @@ module Aws::Lex
379
394
  # * {Types::GetSessionResponse#session_attributes #session_attributes} => Hash<String,String>
380
395
  # * {Types::GetSessionResponse#session_id #session_id} => String
381
396
  # * {Types::GetSessionResponse#dialog_action #dialog_action} => Types::DialogAction
397
+ # * {Types::GetSessionResponse#active_contexts #active_contexts} => Array<Types::ActiveContext>
382
398
  #
383
399
  # @example Request syntax with placeholder values
384
400
  #
@@ -411,6 +427,12 @@ module Aws::Lex
411
427
  # resp.dialog_action.fulfillment_state #=> String, one of "Fulfilled", "Failed", "ReadyForFulfillment"
412
428
  # resp.dialog_action.message #=> String
413
429
  # resp.dialog_action.message_format #=> String, one of "PlainText", "CustomPayload", "SSML", "Composite"
430
+ # resp.active_contexts #=> Array
431
+ # resp.active_contexts[0].name #=> String
432
+ # resp.active_contexts[0].time_to_live.time_to_live_in_seconds #=> Integer
433
+ # resp.active_contexts[0].time_to_live.turns_to_live #=> Integer
434
+ # resp.active_contexts[0].parameters #=> Hash
435
+ # resp.active_contexts[0].parameters["ParameterName"] #=> String
414
436
  #
415
437
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSession AWS API Documentation
416
438
  #
@@ -624,6 +646,19 @@ module Aws::Lex
624
646
  # you get better performance if you stream audio data rather than
625
647
  # buffering the data locally.
626
648
  #
649
+ # @option params [String] :active_contexts
650
+ # A list of contexts active for the request. A context can be activated
651
+ # when a previous intent is fulfilled, or by including the context in
652
+ # the request,
653
+ #
654
+ # If you don't specify a list of contexts, Amazon Lex will use the
655
+ # current list of contexts for the session. If you specify an empty
656
+ # list, all contexts for the session are cleared.
657
+ #
658
+ # **SDK automatically handles json encoding and base64 encoding for you
659
+ # when the required value (Hash, Array, etc.) is provided according to
660
+ # the description.**
661
+ #
627
662
  # @return [Types::PostContentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
628
663
  #
629
664
  # * {Types::PostContentResponse#content_type #content_type} => String
@@ -641,6 +676,7 @@ module Aws::Lex
641
676
  # * {Types::PostContentResponse#audio_stream #audio_stream} => IO
642
677
  # * {Types::PostContentResponse#bot_version #bot_version} => String
643
678
  # * {Types::PostContentResponse#session_id #session_id} => String
679
+ # * {Types::PostContentResponse#active_contexts #active_contexts} => String
644
680
  #
645
681
  # @example Request syntax with placeholder values
646
682
  #
@@ -653,6 +689,7 @@ module Aws::Lex
653
689
  # content_type: "HttpContentType", # required
654
690
  # accept: "Accept",
655
691
  # input_stream: "data", # required
692
+ # active_contexts: "ActiveContextsString",
656
693
  # })
657
694
  #
658
695
  # @example Response structure
@@ -672,6 +709,7 @@ module Aws::Lex
672
709
  # resp.audio_stream #=> IO
673
710
  # resp.bot_version #=> String
674
711
  # resp.session_id #=> String
712
+ # resp.active_contexts #=> String
675
713
  #
676
714
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContent AWS API Documentation
677
715
  #
@@ -797,6 +835,15 @@ module Aws::Lex
797
835
  # @option params [required, String] :input_text
798
836
  # The text that the user entered (Amazon Lex interprets this text).
799
837
  #
838
+ # @option params [Array<Types::ActiveContext>] :active_contexts
839
+ # A list of contexts active for the request. A context can be activated
840
+ # when a previous intent is fulfilled, or by including the context in
841
+ # the request,
842
+ #
843
+ # If you don't specify a list of contexts, Amazon Lex will use the
844
+ # current list of contexts for the session. If you specify an empty
845
+ # list, all contexts for the session are cleared.
846
+ #
800
847
  # @return [Types::PostTextResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
801
848
  #
802
849
  # * {Types::PostTextResponse#intent_name #intent_name} => String
@@ -812,6 +859,7 @@ module Aws::Lex
812
859
  # * {Types::PostTextResponse#response_card #response_card} => Types::ResponseCard
813
860
  # * {Types::PostTextResponse#session_id #session_id} => String
814
861
  # * {Types::PostTextResponse#bot_version #bot_version} => String
862
+ # * {Types::PostTextResponse#active_contexts #active_contexts} => Array&lt;Types::ActiveContext&gt;
815
863
  #
816
864
  # @example Request syntax with placeholder values
817
865
  #
@@ -826,6 +874,18 @@ module Aws::Lex
826
874
  # "String" => "String",
827
875
  # },
828
876
  # input_text: "Text", # required
877
+ # active_contexts: [
878
+ # {
879
+ # name: "ActiveContextName", # required
880
+ # time_to_live: { # required
881
+ # time_to_live_in_seconds: 1,
882
+ # turns_to_live: 1,
883
+ # },
884
+ # parameters: { # required
885
+ # "ParameterName" => "Text",
886
+ # },
887
+ # },
888
+ # ],
829
889
  # })
830
890
  #
831
891
  # @example Response structure
@@ -859,6 +919,12 @@ module Aws::Lex
859
919
  # resp.response_card.generic_attachments[0].buttons[0].value #=> String
860
920
  # resp.session_id #=> String
861
921
  # resp.bot_version #=> String
922
+ # resp.active_contexts #=> Array
923
+ # resp.active_contexts[0].name #=> String
924
+ # resp.active_contexts[0].time_to_live.time_to_live_in_seconds #=> Integer
925
+ # resp.active_contexts[0].time_to_live.turns_to_live #=> Integer
926
+ # resp.active_contexts[0].parameters #=> Hash
927
+ # resp.active_contexts[0].parameters["ParameterName"] #=> String
862
928
  #
863
929
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostText AWS API Documentation
864
930
  #
@@ -949,6 +1015,15 @@ module Aws::Lex
949
1015
  #
950
1016
  # * `text/plain; charset=utf-8`
951
1017
  #
1018
+ # @option params [Array<Types::ActiveContext>] :active_contexts
1019
+ # A list of contexts active for the request. A context can be activated
1020
+ # when a previous intent is fulfilled, or by including the context in
1021
+ # the request,
1022
+ #
1023
+ # If you don't specify a list of contexts, Amazon Lex will use the
1024
+ # current list of contexts for the session. If you specify an empty
1025
+ # list, all contexts for the session are cleared.
1026
+ #
952
1027
  # @return [Types::PutSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
953
1028
  #
954
1029
  # * {Types::PutSessionResponse#content_type #content_type} => String
@@ -961,6 +1036,7 @@ module Aws::Lex
961
1036
  # * {Types::PutSessionResponse#slot_to_elicit #slot_to_elicit} => String
962
1037
  # * {Types::PutSessionResponse#audio_stream #audio_stream} => IO
963
1038
  # * {Types::PutSessionResponse#session_id #session_id} => String
1039
+ # * {Types::PutSessionResponse#active_contexts #active_contexts} => String
964
1040
  #
965
1041
  # @example Request syntax with placeholder values
966
1042
  #
@@ -996,6 +1072,18 @@ module Aws::Lex
996
1072
  # },
997
1073
  # ],
998
1074
  # accept: "Accept",
1075
+ # active_contexts: [
1076
+ # {
1077
+ # name: "ActiveContextName", # required
1078
+ # time_to_live: { # required
1079
+ # time_to_live_in_seconds: 1,
1080
+ # turns_to_live: 1,
1081
+ # },
1082
+ # parameters: { # required
1083
+ # "ParameterName" => "Text",
1084
+ # },
1085
+ # },
1086
+ # ],
999
1087
  # })
1000
1088
  #
1001
1089
  # @example Response structure
@@ -1010,6 +1098,7 @@ module Aws::Lex
1010
1098
  # resp.slot_to_elicit #=> String
1011
1099
  # resp.audio_stream #=> IO
1012
1100
  # resp.session_id #=> String
1101
+ # resp.active_contexts #=> String
1013
1102
  #
1014
1103
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSession AWS API Documentation
1015
1104
  #
@@ -1033,7 +1122,7 @@ module Aws::Lex
1033
1122
  params: params,
1034
1123
  config: config)
1035
1124
  context[:gem_name] = 'aws-sdk-lex'
1036
- context[:gem_version] = '1.29.0'
1125
+ context[:gem_version] = '1.34.0'
1037
1126
  Seahorse::Client::Request.new(handlers, context)
1038
1127
  end
1039
1128
 
@@ -14,6 +14,14 @@ module Aws::Lex
14
14
  include Seahorse::Model
15
15
 
16
16
  Accept = Shapes::StringShape.new(name: 'Accept')
17
+ ActiveContext = Shapes::StructureShape.new(name: 'ActiveContext')
18
+ ActiveContextName = Shapes::StringShape.new(name: 'ActiveContextName')
19
+ ActiveContextParametersMap = Shapes::MapShape.new(name: 'ActiveContextParametersMap')
20
+ ActiveContextTimeToLive = Shapes::StructureShape.new(name: 'ActiveContextTimeToLive')
21
+ ActiveContextTimeToLiveInSeconds = Shapes::IntegerShape.new(name: 'ActiveContextTimeToLiveInSeconds')
22
+ ActiveContextTurnsToLive = Shapes::IntegerShape.new(name: 'ActiveContextTurnsToLive')
23
+ ActiveContextsList = Shapes::ListShape.new(name: 'ActiveContextsList')
24
+ ActiveContextsString = Shapes::StringShape.new(name: 'ActiveContextsString')
17
25
  AttributesString = Shapes::StringShape.new(name: 'AttributesString')
18
26
  BadGatewayException = Shapes::StructureShape.new(name: 'BadGatewayException')
19
27
  BadRequestException = Shapes::StructureShape.new(name: 'BadRequestException')
@@ -52,6 +60,7 @@ module Aws::Lex
52
60
  MessageFormatType = Shapes::StringShape.new(name: 'MessageFormatType')
53
61
  NotAcceptableException = Shapes::StructureShape.new(name: 'NotAcceptableException')
54
62
  NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException')
63
+ ParameterName = Shapes::StringShape.new(name: 'ParameterName')
55
64
  PostContentRequest = Shapes::StructureShape.new(name: 'PostContentRequest')
56
65
  PostContentResponse = Shapes::StructureShape.new(name: 'PostContentResponse')
57
66
  PostTextRequest = Shapes::StructureShape.new(name: 'PostTextRequest')
@@ -74,6 +83,20 @@ module Aws::Lex
74
83
  genericAttachmentList = Shapes::ListShape.new(name: 'genericAttachmentList')
75
84
  listOfButtons = Shapes::ListShape.new(name: 'listOfButtons')
76
85
 
86
+ ActiveContext.add_member(:name, Shapes::ShapeRef.new(shape: ActiveContextName, required: true, location_name: "name"))
87
+ ActiveContext.add_member(:time_to_live, Shapes::ShapeRef.new(shape: ActiveContextTimeToLive, required: true, location_name: "timeToLive"))
88
+ ActiveContext.add_member(:parameters, Shapes::ShapeRef.new(shape: ActiveContextParametersMap, required: true, location_name: "parameters"))
89
+ ActiveContext.struct_class = Types::ActiveContext
90
+
91
+ ActiveContextParametersMap.key = Shapes::ShapeRef.new(shape: ParameterName)
92
+ ActiveContextParametersMap.value = Shapes::ShapeRef.new(shape: Text)
93
+
94
+ ActiveContextTimeToLive.add_member(:time_to_live_in_seconds, Shapes::ShapeRef.new(shape: ActiveContextTimeToLiveInSeconds, location_name: "timeToLiveInSeconds"))
95
+ ActiveContextTimeToLive.add_member(:turns_to_live, Shapes::ShapeRef.new(shape: ActiveContextTurnsToLive, location_name: "turnsToLive"))
96
+ ActiveContextTimeToLive.struct_class = Types::ActiveContextTimeToLive
97
+
98
+ ActiveContextsList.member = Shapes::ShapeRef.new(shape: ActiveContext)
99
+
77
100
  BadGatewayException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
78
101
  BadGatewayException.struct_class = Types::BadGatewayException
79
102
 
@@ -127,6 +150,7 @@ module Aws::Lex
127
150
  GetSessionResponse.add_member(:session_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "sessionAttributes"))
128
151
  GetSessionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location_name: "sessionId"))
129
152
  GetSessionResponse.add_member(:dialog_action, Shapes::ShapeRef.new(shape: DialogAction, location_name: "dialogAction"))
153
+ GetSessionResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
130
154
  GetSessionResponse.struct_class = Types::GetSessionResponse
131
155
 
132
156
  IntentConfidence.add_member(:score, Shapes::ShapeRef.new(shape: Double, location_name: "score"))
@@ -169,6 +193,7 @@ module Aws::Lex
169
193
  PostContentRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: HttpContentType, required: true, location: "header", location_name: "Content-Type"))
170
194
  PostContentRequest.add_member(:accept, Shapes::ShapeRef.new(shape: Accept, location: "header", location_name: "Accept"))
171
195
  PostContentRequest.add_member(:input_stream, Shapes::ShapeRef.new(shape: BlobStream, required: true, location_name: "inputStream"))
196
+ PostContentRequest.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsString, location: "header", location_name: "x-amz-lex-active-contexts", metadata: {"jsonvalue"=>true}))
172
197
  PostContentRequest.struct_class = Types::PostContentRequest
173
198
  PostContentRequest[:payload] = :input_stream
174
199
  PostContentRequest[:payload_member] = PostContentRequest.member(:input_stream)
@@ -188,6 +213,7 @@ module Aws::Lex
188
213
  PostContentResponse.add_member(:audio_stream, Shapes::ShapeRef.new(shape: BlobStream, location_name: "audioStream"))
189
214
  PostContentResponse.add_member(:bot_version, Shapes::ShapeRef.new(shape: BotVersion, location: "header", location_name: "x-amz-lex-bot-version"))
190
215
  PostContentResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-id"))
216
+ PostContentResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsString, location: "header", location_name: "x-amz-lex-active-contexts", metadata: {"jsonvalue"=>true}))
191
217
  PostContentResponse.struct_class = Types::PostContentResponse
192
218
  PostContentResponse[:payload] = :audio_stream
193
219
  PostContentResponse[:payload_member] = PostContentResponse.member(:audio_stream)
@@ -198,6 +224,7 @@ module Aws::Lex
198
224
  PostTextRequest.add_member(:session_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "sessionAttributes"))
199
225
  PostTextRequest.add_member(:request_attributes, Shapes::ShapeRef.new(shape: StringMap, location_name: "requestAttributes"))
200
226
  PostTextRequest.add_member(:input_text, Shapes::ShapeRef.new(shape: Text, required: true, location_name: "inputText"))
227
+ PostTextRequest.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
201
228
  PostTextRequest.struct_class = Types::PostTextRequest
202
229
 
203
230
  PostTextResponse.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location_name: "intentName"))
@@ -213,6 +240,7 @@ module Aws::Lex
213
240
  PostTextResponse.add_member(:response_card, Shapes::ShapeRef.new(shape: ResponseCard, location_name: "responseCard"))
214
241
  PostTextResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location_name: "sessionId"))
215
242
  PostTextResponse.add_member(:bot_version, Shapes::ShapeRef.new(shape: BotVersion, location_name: "botVersion"))
243
+ PostTextResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
216
244
  PostTextResponse.struct_class = Types::PostTextResponse
217
245
 
218
246
  PredictedIntent.add_member(:intent_name, Shapes::ShapeRef.new(shape: IntentName, location_name: "intentName"))
@@ -227,6 +255,7 @@ module Aws::Lex
227
255
  PutSessionRequest.add_member(:dialog_action, Shapes::ShapeRef.new(shape: DialogAction, location_name: "dialogAction"))
228
256
  PutSessionRequest.add_member(:recent_intent_summary_view, Shapes::ShapeRef.new(shape: IntentSummaryList, location_name: "recentIntentSummaryView"))
229
257
  PutSessionRequest.add_member(:accept, Shapes::ShapeRef.new(shape: Accept, location: "header", location_name: "Accept"))
258
+ PutSessionRequest.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsList, location_name: "activeContexts"))
230
259
  PutSessionRequest.struct_class = Types::PutSessionRequest
231
260
 
232
261
  PutSessionResponse.add_member(:content_type, Shapes::ShapeRef.new(shape: HttpContentType, location: "header", location_name: "Content-Type"))
@@ -239,6 +268,7 @@ module Aws::Lex
239
268
  PutSessionResponse.add_member(:slot_to_elicit, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-slot-to-elicit"))
240
269
  PutSessionResponse.add_member(:audio_stream, Shapes::ShapeRef.new(shape: BlobStream, location_name: "audioStream"))
241
270
  PutSessionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "x-amz-lex-session-id"))
271
+ PutSessionResponse.add_member(:active_contexts, Shapes::ShapeRef.new(shape: ActiveContextsString, location: "header", location_name: "x-amz-lex-active-contexts", metadata: {"jsonvalue"=>true}))
242
272
  PutSessionResponse.struct_class = Types::PutSessionResponse
243
273
  PutSessionResponse[:payload] = :audio_stream
244
274
  PutSessionResponse[:payload_member] = PutSessionResponse.member(:audio_stream)
@@ -10,6 +10,80 @@
10
10
  module Aws::Lex
11
11
  module Types
12
12
 
13
+ # A context is a variable that contains information about the current
14
+ # state of the conversation between a user and Amazon Lex. Context can
15
+ # be set automatically by Amazon Lex when an intent is fulfilled, or it
16
+ # can be set at runtime using the `PutContent`, `PutText`, or
17
+ # `PutSession` operation.
18
+ #
19
+ # @note When making an API call, you may pass ActiveContext
20
+ # data as a hash:
21
+ #
22
+ # {
23
+ # name: "ActiveContextName", # required
24
+ # time_to_live: { # required
25
+ # time_to_live_in_seconds: 1,
26
+ # turns_to_live: 1,
27
+ # },
28
+ # parameters: { # required
29
+ # "ParameterName" => "Text",
30
+ # },
31
+ # }
32
+ #
33
+ # @!attribute [rw] name
34
+ # The name of the context.
35
+ # @return [String]
36
+ #
37
+ # @!attribute [rw] time_to_live
38
+ # The length of time or number of turns that a context remains active.
39
+ # @return [Types::ActiveContextTimeToLive]
40
+ #
41
+ # @!attribute [rw] parameters
42
+ # State variables for the current context. You can use these values as
43
+ # default values for slots in subsequent events.
44
+ # @return [Hash<String,String>]
45
+ #
46
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/ActiveContext AWS API Documentation
47
+ #
48
+ class ActiveContext < Struct.new(
49
+ :name,
50
+ :time_to_live,
51
+ :parameters)
52
+ SENSITIVE = []
53
+ include Aws::Structure
54
+ end
55
+
56
+ # The length of time or number of turns that a context remains active.
57
+ #
58
+ # @note When making an API call, you may pass ActiveContextTimeToLive
59
+ # data as a hash:
60
+ #
61
+ # {
62
+ # time_to_live_in_seconds: 1,
63
+ # turns_to_live: 1,
64
+ # }
65
+ #
66
+ # @!attribute [rw] time_to_live_in_seconds
67
+ # The number of seconds that the context should be active after it is
68
+ # first sent in a `PostContent` or `PostText` response. You can set
69
+ # the value between 5 and 86,400 seconds (24 hours).
70
+ # @return [Integer]
71
+ #
72
+ # @!attribute [rw] turns_to_live
73
+ # The number of conversation turns that the context should be active.
74
+ # A conversation turn is one `PostContent` or `PostText` request and
75
+ # the corresponding response from Amazon Lex.
76
+ # @return [Integer]
77
+ #
78
+ # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/ActiveContextTimeToLive AWS API Documentation
79
+ #
80
+ class ActiveContextTimeToLive < Struct.new(
81
+ :time_to_live_in_seconds,
82
+ :turns_to_live)
83
+ SENSITIVE = []
84
+ include Aws::Structure
85
+ end
86
+
13
87
  # Either the Amazon Lex bot is still building, or one of the dependent
14
88
  # services (Amazon Polly, AWS Lambda) failed with an internal service
15
89
  # error.
@@ -361,14 +435,24 @@ module Aws::Lex
361
435
  # Describes the current state of the bot.
362
436
  # @return [Types::DialogAction]
363
437
  #
438
+ # @!attribute [rw] active_contexts
439
+ # A list of active contexts for the session. A context can be set when
440
+ # an intent is fulfilled or by calling the `PostContent`, `PostText`,
441
+ # or `PutSession` operation.
442
+ #
443
+ # You can use a context to control the intents that can follow up an
444
+ # intent, or to modify the operation of your application.
445
+ # @return [Array<Types::ActiveContext>]
446
+ #
364
447
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSessionResponse AWS API Documentation
365
448
  #
366
449
  class GetSessionResponse < Struct.new(
367
450
  :recent_intent_summary_view,
368
451
  :session_attributes,
369
452
  :session_id,
370
- :dialog_action)
371
- SENSITIVE = [:session_attributes]
453
+ :dialog_action,
454
+ :active_contexts)
455
+ SENSITIVE = [:session_attributes, :active_contexts]
372
456
  include Aws::Structure
373
457
  end
374
458
 
@@ -577,6 +661,7 @@ module Aws::Lex
577
661
  # content_type: "HttpContentType", # required
578
662
  # accept: "Accept",
579
663
  # input_stream: "data", # required
664
+ # active_contexts: "ActiveContextsString",
580
665
  # }
581
666
  #
582
667
  # @!attribute [rw] bot_name
@@ -721,6 +806,16 @@ module Aws::Lex
721
806
  # than buffering the data locally.
722
807
  # @return [IO]
723
808
  #
809
+ # @!attribute [rw] active_contexts
810
+ # A list of contexts active for the request. A context can be
811
+ # activated when a previous intent is fulfilled, or by including the
812
+ # context in the request,
813
+ #
814
+ # If you don't specify a list of contexts, Amazon Lex will use the
815
+ # current list of contexts for the session. If you specify an empty
816
+ # list, all contexts for the session are cleared.
817
+ # @return [String]
818
+ #
724
819
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContentRequest AWS API Documentation
725
820
  #
726
821
  class PostContentRequest < Struct.new(
@@ -731,8 +826,9 @@ module Aws::Lex
731
826
  :request_attributes,
732
827
  :content_type,
733
828
  :accept,
734
- :input_stream)
735
- SENSITIVE = [:session_attributes, :request_attributes]
829
+ :input_stream,
830
+ :active_contexts)
831
+ SENSITIVE = [:session_attributes, :request_attributes, :active_contexts]
736
832
  include Aws::Structure
737
833
  end
738
834
 
@@ -751,7 +847,7 @@ module Aws::Lex
751
847
  # score is between 0.0 and 1.0.
752
848
  #
753
849
  # The score is a relative score, not an absolute score. The score may
754
- # change based on improvements to the Amazon Lex NLU.
850
+ # change based on improvements to Amazon Lex.
755
851
  # @return [String]
756
852
  #
757
853
  # @!attribute [rw] alternative_intents
@@ -907,23 +1003,21 @@ module Aws::Lex
907
1003
  # The version of the bot that responded to the conversation. You can
908
1004
  # use this information to help determine if one version of a bot is
909
1005
  # performing better than another version.
910
- #
911
- # If you have enabled the new natural language understanding (NLU)
912
- # model, you can use this to determine if the improvement is due to
913
- # changes to the bot or changes to the NLU.
914
- #
915
- # For more information about enabling the new NLU, see the
916
- # [enableModelImprovements][1] parameter of the `PutBot` operation.
917
- #
918
- #
919
- #
920
- # [1]: https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements
921
1006
  # @return [String]
922
1007
  #
923
1008
  # @!attribute [rw] session_id
924
1009
  # The unique identifier for the session.
925
1010
  # @return [String]
926
1011
  #
1012
+ # @!attribute [rw] active_contexts
1013
+ # A list of active contexts for the session. A context can be set when
1014
+ # an intent is fulfilled or by calling the `PostContent`, `PostText`,
1015
+ # or `PutSession` operation.
1016
+ #
1017
+ # You can use a context to control the intents that can follow up an
1018
+ # intent, or to modify the operation of your application.
1019
+ # @return [String]
1020
+ #
927
1021
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContentResponse AWS API Documentation
928
1022
  #
929
1023
  class PostContentResponse < Struct.new(
@@ -941,8 +1035,9 @@ module Aws::Lex
941
1035
  :input_transcript,
942
1036
  :audio_stream,
943
1037
  :bot_version,
944
- :session_id)
945
- SENSITIVE = [:message]
1038
+ :session_id,
1039
+ :active_contexts)
1040
+ SENSITIVE = [:message, :active_contexts]
946
1041
  include Aws::Structure
947
1042
  end
948
1043
 
@@ -960,6 +1055,18 @@ module Aws::Lex
960
1055
  # "String" => "String",
961
1056
  # },
962
1057
  # input_text: "Text", # required
1058
+ # active_contexts: [
1059
+ # {
1060
+ # name: "ActiveContextName", # required
1061
+ # time_to_live: { # required
1062
+ # time_to_live_in_seconds: 1,
1063
+ # turns_to_live: 1,
1064
+ # },
1065
+ # parameters: { # required
1066
+ # "ParameterName" => "Text",
1067
+ # },
1068
+ # },
1069
+ # ],
963
1070
  # }
964
1071
  #
965
1072
  # @!attribute [rw] bot_name
@@ -1026,6 +1133,16 @@ module Aws::Lex
1026
1133
  # The text that the user entered (Amazon Lex interprets this text).
1027
1134
  # @return [String]
1028
1135
  #
1136
+ # @!attribute [rw] active_contexts
1137
+ # A list of contexts active for the request. A context can be
1138
+ # activated when a previous intent is fulfilled, or by including the
1139
+ # context in the request,
1140
+ #
1141
+ # If you don't specify a list of contexts, Amazon Lex will use the
1142
+ # current list of contexts for the session. If you specify an empty
1143
+ # list, all contexts for the session are cleared.
1144
+ # @return [Array<Types::ActiveContext>]
1145
+ #
1029
1146
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostTextRequest AWS API Documentation
1030
1147
  #
1031
1148
  class PostTextRequest < Struct.new(
@@ -1034,8 +1151,9 @@ module Aws::Lex
1034
1151
  :user_id,
1035
1152
  :session_attributes,
1036
1153
  :request_attributes,
1037
- :input_text)
1038
- SENSITIVE = [:session_attributes, :request_attributes, :input_text]
1154
+ :input_text,
1155
+ :active_contexts)
1156
+ SENSITIVE = [:session_attributes, :request_attributes, :input_text, :active_contexts]
1039
1157
  include Aws::Structure
1040
1158
  end
1041
1159
 
@@ -1050,8 +1168,7 @@ module Aws::Lex
1050
1168
  # Scores][1].
1051
1169
  #
1052
1170
  # The score is a relative score, not an absolute score. The score may
1053
- # change based on improvements to the Amazon Lex natural language
1054
- # understanding (NLU) model.
1171
+ # change based on improvements to Amazon Lex.
1055
1172
  #
1056
1173
  #
1057
1174
  #
@@ -1202,18 +1319,16 @@ module Aws::Lex
1202
1319
  # The version of the bot that responded to the conversation. You can
1203
1320
  # use this information to help determine if one version of a bot is
1204
1321
  # performing better than another version.
1322
+ # @return [String]
1205
1323
  #
1206
- # If you have enabled the new natural language understanding (NLU)
1207
- # model, you can use this to determine if the improvement is due to
1208
- # changes to the bot or changes to the NLU.
1209
- #
1210
- # For more information about enabling the new NLU, see the
1211
- # [enableModelImprovements][1] parameter of the `PutBot` operation.
1212
- #
1213
- #
1324
+ # @!attribute [rw] active_contexts
1325
+ # A list of active contexts for the session. A context can be set when
1326
+ # an intent is fulfilled or by calling the `PostContent`, `PostText`,
1327
+ # or `PutSession` operation.
1214
1328
  #
1215
- # [1]: https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements
1216
- # @return [String]
1329
+ # You can use a context to control the intents that can follow up an
1330
+ # intent, or to modify the operation of your application.
1331
+ # @return [Array<Types::ActiveContext>]
1217
1332
  #
1218
1333
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostTextResponse AWS API Documentation
1219
1334
  #
@@ -1230,8 +1345,9 @@ module Aws::Lex
1230
1345
  :slot_to_elicit,
1231
1346
  :response_card,
1232
1347
  :session_id,
1233
- :bot_version)
1234
- SENSITIVE = [:slots, :session_attributes, :message]
1348
+ :bot_version,
1349
+ :active_contexts)
1350
+ SENSITIVE = [:slots, :session_attributes, :message, :active_contexts]
1235
1351
  include Aws::Structure
1236
1352
  end
1237
1353
 
@@ -1299,6 +1415,18 @@ module Aws::Lex
1299
1415
  # },
1300
1416
  # ],
1301
1417
  # accept: "Accept",
1418
+ # active_contexts: [
1419
+ # {
1420
+ # name: "ActiveContextName", # required
1421
+ # time_to_live: { # required
1422
+ # time_to_live_in_seconds: 1,
1423
+ # turns_to_live: 1,
1424
+ # },
1425
+ # parameters: { # required
1426
+ # "ParameterName" => "Text",
1427
+ # },
1428
+ # },
1429
+ # ],
1302
1430
  # }
1303
1431
  #
1304
1432
  # @!attribute [rw] bot_name
@@ -1378,6 +1506,16 @@ module Aws::Lex
1378
1506
  # * `text/plain; charset=utf-8`
1379
1507
  # @return [String]
1380
1508
  #
1509
+ # @!attribute [rw] active_contexts
1510
+ # A list of contexts active for the request. A context can be
1511
+ # activated when a previous intent is fulfilled, or by including the
1512
+ # context in the request,
1513
+ #
1514
+ # If you don't specify a list of contexts, Amazon Lex will use the
1515
+ # current list of contexts for the session. If you specify an empty
1516
+ # list, all contexts for the session are cleared.
1517
+ # @return [Array<Types::ActiveContext>]
1518
+ #
1381
1519
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSessionRequest AWS API Documentation
1382
1520
  #
1383
1521
  class PutSessionRequest < Struct.new(
@@ -1387,8 +1525,9 @@ module Aws::Lex
1387
1525
  :session_attributes,
1388
1526
  :dialog_action,
1389
1527
  :recent_intent_summary_view,
1390
- :accept)
1391
- SENSITIVE = [:session_attributes]
1528
+ :accept,
1529
+ :active_contexts)
1530
+ SENSITIVE = [:session_attributes, :active_contexts]
1392
1531
  include Aws::Structure
1393
1532
  end
1394
1533
 
@@ -1474,6 +1613,10 @@ module Aws::Lex
1474
1613
  # A unique identifier for the session.
1475
1614
  # @return [String]
1476
1615
  #
1616
+ # @!attribute [rw] active_contexts
1617
+ # A list of active contexts for the session.
1618
+ # @return [String]
1619
+ #
1477
1620
  # @see http://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSessionResponse AWS API Documentation
1478
1621
  #
1479
1622
  class PutSessionResponse < Struct.new(
@@ -1486,8 +1629,9 @@ module Aws::Lex
1486
1629
  :dialog_state,
1487
1630
  :slot_to_elicit,
1488
1631
  :audio_stream,
1489
- :session_id)
1490
- SENSITIVE = [:message]
1632
+ :session_id,
1633
+ :active_contexts)
1634
+ SENSITIVE = [:message, :active_contexts]
1491
1635
  include Aws::Structure
1492
1636
  end
1493
1637
 
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.29.0
4
+ version: 1.34.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: 2020-08-06 00:00:00.000000000 Z
11
+ date: 2021-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.99.0
22
+ version: 3.112.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.99.0
32
+ version: 3.112.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement