File Coverage

blib/lib/Paws/LexRuntime/PostTextResponse.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::LexRuntime::PostTextResponse;
3 1     1   465 use Moose;
  1         3  
  1         9  
4             has DialogState => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'dialogState');
5             has IntentName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'intentName');
6             has Message => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'message');
7             has ResponseCard => (is => 'ro', isa => 'Paws::LexRuntime::ResponseCard', traits => ['NameInRequest'], request_name => 'responseCard');
8             has SessionAttributes => (is => 'ro', isa => 'Paws::LexRuntime::StringMap', traits => ['NameInRequest'], request_name => 'sessionAttributes');
9             has Slots => (is => 'ro', isa => 'Paws::LexRuntime::StringMap', traits => ['NameInRequest'], request_name => 'slots');
10             has SlotToElicit => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'slotToElicit');
11              
12             has _request_id => (is => 'ro', isa => 'Str');
13             1;
14              
15             ### main pod documentation begin ###
16              
17             =head1 NAME
18              
19             Paws::LexRuntime::PostTextResponse
20              
21             =head1 ATTRIBUTES
22              
23              
24             =head2 DialogState => Str
25              
26             Identifies the current state of the user interaction. Amazon Lex
27             returns one of the following values as C<dialogState>. The client can
28             optionally use this information to customize the user interface.
29              
30             =over
31              
32             =item *
33              
34             C<ElicitIntent> E<ndash> Amazon Lex wants to elicit user intent.
35              
36             For example, a user might utter an intent ("I want to order a pizza").
37             If Amazon Lex cannot infer the user intent from this utterance, it will
38             return this dialogState.
39              
40             =item *
41              
42             C<ConfirmIntent> E<ndash> Amazon Lex is expecting a "yes" or "no"
43             response.
44              
45             For example, Amazon Lex wants user confirmation before fulfilling an
46             intent.
47              
48             Instead of a simple "yes" or "no," a user might respond with additional
49             information. For example, "yes, but make it thick crust pizza" or "no,
50             I want to order a drink". Amazon Lex can process such additional
51             information (in these examples, update the crust type slot value, or
52             change intent from OrderPizza to OrderDrink).
53              
54             =item *
55              
56             C<ElicitSlot> E<ndash> Amazon Lex is expecting a slot value for the
57             current intent.
58              
59             For example, suppose that in the response Amazon Lex sends this
60             message: "What size pizza would you like?". A user might reply with the
61             slot value (e.g., "medium"). The user might also provide additional
62             information in the response (e.g., "medium thick crust pizza"). Amazon
63             Lex can process such additional information appropriately.
64              
65             =item *
66              
67             C<Fulfilled> E<ndash> Conveys that the Lambda function configured for
68             the intent has successfully fulfilled the intent.
69              
70             =item *
71              
72             C<ReadyForFulfillment> E<ndash> Conveys that the client has to fulfill
73             the intent.
74              
75             =item *
76              
77             C<Failed> E<ndash> Conveys that the conversation with the user failed.
78              
79             This can happen for various reasons including that the user did not
80             provide an appropriate response to prompts from the service (you can
81             configure how many times Amazon Lex can prompt a user for specific
82             information), or the Lambda function failed to fulfill the intent.
83              
84             =back
85              
86              
87             Valid values are: C<"ElicitIntent">, C<"ConfirmIntent">, C<"ElicitSlot">, C<"Fulfilled">, C<"ReadyForFulfillment">, C<"Failed">
88             =head2 IntentName => Str
89              
90             The current user intent that Amazon Lex is aware of.
91              
92              
93             =head2 Message => Str
94              
95             A message to convey to the user. It can come from the bot's
96             configuration or a code hook (Lambda function). If the current intent
97             is not configured with a code hook or the code hook returned
98             C<Delegate> as the C<dialogAction.type> in its response, then Amazon
99             Lex decides the next course of action and selects an appropriate
100             message from the bot configuration based on the current user
101             interaction context. For example, if Amazon Lex is not able to
102             understand the user input, it uses a clarification prompt message (for
103             more information, see the Error Handling section in the Amazon Lex
104             console). Another example: if the intent requires confirmation before
105             fulfillment, then Amazon Lex uses the confirmation prompt message in
106             the intent configuration. If the code hook returns a message, Amazon
107             Lex passes it as-is in its response to the client.
108              
109              
110             =head2 ResponseCard => L<Paws::LexRuntime::ResponseCard>
111              
112             Represents the options that the user has to respond to the current
113             prompt. Response Card can come from the bot configuration (in the
114             Amazon Lex console, choose the settings button next to a slot) or from
115             a code hook (Lambda function).
116              
117              
118             =head2 SessionAttributes => L<Paws::LexRuntime::StringMap>
119              
120             A map of key-value pairs representing the session-specific context
121             information.
122              
123              
124             =head2 Slots => L<Paws::LexRuntime::StringMap>
125              
126             The intent slots (name/value pairs) that Amazon Lex detected so far
127             from the user input in the conversation.
128              
129              
130             =head2 SlotToElicit => Str
131              
132             If the C<dialogState> value is C<ElicitSlot>, returns the name of the
133             slot for which Amazon Lex is eliciting a value.
134              
135              
136             =head2 _request_id => Str
137              
138              
139             =cut
140