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