blib/lib/Paws/LexRuntime/PostContentResponse.pm untested

filter: Statementstmt 0.0% 0 / 44 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 46 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::LexRuntime::PostContentResponse;
3 use Moose;
4 has ActiveContexts => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-active-contexts');
5 has AlternativeIntents => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-alternative-intents');
6 has AudioStream => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'audioStream');
7 has BotVersion => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-bot-version');
8 has ContentType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'Content-Type');
9 has DialogState => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-dialog-state');
10 has EncodedInputTranscript => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-encoded-input-transcript');
11 has EncodedMessage => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-encoded-message');
12 has InputTranscript => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-input-transcript');
13 has IntentName => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-intent-name');
14 has Message => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-message');
15 has MessageFormat => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-message-format');
16 has NluIntentConfidence => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-nlu-intent-confidence');
17 has SentimentResponse => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-sentiment');
18 has SessionAttributes => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-session-attributes');
19 has SessionId => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-session-id');
20 has Slots => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-slots');
21 has SlotToElicit => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-lex-slot-to-elicit');
22 use MooseX::ClassAttribute;
23 class_has _stream_param => (is => 'ro', default => 'AudioStream');
24 has _request_id => (is => 'ro', isa => 'Str');
25 1;
26  
27 ### main pod documentation begin ###
28  
29 =head1 NAME
30  
31 Paws::LexRuntime::PostContentResponse
32  
33 =head1 ATTRIBUTES
34  
35  
36 =head2 ActiveContexts => Str
37  
38 A list of active contexts for the session. A context can be set when an
39 intent is fulfilled or by calling the C<PostContent>, C<PostText>, or
40 C<PutSession> operation.
41  
42 You can use a context to control the intents that can follow up an
43 intent, or to modify the operation of your application.
44  
45  
46 =head2 AlternativeIntents => Str
47  
48 One to four alternative intents that may be applicable to the user's
49 intent.
50  
51 Each alternative includes a score that indicates how confident Amazon
52 Lex is that the intent matches the user's intent. The intents are
53 sorted by the confidence score.
54  
55  
56 =head2 AudioStream => Str
57  
58 The prompt (or statement) to convey to the user. This is based on the
59 bot configuration and context. For example, if Amazon Lex did not
60 understand the user intent, it sends the C<clarificationPrompt>
61 configured for the bot. If the intent requires confirmation before
62 taking the fulfillment action, it sends the C<confirmationPrompt>.
63 Another example: Suppose that the Lambda function successfully
64 fulfilled the intent, and sent a message to convey to the user. Then
65 Amazon Lex sends that message in the response.
66  
67  
68 =head2 BotVersion => Str
69  
70 The version of the bot that responded to the conversation. You can use
71 this information to help determine if one version of a bot is
72 performing better than another version.
73  
74  
75 =head2 ContentType => Str
76  
77 Content type as specified in the C<Accept> HTTP header in the request.
78  
79  
80 =head2 DialogState => Str
81  
82 Identifies the current state of the user interaction. Amazon Lex
83 returns one of the following values as C<dialogState>. The client can
84 optionally use this information to customize the user interface.
85  
86 =over
87  
88 =item *
89  
90 C<ElicitIntent> - Amazon Lex wants to elicit the user's intent.
91 Consider the following examples:
92  
93 For example, a user might utter an intent ("I want to order a pizza").
94 If Amazon Lex cannot infer the user intent from this utterance, it will
95 return this dialog state.
96  
97 =item *
98  
99 C<ConfirmIntent> - Amazon Lex is expecting a "yes" or "no" response.
100  
101 For example, Amazon Lex wants user confirmation before fulfilling an
102 intent. Instead of a simple "yes" or "no" response, a user might
103 respond with additional information. For example, "yes, but make it a
104 thick crust pizza" or "no, I want to order a drink." Amazon Lex can
105 process such additional information (in these examples, update the
106 crust type slot or change the intent from OrderPizza to OrderDrink).
107  
108 =item *
109  
110 C<ElicitSlot> - Amazon Lex is expecting the value of a slot for the
111 current intent.
112  
113 For example, suppose that in the response Amazon Lex sends this
114 message: "What size pizza would you like?". A user might reply with the
115 slot value (e.g., "medium"). The user might also provide additional
116 information in the response (e.g., "medium thick crust pizza"). Amazon
117 Lex can process such additional information appropriately.
118  
119 =item *
120  
121 C<Fulfilled> - Conveys that the Lambda function has successfully
122 fulfilled the intent.
123  
124 =item *
125  
126 C<ReadyForFulfillment> - Conveys that the client has to fulfill the
127 request.
128  
129 =item *
130  
131 C<Failed> - Conveys that the conversation with the user failed.
132  
133 This can happen for various reasons, including that the user does not
134 provide an appropriate response to prompts from the service (you can
135 configure how many times Amazon Lex can prompt a user for specific
136 information), or if the Lambda function fails to fulfill the intent.
137  
138 =back
139  
140  
141 Valid values are: C<"ElicitIntent">, C<"ConfirmIntent">, C<"ElicitSlot">, C<"Fulfilled">, C<"ReadyForFulfillment">, C<"Failed">
142 =head2 EncodedInputTranscript => Str
143  
144 The text used to process the request.
145  
146 If the input was an audio stream, the C<encodedInputTranscript> field
147 contains the text extracted from the audio stream. This is the text
148 that is actually processed to recognize intents and slot values. You
149 can use this information to determine if Amazon Lex is correctly
150 processing the audio that you send.
151  
152 The C<encodedInputTranscript> field is base-64 encoded. You must decode
153 the field before you can use the value.
154  
155  
156 =head2 EncodedMessage => Str
157  
158 The message to convey to the user. The message can come from the bot's
159 configuration or from a Lambda function.
160  
161 If the intent is not configured with a Lambda function, or if the
162 Lambda function returned C<Delegate> as the C<dialogAction.type> in its
163 response, Amazon Lex decides on the next course of action and selects
164 an appropriate message from the bot's configuration based on the
165 current interaction context. For example, if Amazon Lex isn't able to
166 understand user input, it uses a clarification prompt message.
167  
168 When you create an intent you can assign messages to groups. When
169 messages are assigned to groups Amazon Lex returns one message from
170 each group in the response. The message field is an escaped JSON string
171 containing the messages. For more information about the structure of
172 the JSON string returned, see msg-prompts-formats.
173  
174 If the Lambda function returns a message, Amazon Lex passes it to the
175 client in its response.
176  
177 The C<encodedMessage> field is base-64 encoded. You must decode the
178 field before you can use the value.
179  
180  
181 =head2 InputTranscript => Str
182  
183 The text used to process the request.
184  
185 You can use this field only in the de-DE, en-AU, en-GB, en-US, es-419,
186 es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
187 the C<inputTranscript> field is null. You should use the
188 C<encodedInputTranscript> field instead.
189  
190 If the input was an audio stream, the C<inputTranscript> field contains
191 the text extracted from the audio stream. This is the text that is
192 actually processed to recognize intents and slot values. You can use
193 this information to determine if Amazon Lex is correctly processing the
194 audio that you send.
195  
196  
197 =head2 IntentName => Str
198  
199 Current user intent that Amazon Lex is aware of.
200  
201  
202 =head2 Message => Str
203  
204 You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419,
205 es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales,
206 the C<message> field is null. You should use the C<encodedMessage>
207 field instead.
208  
209 The message to convey to the user. The message can come from the bot's
210 configuration or from a Lambda function.
211  
212 If the intent is not configured with a Lambda function, or if the
213 Lambda function returned C<Delegate> as the C<dialogAction.type> in its
214 response, Amazon Lex decides on the next course of action and selects
215 an appropriate message from the bot's configuration based on the
216 current interaction context. For example, if Amazon Lex isn't able to
217 understand user input, it uses a clarification prompt message.
218  
219 When you create an intent you can assign messages to groups. When
220 messages are assigned to groups Amazon Lex returns one message from
221 each group in the response. The message field is an escaped JSON string
222 containing the messages. For more information about the structure of
223 the JSON string returned, see msg-prompts-formats.
224  
225 If the Lambda function returns a message, Amazon Lex passes it to the
226 client in its response.
227  
228  
229 =head2 MessageFormat => Str
230  
231 The format of the response message. One of the following values:
232  
233 =over
234  
235 =item *
236  
237 C<PlainText> - The message contains plain UTF-8 text.
238  
239 =item *
240  
241 C<CustomPayload> - The message is a custom format for the client.
242  
243 =item *
244  
245 C<SSML> - The message contains text formatted for voice output.
246  
247 =item *
248  
249 C<Composite> - The message contains an escaped JSON object containing
250 one or more messages from the groups that messages were assigned to
251 when the intent was created.
252  
253 =back
254  
255  
256 Valid values are: C<"PlainText">, C<"CustomPayload">, C<"SSML">, C<"Composite">
257 =head2 NluIntentConfidence => Str
258  
259 Provides a score that indicates how confident Amazon Lex is that the
260 returned intent is the one that matches the user's intent. The score is
261 between 0.0 and 1.0.
262  
263 The score is a relative score, not an absolute score. The score may
264 change based on improvements to Amazon Lex.
265  
266  
267 =head2 SentimentResponse => Str
268  
269 The sentiment expressed in an utterance.
270  
271 When the bot is configured to send utterances to Amazon Comprehend for
272 sentiment analysis, this field contains the result of the analysis.
273  
274  
275 =head2 SessionAttributes => Str
276  
277 Map of key/value pairs representing the session-specific context
278 information.
279  
280  
281 =head2 SessionId => Str
282  
283 The unique identifier for the session.
284  
285  
286 =head2 Slots => Str
287  
288 Map of zero or more intent slots (name/value pairs) Amazon Lex detected
289 from the user input during the conversation. The field is base-64
290 encoded.
291  
292 Amazon Lex creates a resolution list containing likely values for a
293 slot. The value that it returns is determined by the
294 C<valueSelectionStrategy> selected when the slot type was created or
295 updated. If C<valueSelectionStrategy> is set to C<ORIGINAL_VALUE>, the
296 value provided by the user is returned, if the user value is similar to
297 the slot values. If C<valueSelectionStrategy> is set to
298 C<TOP_RESOLUTION> Amazon Lex returns the first value in the resolution
299 list or, if there is no resolution list, null. If you don't specify a
300 C<valueSelectionStrategy>, the default is C<ORIGINAL_VALUE>.
301  
302  
303 =head2 SlotToElicit => Str
304  
305 If the C<dialogState> value is C<ElicitSlot>, returns the name of the
306 slot for which Amazon Lex is eliciting a value.
307  
308  
309 =head2 _request_id => Str
310  
311  
312 =cut
313