blib/lib/Paws/LexModels/PutBot.pm untested

filter: Statementstmt 0.0% 0 / 42 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 44 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::LexModels::PutBot;
3 use Moose;
4 has AbortStatement => (is => 'ro', isa => 'Paws::LexModels::Statement', traits => ['NameInRequest'], request_name => 'abortStatement');
5 has Checksum => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'checksum');
6 has ChildDirected => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'childDirected', required => 1);
7 has ClarificationPrompt => (is => 'ro', isa => 'Paws::LexModels::Prompt', traits => ['NameInRequest'], request_name => 'clarificationPrompt');
8 has CreateVersion => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'createVersion');
9 has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description');
10 has DetectSentiment => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'detectSentiment');
11 has EnableModelImprovements => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'enableModelImprovements');
12 has IdleSessionTTLInSeconds => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'idleSessionTTLInSeconds');
13 has Intents => (is => 'ro', isa => 'ArrayRef[Paws::LexModels::Intent]', traits => ['NameInRequest'], request_name => 'intents');
14 has Locale => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'locale', required => 1);
15 has Name => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'name', required => 1);
16 has NluIntentConfidenceThreshold => (is => 'ro', isa => 'Num', traits => ['NameInRequest'], request_name => 'nluIntentConfidenceThreshold');
17 has ProcessBehavior => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'processBehavior');
18 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::LexModels::Tag]', traits => ['NameInRequest'], request_name => 'tags');
19 has VoiceId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'voiceId');
20  
21 use MooseX::ClassAttribute;
22  
23 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutBot');
24 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/bots/{name}/versions/$LATEST');
25 class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');
26 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexModels::PutBotResponse');
27 1;
28  
29 ### main pod documentation begin ###
30  
31 =head1 NAME
32  
33 Paws::LexModels::PutBot - Arguments for method PutBot on L<Paws::LexModels>
34  
35 =head1 DESCRIPTION
36  
37 This class represents the parameters used for calling the method PutBot on the
38 L<Amazon Lex Model Building Service|Paws::LexModels> service. Use the attributes of this class
39 as arguments to method PutBot.
40  
41 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutBot.
42  
43 =head1 SYNOPSIS
44  
45 my $models.lex = Paws->service('LexModels');
46 # To create a bot
47 # This example shows how to create a bot for ordering pizzas.
48 my $PutBotResponse = $models.lex->PutBot(
49 'AbortStatement' =>
50 {
51 'Messages' =>
52 [
53  
54 {
55 'Content' => 'I don't understand. Can you try again?',
56 'ContentType' => 'PlainText'
57 },
58  
59 {
60 'Content' => 'I'm sorry, I don't understand.',
61 'ContentType' => 'PlainText'
62 }
63 ]
64 },
65 'ChildDirected' => 1,
66 'ClarificationPrompt' =>
67 {
68 'MaxAttempts' => 1,
69 'Messages' =>
70 [
71  
72 {
73 'Content' => 'I'm sorry, I didn't hear that. Can you repeate what you just said?',
74 'ContentType' => 'PlainText'
75 },
76  
77 {
78 'Content' => 'Can you say that again?',
79 'ContentType' => 'PlainText'
80 }
81 ]
82 },
83 'Description' => 'Orders a pizza from a local pizzeria.',
84 'IdleSessionTTLInSeconds' => 300,
85 'Intents' =>
86 [
87  
88 {
89 'IntentName' => 'DocOrderPizza',
90 'IntentVersion' => '$LATEST'
91 }
92 ],
93 'Locale' => 'en-US',
94 'Name' => 'DocOrderPizzaBot',
95 'ProcessBehavior' => 'SAVE'
96 );
97  
98 # Results:
99 my $abortStatement = $PutBotResponse->abortStatement;
100 my $checksum = $PutBotResponse->checksum;
101 my $childDirected = $PutBotResponse->childDirected;
102 my $clarificationPrompt = $PutBotResponse->clarificationPrompt;
103 my $createdDate = $PutBotResponse->createdDate;
104 my $description = $PutBotResponse->description;
105 my $idleSessionTTLInSeconds = $PutBotResponse->idleSessionTTLInSeconds;
106 my $intents = $PutBotResponse->intents;
107 my $lastUpdatedDate = $PutBotResponse->lastUpdatedDate;
108 my $locale = $PutBotResponse->locale;
109 my $name = $PutBotResponse->name;
110 my $status = $PutBotResponse->status;
111 my $version = $PutBotResponse->version;
112  
113 # Returns a L<Paws::LexModels::PutBotResponse> object.
114  
115 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
116 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/models.lex/PutBot>
117  
118 =head1 ATTRIBUTES
119  
120  
121 =head2 AbortStatement => L<Paws::LexModels::Statement>
122  
123 When Amazon Lex can't understand the user's input in context, it tries
124 to elicit the information a few times. After that, Amazon Lex sends the
125 message defined in C<abortStatement> to the user, and then cancels the
126 conversation. To set the number of retries, use the
127 C<valueElicitationPrompt> field for the slot type.
128  
129 For example, in a pizza ordering bot, Amazon Lex might ask a user "What
130 type of crust would you like?" If the user's response is not one of the
131 expected responses (for example, "thin crust, "deep dish," etc.),
132 Amazon Lex tries to elicit a correct response a few more times.
133  
134 For example, in a pizza ordering application, C<OrderPizza> might be
135 one of the intents. This intent might require the C<CrustType> slot.
136 You specify the C<valueElicitationPrompt> field when you create the
137 C<CrustType> slot.
138  
139 If you have defined a fallback intent the cancel statement will not be
140 sent to the user, the fallback intent is used instead. For more
141 information, see AMAZON.FallbackIntent
142 (https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html).
143  
144  
145  
146 =head2 Checksum => Str
147  
148 Identifies a specific revision of the C<$LATEST> version.
149  
150 When you create a new bot, leave the C<checksum> field blank. If you
151 specify a checksum you get a C<BadRequestException> exception.
152  
153 When you want to update a bot, set the C<checksum> field to the
154 checksum of the most recent revision of the C<$LATEST> version. If you
155 don't specify the C< checksum> field, or if the checksum does not match
156 the C<$LATEST> version, you get a C<PreconditionFailedException>
157 exception.
158  
159  
160  
161 =head2 B<REQUIRED> ChildDirected => Bool
162  
163 For each Amazon Lex bot created with the Amazon Lex Model Building
164 Service, you must specify whether your use of Amazon Lex is related to
165 a website, program, or other application that is directed or targeted,
166 in whole or in part, to children under age 13 and subject to the
167 Children's Online Privacy Protection Act (COPPA) by specifying C<true>
168 or C<false> in the C<childDirected> field. By specifying C<true> in the
169 C<childDirected> field, you confirm that your use of Amazon Lex B<is>
170 related to a website, program, or other application that is directed or
171 targeted, in whole or in part, to children under age 13 and subject to
172 COPPA. By specifying C<false> in the C<childDirected> field, you
173 confirm that your use of Amazon Lex B<is not> related to a website,
174 program, or other application that is directed or targeted, in whole or
175 in part, to children under age 13 and subject to COPPA. You may not
176 specify a default value for the C<childDirected> field that does not
177 accurately reflect whether your use of Amazon Lex is related to a
178 website, program, or other application that is directed or targeted, in
179 whole or in part, to children under age 13 and subject to COPPA.
180  
181 If your use of Amazon Lex relates to a website, program, or other
182 application that is directed in whole or in part, to children under age
183 13, you must obtain any required verifiable parental consent under
184 COPPA. For information regarding the use of Amazon Lex in connection
185 with websites, programs, or other applications that are directed or
186 targeted, in whole or in part, to children under age 13, see the Amazon
187 Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security)
188  
189  
190  
191 =head2 ClarificationPrompt => L<Paws::LexModels::Prompt>
192  
193 When Amazon Lex doesn't understand the user's intent, it uses this
194 message to get clarification. To specify how many times Amazon Lex
195 should repeat the clarification prompt, use the C<maxAttempts> field.
196 If Amazon Lex still doesn't understand, it sends the message in the
197 C<abortStatement> field.
198  
199 When you create a clarification prompt, make sure that it suggests the
200 correct response from the user. for example, for a bot that orders
201 pizza and drinks, you might create this clarification prompt: "What
202 would you like to do? You can say 'Order a pizza' or 'Order a drink.'"
203  
204 If you have defined a fallback intent, it will be invoked if the
205 clarification prompt is repeated the number of times defined in the
206 C<maxAttempts> field. For more information, see AMAZON.FallbackIntent
207 (https://docs.aws.amazon.com/lex/latest/dg/built-in-intent-fallback.html).
208  
209 If you don't define a clarification prompt, at runtime Amazon Lex will
210 return a 400 Bad Request exception in three cases:
211  
212 =over
213  
214 =item *
215  
216 Follow-up prompt - When the user responds to a follow-up prompt but
217 does not provide an intent. For example, in response to a follow-up
218 prompt that says "Would you like anything else today?" the user says
219 "Yes." Amazon Lex will return a 400 Bad Request exception because it
220 does not have a clarification prompt to send to the user to get an
221 intent.
222  
223 =item *
224  
225 Lambda function - When using a Lambda function, you return an
226 C<ElicitIntent> dialog type. Since Amazon Lex does not have a
227 clarification prompt to get an intent from the user, it returns a 400
228 Bad Request exception.
229  
230 =item *
231  
232 PutSession operation - When using the C<PutSession> operation, you send
233 an C<ElicitIntent> dialog type. Since Amazon Lex does not have a
234 clarification prompt to get an intent from the user, it returns a 400
235 Bad Request exception.
236  
237 =back
238  
239  
240  
241  
242 =head2 CreateVersion => Bool
243  
244 When set to C<true> a new numbered version of the bot is created. This
245 is the same as calling the C<CreateBotVersion> operation. If you don't
246 specify C<createVersion>, the default is C<false>.
247  
248  
249  
250 =head2 Description => Str
251  
252 A description of the bot.
253  
254  
255  
256 =head2 DetectSentiment => Bool
257  
258 When set to C<true> user utterances are sent to Amazon Comprehend for
259 sentiment analysis. If you don't specify C<detectSentiment>, the
260 default is C<false>.
261  
262  
263  
264 =head2 EnableModelImprovements => Bool
265  
266 Set to C<true> to enable access to natural language understanding
267 improvements.
268  
269 When you set the C<enableModelImprovements> parameter to C<true> you
270 can use the C<nluIntentConfidenceThreshold> parameter to configure
271 confidence scores. For more information, see Confidence Scores
272 (https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html).
273  
274 You can only set the C<enableModelImprovements> parameter in certain
275 Regions. If you set the parameter to C<true>, your bot has access to
276 accuracy improvements.
277  
278 The Regions where you can set the C<enableModelImprovements> parameter
279 to C<true> are:
280  
281 =over
282  
283 =item *
284  
285 US East (N. Virginia) (us-east-1)
286  
287 =item *
288  
289 US West (Oregon) (us-west-2)
290  
291 =item *
292  
293 Asia Pacific (Sydney) (ap-southeast-2)
294  
295 =item *
296  
297 EU (Ireland) (eu-west-1)
298  
299 =back
300  
301 In other Regions, the C<enableModelImprovements> parameter is set to
302 C<true> by default. In these Regions setting the parameter to C<false>
303 throws a C<ValidationException> exception.
304  
305  
306  
307 =head2 IdleSessionTTLInSeconds => Int
308  
309 The maximum time in seconds that Amazon Lex retains the data gathered
310 in a conversation.
311  
312 A user interaction session remains active for the amount of time
313 specified. If no conversation occurs during this time, the session
314 expires and Amazon Lex deletes any data provided before the timeout.
315  
316 For example, suppose that a user chooses the OrderPizza intent, but
317 gets sidetracked halfway through placing an order. If the user doesn't
318 complete the order within the specified time, Amazon Lex discards the
319 slot information that it gathered, and the user must start over.
320  
321 If you don't include the C<idleSessionTTLInSeconds> element in a
322 C<PutBot> operation request, Amazon Lex uses the default value. This is
323 also true if the request replaces an existing bot.
324  
325 The default is 300 seconds (5 minutes).
326  
327  
328  
329 =head2 Intents => ArrayRef[L<Paws::LexModels::Intent>]
330  
331 An array of C<Intent> objects. Each intent represents a command that a
332 user can express. For example, a pizza ordering bot might support an
333 OrderPizza intent. For more information, see how-it-works.
334  
335  
336  
337 =head2 B<REQUIRED> Locale => Str
338  
339 Specifies the target locale for the bot. Any intent used in the bot
340 must be compatible with the locale of the bot.
341  
342 The default is C<en-US>.
343  
344 Valid values are: C<"de-DE">, C<"en-AU">, C<"en-GB">, C<"en-US">, C<"es-419">, C<"es-ES">, C<"es-US">, C<"fr-FR">, C<"fr-CA">, C<"it-IT">, C<"ja-JP">
345  
346 =head2 B<REQUIRED> Name => Str
347  
348 The name of the bot. The name is I<not> case sensitive.
349  
350  
351  
352 =head2 NluIntentConfidenceThreshold => Num
353  
354 Determines the threshold where Amazon Lex will insert the
355 C<AMAZON.FallbackIntent>, C<AMAZON.KendraSearchIntent>, or both when
356 returning alternative intents in a PostContent
357 (https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html)
358 or PostText
359 (https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html)
360 response. C<AMAZON.FallbackIntent> and C<AMAZON.KendraSearchIntent> are
361 only inserted if they are configured for the bot.
362  
363 You must set the C<enableModelImprovements> parameter to C<true> to use
364 confidence scores in the following regions.
365  
366 =over
367  
368 =item *
369  
370 US East (N. Virginia) (us-east-1)
371  
372 =item *
373  
374 US West (Oregon) (us-west-2)
375  
376 =item *
377  
378 Asia Pacific (Sydney) (ap-southeast-2)
379  
380 =item *
381  
382 EU (Ireland) (eu-west-1)
383  
384 =back
385  
386 In other Regions, the C<enableModelImprovements> parameter is set to
387 C<true> by default.
388  
389 For example, suppose a bot is configured with the confidence threshold
390 of 0.80 and the C<AMAZON.FallbackIntent>. Amazon Lex returns three
391 alternative intents with the following confidence scores: IntentA
392 (0.70), IntentB (0.60), IntentC (0.50). The response from the
393 C<PostText> operation would be:
394  
395 =over
396  
397 =item *
398  
399 AMAZON.FallbackIntent
400  
401 =item *
402  
403 IntentA
404  
405 =item *
406  
407 IntentB
408  
409 =item *
410  
411 IntentC
412  
413 =back
414  
415  
416  
417  
418 =head2 ProcessBehavior => Str
419  
420 If you set the C<processBehavior> element to C<BUILD>, Amazon Lex
421 builds the bot so that it can be run. If you set the element to C<SAVE>
422 Amazon Lex saves the bot, but doesn't build it.
423  
424 If you don't specify this value, the default value is C<BUILD>.
425  
426 Valid values are: C<"SAVE">, C<"BUILD">
427  
428 =head2 Tags => ArrayRef[L<Paws::LexModels::Tag>]
429  
430 A list of tags to add to the bot. You can only add tags when you create
431 a bot, you can't use the C<PutBot> operation to update the tags on a
432 bot. To update tags, use the C<TagResource> operation.
433  
434  
435  
436 =head2 VoiceId => Str
437  
438 The Amazon Polly voice ID that you want Amazon Lex to use for voice
439 interactions with the user. The locale configured for the voice must
440 match the locale of the bot. For more information, see Voices in Amazon
441 Polly (https://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in
442 the I<Amazon Polly Developer Guide>.
443  
444  
445  
446  
447 =head1 SEE ALSO
448  
449 This class forms part of L<Paws>, documenting arguments for method PutBot in L<Paws::LexModels>
450  
451 =head1 BUGS and CONTRIBUTIONS
452  
453 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
454  
455 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
456  
457 =cut
458