1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package types
4
5// A context is a variable that contains information about the current state of the
6// conversation between a user and Amazon Lex. Context can be set automatically by
7// Amazon Lex when an intent is fulfilled, or it can be set at runtime using the
8// PutContent, PutText, or PutSession operation.
9type ActiveContext struct {
10
11	// The name of the context.
12	//
13	// This member is required.
14	Name *string
15
16	// State variables for the current context. You can use these values as default
17	// values for slots in subsequent events.
18	//
19	// This member is required.
20	Parameters map[string]string
21
22	// The length of time or number of turns that a context remains active.
23	//
24	// This member is required.
25	TimeToLive *ActiveContextTimeToLive
26}
27
28// The length of time or number of turns that a context remains active.
29type ActiveContextTimeToLive struct {
30
31	// The number of seconds that the context should be active after it is first sent
32	// in a PostContent or PostText response. You can set the value between 5 and
33	// 86,400 seconds (24 hours).
34	TimeToLiveInSeconds *int32
35
36	// The number of conversation turns that the context should be active. A
37	// conversation turn is one PostContent or PostText request and the corresponding
38	// response from Amazon Lex.
39	TurnsToLive *int32
40}
41
42// Represents an option to be shown on the client platform (Facebook, Slack, etc.)
43type Button struct {
44
45	// Text that is visible to the user on the button.
46	//
47	// This member is required.
48	Text *string
49
50	// The value sent to Amazon Lex when a user chooses the button. For example,
51	// consider button text "NYC." When the user chooses the button, the value sent can
52	// be "New York City."
53	//
54	// This member is required.
55	Value *string
56}
57
58// Describes the next action that the bot should take in its interaction with the
59// user and provides information about the context in which the action takes place.
60// Use the DialogAction data type to set the interaction to a specific state, or to
61// return the interaction to a previous state.
62type DialogAction struct {
63
64	// The next action that the bot should take in its interaction with the user. The
65	// possible values are:
66	//
67	// * ConfirmIntent - The next action is asking the user if
68	// the intent is complete and ready to be fulfilled. This is a yes/no question such
69	// as "Place the order?"
70	//
71	// * Close - Indicates that the there will not be a response
72	// from the user. For example, the statement "Your order has been placed" does not
73	// require a response.
74	//
75	// * Delegate - The next action is determined by Amazon
76	// Lex.
77	//
78	// * ElicitIntent - The next action is to determine the intent that the user
79	// wants to fulfill.
80	//
81	// * ElicitSlot - The next action is to elicit a slot value from
82	// the user.
83	//
84	// This member is required.
85	Type DialogActionType
86
87	// The fulfillment state of the intent. The possible values are:
88	//
89	// * Failed - The
90	// Lambda function associated with the intent failed to fulfill the intent.
91	//
92	// *
93	// Fulfilled - The intent has fulfilled by the Lambda function associated with the
94	// intent.
95	//
96	// * ReadyForFulfillment - All of the information necessary for the intent
97	// is present and the intent ready to be fulfilled by the client application.
98	FulfillmentState FulfillmentState
99
100	// The name of the intent.
101	IntentName *string
102
103	// The message that should be shown to the user. If you don't specify a message,
104	// Amazon Lex will use the message configured for the intent.
105	Message *string
106
107	// * PlainText - The message contains plain UTF-8 text.
108	//
109	// * CustomPayload - The
110	// message is a custom format for the client.
111	//
112	// * SSML - The message contains text
113	// formatted for voice output.
114	//
115	// * Composite - The message contains an escaped JSON
116	// object containing one or more messages. For more information, see Message Groups
117	// (https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html).
118	MessageFormat MessageFormatType
119
120	// The name of the slot that should be elicited from the user.
121	SlotToElicit *string
122
123	// Map of the slots that have been gathered and their values.
124	Slots map[string]string
125}
126
127// Represents an option rendered to the user when a prompt is shown. It could be an
128// image, a button, a link, or text.
129type GenericAttachment struct {
130
131	// The URL of an attachment to the response card.
132	AttachmentLinkUrl *string
133
134	// The list of options to show to the user.
135	Buttons []Button
136
137	// The URL of an image that is displayed to the user.
138	ImageUrl *string
139
140	// The subtitle shown below the title.
141	SubTitle *string
142
143	// The title of the option.
144	Title *string
145}
146
147// Provides a score that indicates the confidence that Amazon Lex has that an
148// intent is the one that satisfies the user's intent.
149type IntentConfidence struct {
150
151	// A score that indicates how confident Amazon Lex is that an intent satisfies the
152	// user's intent. Ranges between 0.00 and 1.00. Higher scores indicate higher
153	// confidence.
154	Score float64
155}
156
157// Provides information about the state of an intent. You can use this information
158// to get the current state of an intent so that you can process the intent, or so
159// that you can return the intent to its previous state.
160type IntentSummary struct {
161
162	// The next action that the bot should take in its interaction with the user. The
163	// possible values are:
164	//
165	// * ConfirmIntent - The next action is asking the user if
166	// the intent is complete and ready to be fulfilled. This is a yes/no question such
167	// as "Place the order?"
168	//
169	// * Close - Indicates that the there will not be a response
170	// from the user. For example, the statement "Your order has been placed" does not
171	// require a response.
172	//
173	// * ElicitIntent - The next action is to determine the intent
174	// that the user wants to fulfill.
175	//
176	// * ElicitSlot - The next action is to elicit a
177	// slot value from the user.
178	//
179	// This member is required.
180	DialogActionType DialogActionType
181
182	// A user-defined label that identifies a particular intent. You can use this label
183	// to return to a previous intent. Use the checkpointLabelFilter parameter of the
184	// GetSessionRequest operation to filter the intents returned by the operation to
185	// those with only the specified label.
186	CheckpointLabel *string
187
188	// The status of the intent after the user responds to the confirmation prompt. If
189	// the user confirms the intent, Amazon Lex sets this field to Confirmed. If the
190	// user denies the intent, Amazon Lex sets this value to Denied. The possible
191	// values are:
192	//
193	// * Confirmed - The user has responded "Yes" to the confirmation
194	// prompt, confirming that the intent is complete and that it is ready to be
195	// fulfilled.
196	//
197	// * Denied - The user has responded "No" to the confirmation
198	// prompt.
199	//
200	// * None - The user has never been prompted for confirmation; or, the
201	// user was prompted but did not confirm or deny the prompt.
202	ConfirmationStatus ConfirmationStatus
203
204	// The fulfillment state of the intent. The possible values are:
205	//
206	// * Failed - The
207	// Lambda function associated with the intent failed to fulfill the intent.
208	//
209	// *
210	// Fulfilled - The intent has fulfilled by the Lambda function associated with the
211	// intent.
212	//
213	// * ReadyForFulfillment - All of the information necessary for the intent
214	// is present and the intent ready to be fulfilled by the client application.
215	FulfillmentState FulfillmentState
216
217	// The name of the intent.
218	IntentName *string
219
220	// The next slot to elicit from the user. If there is not slot to elicit, the field
221	// is blank.
222	SlotToElicit *string
223
224	// Map of the slots that have been gathered and their values.
225	Slots map[string]string
226}
227
228// An intent that Amazon Lex suggests satisfies the user's intent. Includes the
229// name of the intent, the confidence that Amazon Lex has that the user's intent is
230// satisfied, and the slots defined for the intent.
231type PredictedIntent struct {
232
233	// The name of the intent that Amazon Lex suggests satisfies the user's intent.
234	IntentName *string
235
236	// Indicates how confident Amazon Lex is that an intent satisfies the user's
237	// intent.
238	NluIntentConfidence *IntentConfidence
239
240	// The slot and slot values associated with the predicted intent.
241	Slots map[string]string
242}
243
244// If you configure a response card when creating your bots, Amazon Lex substitutes
245// the session attributes and slot values that are available, and then returns it.
246// The response card can also come from a Lambda function ( dialogCodeHook and
247// fulfillmentActivity on an intent).
248type ResponseCard struct {
249
250	// The content type of the response.
251	ContentType ContentType
252
253	// An array of attachment objects representing options.
254	GenericAttachments []GenericAttachment
255
256	// The version of the response card format.
257	Version *string
258}
259
260// The sentiment expressed in an utterance. When the bot is configured to send
261// utterances to Amazon Comprehend for sentiment analysis, this field structure
262// contains the result of the analysis.
263type SentimentResponse struct {
264
265	// The inferred sentiment that Amazon Comprehend has the highest confidence in.
266	SentimentLabel *string
267
268	// The likelihood that the sentiment was correctly inferred.
269	SentimentScore *string
270}
271