| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Paws::LexModels::PutIntent; |
|
3
|
1
|
|
|
1
|
|
351
|
use Moose; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
|
|
has Checksum => (is => 'ro', isa => 'Str'); |
|
5
|
|
|
|
|
|
|
has ConclusionStatement => (is => 'ro', isa => 'Paws::LexModels::Statement'); |
|
6
|
|
|
|
|
|
|
has ConfirmationPrompt => (is => 'ro', isa => 'Paws::LexModels::Prompt'); |
|
7
|
|
|
|
|
|
|
has Description => (is => 'ro', isa => 'Str'); |
|
8
|
|
|
|
|
|
|
has DialogCodeHook => (is => 'ro', isa => 'Paws::LexModels::CodeHook'); |
|
9
|
|
|
|
|
|
|
has FollowUpPrompt => (is => 'ro', isa => 'Paws::LexModels::FollowUpPrompt'); |
|
10
|
|
|
|
|
|
|
has FulfillmentActivity => (is => 'ro', isa => 'Paws::LexModels::FulfillmentActivity'); |
|
11
|
|
|
|
|
|
|
has Name => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'name' , required => 1); |
|
12
|
|
|
|
|
|
|
has ParentIntentSignature => (is => 'ro', isa => 'Str'); |
|
13
|
|
|
|
|
|
|
has RejectionStatement => (is => 'ro', isa => 'Paws::LexModels::Statement'); |
|
14
|
|
|
|
|
|
|
has SampleUtterances => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); |
|
15
|
|
|
|
|
|
|
has Slots => (is => 'ro', isa => 'ArrayRef[Paws::LexModels::Slot]'); |
|
16
|
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
5449
|
use MooseX::ClassAttribute; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
7
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutIntent'); |
|
20
|
|
|
|
|
|
|
class_has _api_uri => (isa => 'Str', is => 'ro', default => '/intents/{name}/versions/$LATEST'); |
|
21
|
|
|
|
|
|
|
class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); |
|
22
|
|
|
|
|
|
|
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexModels::PutIntentResponse'); |
|
23
|
|
|
|
|
|
|
class_has _result_key => (isa => 'Str', is => 'ro'); |
|
24
|
|
|
|
|
|
|
1; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
### main pod documentation begin ### |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Paws::LexModels::PutIntent - Arguments for method PutIntent on Paws::LexModels |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
This class represents the parameters used for calling the method PutIntent on the |
|
35
|
|
|
|
|
|
|
Amazon Lex Model Building Service service. Use the attributes of this class |
|
36
|
|
|
|
|
|
|
as arguments to method PutIntent. |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutIntent. |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
As an example: |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
$service_obj->PutIntent(Att1 => $value1, Att2 => $value2, ...); |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
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. |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 Checksum => Str |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Identifies a specific revision of the C<$LATEST> version. |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
When you create a new intent, leave the C<checksum> field blank. If you |
|
54
|
|
|
|
|
|
|
specify a checksum you get a C<BadRequestException> exception. |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
When you want to update a intent, set the C<checksum> field to the |
|
57
|
|
|
|
|
|
|
checksum of the most recent revision of the C<$LATEST> version. If you |
|
58
|
|
|
|
|
|
|
don't specify the C< checksum> field, or if the checksum does not match |
|
59
|
|
|
|
|
|
|
the C<$LATEST> version, you get a C<PreconditionFailedException> |
|
60
|
|
|
|
|
|
|
exception. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 ConclusionStatement => L<Paws::LexModels::Statement> |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
The statement that you want Amazon Lex to convey to the user after the |
|
67
|
|
|
|
|
|
|
intent is successfully fulfilled by the Lambda function. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This element is relevant only if you provide a Lambda function in the |
|
70
|
|
|
|
|
|
|
C<fulfillmentActivity>. If you return the intent to the client |
|
71
|
|
|
|
|
|
|
application, you can't specify this element. |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The C<followUpPrompt> and C<conclusionStatement> are mutually |
|
74
|
|
|
|
|
|
|
exclusive. You can specify only one. |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 ConfirmationPrompt => L<Paws::LexModels::Prompt> |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Prompts the user to confirm the intent. This question should have a yes |
|
81
|
|
|
|
|
|
|
or no answer. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Amazon Lex uses this prompt to ensure that the user acknowledges that |
|
84
|
|
|
|
|
|
|
the intent is ready for fulfillment. For example, with the |
|
85
|
|
|
|
|
|
|
C<OrderPizza> intent, you might want to confirm that the order is |
|
86
|
|
|
|
|
|
|
correct before placing it. For other intents, such as intents that |
|
87
|
|
|
|
|
|
|
simply respond to user questions, you might not need to ask the user |
|
88
|
|
|
|
|
|
|
for confirmation before providing the information. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
You you must provide both the C<rejectionStatement> and the |
|
91
|
|
|
|
|
|
|
C<confirmationPrompt>, or neither. |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 Description => Str |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
A description of the intent. |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 DialogCodeHook => L<Paws::LexModels::CodeHook> |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Specifies a Lambda function to invoke for each user input. You can |
|
104
|
|
|
|
|
|
|
invoke this Lambda function to personalize user interaction. |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
For example, suppose your bot determines that the user is John. Your |
|
107
|
|
|
|
|
|
|
Lambda function might retrieve John's information from a backend |
|
108
|
|
|
|
|
|
|
database and prepopulate some of the values. For example, if you find |
|
109
|
|
|
|
|
|
|
that John is gluten intolerant, you might set the corresponding intent |
|
110
|
|
|
|
|
|
|
slot, C<GlutenIntolerant>, to true. You might find John's phone number |
|
111
|
|
|
|
|
|
|
and set the corresponding session attribute. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 FollowUpPrompt => L<Paws::LexModels::FollowUpPrompt> |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Amazon Lex uses this prompt to solicit additional activity after |
|
118
|
|
|
|
|
|
|
fulfilling an intent. For example, after the C<OrderPizza> intent is |
|
119
|
|
|
|
|
|
|
fulfilled, you might prompt the user to order a drink. |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
The action that Amazon Lex takes depends on the user's response, as |
|
122
|
|
|
|
|
|
|
follows: |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=over |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=item * |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
If the user says "Yes" it responds with the clarification prompt that |
|
129
|
|
|
|
|
|
|
is configured for the bot. |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=item * |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
if the user says "Yes" and continues with an utterance that triggers an |
|
134
|
|
|
|
|
|
|
intent it starts a conversation for the intent. |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=item * |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
If the user says "No" it responds with the rejection statement |
|
139
|
|
|
|
|
|
|
configured for the the follow-up prompt. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=item * |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
If it doesn't recognize the utterance it repeats the follow-up prompt |
|
144
|
|
|
|
|
|
|
again. |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=back |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
The C<followUpPrompt> field and the C<conclusionStatement> field are |
|
149
|
|
|
|
|
|
|
mutually exclusive. You can specify only one. |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 FulfillmentActivity => L<Paws::LexModels::FulfillmentActivity> |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
Required. Describes how the intent is fulfilled. For example, after a |
|
156
|
|
|
|
|
|
|
user provides all of the information for a pizza order, |
|
157
|
|
|
|
|
|
|
C<fulfillmentActivity> defines how the bot places an order with a local |
|
158
|
|
|
|
|
|
|
pizza store. |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
You might configure Amazon Lex to return all of the intent information |
|
161
|
|
|
|
|
|
|
to the client application, or direct it to invoke a Lambda function |
|
162
|
|
|
|
|
|
|
that can process the intent (for example, place an order with a |
|
163
|
|
|
|
|
|
|
pizzeria). |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head2 B<REQUIRED> Name => Str |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
The name of the intent. The name is I<not> case sensitive. |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
The name can't match a built-in intent name, or a built-in intent name |
|
172
|
|
|
|
|
|
|
with "AMAZON." removed. For example, because there is a built-in intent |
|
173
|
|
|
|
|
|
|
called C<AMAZON.HelpIntent>, you can't create a custom intent called |
|
174
|
|
|
|
|
|
|
C<HelpIntent>. |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
For a list of built-in intents, see Standard Built-in Intents in the |
|
177
|
|
|
|
|
|
|
I<Alexa Skills Kit>. |
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=head2 ParentIntentSignature => Str |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
A unique identifier for the built-in intent to base this intent on. To |
|
184
|
|
|
|
|
|
|
find the signature for an intent, see Standard Built-in Intents in the |
|
185
|
|
|
|
|
|
|
I<Alexa Skills Kit>. |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=head2 RejectionStatement => L<Paws::LexModels::Statement> |
|
190
|
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
When the user answers "no" to the question defined in |
|
192
|
|
|
|
|
|
|
C<confirmationPrompt>, Amazon Lex responds with this statement to |
|
193
|
|
|
|
|
|
|
acknowledge that the intent was canceled. |
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
You must provide both the C<rejectionStatement> and the |
|
196
|
|
|
|
|
|
|
C<confirmationPrompt>, or neither. |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=head2 SampleUtterances => ArrayRef[Str|Undef] |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
An array of utterances (strings) that a user might say to signal the |
|
203
|
|
|
|
|
|
|
intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} |
|
204
|
|
|
|
|
|
|
{PizzaSize} pizzas". |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
In each utterance, a slot name is enclosed in curly braces. |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=head2 Slots => ArrayRef[L<Paws::LexModels::Slot>] |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
An array of intent slots. At runtime, Amazon Lex elicits required slot |
|
213
|
|
|
|
|
|
|
values from the user using prompts defined in the slots. For more |
|
214
|
|
|
|
|
|
|
information, see how-it-works. |
|
215
|
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
This class forms part of L<Paws>, documenting arguments for method PutIntent in L<Paws::LexModels> |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
|
224
|
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
|
226
|
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
|
228
|
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=cut |
|
230
|
|
|
|
|
|
|
|