1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package lexruntimeservice
4
5import (
6	"fmt"
7	"io"
8
9	"github.com/aws/aws-sdk-go/aws"
10	"github.com/aws/aws-sdk-go/aws/awsutil"
11	"github.com/aws/aws-sdk-go/aws/request"
12	"github.com/aws/aws-sdk-go/aws/signer/v4"
13	"github.com/aws/aws-sdk-go/private/protocol"
14)
15
16const opDeleteSession = "DeleteSession"
17
18// DeleteSessionRequest generates a "aws/request.Request" representing the
19// client's request for the DeleteSession operation. The "output" return
20// value will be populated with the request's response once the request completes
21// successfully.
22//
23// Use "Send" method on the returned Request to send the API call to the service.
24// the "output" return value is not valid until after Send returns without error.
25//
26// See DeleteSession for more information on using the DeleteSession
27// API call, and error handling.
28//
29// This method is useful when you want to inject custom logic or configuration
30// into the SDK's request lifecycle. Such as custom headers, or retry logic.
31//
32//
33//    // Example sending a request using the DeleteSessionRequest method.
34//    req, resp := client.DeleteSessionRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40//
41// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/DeleteSession
42func (c *LexRuntimeService) DeleteSessionRequest(input *DeleteSessionInput) (req *request.Request, output *DeleteSessionOutput) {
43	op := &request.Operation{
44		Name:       opDeleteSession,
45		HTTPMethod: "DELETE",
46		HTTPPath:   "/bot/{botName}/alias/{botAlias}/user/{userId}/session",
47	}
48
49	if input == nil {
50		input = &DeleteSessionInput{}
51	}
52
53	output = &DeleteSessionOutput{}
54	req = c.newRequest(op, input, output)
55	return
56}
57
58// DeleteSession API operation for Amazon Lex Runtime Service.
59//
60// Removes session information for a specified bot, alias, and user ID.
61//
62// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
63// with awserr.Error's Code and Message methods to get detailed information about
64// the error.
65//
66// See the AWS API reference guide for Amazon Lex Runtime Service's
67// API operation DeleteSession for usage and error information.
68//
69// Returned Error Types:
70//   * NotFoundException
71//   The resource (such as the Amazon Lex bot or an alias) that is referred to
72//   is not found.
73//
74//   * BadRequestException
75//   Request validation failed, there is no usable message in the context, or
76//   the bot build failed, is still in progress, or contains unbuilt changes.
77//
78//   * LimitExceededException
79//   Exceeded a limit.
80//
81//   * InternalFailureException
82//   Internal service error. Retry the call.
83//
84//   * ConflictException
85//   Two clients are using the same AWS account, Amazon Lex bot, and user ID.
86//
87// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/DeleteSession
88func (c *LexRuntimeService) DeleteSession(input *DeleteSessionInput) (*DeleteSessionOutput, error) {
89	req, out := c.DeleteSessionRequest(input)
90	return out, req.Send()
91}
92
93// DeleteSessionWithContext is the same as DeleteSession with the addition of
94// the ability to pass a context and additional request options.
95//
96// See DeleteSession for details on how to use this API operation.
97//
98// The context must be non-nil and will be used for request cancellation. If
99// the context is nil a panic will occur. In the future the SDK may create
100// sub-contexts for http.Requests. See https://golang.org/pkg/context/
101// for more information on using Contexts.
102func (c *LexRuntimeService) DeleteSessionWithContext(ctx aws.Context, input *DeleteSessionInput, opts ...request.Option) (*DeleteSessionOutput, error) {
103	req, out := c.DeleteSessionRequest(input)
104	req.SetContext(ctx)
105	req.ApplyOptions(opts...)
106	return out, req.Send()
107}
108
109const opGetSession = "GetSession"
110
111// GetSessionRequest generates a "aws/request.Request" representing the
112// client's request for the GetSession operation. The "output" return
113// value will be populated with the request's response once the request completes
114// successfully.
115//
116// Use "Send" method on the returned Request to send the API call to the service.
117// the "output" return value is not valid until after Send returns without error.
118//
119// See GetSession for more information on using the GetSession
120// API call, and error handling.
121//
122// This method is useful when you want to inject custom logic or configuration
123// into the SDK's request lifecycle. Such as custom headers, or retry logic.
124//
125//
126//    // Example sending a request using the GetSessionRequest method.
127//    req, resp := client.GetSessionRequest(params)
128//
129//    err := req.Send()
130//    if err == nil { // resp is now filled
131//        fmt.Println(resp)
132//    }
133//
134// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSession
135func (c *LexRuntimeService) GetSessionRequest(input *GetSessionInput) (req *request.Request, output *GetSessionOutput) {
136	op := &request.Operation{
137		Name:       opGetSession,
138		HTTPMethod: "GET",
139		HTTPPath:   "/bot/{botName}/alias/{botAlias}/user/{userId}/session/",
140	}
141
142	if input == nil {
143		input = &GetSessionInput{}
144	}
145
146	output = &GetSessionOutput{}
147	req = c.newRequest(op, input, output)
148	return
149}
150
151// GetSession API operation for Amazon Lex Runtime Service.
152//
153// Returns session information for a specified bot, alias, and user ID.
154//
155// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
156// with awserr.Error's Code and Message methods to get detailed information about
157// the error.
158//
159// See the AWS API reference guide for Amazon Lex Runtime Service's
160// API operation GetSession for usage and error information.
161//
162// Returned Error Types:
163//   * NotFoundException
164//   The resource (such as the Amazon Lex bot or an alias) that is referred to
165//   is not found.
166//
167//   * BadRequestException
168//   Request validation failed, there is no usable message in the context, or
169//   the bot build failed, is still in progress, or contains unbuilt changes.
170//
171//   * LimitExceededException
172//   Exceeded a limit.
173//
174//   * InternalFailureException
175//   Internal service error. Retry the call.
176//
177// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GetSession
178func (c *LexRuntimeService) GetSession(input *GetSessionInput) (*GetSessionOutput, error) {
179	req, out := c.GetSessionRequest(input)
180	return out, req.Send()
181}
182
183// GetSessionWithContext is the same as GetSession with the addition of
184// the ability to pass a context and additional request options.
185//
186// See GetSession for details on how to use this API operation.
187//
188// The context must be non-nil and will be used for request cancellation. If
189// the context is nil a panic will occur. In the future the SDK may create
190// sub-contexts for http.Requests. See https://golang.org/pkg/context/
191// for more information on using Contexts.
192func (c *LexRuntimeService) GetSessionWithContext(ctx aws.Context, input *GetSessionInput, opts ...request.Option) (*GetSessionOutput, error) {
193	req, out := c.GetSessionRequest(input)
194	req.SetContext(ctx)
195	req.ApplyOptions(opts...)
196	return out, req.Send()
197}
198
199const opPostContent = "PostContent"
200
201// PostContentRequest generates a "aws/request.Request" representing the
202// client's request for the PostContent operation. The "output" return
203// value will be populated with the request's response once the request completes
204// successfully.
205//
206// Use "Send" method on the returned Request to send the API call to the service.
207// the "output" return value is not valid until after Send returns without error.
208//
209// See PostContent for more information on using the PostContent
210// API call, and error handling.
211//
212// This method is useful when you want to inject custom logic or configuration
213// into the SDK's request lifecycle. Such as custom headers, or retry logic.
214//
215//
216//    // Example sending a request using the PostContentRequest method.
217//    req, resp := client.PostContentRequest(params)
218//
219//    err := req.Send()
220//    if err == nil { // resp is now filled
221//        fmt.Println(resp)
222//    }
223//
224// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContent
225func (c *LexRuntimeService) PostContentRequest(input *PostContentInput) (req *request.Request, output *PostContentOutput) {
226	op := &request.Operation{
227		Name:       opPostContent,
228		HTTPMethod: "POST",
229		HTTPPath:   "/bot/{botName}/alias/{botAlias}/user/{userId}/content",
230	}
231
232	if input == nil {
233		input = &PostContentInput{}
234	}
235
236	output = &PostContentOutput{}
237	req = c.newRequest(op, input, output)
238	req.Handlers.Sign.Remove(v4.SignRequestHandler)
239	handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload)
240	req.Handlers.Sign.PushFrontNamed(handler)
241	return
242}
243
244// PostContent API operation for Amazon Lex Runtime Service.
245//
246// Sends user input (text or speech) to Amazon Lex. Clients use this API to
247// send text and audio requests to Amazon Lex at runtime. Amazon Lex interprets
248// the user input using the machine learning model that it built for the bot.
249//
250// The PostContent operation supports audio input at 8kHz and 16kHz. You can
251// use 8kHz audio to achieve higher speech recognition accuracy in telephone
252// audio applications.
253//
254// In response, Amazon Lex returns the next message to convey to the user. Consider
255// the following example messages:
256//
257//    * For a user input "I would like a pizza," Amazon Lex might return a response
258//    with a message eliciting slot data (for example, PizzaSize): "What size
259//    pizza would you like?".
260//
261//    * After the user provides all of the pizza order information, Amazon Lex
262//    might return a response with a message to get user confirmation: "Order
263//    the pizza?".
264//
265//    * After the user replies "Yes" to the confirmation prompt, Amazon Lex
266//    might return a conclusion statement: "Thank you, your cheese pizza has
267//    been ordered.".
268//
269// Not all Amazon Lex messages require a response from the user. For example,
270// conclusion statements do not require a response. Some messages require only
271// a yes or no response. In addition to the message, Amazon Lex provides additional
272// context about the message in the response that you can use to enhance client
273// behavior, such as displaying the appropriate client user interface. Consider
274// the following examples:
275//
276//    * If the message is to elicit slot data, Amazon Lex returns the following
277//    context information: x-amz-lex-dialog-state header set to ElicitSlot x-amz-lex-intent-name
278//    header set to the intent name in the current context x-amz-lex-slot-to-elicit
279//    header set to the slot name for which the message is eliciting information
280//    x-amz-lex-slots header set to a map of slots configured for the intent
281//    with their current values
282//
283//    * If the message is a confirmation prompt, the x-amz-lex-dialog-state
284//    header is set to Confirmation and the x-amz-lex-slot-to-elicit header
285//    is omitted.
286//
287//    * If the message is a clarification prompt configured for the intent,
288//    indicating that the user intent is not understood, the x-amz-dialog-state
289//    header is set to ElicitIntent and the x-amz-slot-to-elicit header is omitted.
290//
291// In addition, Amazon Lex also returns your application-specific sessionAttributes.
292// For more information, see Managing Conversation Context (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html).
293//
294// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
295// with awserr.Error's Code and Message methods to get detailed information about
296// the error.
297//
298// See the AWS API reference guide for Amazon Lex Runtime Service's
299// API operation PostContent for usage and error information.
300//
301// Returned Error Types:
302//   * NotFoundException
303//   The resource (such as the Amazon Lex bot or an alias) that is referred to
304//   is not found.
305//
306//   * BadRequestException
307//   Request validation failed, there is no usable message in the context, or
308//   the bot build failed, is still in progress, or contains unbuilt changes.
309//
310//   * LimitExceededException
311//   Exceeded a limit.
312//
313//   * InternalFailureException
314//   Internal service error. Retry the call.
315//
316//   * ConflictException
317//   Two clients are using the same AWS account, Amazon Lex bot, and user ID.
318//
319//   * UnsupportedMediaTypeException
320//   The Content-Type header (PostContent API) has an invalid value.
321//
322//   * NotAcceptableException
323//   The accept header in the request does not have a valid value.
324//
325//   * RequestTimeoutException
326//   The input speech is too long.
327//
328//   * DependencyFailedException
329//   One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception.
330//   For example,
331//
332//      * If Amazon Lex does not have sufficient permissions to call a Lambda
333//      function.
334//
335//      * If a Lambda function takes longer than 30 seconds to execute.
336//
337//      * If a fulfillment Lambda function returns a Delegate dialog action without
338//      removing any slot values.
339//
340//   * BadGatewayException
341//   Either the Amazon Lex bot is still building, or one of the dependent services
342//   (Amazon Polly, AWS Lambda) failed with an internal service error.
343//
344//   * LoopDetectedException
345//   This exception is not used.
346//
347// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContent
348func (c *LexRuntimeService) PostContent(input *PostContentInput) (*PostContentOutput, error) {
349	req, out := c.PostContentRequest(input)
350	return out, req.Send()
351}
352
353// PostContentWithContext is the same as PostContent with the addition of
354// the ability to pass a context and additional request options.
355//
356// See PostContent for details on how to use this API operation.
357//
358// The context must be non-nil and will be used for request cancellation. If
359// the context is nil a panic will occur. In the future the SDK may create
360// sub-contexts for http.Requests. See https://golang.org/pkg/context/
361// for more information on using Contexts.
362func (c *LexRuntimeService) PostContentWithContext(ctx aws.Context, input *PostContentInput, opts ...request.Option) (*PostContentOutput, error) {
363	req, out := c.PostContentRequest(input)
364	req.SetContext(ctx)
365	req.ApplyOptions(opts...)
366	return out, req.Send()
367}
368
369const opPostText = "PostText"
370
371// PostTextRequest generates a "aws/request.Request" representing the
372// client's request for the PostText operation. The "output" return
373// value will be populated with the request's response once the request completes
374// successfully.
375//
376// Use "Send" method on the returned Request to send the API call to the service.
377// the "output" return value is not valid until after Send returns without error.
378//
379// See PostText for more information on using the PostText
380// API call, and error handling.
381//
382// This method is useful when you want to inject custom logic or configuration
383// into the SDK's request lifecycle. Such as custom headers, or retry logic.
384//
385//
386//    // Example sending a request using the PostTextRequest method.
387//    req, resp := client.PostTextRequest(params)
388//
389//    err := req.Send()
390//    if err == nil { // resp is now filled
391//        fmt.Println(resp)
392//    }
393//
394// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostText
395func (c *LexRuntimeService) PostTextRequest(input *PostTextInput) (req *request.Request, output *PostTextOutput) {
396	op := &request.Operation{
397		Name:       opPostText,
398		HTTPMethod: "POST",
399		HTTPPath:   "/bot/{botName}/alias/{botAlias}/user/{userId}/text",
400	}
401
402	if input == nil {
403		input = &PostTextInput{}
404	}
405
406	output = &PostTextOutput{}
407	req = c.newRequest(op, input, output)
408	return
409}
410
411// PostText API operation for Amazon Lex Runtime Service.
412//
413// Sends user input to Amazon Lex. Client applications can use this API to send
414// requests to Amazon Lex at runtime. Amazon Lex then interprets the user input
415// using the machine learning model it built for the bot.
416//
417// In response, Amazon Lex returns the next message to convey to the user an
418// optional responseCard to display. Consider the following example messages:
419//
420//    * For a user input "I would like a pizza", Amazon Lex might return a response
421//    with a message eliciting slot data (for example, PizzaSize): "What size
422//    pizza would you like?"
423//
424//    * After the user provides all of the pizza order information, Amazon Lex
425//    might return a response with a message to obtain user confirmation "Proceed
426//    with the pizza order?".
427//
428//    * After the user replies to a confirmation prompt with a "yes", Amazon
429//    Lex might return a conclusion statement: "Thank you, your cheese pizza
430//    has been ordered.".
431//
432// Not all Amazon Lex messages require a user response. For example, a conclusion
433// statement does not require a response. Some messages require only a "yes"
434// or "no" user response. In addition to the message, Amazon Lex provides additional
435// context about the message in the response that you might use to enhance client
436// behavior, for example, to display the appropriate client user interface.
437// These are the slotToElicit, dialogState, intentName, and slots fields in
438// the response. Consider the following examples:
439//
440//    * If the message is to elicit slot data, Amazon Lex returns the following
441//    context information: dialogState set to ElicitSlot intentName set to the
442//    intent name in the current context slotToElicit set to the slot name for
443//    which the message is eliciting information slots set to a map of slots,
444//    configured for the intent, with currently known values
445//
446//    * If the message is a confirmation prompt, the dialogState is set to ConfirmIntent
447//    and SlotToElicit is set to null.
448//
449//    * If the message is a clarification prompt (configured for the intent)
450//    that indicates that user intent is not understood, the dialogState is
451//    set to ElicitIntent and slotToElicit is set to null.
452//
453// In addition, Amazon Lex also returns your application-specific sessionAttributes.
454// For more information, see Managing Conversation Context (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html).
455//
456// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
457// with awserr.Error's Code and Message methods to get detailed information about
458// the error.
459//
460// See the AWS API reference guide for Amazon Lex Runtime Service's
461// API operation PostText for usage and error information.
462//
463// Returned Error Types:
464//   * NotFoundException
465//   The resource (such as the Amazon Lex bot or an alias) that is referred to
466//   is not found.
467//
468//   * BadRequestException
469//   Request validation failed, there is no usable message in the context, or
470//   the bot build failed, is still in progress, or contains unbuilt changes.
471//
472//   * LimitExceededException
473//   Exceeded a limit.
474//
475//   * InternalFailureException
476//   Internal service error. Retry the call.
477//
478//   * ConflictException
479//   Two clients are using the same AWS account, Amazon Lex bot, and user ID.
480//
481//   * DependencyFailedException
482//   One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception.
483//   For example,
484//
485//      * If Amazon Lex does not have sufficient permissions to call a Lambda
486//      function.
487//
488//      * If a Lambda function takes longer than 30 seconds to execute.
489//
490//      * If a fulfillment Lambda function returns a Delegate dialog action without
491//      removing any slot values.
492//
493//   * BadGatewayException
494//   Either the Amazon Lex bot is still building, or one of the dependent services
495//   (Amazon Polly, AWS Lambda) failed with an internal service error.
496//
497//   * LoopDetectedException
498//   This exception is not used.
499//
500// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostText
501func (c *LexRuntimeService) PostText(input *PostTextInput) (*PostTextOutput, error) {
502	req, out := c.PostTextRequest(input)
503	return out, req.Send()
504}
505
506// PostTextWithContext is the same as PostText with the addition of
507// the ability to pass a context and additional request options.
508//
509// See PostText for details on how to use this API operation.
510//
511// The context must be non-nil and will be used for request cancellation. If
512// the context is nil a panic will occur. In the future the SDK may create
513// sub-contexts for http.Requests. See https://golang.org/pkg/context/
514// for more information on using Contexts.
515func (c *LexRuntimeService) PostTextWithContext(ctx aws.Context, input *PostTextInput, opts ...request.Option) (*PostTextOutput, error) {
516	req, out := c.PostTextRequest(input)
517	req.SetContext(ctx)
518	req.ApplyOptions(opts...)
519	return out, req.Send()
520}
521
522const opPutSession = "PutSession"
523
524// PutSessionRequest generates a "aws/request.Request" representing the
525// client's request for the PutSession operation. The "output" return
526// value will be populated with the request's response once the request completes
527// successfully.
528//
529// Use "Send" method on the returned Request to send the API call to the service.
530// the "output" return value is not valid until after Send returns without error.
531//
532// See PutSession for more information on using the PutSession
533// API call, and error handling.
534//
535// This method is useful when you want to inject custom logic or configuration
536// into the SDK's request lifecycle. Such as custom headers, or retry logic.
537//
538//
539//    // Example sending a request using the PutSessionRequest method.
540//    req, resp := client.PutSessionRequest(params)
541//
542//    err := req.Send()
543//    if err == nil { // resp is now filled
544//        fmt.Println(resp)
545//    }
546//
547// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSession
548func (c *LexRuntimeService) PutSessionRequest(input *PutSessionInput) (req *request.Request, output *PutSessionOutput) {
549	op := &request.Operation{
550		Name:       opPutSession,
551		HTTPMethod: "POST",
552		HTTPPath:   "/bot/{botName}/alias/{botAlias}/user/{userId}/session",
553	}
554
555	if input == nil {
556		input = &PutSessionInput{}
557	}
558
559	output = &PutSessionOutput{}
560	req = c.newRequest(op, input, output)
561	return
562}
563
564// PutSession API operation for Amazon Lex Runtime Service.
565//
566// Creates a new session or modifies an existing session with an Amazon Lex
567// bot. Use this operation to enable your application to set the state of the
568// bot.
569//
570// For more information, see Managing Sessions (https://docs.aws.amazon.com/lex/latest/dg/how-session-api.html).
571//
572// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
573// with awserr.Error's Code and Message methods to get detailed information about
574// the error.
575//
576// See the AWS API reference guide for Amazon Lex Runtime Service's
577// API operation PutSession for usage and error information.
578//
579// Returned Error Types:
580//   * NotFoundException
581//   The resource (such as the Amazon Lex bot or an alias) that is referred to
582//   is not found.
583//
584//   * BadRequestException
585//   Request validation failed, there is no usable message in the context, or
586//   the bot build failed, is still in progress, or contains unbuilt changes.
587//
588//   * LimitExceededException
589//   Exceeded a limit.
590//
591//   * InternalFailureException
592//   Internal service error. Retry the call.
593//
594//   * ConflictException
595//   Two clients are using the same AWS account, Amazon Lex bot, and user ID.
596//
597//   * NotAcceptableException
598//   The accept header in the request does not have a valid value.
599//
600//   * DependencyFailedException
601//   One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception.
602//   For example,
603//
604//      * If Amazon Lex does not have sufficient permissions to call a Lambda
605//      function.
606//
607//      * If a Lambda function takes longer than 30 seconds to execute.
608//
609//      * If a fulfillment Lambda function returns a Delegate dialog action without
610//      removing any slot values.
611//
612//   * BadGatewayException
613//   Either the Amazon Lex bot is still building, or one of the dependent services
614//   (Amazon Polly, AWS Lambda) failed with an internal service error.
615//
616// See also, https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PutSession
617func (c *LexRuntimeService) PutSession(input *PutSessionInput) (*PutSessionOutput, error) {
618	req, out := c.PutSessionRequest(input)
619	return out, req.Send()
620}
621
622// PutSessionWithContext is the same as PutSession with the addition of
623// the ability to pass a context and additional request options.
624//
625// See PutSession for details on how to use this API operation.
626//
627// The context must be non-nil and will be used for request cancellation. If
628// the context is nil a panic will occur. In the future the SDK may create
629// sub-contexts for http.Requests. See https://golang.org/pkg/context/
630// for more information on using Contexts.
631func (c *LexRuntimeService) PutSessionWithContext(ctx aws.Context, input *PutSessionInput, opts ...request.Option) (*PutSessionOutput, error) {
632	req, out := c.PutSessionRequest(input)
633	req.SetContext(ctx)
634	req.ApplyOptions(opts...)
635	return out, req.Send()
636}
637
638// A context is a variable that contains information about the current state
639// of the conversation between a user and Amazon Lex. Context can be set automatically
640// by Amazon Lex when an intent is fulfilled, or it can be set at runtime using
641// the PutContent, PutText, or PutSession operation.
642type ActiveContext struct {
643	_ struct{} `type:"structure"`
644
645	// The name of the context.
646	//
647	// Name is a required field
648	Name *string `locationName:"name" min:"1" type:"string" required:"true"`
649
650	// State variables for the current context. You can use these values as default
651	// values for slots in subsequent events.
652	//
653	// Parameters is a required field
654	Parameters map[string]*string `locationName:"parameters" type:"map" required:"true"`
655
656	// The length of time or number of turns that a context remains active.
657	//
658	// TimeToLive is a required field
659	TimeToLive *ActiveContextTimeToLive `locationName:"timeToLive" type:"structure" required:"true"`
660}
661
662// String returns the string representation
663func (s ActiveContext) String() string {
664	return awsutil.Prettify(s)
665}
666
667// GoString returns the string representation
668func (s ActiveContext) GoString() string {
669	return s.String()
670}
671
672// Validate inspects the fields of the type to determine if they are valid.
673func (s *ActiveContext) Validate() error {
674	invalidParams := request.ErrInvalidParams{Context: "ActiveContext"}
675	if s.Name == nil {
676		invalidParams.Add(request.NewErrParamRequired("Name"))
677	}
678	if s.Name != nil && len(*s.Name) < 1 {
679		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
680	}
681	if s.Parameters == nil {
682		invalidParams.Add(request.NewErrParamRequired("Parameters"))
683	}
684	if s.TimeToLive == nil {
685		invalidParams.Add(request.NewErrParamRequired("TimeToLive"))
686	}
687	if s.TimeToLive != nil {
688		if err := s.TimeToLive.Validate(); err != nil {
689			invalidParams.AddNested("TimeToLive", err.(request.ErrInvalidParams))
690		}
691	}
692
693	if invalidParams.Len() > 0 {
694		return invalidParams
695	}
696	return nil
697}
698
699// SetName sets the Name field's value.
700func (s *ActiveContext) SetName(v string) *ActiveContext {
701	s.Name = &v
702	return s
703}
704
705// SetParameters sets the Parameters field's value.
706func (s *ActiveContext) SetParameters(v map[string]*string) *ActiveContext {
707	s.Parameters = v
708	return s
709}
710
711// SetTimeToLive sets the TimeToLive field's value.
712func (s *ActiveContext) SetTimeToLive(v *ActiveContextTimeToLive) *ActiveContext {
713	s.TimeToLive = v
714	return s
715}
716
717// The length of time or number of turns that a context remains active.
718type ActiveContextTimeToLive struct {
719	_ struct{} `type:"structure"`
720
721	// The number of seconds that the context should be active after it is first
722	// sent in a PostContent or PostText response. You can set the value between
723	// 5 and 86,400 seconds (24 hours).
724	TimeToLiveInSeconds *int64 `locationName:"timeToLiveInSeconds" min:"5" type:"integer"`
725
726	// The number of conversation turns that the context should be active. A conversation
727	// turn is one PostContent or PostText request and the corresponding response
728	// from Amazon Lex.
729	TurnsToLive *int64 `locationName:"turnsToLive" min:"1" type:"integer"`
730}
731
732// String returns the string representation
733func (s ActiveContextTimeToLive) String() string {
734	return awsutil.Prettify(s)
735}
736
737// GoString returns the string representation
738func (s ActiveContextTimeToLive) GoString() string {
739	return s.String()
740}
741
742// Validate inspects the fields of the type to determine if they are valid.
743func (s *ActiveContextTimeToLive) Validate() error {
744	invalidParams := request.ErrInvalidParams{Context: "ActiveContextTimeToLive"}
745	if s.TimeToLiveInSeconds != nil && *s.TimeToLiveInSeconds < 5 {
746		invalidParams.Add(request.NewErrParamMinValue("TimeToLiveInSeconds", 5))
747	}
748	if s.TurnsToLive != nil && *s.TurnsToLive < 1 {
749		invalidParams.Add(request.NewErrParamMinValue("TurnsToLive", 1))
750	}
751
752	if invalidParams.Len() > 0 {
753		return invalidParams
754	}
755	return nil
756}
757
758// SetTimeToLiveInSeconds sets the TimeToLiveInSeconds field's value.
759func (s *ActiveContextTimeToLive) SetTimeToLiveInSeconds(v int64) *ActiveContextTimeToLive {
760	s.TimeToLiveInSeconds = &v
761	return s
762}
763
764// SetTurnsToLive sets the TurnsToLive field's value.
765func (s *ActiveContextTimeToLive) SetTurnsToLive(v int64) *ActiveContextTimeToLive {
766	s.TurnsToLive = &v
767	return s
768}
769
770// Either the Amazon Lex bot is still building, or one of the dependent services
771// (Amazon Polly, AWS Lambda) failed with an internal service error.
772type BadGatewayException struct {
773	_            struct{}                  `type:"structure"`
774	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
775
776	Message_ *string `locationName:"Message" type:"string"`
777}
778
779// String returns the string representation
780func (s BadGatewayException) String() string {
781	return awsutil.Prettify(s)
782}
783
784// GoString returns the string representation
785func (s BadGatewayException) GoString() string {
786	return s.String()
787}
788
789func newErrorBadGatewayException(v protocol.ResponseMetadata) error {
790	return &BadGatewayException{
791		RespMetadata: v,
792	}
793}
794
795// Code returns the exception type name.
796func (s *BadGatewayException) Code() string {
797	return "BadGatewayException"
798}
799
800// Message returns the exception's message.
801func (s *BadGatewayException) Message() string {
802	if s.Message_ != nil {
803		return *s.Message_
804	}
805	return ""
806}
807
808// OrigErr always returns nil, satisfies awserr.Error interface.
809func (s *BadGatewayException) OrigErr() error {
810	return nil
811}
812
813func (s *BadGatewayException) Error() string {
814	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
815}
816
817// Status code returns the HTTP status code for the request's response error.
818func (s *BadGatewayException) StatusCode() int {
819	return s.RespMetadata.StatusCode
820}
821
822// RequestID returns the service's response RequestID for request.
823func (s *BadGatewayException) RequestID() string {
824	return s.RespMetadata.RequestID
825}
826
827// Request validation failed, there is no usable message in the context, or
828// the bot build failed, is still in progress, or contains unbuilt changes.
829type BadRequestException struct {
830	_            struct{}                  `type:"structure"`
831	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
832
833	Message_ *string `locationName:"message" type:"string"`
834}
835
836// String returns the string representation
837func (s BadRequestException) String() string {
838	return awsutil.Prettify(s)
839}
840
841// GoString returns the string representation
842func (s BadRequestException) GoString() string {
843	return s.String()
844}
845
846func newErrorBadRequestException(v protocol.ResponseMetadata) error {
847	return &BadRequestException{
848		RespMetadata: v,
849	}
850}
851
852// Code returns the exception type name.
853func (s *BadRequestException) Code() string {
854	return "BadRequestException"
855}
856
857// Message returns the exception's message.
858func (s *BadRequestException) Message() string {
859	if s.Message_ != nil {
860		return *s.Message_
861	}
862	return ""
863}
864
865// OrigErr always returns nil, satisfies awserr.Error interface.
866func (s *BadRequestException) OrigErr() error {
867	return nil
868}
869
870func (s *BadRequestException) Error() string {
871	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
872}
873
874// Status code returns the HTTP status code for the request's response error.
875func (s *BadRequestException) StatusCode() int {
876	return s.RespMetadata.StatusCode
877}
878
879// RequestID returns the service's response RequestID for request.
880func (s *BadRequestException) RequestID() string {
881	return s.RespMetadata.RequestID
882}
883
884// Represents an option to be shown on the client platform (Facebook, Slack,
885// etc.)
886type Button struct {
887	_ struct{} `type:"structure"`
888
889	// Text that is visible to the user on the button.
890	//
891	// Text is a required field
892	Text *string `locationName:"text" min:"1" type:"string" required:"true"`
893
894	// The value sent to Amazon Lex when a user chooses the button. For example,
895	// consider button text "NYC." When the user chooses the button, the value sent
896	// can be "New York City."
897	//
898	// Value is a required field
899	Value *string `locationName:"value" min:"1" type:"string" required:"true"`
900}
901
902// String returns the string representation
903func (s Button) String() string {
904	return awsutil.Prettify(s)
905}
906
907// GoString returns the string representation
908func (s Button) GoString() string {
909	return s.String()
910}
911
912// SetText sets the Text field's value.
913func (s *Button) SetText(v string) *Button {
914	s.Text = &v
915	return s
916}
917
918// SetValue sets the Value field's value.
919func (s *Button) SetValue(v string) *Button {
920	s.Value = &v
921	return s
922}
923
924// Two clients are using the same AWS account, Amazon Lex bot, and user ID.
925type ConflictException struct {
926	_            struct{}                  `type:"structure"`
927	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
928
929	Message_ *string `locationName:"message" type:"string"`
930}
931
932// String returns the string representation
933func (s ConflictException) String() string {
934	return awsutil.Prettify(s)
935}
936
937// GoString returns the string representation
938func (s ConflictException) GoString() string {
939	return s.String()
940}
941
942func newErrorConflictException(v protocol.ResponseMetadata) error {
943	return &ConflictException{
944		RespMetadata: v,
945	}
946}
947
948// Code returns the exception type name.
949func (s *ConflictException) Code() string {
950	return "ConflictException"
951}
952
953// Message returns the exception's message.
954func (s *ConflictException) Message() string {
955	if s.Message_ != nil {
956		return *s.Message_
957	}
958	return ""
959}
960
961// OrigErr always returns nil, satisfies awserr.Error interface.
962func (s *ConflictException) OrigErr() error {
963	return nil
964}
965
966func (s *ConflictException) Error() string {
967	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
968}
969
970// Status code returns the HTTP status code for the request's response error.
971func (s *ConflictException) StatusCode() int {
972	return s.RespMetadata.StatusCode
973}
974
975// RequestID returns the service's response RequestID for request.
976func (s *ConflictException) RequestID() string {
977	return s.RespMetadata.RequestID
978}
979
980type DeleteSessionInput struct {
981	_ struct{} `type:"structure"`
982
983	// The alias in use for the bot that contains the session data.
984	//
985	// BotAlias is a required field
986	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
987
988	// The name of the bot that contains the session data.
989	//
990	// BotName is a required field
991	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
992
993	// The identifier of the user associated with the session data.
994	//
995	// UserId is a required field
996	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
997}
998
999// String returns the string representation
1000func (s DeleteSessionInput) String() string {
1001	return awsutil.Prettify(s)
1002}
1003
1004// GoString returns the string representation
1005func (s DeleteSessionInput) GoString() string {
1006	return s.String()
1007}
1008
1009// Validate inspects the fields of the type to determine if they are valid.
1010func (s *DeleteSessionInput) Validate() error {
1011	invalidParams := request.ErrInvalidParams{Context: "DeleteSessionInput"}
1012	if s.BotAlias == nil {
1013		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
1014	}
1015	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
1016		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
1017	}
1018	if s.BotName == nil {
1019		invalidParams.Add(request.NewErrParamRequired("BotName"))
1020	}
1021	if s.BotName != nil && len(*s.BotName) < 1 {
1022		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
1023	}
1024	if s.UserId == nil {
1025		invalidParams.Add(request.NewErrParamRequired("UserId"))
1026	}
1027	if s.UserId != nil && len(*s.UserId) < 2 {
1028		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
1029	}
1030
1031	if invalidParams.Len() > 0 {
1032		return invalidParams
1033	}
1034	return nil
1035}
1036
1037// SetBotAlias sets the BotAlias field's value.
1038func (s *DeleteSessionInput) SetBotAlias(v string) *DeleteSessionInput {
1039	s.BotAlias = &v
1040	return s
1041}
1042
1043// SetBotName sets the BotName field's value.
1044func (s *DeleteSessionInput) SetBotName(v string) *DeleteSessionInput {
1045	s.BotName = &v
1046	return s
1047}
1048
1049// SetUserId sets the UserId field's value.
1050func (s *DeleteSessionInput) SetUserId(v string) *DeleteSessionInput {
1051	s.UserId = &v
1052	return s
1053}
1054
1055type DeleteSessionOutput struct {
1056	_ struct{} `type:"structure"`
1057
1058	// The alias in use for the bot associated with the session data.
1059	BotAlias *string `locationName:"botAlias" type:"string"`
1060
1061	// The name of the bot associated with the session data.
1062	BotName *string `locationName:"botName" type:"string"`
1063
1064	// The unique identifier for the session.
1065	SessionId *string `locationName:"sessionId" type:"string"`
1066
1067	// The ID of the client application user.
1068	UserId *string `locationName:"userId" min:"2" type:"string"`
1069}
1070
1071// String returns the string representation
1072func (s DeleteSessionOutput) String() string {
1073	return awsutil.Prettify(s)
1074}
1075
1076// GoString returns the string representation
1077func (s DeleteSessionOutput) GoString() string {
1078	return s.String()
1079}
1080
1081// SetBotAlias sets the BotAlias field's value.
1082func (s *DeleteSessionOutput) SetBotAlias(v string) *DeleteSessionOutput {
1083	s.BotAlias = &v
1084	return s
1085}
1086
1087// SetBotName sets the BotName field's value.
1088func (s *DeleteSessionOutput) SetBotName(v string) *DeleteSessionOutput {
1089	s.BotName = &v
1090	return s
1091}
1092
1093// SetSessionId sets the SessionId field's value.
1094func (s *DeleteSessionOutput) SetSessionId(v string) *DeleteSessionOutput {
1095	s.SessionId = &v
1096	return s
1097}
1098
1099// SetUserId sets the UserId field's value.
1100func (s *DeleteSessionOutput) SetUserId(v string) *DeleteSessionOutput {
1101	s.UserId = &v
1102	return s
1103}
1104
1105// One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception.
1106// For example,
1107//
1108//    * If Amazon Lex does not have sufficient permissions to call a Lambda
1109//    function.
1110//
1111//    * If a Lambda function takes longer than 30 seconds to execute.
1112//
1113//    * If a fulfillment Lambda function returns a Delegate dialog action without
1114//    removing any slot values.
1115type DependencyFailedException struct {
1116	_            struct{}                  `type:"structure"`
1117	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1118
1119	Message_ *string `locationName:"Message" type:"string"`
1120}
1121
1122// String returns the string representation
1123func (s DependencyFailedException) String() string {
1124	return awsutil.Prettify(s)
1125}
1126
1127// GoString returns the string representation
1128func (s DependencyFailedException) GoString() string {
1129	return s.String()
1130}
1131
1132func newErrorDependencyFailedException(v protocol.ResponseMetadata) error {
1133	return &DependencyFailedException{
1134		RespMetadata: v,
1135	}
1136}
1137
1138// Code returns the exception type name.
1139func (s *DependencyFailedException) Code() string {
1140	return "DependencyFailedException"
1141}
1142
1143// Message returns the exception's message.
1144func (s *DependencyFailedException) Message() string {
1145	if s.Message_ != nil {
1146		return *s.Message_
1147	}
1148	return ""
1149}
1150
1151// OrigErr always returns nil, satisfies awserr.Error interface.
1152func (s *DependencyFailedException) OrigErr() error {
1153	return nil
1154}
1155
1156func (s *DependencyFailedException) Error() string {
1157	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1158}
1159
1160// Status code returns the HTTP status code for the request's response error.
1161func (s *DependencyFailedException) StatusCode() int {
1162	return s.RespMetadata.StatusCode
1163}
1164
1165// RequestID returns the service's response RequestID for request.
1166func (s *DependencyFailedException) RequestID() string {
1167	return s.RespMetadata.RequestID
1168}
1169
1170// Describes the next action that the bot should take in its interaction with
1171// the user and provides information about the context in which the action takes
1172// place. Use the DialogAction data type to set the interaction to a specific
1173// state, or to return the interaction to a previous state.
1174type DialogAction struct {
1175	_ struct{} `type:"structure"`
1176
1177	// The fulfillment state of the intent. The possible values are:
1178	//
1179	//    * Failed - The Lambda function associated with the intent failed to fulfill
1180	//    the intent.
1181	//
1182	//    * Fulfilled - The intent has fulfilled by the Lambda function associated
1183	//    with the intent.
1184	//
1185	//    * ReadyForFulfillment - All of the information necessary for the intent
1186	//    is present and the intent ready to be fulfilled by the client application.
1187	FulfillmentState *string `locationName:"fulfillmentState" type:"string" enum:"FulfillmentState"`
1188
1189	// The name of the intent.
1190	IntentName *string `locationName:"intentName" type:"string"`
1191
1192	// The message that should be shown to the user. If you don't specify a message,
1193	// Amazon Lex will use the message configured for the intent.
1194	Message *string `locationName:"message" min:"1" type:"string" sensitive:"true"`
1195
1196	//    * PlainText - The message contains plain UTF-8 text.
1197	//
1198	//    * CustomPayload - The message is a custom format for the client.
1199	//
1200	//    * SSML - The message contains text formatted for voice output.
1201	//
1202	//    * Composite - The message contains an escaped JSON object containing one
1203	//    or more messages. For more information, see Message Groups (https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html).
1204	MessageFormat *string `locationName:"messageFormat" type:"string" enum:"MessageFormatType"`
1205
1206	// The name of the slot that should be elicited from the user.
1207	SlotToElicit *string `locationName:"slotToElicit" type:"string"`
1208
1209	// Map of the slots that have been gathered and their values.
1210	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
1211
1212	// The next action that the bot should take in its interaction with the user.
1213	// The possible values are:
1214	//
1215	//    * ConfirmIntent - The next action is asking the user if the intent is
1216	//    complete and ready to be fulfilled. This is a yes/no question such as
1217	//    "Place the order?"
1218	//
1219	//    * Close - Indicates that the there will not be a response from the user.
1220	//    For example, the statement "Your order has been placed" does not require
1221	//    a response.
1222	//
1223	//    * Delegate - The next action is determined by Amazon Lex.
1224	//
1225	//    * ElicitIntent - The next action is to determine the intent that the user
1226	//    wants to fulfill.
1227	//
1228	//    * ElicitSlot - The next action is to elicit a slot value from the user.
1229	//
1230	// Type is a required field
1231	Type *string `locationName:"type" type:"string" required:"true" enum:"DialogActionType"`
1232}
1233
1234// String returns the string representation
1235func (s DialogAction) String() string {
1236	return awsutil.Prettify(s)
1237}
1238
1239// GoString returns the string representation
1240func (s DialogAction) GoString() string {
1241	return s.String()
1242}
1243
1244// Validate inspects the fields of the type to determine if they are valid.
1245func (s *DialogAction) Validate() error {
1246	invalidParams := request.ErrInvalidParams{Context: "DialogAction"}
1247	if s.Message != nil && len(*s.Message) < 1 {
1248		invalidParams.Add(request.NewErrParamMinLen("Message", 1))
1249	}
1250	if s.Type == nil {
1251		invalidParams.Add(request.NewErrParamRequired("Type"))
1252	}
1253
1254	if invalidParams.Len() > 0 {
1255		return invalidParams
1256	}
1257	return nil
1258}
1259
1260// SetFulfillmentState sets the FulfillmentState field's value.
1261func (s *DialogAction) SetFulfillmentState(v string) *DialogAction {
1262	s.FulfillmentState = &v
1263	return s
1264}
1265
1266// SetIntentName sets the IntentName field's value.
1267func (s *DialogAction) SetIntentName(v string) *DialogAction {
1268	s.IntentName = &v
1269	return s
1270}
1271
1272// SetMessage sets the Message field's value.
1273func (s *DialogAction) SetMessage(v string) *DialogAction {
1274	s.Message = &v
1275	return s
1276}
1277
1278// SetMessageFormat sets the MessageFormat field's value.
1279func (s *DialogAction) SetMessageFormat(v string) *DialogAction {
1280	s.MessageFormat = &v
1281	return s
1282}
1283
1284// SetSlotToElicit sets the SlotToElicit field's value.
1285func (s *DialogAction) SetSlotToElicit(v string) *DialogAction {
1286	s.SlotToElicit = &v
1287	return s
1288}
1289
1290// SetSlots sets the Slots field's value.
1291func (s *DialogAction) SetSlots(v map[string]*string) *DialogAction {
1292	s.Slots = v
1293	return s
1294}
1295
1296// SetType sets the Type field's value.
1297func (s *DialogAction) SetType(v string) *DialogAction {
1298	s.Type = &v
1299	return s
1300}
1301
1302// Represents an option rendered to the user when a prompt is shown. It could
1303// be an image, a button, a link, or text.
1304type GenericAttachment struct {
1305	_ struct{} `type:"structure"`
1306
1307	// The URL of an attachment to the response card.
1308	AttachmentLinkUrl *string `locationName:"attachmentLinkUrl" min:"1" type:"string"`
1309
1310	// The list of options to show to the user.
1311	Buttons []*Button `locationName:"buttons" type:"list"`
1312
1313	// The URL of an image that is displayed to the user.
1314	ImageUrl *string `locationName:"imageUrl" min:"1" type:"string"`
1315
1316	// The subtitle shown below the title.
1317	SubTitle *string `locationName:"subTitle" min:"1" type:"string"`
1318
1319	// The title of the option.
1320	Title *string `locationName:"title" min:"1" type:"string"`
1321}
1322
1323// String returns the string representation
1324func (s GenericAttachment) String() string {
1325	return awsutil.Prettify(s)
1326}
1327
1328// GoString returns the string representation
1329func (s GenericAttachment) GoString() string {
1330	return s.String()
1331}
1332
1333// SetAttachmentLinkUrl sets the AttachmentLinkUrl field's value.
1334func (s *GenericAttachment) SetAttachmentLinkUrl(v string) *GenericAttachment {
1335	s.AttachmentLinkUrl = &v
1336	return s
1337}
1338
1339// SetButtons sets the Buttons field's value.
1340func (s *GenericAttachment) SetButtons(v []*Button) *GenericAttachment {
1341	s.Buttons = v
1342	return s
1343}
1344
1345// SetImageUrl sets the ImageUrl field's value.
1346func (s *GenericAttachment) SetImageUrl(v string) *GenericAttachment {
1347	s.ImageUrl = &v
1348	return s
1349}
1350
1351// SetSubTitle sets the SubTitle field's value.
1352func (s *GenericAttachment) SetSubTitle(v string) *GenericAttachment {
1353	s.SubTitle = &v
1354	return s
1355}
1356
1357// SetTitle sets the Title field's value.
1358func (s *GenericAttachment) SetTitle(v string) *GenericAttachment {
1359	s.Title = &v
1360	return s
1361}
1362
1363type GetSessionInput struct {
1364	_ struct{} `type:"structure"`
1365
1366	// The alias in use for the bot that contains the session data.
1367	//
1368	// BotAlias is a required field
1369	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
1370
1371	// The name of the bot that contains the session data.
1372	//
1373	// BotName is a required field
1374	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
1375
1376	// A string used to filter the intents returned in the recentIntentSummaryView
1377	// structure.
1378	//
1379	// When you specify a filter, only intents with their checkpointLabel field
1380	// set to that string are returned.
1381	CheckpointLabelFilter *string `location:"querystring" locationName:"checkpointLabelFilter" min:"1" type:"string"`
1382
1383	// The ID of the client application user. Amazon Lex uses this to identify a
1384	// user's conversation with your bot.
1385	//
1386	// UserId is a required field
1387	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
1388}
1389
1390// String returns the string representation
1391func (s GetSessionInput) String() string {
1392	return awsutil.Prettify(s)
1393}
1394
1395// GoString returns the string representation
1396func (s GetSessionInput) GoString() string {
1397	return s.String()
1398}
1399
1400// Validate inspects the fields of the type to determine if they are valid.
1401func (s *GetSessionInput) Validate() error {
1402	invalidParams := request.ErrInvalidParams{Context: "GetSessionInput"}
1403	if s.BotAlias == nil {
1404		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
1405	}
1406	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
1407		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
1408	}
1409	if s.BotName == nil {
1410		invalidParams.Add(request.NewErrParamRequired("BotName"))
1411	}
1412	if s.BotName != nil && len(*s.BotName) < 1 {
1413		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
1414	}
1415	if s.CheckpointLabelFilter != nil && len(*s.CheckpointLabelFilter) < 1 {
1416		invalidParams.Add(request.NewErrParamMinLen("CheckpointLabelFilter", 1))
1417	}
1418	if s.UserId == nil {
1419		invalidParams.Add(request.NewErrParamRequired("UserId"))
1420	}
1421	if s.UserId != nil && len(*s.UserId) < 2 {
1422		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
1423	}
1424
1425	if invalidParams.Len() > 0 {
1426		return invalidParams
1427	}
1428	return nil
1429}
1430
1431// SetBotAlias sets the BotAlias field's value.
1432func (s *GetSessionInput) SetBotAlias(v string) *GetSessionInput {
1433	s.BotAlias = &v
1434	return s
1435}
1436
1437// SetBotName sets the BotName field's value.
1438func (s *GetSessionInput) SetBotName(v string) *GetSessionInput {
1439	s.BotName = &v
1440	return s
1441}
1442
1443// SetCheckpointLabelFilter sets the CheckpointLabelFilter field's value.
1444func (s *GetSessionInput) SetCheckpointLabelFilter(v string) *GetSessionInput {
1445	s.CheckpointLabelFilter = &v
1446	return s
1447}
1448
1449// SetUserId sets the UserId field's value.
1450func (s *GetSessionInput) SetUserId(v string) *GetSessionInput {
1451	s.UserId = &v
1452	return s
1453}
1454
1455type GetSessionOutput struct {
1456	_ struct{} `type:"structure"`
1457
1458	// A list of active contexts for the session. A context can be set when an intent
1459	// is fulfilled or by calling the PostContent, PostText, or PutSession operation.
1460	//
1461	// You can use a context to control the intents that can follow up an intent,
1462	// or to modify the operation of your application.
1463	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
1464
1465	// Describes the current state of the bot.
1466	DialogAction *DialogAction `locationName:"dialogAction" type:"structure"`
1467
1468	// An array of information about the intents used in the session. The array
1469	// can contain a maximum of three summaries. If more than three intents are
1470	// used in the session, the recentIntentSummaryView operation contains information
1471	// about the last three intents used.
1472	//
1473	// If you set the checkpointLabelFilter parameter in the request, the array
1474	// contains only the intents with the specified label.
1475	RecentIntentSummaryView []*IntentSummary `locationName:"recentIntentSummaryView" type:"list"`
1476
1477	// Map of key/value pairs representing the session-specific context information.
1478	// It contains application information passed between Amazon Lex and a client
1479	// application.
1480	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
1481
1482	// A unique identifier for the session.
1483	SessionId *string `locationName:"sessionId" type:"string"`
1484}
1485
1486// String returns the string representation
1487func (s GetSessionOutput) String() string {
1488	return awsutil.Prettify(s)
1489}
1490
1491// GoString returns the string representation
1492func (s GetSessionOutput) GoString() string {
1493	return s.String()
1494}
1495
1496// SetActiveContexts sets the ActiveContexts field's value.
1497func (s *GetSessionOutput) SetActiveContexts(v []*ActiveContext) *GetSessionOutput {
1498	s.ActiveContexts = v
1499	return s
1500}
1501
1502// SetDialogAction sets the DialogAction field's value.
1503func (s *GetSessionOutput) SetDialogAction(v *DialogAction) *GetSessionOutput {
1504	s.DialogAction = v
1505	return s
1506}
1507
1508// SetRecentIntentSummaryView sets the RecentIntentSummaryView field's value.
1509func (s *GetSessionOutput) SetRecentIntentSummaryView(v []*IntentSummary) *GetSessionOutput {
1510	s.RecentIntentSummaryView = v
1511	return s
1512}
1513
1514// SetSessionAttributes sets the SessionAttributes field's value.
1515func (s *GetSessionOutput) SetSessionAttributes(v map[string]*string) *GetSessionOutput {
1516	s.SessionAttributes = v
1517	return s
1518}
1519
1520// SetSessionId sets the SessionId field's value.
1521func (s *GetSessionOutput) SetSessionId(v string) *GetSessionOutput {
1522	s.SessionId = &v
1523	return s
1524}
1525
1526// Provides a score that indicates the confidence that Amazon Lex has that an
1527// intent is the one that satisfies the user's intent.
1528type IntentConfidence struct {
1529	_ struct{} `type:"structure"`
1530
1531	// A score that indicates how confident Amazon Lex is that an intent satisfies
1532	// the user's intent. Ranges between 0.00 and 1.00. Higher scores indicate higher
1533	// confidence.
1534	Score *float64 `locationName:"score" type:"double"`
1535}
1536
1537// String returns the string representation
1538func (s IntentConfidence) String() string {
1539	return awsutil.Prettify(s)
1540}
1541
1542// GoString returns the string representation
1543func (s IntentConfidence) GoString() string {
1544	return s.String()
1545}
1546
1547// SetScore sets the Score field's value.
1548func (s *IntentConfidence) SetScore(v float64) *IntentConfidence {
1549	s.Score = &v
1550	return s
1551}
1552
1553// Provides information about the state of an intent. You can use this information
1554// to get the current state of an intent so that you can process the intent,
1555// or so that you can return the intent to its previous state.
1556type IntentSummary struct {
1557	_ struct{} `type:"structure"`
1558
1559	// A user-defined label that identifies a particular intent. You can use this
1560	// label to return to a previous intent.
1561	//
1562	// Use the checkpointLabelFilter parameter of the GetSessionRequest operation
1563	// to filter the intents returned by the operation to those with only the specified
1564	// label.
1565	CheckpointLabel *string `locationName:"checkpointLabel" min:"1" type:"string"`
1566
1567	// The status of the intent after the user responds to the confirmation prompt.
1568	// If the user confirms the intent, Amazon Lex sets this field to Confirmed.
1569	// If the user denies the intent, Amazon Lex sets this value to Denied. The
1570	// possible values are:
1571	//
1572	//    * Confirmed - The user has responded "Yes" to the confirmation prompt,
1573	//    confirming that the intent is complete and that it is ready to be fulfilled.
1574	//
1575	//    * Denied - The user has responded "No" to the confirmation prompt.
1576	//
1577	//    * None - The user has never been prompted for confirmation; or, the user
1578	//    was prompted but did not confirm or deny the prompt.
1579	ConfirmationStatus *string `locationName:"confirmationStatus" type:"string" enum:"ConfirmationStatus"`
1580
1581	// The next action that the bot should take in its interaction with the user.
1582	// The possible values are:
1583	//
1584	//    * ConfirmIntent - The next action is asking the user if the intent is
1585	//    complete and ready to be fulfilled. This is a yes/no question such as
1586	//    "Place the order?"
1587	//
1588	//    * Close - Indicates that the there will not be a response from the user.
1589	//    For example, the statement "Your order has been placed" does not require
1590	//    a response.
1591	//
1592	//    * ElicitIntent - The next action is to determine the intent that the user
1593	//    wants to fulfill.
1594	//
1595	//    * ElicitSlot - The next action is to elicit a slot value from the user.
1596	//
1597	// DialogActionType is a required field
1598	DialogActionType *string `locationName:"dialogActionType" type:"string" required:"true" enum:"DialogActionType"`
1599
1600	// The fulfillment state of the intent. The possible values are:
1601	//
1602	//    * Failed - The Lambda function associated with the intent failed to fulfill
1603	//    the intent.
1604	//
1605	//    * Fulfilled - The intent has fulfilled by the Lambda function associated
1606	//    with the intent.
1607	//
1608	//    * ReadyForFulfillment - All of the information necessary for the intent
1609	//    is present and the intent ready to be fulfilled by the client application.
1610	FulfillmentState *string `locationName:"fulfillmentState" type:"string" enum:"FulfillmentState"`
1611
1612	// The name of the intent.
1613	IntentName *string `locationName:"intentName" type:"string"`
1614
1615	// The next slot to elicit from the user. If there is not slot to elicit, the
1616	// field is blank.
1617	SlotToElicit *string `locationName:"slotToElicit" type:"string"`
1618
1619	// Map of the slots that have been gathered and their values.
1620	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
1621}
1622
1623// String returns the string representation
1624func (s IntentSummary) String() string {
1625	return awsutil.Prettify(s)
1626}
1627
1628// GoString returns the string representation
1629func (s IntentSummary) GoString() string {
1630	return s.String()
1631}
1632
1633// Validate inspects the fields of the type to determine if they are valid.
1634func (s *IntentSummary) Validate() error {
1635	invalidParams := request.ErrInvalidParams{Context: "IntentSummary"}
1636	if s.CheckpointLabel != nil && len(*s.CheckpointLabel) < 1 {
1637		invalidParams.Add(request.NewErrParamMinLen("CheckpointLabel", 1))
1638	}
1639	if s.DialogActionType == nil {
1640		invalidParams.Add(request.NewErrParamRequired("DialogActionType"))
1641	}
1642
1643	if invalidParams.Len() > 0 {
1644		return invalidParams
1645	}
1646	return nil
1647}
1648
1649// SetCheckpointLabel sets the CheckpointLabel field's value.
1650func (s *IntentSummary) SetCheckpointLabel(v string) *IntentSummary {
1651	s.CheckpointLabel = &v
1652	return s
1653}
1654
1655// SetConfirmationStatus sets the ConfirmationStatus field's value.
1656func (s *IntentSummary) SetConfirmationStatus(v string) *IntentSummary {
1657	s.ConfirmationStatus = &v
1658	return s
1659}
1660
1661// SetDialogActionType sets the DialogActionType field's value.
1662func (s *IntentSummary) SetDialogActionType(v string) *IntentSummary {
1663	s.DialogActionType = &v
1664	return s
1665}
1666
1667// SetFulfillmentState sets the FulfillmentState field's value.
1668func (s *IntentSummary) SetFulfillmentState(v string) *IntentSummary {
1669	s.FulfillmentState = &v
1670	return s
1671}
1672
1673// SetIntentName sets the IntentName field's value.
1674func (s *IntentSummary) SetIntentName(v string) *IntentSummary {
1675	s.IntentName = &v
1676	return s
1677}
1678
1679// SetSlotToElicit sets the SlotToElicit field's value.
1680func (s *IntentSummary) SetSlotToElicit(v string) *IntentSummary {
1681	s.SlotToElicit = &v
1682	return s
1683}
1684
1685// SetSlots sets the Slots field's value.
1686func (s *IntentSummary) SetSlots(v map[string]*string) *IntentSummary {
1687	s.Slots = v
1688	return s
1689}
1690
1691// Internal service error. Retry the call.
1692type InternalFailureException struct {
1693	_            struct{}                  `type:"structure"`
1694	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1695
1696	Message_ *string `locationName:"message" type:"string"`
1697}
1698
1699// String returns the string representation
1700func (s InternalFailureException) String() string {
1701	return awsutil.Prettify(s)
1702}
1703
1704// GoString returns the string representation
1705func (s InternalFailureException) GoString() string {
1706	return s.String()
1707}
1708
1709func newErrorInternalFailureException(v protocol.ResponseMetadata) error {
1710	return &InternalFailureException{
1711		RespMetadata: v,
1712	}
1713}
1714
1715// Code returns the exception type name.
1716func (s *InternalFailureException) Code() string {
1717	return "InternalFailureException"
1718}
1719
1720// Message returns the exception's message.
1721func (s *InternalFailureException) Message() string {
1722	if s.Message_ != nil {
1723		return *s.Message_
1724	}
1725	return ""
1726}
1727
1728// OrigErr always returns nil, satisfies awserr.Error interface.
1729func (s *InternalFailureException) OrigErr() error {
1730	return nil
1731}
1732
1733func (s *InternalFailureException) Error() string {
1734	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1735}
1736
1737// Status code returns the HTTP status code for the request's response error.
1738func (s *InternalFailureException) StatusCode() int {
1739	return s.RespMetadata.StatusCode
1740}
1741
1742// RequestID returns the service's response RequestID for request.
1743func (s *InternalFailureException) RequestID() string {
1744	return s.RespMetadata.RequestID
1745}
1746
1747// Exceeded a limit.
1748type LimitExceededException struct {
1749	_            struct{}                  `type:"structure"`
1750	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1751
1752	Message_ *string `locationName:"message" type:"string"`
1753
1754	RetryAfterSeconds *string `location:"header" locationName:"Retry-After" type:"string"`
1755}
1756
1757// String returns the string representation
1758func (s LimitExceededException) String() string {
1759	return awsutil.Prettify(s)
1760}
1761
1762// GoString returns the string representation
1763func (s LimitExceededException) GoString() string {
1764	return s.String()
1765}
1766
1767func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
1768	return &LimitExceededException{
1769		RespMetadata: v,
1770	}
1771}
1772
1773// Code returns the exception type name.
1774func (s *LimitExceededException) Code() string {
1775	return "LimitExceededException"
1776}
1777
1778// Message returns the exception's message.
1779func (s *LimitExceededException) Message() string {
1780	if s.Message_ != nil {
1781		return *s.Message_
1782	}
1783	return ""
1784}
1785
1786// OrigErr always returns nil, satisfies awserr.Error interface.
1787func (s *LimitExceededException) OrigErr() error {
1788	return nil
1789}
1790
1791func (s *LimitExceededException) Error() string {
1792	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
1793}
1794
1795// Status code returns the HTTP status code for the request's response error.
1796func (s *LimitExceededException) StatusCode() int {
1797	return s.RespMetadata.StatusCode
1798}
1799
1800// RequestID returns the service's response RequestID for request.
1801func (s *LimitExceededException) RequestID() string {
1802	return s.RespMetadata.RequestID
1803}
1804
1805// This exception is not used.
1806type LoopDetectedException struct {
1807	_            struct{}                  `type:"structure"`
1808	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1809
1810	Message_ *string `locationName:"Message" type:"string"`
1811}
1812
1813// String returns the string representation
1814func (s LoopDetectedException) String() string {
1815	return awsutil.Prettify(s)
1816}
1817
1818// GoString returns the string representation
1819func (s LoopDetectedException) GoString() string {
1820	return s.String()
1821}
1822
1823func newErrorLoopDetectedException(v protocol.ResponseMetadata) error {
1824	return &LoopDetectedException{
1825		RespMetadata: v,
1826	}
1827}
1828
1829// Code returns the exception type name.
1830func (s *LoopDetectedException) Code() string {
1831	return "LoopDetectedException"
1832}
1833
1834// Message returns the exception's message.
1835func (s *LoopDetectedException) Message() string {
1836	if s.Message_ != nil {
1837		return *s.Message_
1838	}
1839	return ""
1840}
1841
1842// OrigErr always returns nil, satisfies awserr.Error interface.
1843func (s *LoopDetectedException) OrigErr() error {
1844	return nil
1845}
1846
1847func (s *LoopDetectedException) Error() string {
1848	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1849}
1850
1851// Status code returns the HTTP status code for the request's response error.
1852func (s *LoopDetectedException) StatusCode() int {
1853	return s.RespMetadata.StatusCode
1854}
1855
1856// RequestID returns the service's response RequestID for request.
1857func (s *LoopDetectedException) RequestID() string {
1858	return s.RespMetadata.RequestID
1859}
1860
1861// The accept header in the request does not have a valid value.
1862type NotAcceptableException struct {
1863	_            struct{}                  `type:"structure"`
1864	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1865
1866	Message_ *string `locationName:"message" type:"string"`
1867}
1868
1869// String returns the string representation
1870func (s NotAcceptableException) String() string {
1871	return awsutil.Prettify(s)
1872}
1873
1874// GoString returns the string representation
1875func (s NotAcceptableException) GoString() string {
1876	return s.String()
1877}
1878
1879func newErrorNotAcceptableException(v protocol.ResponseMetadata) error {
1880	return &NotAcceptableException{
1881		RespMetadata: v,
1882	}
1883}
1884
1885// Code returns the exception type name.
1886func (s *NotAcceptableException) Code() string {
1887	return "NotAcceptableException"
1888}
1889
1890// Message returns the exception's message.
1891func (s *NotAcceptableException) Message() string {
1892	if s.Message_ != nil {
1893		return *s.Message_
1894	}
1895	return ""
1896}
1897
1898// OrigErr always returns nil, satisfies awserr.Error interface.
1899func (s *NotAcceptableException) OrigErr() error {
1900	return nil
1901}
1902
1903func (s *NotAcceptableException) Error() string {
1904	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1905}
1906
1907// Status code returns the HTTP status code for the request's response error.
1908func (s *NotAcceptableException) StatusCode() int {
1909	return s.RespMetadata.StatusCode
1910}
1911
1912// RequestID returns the service's response RequestID for request.
1913func (s *NotAcceptableException) RequestID() string {
1914	return s.RespMetadata.RequestID
1915}
1916
1917// The resource (such as the Amazon Lex bot or an alias) that is referred to
1918// is not found.
1919type NotFoundException struct {
1920	_            struct{}                  `type:"structure"`
1921	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1922
1923	Message_ *string `locationName:"message" type:"string"`
1924}
1925
1926// String returns the string representation
1927func (s NotFoundException) String() string {
1928	return awsutil.Prettify(s)
1929}
1930
1931// GoString returns the string representation
1932func (s NotFoundException) GoString() string {
1933	return s.String()
1934}
1935
1936func newErrorNotFoundException(v protocol.ResponseMetadata) error {
1937	return &NotFoundException{
1938		RespMetadata: v,
1939	}
1940}
1941
1942// Code returns the exception type name.
1943func (s *NotFoundException) Code() string {
1944	return "NotFoundException"
1945}
1946
1947// Message returns the exception's message.
1948func (s *NotFoundException) Message() string {
1949	if s.Message_ != nil {
1950		return *s.Message_
1951	}
1952	return ""
1953}
1954
1955// OrigErr always returns nil, satisfies awserr.Error interface.
1956func (s *NotFoundException) OrigErr() error {
1957	return nil
1958}
1959
1960func (s *NotFoundException) Error() string {
1961	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1962}
1963
1964// Status code returns the HTTP status code for the request's response error.
1965func (s *NotFoundException) StatusCode() int {
1966	return s.RespMetadata.StatusCode
1967}
1968
1969// RequestID returns the service's response RequestID for request.
1970func (s *NotFoundException) RequestID() string {
1971	return s.RespMetadata.RequestID
1972}
1973
1974type PostContentInput struct {
1975	_ struct{} `type:"structure" payload:"InputStream"`
1976
1977	// You pass this value as the Accept HTTP header.
1978	//
1979	// The message Amazon Lex returns in the response can be either text or speech
1980	// based on the Accept HTTP header value in the request.
1981	//
1982	//    * If the value is text/plain; charset=utf-8, Amazon Lex returns text in
1983	//    the response.
1984	//
1985	//    * If the value begins with audio/, Amazon Lex returns speech in the response.
1986	//    Amazon Lex uses Amazon Polly to generate the speech (using the configuration
1987	//    you specified in the Accept header). For example, if you specify audio/mpeg
1988	//    as the value, Amazon Lex returns speech in the MPEG format.
1989	//
1990	//    * If the value is audio/pcm, the speech returned is audio/pcm in 16-bit,
1991	//    little endian format.
1992	//
1993	//    * The following are the accepted values: audio/mpeg audio/ogg audio/pcm
1994	//    text/plain; charset=utf-8 audio/* (defaults to mpeg)
1995	Accept *string `location:"header" locationName:"Accept" type:"string"`
1996
1997	// A list of contexts active for the request. A context can be activated when
1998	// a previous intent is fulfilled, or by including the context in the request,
1999	//
2000	// If you don't specify a list of contexts, Amazon Lex will use the current
2001	// list of contexts for the session. If you specify an empty list, all contexts
2002	// for the session are cleared.
2003	ActiveContexts aws.JSONValue `location:"header" locationName:"x-amz-lex-active-contexts" type:"jsonvalue"`
2004
2005	// Alias of the Amazon Lex bot.
2006	//
2007	// BotAlias is a required field
2008	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
2009
2010	// Name of the Amazon Lex bot.
2011	//
2012	// BotName is a required field
2013	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
2014
2015	// You pass this value as the Content-Type HTTP header.
2016	//
2017	// Indicates the audio format or text. The header value must start with one
2018	// of the following prefixes:
2019	//
2020	//    * PCM format, audio data must be in little-endian byte order. audio/l16;
2021	//    rate=16000; channels=1 audio/x-l16; sample-rate=16000; channel-count=1
2022	//    audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false
2023	//
2024	//    * Opus format audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=256000;
2025	//    frame-size-milliseconds=4
2026	//
2027	//    * Text format text/plain; charset=utf-8
2028	//
2029	// ContentType is a required field
2030	ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true"`
2031
2032	// User input in PCM or Opus audio format or text format as described in the
2033	// Content-Type HTTP header.
2034	//
2035	// You can stream audio data to Amazon Lex or you can create a local buffer
2036	// that captures all of the audio data before sending. In general, you get better
2037	// performance if you stream audio data rather than buffering the data locally.
2038	//
2039	// To use an non-seekable io.Reader for this request wrap the io.Reader with
2040	// "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable
2041	// readers. This will allow the SDK to send the reader's payload as chunked
2042	// transfer encoding.
2043	//
2044	// InputStream is a required field
2045	InputStream io.ReadSeeker `locationName:"inputStream" type:"blob" required:"true"`
2046
2047	// You pass this value as the x-amz-lex-request-attributes HTTP header.
2048	//
2049	// Request-specific information passed between Amazon Lex and a client application.
2050	// The value must be a JSON serialized and base64 encoded map with string keys
2051	// and values. The total size of the requestAttributes and sessionAttributes
2052	// headers is limited to 12 KB.
2053	//
2054	// The namespace x-amz-lex: is reserved for special attributes. Don't create
2055	// any request attributes with the prefix x-amz-lex:.
2056	//
2057	// For more information, see Setting Request Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs).
2058	RequestAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-request-attributes" type:"jsonvalue"`
2059
2060	// You pass this value as the x-amz-lex-session-attributes HTTP header.
2061	//
2062	// Application-specific information passed between Amazon Lex and a client application.
2063	// The value must be a JSON serialized and base64 encoded map with string keys
2064	// and values. The total size of the sessionAttributes and requestAttributes
2065	// headers is limited to 12 KB.
2066	//
2067	// For more information, see Setting Session Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs).
2068	SessionAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-session-attributes" type:"jsonvalue"`
2069
2070	// The ID of the client application user. Amazon Lex uses this to identify a
2071	// user's conversation with your bot. At runtime, each request must contain
2072	// the userID field.
2073	//
2074	// To decide the user ID to use for your application, consider the following
2075	// factors.
2076	//
2077	//    * The userID field must not contain any personally identifiable information
2078	//    of the user, for example, name, personal identification numbers, or other
2079	//    end user personal information.
2080	//
2081	//    * If you want a user to start a conversation on one device and continue
2082	//    on another device, use a user-specific identifier.
2083	//
2084	//    * If you want the same user to be able to have two independent conversations
2085	//    on two different devices, choose a device-specific identifier.
2086	//
2087	//    * A user can't have two independent conversations with two different versions
2088	//    of the same bot. For example, a user can't have a conversation with the
2089	//    PROD and BETA versions of the same bot. If you anticipate that a user
2090	//    will need to have conversation with two different versions, for example,
2091	//    while testing, include the bot alias in the user ID to separate the two
2092	//    conversations.
2093	//
2094	// UserId is a required field
2095	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
2096}
2097
2098// String returns the string representation
2099func (s PostContentInput) String() string {
2100	return awsutil.Prettify(s)
2101}
2102
2103// GoString returns the string representation
2104func (s PostContentInput) GoString() string {
2105	return s.String()
2106}
2107
2108// Validate inspects the fields of the type to determine if they are valid.
2109func (s *PostContentInput) Validate() error {
2110	invalidParams := request.ErrInvalidParams{Context: "PostContentInput"}
2111	if s.BotAlias == nil {
2112		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
2113	}
2114	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
2115		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
2116	}
2117	if s.BotName == nil {
2118		invalidParams.Add(request.NewErrParamRequired("BotName"))
2119	}
2120	if s.BotName != nil && len(*s.BotName) < 1 {
2121		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
2122	}
2123	if s.ContentType == nil {
2124		invalidParams.Add(request.NewErrParamRequired("ContentType"))
2125	}
2126	if s.InputStream == nil {
2127		invalidParams.Add(request.NewErrParamRequired("InputStream"))
2128	}
2129	if s.UserId == nil {
2130		invalidParams.Add(request.NewErrParamRequired("UserId"))
2131	}
2132	if s.UserId != nil && len(*s.UserId) < 2 {
2133		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
2134	}
2135
2136	if invalidParams.Len() > 0 {
2137		return invalidParams
2138	}
2139	return nil
2140}
2141
2142// SetAccept sets the Accept field's value.
2143func (s *PostContentInput) SetAccept(v string) *PostContentInput {
2144	s.Accept = &v
2145	return s
2146}
2147
2148// SetActiveContexts sets the ActiveContexts field's value.
2149func (s *PostContentInput) SetActiveContexts(v aws.JSONValue) *PostContentInput {
2150	s.ActiveContexts = v
2151	return s
2152}
2153
2154// SetBotAlias sets the BotAlias field's value.
2155func (s *PostContentInput) SetBotAlias(v string) *PostContentInput {
2156	s.BotAlias = &v
2157	return s
2158}
2159
2160// SetBotName sets the BotName field's value.
2161func (s *PostContentInput) SetBotName(v string) *PostContentInput {
2162	s.BotName = &v
2163	return s
2164}
2165
2166// SetContentType sets the ContentType field's value.
2167func (s *PostContentInput) SetContentType(v string) *PostContentInput {
2168	s.ContentType = &v
2169	return s
2170}
2171
2172// SetInputStream sets the InputStream field's value.
2173func (s *PostContentInput) SetInputStream(v io.ReadSeeker) *PostContentInput {
2174	s.InputStream = v
2175	return s
2176}
2177
2178// SetRequestAttributes sets the RequestAttributes field's value.
2179func (s *PostContentInput) SetRequestAttributes(v aws.JSONValue) *PostContentInput {
2180	s.RequestAttributes = v
2181	return s
2182}
2183
2184// SetSessionAttributes sets the SessionAttributes field's value.
2185func (s *PostContentInput) SetSessionAttributes(v aws.JSONValue) *PostContentInput {
2186	s.SessionAttributes = v
2187	return s
2188}
2189
2190// SetUserId sets the UserId field's value.
2191func (s *PostContentInput) SetUserId(v string) *PostContentInput {
2192	s.UserId = &v
2193	return s
2194}
2195
2196type PostContentOutput struct {
2197	_ struct{} `type:"structure" payload:"AudioStream"`
2198
2199	// A list of active contexts for the session. A context can be set when an intent
2200	// is fulfilled or by calling the PostContent, PostText, or PutSession operation.
2201	//
2202	// You can use a context to control the intents that can follow up an intent,
2203	// or to modify the operation of your application.
2204	ActiveContexts aws.JSONValue `location:"header" locationName:"x-amz-lex-active-contexts" type:"jsonvalue"`
2205
2206	// One to four alternative intents that may be applicable to the user's intent.
2207	//
2208	// Each alternative includes a score that indicates how confident Amazon Lex
2209	// is that the intent matches the user's intent. The intents are sorted by the
2210	// confidence score.
2211	AlternativeIntents aws.JSONValue `location:"header" locationName:"x-amz-lex-alternative-intents" type:"jsonvalue"`
2212
2213	// The prompt (or statement) to convey to the user. This is based on the bot
2214	// configuration and context. For example, if Amazon Lex did not understand
2215	// the user intent, it sends the clarificationPrompt configured for the bot.
2216	// If the intent requires confirmation before taking the fulfillment action,
2217	// it sends the confirmationPrompt. Another example: Suppose that the Lambda
2218	// function successfully fulfilled the intent, and sent a message to convey
2219	// to the user. Then Amazon Lex sends that message in the response.
2220	AudioStream io.ReadCloser `locationName:"audioStream" type:"blob"`
2221
2222	// The version of the bot that responded to the conversation. You can use this
2223	// information to help determine if one version of a bot is performing better
2224	// than another version.
2225	BotVersion *string `location:"header" locationName:"x-amz-lex-bot-version" min:"1" type:"string"`
2226
2227	// Content type as specified in the Accept HTTP header in the request.
2228	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
2229
2230	// Identifies the current state of the user interaction. Amazon Lex returns
2231	// one of the following values as dialogState. The client can optionally use
2232	// this information to customize the user interface.
2233	//
2234	//    * ElicitIntent - Amazon Lex wants to elicit the user's intent. Consider
2235	//    the following examples: For example, a user might utter an intent ("I
2236	//    want to order a pizza"). If Amazon Lex cannot infer the user intent from
2237	//    this utterance, it will return this dialog state.
2238	//
2239	//    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. For
2240	//    example, Amazon Lex wants user confirmation before fulfilling an intent.
2241	//    Instead of a simple "yes" or "no" response, a user might respond with
2242	//    additional information. For example, "yes, but make it a thick crust pizza"
2243	//    or "no, I want to order a drink." Amazon Lex can process such additional
2244	//    information (in these examples, update the crust type slot or change the
2245	//    intent from OrderPizza to OrderDrink).
2246	//
2247	//    * ElicitSlot - Amazon Lex is expecting the value of a slot for the current
2248	//    intent. For example, suppose that in the response Amazon Lex sends this
2249	//    message: "What size pizza would you like?". A user might reply with the
2250	//    slot value (e.g., "medium"). The user might also provide additional information
2251	//    in the response (e.g., "medium thick crust pizza"). Amazon Lex can process
2252	//    such additional information appropriately.
2253	//
2254	//    * Fulfilled - Conveys that the Lambda function has successfully fulfilled
2255	//    the intent.
2256	//
2257	//    * ReadyForFulfillment - Conveys that the client has to fulfill the request.
2258	//
2259	//    * Failed - Conveys that the conversation with the user failed. This can
2260	//    happen for various reasons, including that the user does not provide an
2261	//    appropriate response to prompts from the service (you can configure how
2262	//    many times Amazon Lex can prompt a user for specific information), or
2263	//    if the Lambda function fails to fulfill the intent.
2264	DialogState *string `location:"header" locationName:"x-amz-lex-dialog-state" type:"string" enum:"DialogState"`
2265
2266	// The text used to process the request.
2267	//
2268	// If the input was an audio stream, the inputTranscript field contains the
2269	// text extracted from the audio stream. This is the text that is actually processed
2270	// to recognize intents and slot values. You can use this information to determine
2271	// if Amazon Lex is correctly processing the audio that you send.
2272	InputTranscript *string `location:"header" locationName:"x-amz-lex-input-transcript" type:"string"`
2273
2274	// Current user intent that Amazon Lex is aware of.
2275	IntentName *string `location:"header" locationName:"x-amz-lex-intent-name" type:"string"`
2276
2277	// The message to convey to the user. The message can come from the bot's configuration
2278	// or from a Lambda function.
2279	//
2280	// If the intent is not configured with a Lambda function, or if the Lambda
2281	// function returned Delegate as the dialogAction.type in its response, Amazon
2282	// Lex decides on the next course of action and selects an appropriate message
2283	// from the bot's configuration based on the current interaction context. For
2284	// example, if Amazon Lex isn't able to understand user input, it uses a clarification
2285	// prompt message.
2286	//
2287	// When you create an intent you can assign messages to groups. When messages
2288	// are assigned to groups Amazon Lex returns one message from each group in
2289	// the response. The message field is an escaped JSON string containing the
2290	// messages. For more information about the structure of the JSON string returned,
2291	// see msg-prompts-formats.
2292	//
2293	// If the Lambda function returns a message, Amazon Lex passes it to the client
2294	// in its response.
2295	Message *string `location:"header" locationName:"x-amz-lex-message" min:"1" type:"string" sensitive:"true"`
2296
2297	// The format of the response message. One of the following values:
2298	//
2299	//    * PlainText - The message contains plain UTF-8 text.
2300	//
2301	//    * CustomPayload - The message is a custom format for the client.
2302	//
2303	//    * SSML - The message contains text formatted for voice output.
2304	//
2305	//    * Composite - The message contains an escaped JSON object containing one
2306	//    or more messages from the groups that messages were assigned to when the
2307	//    intent was created.
2308	MessageFormat *string `location:"header" locationName:"x-amz-lex-message-format" type:"string" enum:"MessageFormatType"`
2309
2310	// Provides a score that indicates how confident Amazon Lex is that the returned
2311	// intent is the one that matches the user's intent. The score is between 0.0
2312	// and 1.0.
2313	//
2314	// The score is a relative score, not an absolute score. The score may change
2315	// based on improvements to Amazon Lex.
2316	NluIntentConfidence aws.JSONValue `location:"header" locationName:"x-amz-lex-nlu-intent-confidence" type:"jsonvalue"`
2317
2318	// The sentiment expressed in an utterance.
2319	//
2320	// When the bot is configured to send utterances to Amazon Comprehend for sentiment
2321	// analysis, this field contains the result of the analysis.
2322	SentimentResponse *string `location:"header" locationName:"x-amz-lex-sentiment" type:"string"`
2323
2324	// Map of key/value pairs representing the session-specific context information.
2325	SessionAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-session-attributes" type:"jsonvalue"`
2326
2327	// The unique identifier for the session.
2328	SessionId *string `location:"header" locationName:"x-amz-lex-session-id" type:"string"`
2329
2330	// If the dialogState value is ElicitSlot, returns the name of the slot for
2331	// which Amazon Lex is eliciting a value.
2332	SlotToElicit *string `location:"header" locationName:"x-amz-lex-slot-to-elicit" type:"string"`
2333
2334	// Map of zero or more intent slots (name/value pairs) Amazon Lex detected from
2335	// the user input during the conversation. The field is base-64 encoded.
2336	//
2337	// Amazon Lex creates a resolution list containing likely values for a slot.
2338	// The value that it returns is determined by the valueSelectionStrategy selected
2339	// when the slot type was created or updated. If valueSelectionStrategy is set
2340	// to ORIGINAL_VALUE, the value provided by the user is returned, if the user
2341	// value is similar to the slot values. If valueSelectionStrategy is set to
2342	// TOP_RESOLUTION Amazon Lex returns the first value in the resolution list
2343	// or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy,
2344	// the default is ORIGINAL_VALUE.
2345	Slots aws.JSONValue `location:"header" locationName:"x-amz-lex-slots" type:"jsonvalue"`
2346}
2347
2348// String returns the string representation
2349func (s PostContentOutput) String() string {
2350	return awsutil.Prettify(s)
2351}
2352
2353// GoString returns the string representation
2354func (s PostContentOutput) GoString() string {
2355	return s.String()
2356}
2357
2358// SetActiveContexts sets the ActiveContexts field's value.
2359func (s *PostContentOutput) SetActiveContexts(v aws.JSONValue) *PostContentOutput {
2360	s.ActiveContexts = v
2361	return s
2362}
2363
2364// SetAlternativeIntents sets the AlternativeIntents field's value.
2365func (s *PostContentOutput) SetAlternativeIntents(v aws.JSONValue) *PostContentOutput {
2366	s.AlternativeIntents = v
2367	return s
2368}
2369
2370// SetAudioStream sets the AudioStream field's value.
2371func (s *PostContentOutput) SetAudioStream(v io.ReadCloser) *PostContentOutput {
2372	s.AudioStream = v
2373	return s
2374}
2375
2376// SetBotVersion sets the BotVersion field's value.
2377func (s *PostContentOutput) SetBotVersion(v string) *PostContentOutput {
2378	s.BotVersion = &v
2379	return s
2380}
2381
2382// SetContentType sets the ContentType field's value.
2383func (s *PostContentOutput) SetContentType(v string) *PostContentOutput {
2384	s.ContentType = &v
2385	return s
2386}
2387
2388// SetDialogState sets the DialogState field's value.
2389func (s *PostContentOutput) SetDialogState(v string) *PostContentOutput {
2390	s.DialogState = &v
2391	return s
2392}
2393
2394// SetInputTranscript sets the InputTranscript field's value.
2395func (s *PostContentOutput) SetInputTranscript(v string) *PostContentOutput {
2396	s.InputTranscript = &v
2397	return s
2398}
2399
2400// SetIntentName sets the IntentName field's value.
2401func (s *PostContentOutput) SetIntentName(v string) *PostContentOutput {
2402	s.IntentName = &v
2403	return s
2404}
2405
2406// SetMessage sets the Message field's value.
2407func (s *PostContentOutput) SetMessage(v string) *PostContentOutput {
2408	s.Message = &v
2409	return s
2410}
2411
2412// SetMessageFormat sets the MessageFormat field's value.
2413func (s *PostContentOutput) SetMessageFormat(v string) *PostContentOutput {
2414	s.MessageFormat = &v
2415	return s
2416}
2417
2418// SetNluIntentConfidence sets the NluIntentConfidence field's value.
2419func (s *PostContentOutput) SetNluIntentConfidence(v aws.JSONValue) *PostContentOutput {
2420	s.NluIntentConfidence = v
2421	return s
2422}
2423
2424// SetSentimentResponse sets the SentimentResponse field's value.
2425func (s *PostContentOutput) SetSentimentResponse(v string) *PostContentOutput {
2426	s.SentimentResponse = &v
2427	return s
2428}
2429
2430// SetSessionAttributes sets the SessionAttributes field's value.
2431func (s *PostContentOutput) SetSessionAttributes(v aws.JSONValue) *PostContentOutput {
2432	s.SessionAttributes = v
2433	return s
2434}
2435
2436// SetSessionId sets the SessionId field's value.
2437func (s *PostContentOutput) SetSessionId(v string) *PostContentOutput {
2438	s.SessionId = &v
2439	return s
2440}
2441
2442// SetSlotToElicit sets the SlotToElicit field's value.
2443func (s *PostContentOutput) SetSlotToElicit(v string) *PostContentOutput {
2444	s.SlotToElicit = &v
2445	return s
2446}
2447
2448// SetSlots sets the Slots field's value.
2449func (s *PostContentOutput) SetSlots(v aws.JSONValue) *PostContentOutput {
2450	s.Slots = v
2451	return s
2452}
2453
2454type PostTextInput struct {
2455	_ struct{} `type:"structure"`
2456
2457	// A list of contexts active for the request. A context can be activated when
2458	// a previous intent is fulfilled, or by including the context in the request,
2459	//
2460	// If you don't specify a list of contexts, Amazon Lex will use the current
2461	// list of contexts for the session. If you specify an empty list, all contexts
2462	// for the session are cleared.
2463	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
2464
2465	// The alias of the Amazon Lex bot.
2466	//
2467	// BotAlias is a required field
2468	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
2469
2470	// The name of the Amazon Lex bot.
2471	//
2472	// BotName is a required field
2473	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
2474
2475	// The text that the user entered (Amazon Lex interprets this text).
2476	//
2477	// InputText is a required field
2478	InputText *string `locationName:"inputText" min:"1" type:"string" required:"true" sensitive:"true"`
2479
2480	// Request-specific information passed between Amazon Lex and a client application.
2481	//
2482	// The namespace x-amz-lex: is reserved for special attributes. Don't create
2483	// any request attributes with the prefix x-amz-lex:.
2484	//
2485	// For more information, see Setting Request Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs).
2486	RequestAttributes map[string]*string `locationName:"requestAttributes" type:"map" sensitive:"true"`
2487
2488	// Application-specific information passed between Amazon Lex and a client application.
2489	//
2490	// For more information, see Setting Session Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs).
2491	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
2492
2493	// The ID of the client application user. Amazon Lex uses this to identify a
2494	// user's conversation with your bot. At runtime, each request must contain
2495	// the userID field.
2496	//
2497	// To decide the user ID to use for your application, consider the following
2498	// factors.
2499	//
2500	//    * The userID field must not contain any personally identifiable information
2501	//    of the user, for example, name, personal identification numbers, or other
2502	//    end user personal information.
2503	//
2504	//    * If you want a user to start a conversation on one device and continue
2505	//    on another device, use a user-specific identifier.
2506	//
2507	//    * If you want the same user to be able to have two independent conversations
2508	//    on two different devices, choose a device-specific identifier.
2509	//
2510	//    * A user can't have two independent conversations with two different versions
2511	//    of the same bot. For example, a user can't have a conversation with the
2512	//    PROD and BETA versions of the same bot. If you anticipate that a user
2513	//    will need to have conversation with two different versions, for example,
2514	//    while testing, include the bot alias in the user ID to separate the two
2515	//    conversations.
2516	//
2517	// UserId is a required field
2518	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
2519}
2520
2521// String returns the string representation
2522func (s PostTextInput) String() string {
2523	return awsutil.Prettify(s)
2524}
2525
2526// GoString returns the string representation
2527func (s PostTextInput) GoString() string {
2528	return s.String()
2529}
2530
2531// Validate inspects the fields of the type to determine if they are valid.
2532func (s *PostTextInput) Validate() error {
2533	invalidParams := request.ErrInvalidParams{Context: "PostTextInput"}
2534	if s.BotAlias == nil {
2535		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
2536	}
2537	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
2538		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
2539	}
2540	if s.BotName == nil {
2541		invalidParams.Add(request.NewErrParamRequired("BotName"))
2542	}
2543	if s.BotName != nil && len(*s.BotName) < 1 {
2544		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
2545	}
2546	if s.InputText == nil {
2547		invalidParams.Add(request.NewErrParamRequired("InputText"))
2548	}
2549	if s.InputText != nil && len(*s.InputText) < 1 {
2550		invalidParams.Add(request.NewErrParamMinLen("InputText", 1))
2551	}
2552	if s.UserId == nil {
2553		invalidParams.Add(request.NewErrParamRequired("UserId"))
2554	}
2555	if s.UserId != nil && len(*s.UserId) < 2 {
2556		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
2557	}
2558	if s.ActiveContexts != nil {
2559		for i, v := range s.ActiveContexts {
2560			if v == nil {
2561				continue
2562			}
2563			if err := v.Validate(); err != nil {
2564				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ActiveContexts", i), err.(request.ErrInvalidParams))
2565			}
2566		}
2567	}
2568
2569	if invalidParams.Len() > 0 {
2570		return invalidParams
2571	}
2572	return nil
2573}
2574
2575// SetActiveContexts sets the ActiveContexts field's value.
2576func (s *PostTextInput) SetActiveContexts(v []*ActiveContext) *PostTextInput {
2577	s.ActiveContexts = v
2578	return s
2579}
2580
2581// SetBotAlias sets the BotAlias field's value.
2582func (s *PostTextInput) SetBotAlias(v string) *PostTextInput {
2583	s.BotAlias = &v
2584	return s
2585}
2586
2587// SetBotName sets the BotName field's value.
2588func (s *PostTextInput) SetBotName(v string) *PostTextInput {
2589	s.BotName = &v
2590	return s
2591}
2592
2593// SetInputText sets the InputText field's value.
2594func (s *PostTextInput) SetInputText(v string) *PostTextInput {
2595	s.InputText = &v
2596	return s
2597}
2598
2599// SetRequestAttributes sets the RequestAttributes field's value.
2600func (s *PostTextInput) SetRequestAttributes(v map[string]*string) *PostTextInput {
2601	s.RequestAttributes = v
2602	return s
2603}
2604
2605// SetSessionAttributes sets the SessionAttributes field's value.
2606func (s *PostTextInput) SetSessionAttributes(v map[string]*string) *PostTextInput {
2607	s.SessionAttributes = v
2608	return s
2609}
2610
2611// SetUserId sets the UserId field's value.
2612func (s *PostTextInput) SetUserId(v string) *PostTextInput {
2613	s.UserId = &v
2614	return s
2615}
2616
2617type PostTextOutput struct {
2618	_ struct{} `type:"structure"`
2619
2620	// A list of active contexts for the session. A context can be set when an intent
2621	// is fulfilled or by calling the PostContent, PostText, or PutSession operation.
2622	//
2623	// You can use a context to control the intents that can follow up an intent,
2624	// or to modify the operation of your application.
2625	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
2626
2627	// One to four alternative intents that may be applicable to the user's intent.
2628	//
2629	// Each alternative includes a score that indicates how confident Amazon Lex
2630	// is that the intent matches the user's intent. The intents are sorted by the
2631	// confidence score.
2632	AlternativeIntents []*PredictedIntent `locationName:"alternativeIntents" type:"list"`
2633
2634	// The version of the bot that responded to the conversation. You can use this
2635	// information to help determine if one version of a bot is performing better
2636	// than another version.
2637	BotVersion *string `locationName:"botVersion" min:"1" type:"string"`
2638
2639	// Identifies the current state of the user interaction. Amazon Lex returns
2640	// one of the following values as dialogState. The client can optionally use
2641	// this information to customize the user interface.
2642	//
2643	//    * ElicitIntent - Amazon Lex wants to elicit user intent. For example,
2644	//    a user might utter an intent ("I want to order a pizza"). If Amazon Lex
2645	//    cannot infer the user intent from this utterance, it will return this
2646	//    dialogState.
2647	//
2648	//    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. For
2649	//    example, Amazon Lex wants user confirmation before fulfilling an intent.
2650	//    Instead of a simple "yes" or "no," a user might respond with additional
2651	//    information. For example, "yes, but make it thick crust pizza" or "no,
2652	//    I want to order a drink". Amazon Lex can process such additional information
2653	//    (in these examples, update the crust type slot value, or change intent
2654	//    from OrderPizza to OrderDrink).
2655	//
2656	//    * ElicitSlot - Amazon Lex is expecting a slot value for the current intent.
2657	//    For example, suppose that in the response Amazon Lex sends this message:
2658	//    "What size pizza would you like?". A user might reply with the slot value
2659	//    (e.g., "medium"). The user might also provide additional information in
2660	//    the response (e.g., "medium thick crust pizza"). Amazon Lex can process
2661	//    such additional information appropriately.
2662	//
2663	//    * Fulfilled - Conveys that the Lambda function configured for the intent
2664	//    has successfully fulfilled the intent.
2665	//
2666	//    * ReadyForFulfillment - Conveys that the client has to fulfill the intent.
2667	//
2668	//    * Failed - Conveys that the conversation with the user failed. This can
2669	//    happen for various reasons including that the user did not provide an
2670	//    appropriate response to prompts from the service (you can configure how
2671	//    many times Amazon Lex can prompt a user for specific information), or
2672	//    the Lambda function failed to fulfill the intent.
2673	DialogState *string `locationName:"dialogState" type:"string" enum:"DialogState"`
2674
2675	// The current user intent that Amazon Lex is aware of.
2676	IntentName *string `locationName:"intentName" type:"string"`
2677
2678	// The message to convey to the user. The message can come from the bot's configuration
2679	// or from a Lambda function.
2680	//
2681	// If the intent is not configured with a Lambda function, or if the Lambda
2682	// function returned Delegate as the dialogAction.type its response, Amazon
2683	// Lex decides on the next course of action and selects an appropriate message
2684	// from the bot's configuration based on the current interaction context. For
2685	// example, if Amazon Lex isn't able to understand user input, it uses a clarification
2686	// prompt message.
2687	//
2688	// When you create an intent you can assign messages to groups. When messages
2689	// are assigned to groups Amazon Lex returns one message from each group in
2690	// the response. The message field is an escaped JSON string containing the
2691	// messages. For more information about the structure of the JSON string returned,
2692	// see msg-prompts-formats.
2693	//
2694	// If the Lambda function returns a message, Amazon Lex passes it to the client
2695	// in its response.
2696	Message *string `locationName:"message" min:"1" type:"string" sensitive:"true"`
2697
2698	// The format of the response message. One of the following values:
2699	//
2700	//    * PlainText - The message contains plain UTF-8 text.
2701	//
2702	//    * CustomPayload - The message is a custom format defined by the Lambda
2703	//    function.
2704	//
2705	//    * SSML - The message contains text formatted for voice output.
2706	//
2707	//    * Composite - The message contains an escaped JSON object containing one
2708	//    or more messages from the groups that messages were assigned to when the
2709	//    intent was created.
2710	MessageFormat *string `locationName:"messageFormat" type:"string" enum:"MessageFormatType"`
2711
2712	// Provides a score that indicates how confident Amazon Lex is that the returned
2713	// intent is the one that matches the user's intent. The score is between 0.0
2714	// and 1.0. For more information, see Confidence Scores (https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html).
2715	//
2716	// The score is a relative score, not an absolute score. The score may change
2717	// based on improvements to Amazon Lex.
2718	NluIntentConfidence *IntentConfidence `locationName:"nluIntentConfidence" type:"structure"`
2719
2720	// Represents the options that the user has to respond to the current prompt.
2721	// Response Card can come from the bot configuration (in the Amazon Lex console,
2722	// choose the settings button next to a slot) or from a code hook (Lambda function).
2723	ResponseCard *ResponseCard `locationName:"responseCard" type:"structure"`
2724
2725	// The sentiment expressed in and utterance.
2726	//
2727	// When the bot is configured to send utterances to Amazon Comprehend for sentiment
2728	// analysis, this field contains the result of the analysis.
2729	SentimentResponse *SentimentResponse `locationName:"sentimentResponse" type:"structure"`
2730
2731	// A map of key-value pairs representing the session-specific context information.
2732	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
2733
2734	// A unique identifier for the session.
2735	SessionId *string `locationName:"sessionId" type:"string"`
2736
2737	// If the dialogState value is ElicitSlot, returns the name of the slot for
2738	// which Amazon Lex is eliciting a value.
2739	SlotToElicit *string `locationName:"slotToElicit" type:"string"`
2740
2741	// The intent slots that Amazon Lex detected from the user input in the conversation.
2742	//
2743	// Amazon Lex creates a resolution list containing likely values for a slot.
2744	// The value that it returns is determined by the valueSelectionStrategy selected
2745	// when the slot type was created or updated. If valueSelectionStrategy is set
2746	// to ORIGINAL_VALUE, the value provided by the user is returned, if the user
2747	// value is similar to the slot values. If valueSelectionStrategy is set to
2748	// TOP_RESOLUTION Amazon Lex returns the first value in the resolution list
2749	// or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy,
2750	// the default is ORIGINAL_VALUE.
2751	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
2752}
2753
2754// String returns the string representation
2755func (s PostTextOutput) String() string {
2756	return awsutil.Prettify(s)
2757}
2758
2759// GoString returns the string representation
2760func (s PostTextOutput) GoString() string {
2761	return s.String()
2762}
2763
2764// SetActiveContexts sets the ActiveContexts field's value.
2765func (s *PostTextOutput) SetActiveContexts(v []*ActiveContext) *PostTextOutput {
2766	s.ActiveContexts = v
2767	return s
2768}
2769
2770// SetAlternativeIntents sets the AlternativeIntents field's value.
2771func (s *PostTextOutput) SetAlternativeIntents(v []*PredictedIntent) *PostTextOutput {
2772	s.AlternativeIntents = v
2773	return s
2774}
2775
2776// SetBotVersion sets the BotVersion field's value.
2777func (s *PostTextOutput) SetBotVersion(v string) *PostTextOutput {
2778	s.BotVersion = &v
2779	return s
2780}
2781
2782// SetDialogState sets the DialogState field's value.
2783func (s *PostTextOutput) SetDialogState(v string) *PostTextOutput {
2784	s.DialogState = &v
2785	return s
2786}
2787
2788// SetIntentName sets the IntentName field's value.
2789func (s *PostTextOutput) SetIntentName(v string) *PostTextOutput {
2790	s.IntentName = &v
2791	return s
2792}
2793
2794// SetMessage sets the Message field's value.
2795func (s *PostTextOutput) SetMessage(v string) *PostTextOutput {
2796	s.Message = &v
2797	return s
2798}
2799
2800// SetMessageFormat sets the MessageFormat field's value.
2801func (s *PostTextOutput) SetMessageFormat(v string) *PostTextOutput {
2802	s.MessageFormat = &v
2803	return s
2804}
2805
2806// SetNluIntentConfidence sets the NluIntentConfidence field's value.
2807func (s *PostTextOutput) SetNluIntentConfidence(v *IntentConfidence) *PostTextOutput {
2808	s.NluIntentConfidence = v
2809	return s
2810}
2811
2812// SetResponseCard sets the ResponseCard field's value.
2813func (s *PostTextOutput) SetResponseCard(v *ResponseCard) *PostTextOutput {
2814	s.ResponseCard = v
2815	return s
2816}
2817
2818// SetSentimentResponse sets the SentimentResponse field's value.
2819func (s *PostTextOutput) SetSentimentResponse(v *SentimentResponse) *PostTextOutput {
2820	s.SentimentResponse = v
2821	return s
2822}
2823
2824// SetSessionAttributes sets the SessionAttributes field's value.
2825func (s *PostTextOutput) SetSessionAttributes(v map[string]*string) *PostTextOutput {
2826	s.SessionAttributes = v
2827	return s
2828}
2829
2830// SetSessionId sets the SessionId field's value.
2831func (s *PostTextOutput) SetSessionId(v string) *PostTextOutput {
2832	s.SessionId = &v
2833	return s
2834}
2835
2836// SetSlotToElicit sets the SlotToElicit field's value.
2837func (s *PostTextOutput) SetSlotToElicit(v string) *PostTextOutput {
2838	s.SlotToElicit = &v
2839	return s
2840}
2841
2842// SetSlots sets the Slots field's value.
2843func (s *PostTextOutput) SetSlots(v map[string]*string) *PostTextOutput {
2844	s.Slots = v
2845	return s
2846}
2847
2848// An intent that Amazon Lex suggests satisfies the user's intent. Includes
2849// the name of the intent, the confidence that Amazon Lex has that the user's
2850// intent is satisfied, and the slots defined for the intent.
2851type PredictedIntent struct {
2852	_ struct{} `type:"structure"`
2853
2854	// The name of the intent that Amazon Lex suggests satisfies the user's intent.
2855	IntentName *string `locationName:"intentName" type:"string"`
2856
2857	// Indicates how confident Amazon Lex is that an intent satisfies the user's
2858	// intent.
2859	NluIntentConfidence *IntentConfidence `locationName:"nluIntentConfidence" type:"structure"`
2860
2861	// The slot and slot values associated with the predicted intent.
2862	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
2863}
2864
2865// String returns the string representation
2866func (s PredictedIntent) String() string {
2867	return awsutil.Prettify(s)
2868}
2869
2870// GoString returns the string representation
2871func (s PredictedIntent) GoString() string {
2872	return s.String()
2873}
2874
2875// SetIntentName sets the IntentName field's value.
2876func (s *PredictedIntent) SetIntentName(v string) *PredictedIntent {
2877	s.IntentName = &v
2878	return s
2879}
2880
2881// SetNluIntentConfidence sets the NluIntentConfidence field's value.
2882func (s *PredictedIntent) SetNluIntentConfidence(v *IntentConfidence) *PredictedIntent {
2883	s.NluIntentConfidence = v
2884	return s
2885}
2886
2887// SetSlots sets the Slots field's value.
2888func (s *PredictedIntent) SetSlots(v map[string]*string) *PredictedIntent {
2889	s.Slots = v
2890	return s
2891}
2892
2893type PutSessionInput struct {
2894	_ struct{} `type:"structure"`
2895
2896	// The message that Amazon Lex returns in the response can be either text or
2897	// speech based depending on the value of this field.
2898	//
2899	//    * If the value is text/plain; charset=utf-8, Amazon Lex returns text in
2900	//    the response.
2901	//
2902	//    * If the value begins with audio/, Amazon Lex returns speech in the response.
2903	//    Amazon Lex uses Amazon Polly to generate the speech in the configuration
2904	//    that you specify. For example, if you specify audio/mpeg as the value,
2905	//    Amazon Lex returns speech in the MPEG format.
2906	//
2907	//    * If the value is audio/pcm, the speech is returned as audio/pcm in 16-bit,
2908	//    little endian format.
2909	//
2910	//    * The following are the accepted values: audio/mpeg audio/ogg audio/pcm
2911	//    audio/* (defaults to mpeg) text/plain; charset=utf-8
2912	Accept *string `location:"header" locationName:"Accept" type:"string"`
2913
2914	// A list of contexts active for the request. A context can be activated when
2915	// a previous intent is fulfilled, or by including the context in the request,
2916	//
2917	// If you don't specify a list of contexts, Amazon Lex will use the current
2918	// list of contexts for the session. If you specify an empty list, all contexts
2919	// for the session are cleared.
2920	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
2921
2922	// The alias in use for the bot that contains the session data.
2923	//
2924	// BotAlias is a required field
2925	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
2926
2927	// The name of the bot that contains the session data.
2928	//
2929	// BotName is a required field
2930	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
2931
2932	// Sets the next action that the bot should take to fulfill the conversation.
2933	DialogAction *DialogAction `locationName:"dialogAction" type:"structure"`
2934
2935	// A summary of the recent intents for the bot. You can use the intent summary
2936	// view to set a checkpoint label on an intent and modify attributes of intents.
2937	// You can also use it to remove or add intent summary objects to the list.
2938	//
2939	// An intent that you modify or add to the list must make sense for the bot.
2940	// For example, the intent name must be valid for the bot. You must provide
2941	// valid values for:
2942	//
2943	//    * intentName
2944	//
2945	//    * slot names
2946	//
2947	//    * slotToElict
2948	//
2949	// If you send the recentIntentSummaryView parameter in a PutSession request,
2950	// the contents of the new summary view replaces the old summary view. For example,
2951	// if a GetSession request returns three intents in the summary view and you
2952	// call PutSession with one intent in the summary view, the next call to GetSession
2953	// will only return one intent.
2954	RecentIntentSummaryView []*IntentSummary `locationName:"recentIntentSummaryView" type:"list"`
2955
2956	// Map of key/value pairs representing the session-specific context information.
2957	// It contains application information passed between Amazon Lex and a client
2958	// application.
2959	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
2960
2961	// The ID of the client application user. Amazon Lex uses this to identify a
2962	// user's conversation with your bot.
2963	//
2964	// UserId is a required field
2965	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
2966}
2967
2968// String returns the string representation
2969func (s PutSessionInput) String() string {
2970	return awsutil.Prettify(s)
2971}
2972
2973// GoString returns the string representation
2974func (s PutSessionInput) GoString() string {
2975	return s.String()
2976}
2977
2978// Validate inspects the fields of the type to determine if they are valid.
2979func (s *PutSessionInput) Validate() error {
2980	invalidParams := request.ErrInvalidParams{Context: "PutSessionInput"}
2981	if s.BotAlias == nil {
2982		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
2983	}
2984	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
2985		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
2986	}
2987	if s.BotName == nil {
2988		invalidParams.Add(request.NewErrParamRequired("BotName"))
2989	}
2990	if s.BotName != nil && len(*s.BotName) < 1 {
2991		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
2992	}
2993	if s.UserId == nil {
2994		invalidParams.Add(request.NewErrParamRequired("UserId"))
2995	}
2996	if s.UserId != nil && len(*s.UserId) < 2 {
2997		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
2998	}
2999	if s.ActiveContexts != nil {
3000		for i, v := range s.ActiveContexts {
3001			if v == nil {
3002				continue
3003			}
3004			if err := v.Validate(); err != nil {
3005				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ActiveContexts", i), err.(request.ErrInvalidParams))
3006			}
3007		}
3008	}
3009	if s.DialogAction != nil {
3010		if err := s.DialogAction.Validate(); err != nil {
3011			invalidParams.AddNested("DialogAction", err.(request.ErrInvalidParams))
3012		}
3013	}
3014	if s.RecentIntentSummaryView != nil {
3015		for i, v := range s.RecentIntentSummaryView {
3016			if v == nil {
3017				continue
3018			}
3019			if err := v.Validate(); err != nil {
3020				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecentIntentSummaryView", i), err.(request.ErrInvalidParams))
3021			}
3022		}
3023	}
3024
3025	if invalidParams.Len() > 0 {
3026		return invalidParams
3027	}
3028	return nil
3029}
3030
3031// SetAccept sets the Accept field's value.
3032func (s *PutSessionInput) SetAccept(v string) *PutSessionInput {
3033	s.Accept = &v
3034	return s
3035}
3036
3037// SetActiveContexts sets the ActiveContexts field's value.
3038func (s *PutSessionInput) SetActiveContexts(v []*ActiveContext) *PutSessionInput {
3039	s.ActiveContexts = v
3040	return s
3041}
3042
3043// SetBotAlias sets the BotAlias field's value.
3044func (s *PutSessionInput) SetBotAlias(v string) *PutSessionInput {
3045	s.BotAlias = &v
3046	return s
3047}
3048
3049// SetBotName sets the BotName field's value.
3050func (s *PutSessionInput) SetBotName(v string) *PutSessionInput {
3051	s.BotName = &v
3052	return s
3053}
3054
3055// SetDialogAction sets the DialogAction field's value.
3056func (s *PutSessionInput) SetDialogAction(v *DialogAction) *PutSessionInput {
3057	s.DialogAction = v
3058	return s
3059}
3060
3061// SetRecentIntentSummaryView sets the RecentIntentSummaryView field's value.
3062func (s *PutSessionInput) SetRecentIntentSummaryView(v []*IntentSummary) *PutSessionInput {
3063	s.RecentIntentSummaryView = v
3064	return s
3065}
3066
3067// SetSessionAttributes sets the SessionAttributes field's value.
3068func (s *PutSessionInput) SetSessionAttributes(v map[string]*string) *PutSessionInput {
3069	s.SessionAttributes = v
3070	return s
3071}
3072
3073// SetUserId sets the UserId field's value.
3074func (s *PutSessionInput) SetUserId(v string) *PutSessionInput {
3075	s.UserId = &v
3076	return s
3077}
3078
3079type PutSessionOutput struct {
3080	_ struct{} `type:"structure" payload:"AudioStream"`
3081
3082	// A list of active contexts for the session.
3083	ActiveContexts aws.JSONValue `location:"header" locationName:"x-amz-lex-active-contexts" type:"jsonvalue"`
3084
3085	// The audio version of the message to convey to the user.
3086	AudioStream io.ReadCloser `locationName:"audioStream" type:"blob"`
3087
3088	// Content type as specified in the Accept HTTP header in the request.
3089	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
3090
3091	//    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response to
3092	//    confirm the intent before fulfilling an intent.
3093	//
3094	//    * ElicitIntent - Amazon Lex wants to elicit the user's intent.
3095	//
3096	//    * ElicitSlot - Amazon Lex is expecting the value of a slot for the current
3097	//    intent.
3098	//
3099	//    * Failed - Conveys that the conversation with the user has failed. This
3100	//    can happen for various reasons, including the user does not provide an
3101	//    appropriate response to prompts from the service, or if the Lambda function
3102	//    fails to fulfill the intent.
3103	//
3104	//    * Fulfilled - Conveys that the Lambda function has sucessfully fulfilled
3105	//    the intent.
3106	//
3107	//    * ReadyForFulfillment - Conveys that the client has to fulfill the intent.
3108	DialogState *string `location:"header" locationName:"x-amz-lex-dialog-state" type:"string" enum:"DialogState"`
3109
3110	// The name of the current intent.
3111	IntentName *string `location:"header" locationName:"x-amz-lex-intent-name" type:"string"`
3112
3113	// The next message that should be presented to the user.
3114	Message *string `location:"header" locationName:"x-amz-lex-message" min:"1" type:"string" sensitive:"true"`
3115
3116	// The format of the response message. One of the following values:
3117	//
3118	//    * PlainText - The message contains plain UTF-8 text.
3119	//
3120	//    * CustomPayload - The message is a custom format for the client.
3121	//
3122	//    * SSML - The message contains text formatted for voice output.
3123	//
3124	//    * Composite - The message contains an escaped JSON object containing one
3125	//    or more messages from the groups that messages were assigned to when the
3126	//    intent was created.
3127	MessageFormat *string `location:"header" locationName:"x-amz-lex-message-format" type:"string" enum:"MessageFormatType"`
3128
3129	// Map of key/value pairs representing session-specific context information.
3130	SessionAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-session-attributes" type:"jsonvalue"`
3131
3132	// A unique identifier for the session.
3133	SessionId *string `location:"header" locationName:"x-amz-lex-session-id" type:"string"`
3134
3135	// If the dialogState is ElicitSlot, returns the name of the slot for which
3136	// Amazon Lex is eliciting a value.
3137	SlotToElicit *string `location:"header" locationName:"x-amz-lex-slot-to-elicit" type:"string"`
3138
3139	// Map of zero or more intent slots Amazon Lex detected from the user input
3140	// during the conversation.
3141	//
3142	// Amazon Lex creates a resolution list containing likely values for a slot.
3143	// The value that it returns is determined by the valueSelectionStrategy selected
3144	// when the slot type was created or updated. If valueSelectionStrategy is set
3145	// to ORIGINAL_VALUE, the value provided by the user is returned, if the user
3146	// value is similar to the slot values. If valueSelectionStrategy is set to
3147	// TOP_RESOLUTION Amazon Lex returns the first value in the resolution list
3148	// or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy
3149	// the default is ORIGINAL_VALUE.
3150	Slots aws.JSONValue `location:"header" locationName:"x-amz-lex-slots" type:"jsonvalue"`
3151}
3152
3153// String returns the string representation
3154func (s PutSessionOutput) String() string {
3155	return awsutil.Prettify(s)
3156}
3157
3158// GoString returns the string representation
3159func (s PutSessionOutput) GoString() string {
3160	return s.String()
3161}
3162
3163// SetActiveContexts sets the ActiveContexts field's value.
3164func (s *PutSessionOutput) SetActiveContexts(v aws.JSONValue) *PutSessionOutput {
3165	s.ActiveContexts = v
3166	return s
3167}
3168
3169// SetAudioStream sets the AudioStream field's value.
3170func (s *PutSessionOutput) SetAudioStream(v io.ReadCloser) *PutSessionOutput {
3171	s.AudioStream = v
3172	return s
3173}
3174
3175// SetContentType sets the ContentType field's value.
3176func (s *PutSessionOutput) SetContentType(v string) *PutSessionOutput {
3177	s.ContentType = &v
3178	return s
3179}
3180
3181// SetDialogState sets the DialogState field's value.
3182func (s *PutSessionOutput) SetDialogState(v string) *PutSessionOutput {
3183	s.DialogState = &v
3184	return s
3185}
3186
3187// SetIntentName sets the IntentName field's value.
3188func (s *PutSessionOutput) SetIntentName(v string) *PutSessionOutput {
3189	s.IntentName = &v
3190	return s
3191}
3192
3193// SetMessage sets the Message field's value.
3194func (s *PutSessionOutput) SetMessage(v string) *PutSessionOutput {
3195	s.Message = &v
3196	return s
3197}
3198
3199// SetMessageFormat sets the MessageFormat field's value.
3200func (s *PutSessionOutput) SetMessageFormat(v string) *PutSessionOutput {
3201	s.MessageFormat = &v
3202	return s
3203}
3204
3205// SetSessionAttributes sets the SessionAttributes field's value.
3206func (s *PutSessionOutput) SetSessionAttributes(v aws.JSONValue) *PutSessionOutput {
3207	s.SessionAttributes = v
3208	return s
3209}
3210
3211// SetSessionId sets the SessionId field's value.
3212func (s *PutSessionOutput) SetSessionId(v string) *PutSessionOutput {
3213	s.SessionId = &v
3214	return s
3215}
3216
3217// SetSlotToElicit sets the SlotToElicit field's value.
3218func (s *PutSessionOutput) SetSlotToElicit(v string) *PutSessionOutput {
3219	s.SlotToElicit = &v
3220	return s
3221}
3222
3223// SetSlots sets the Slots field's value.
3224func (s *PutSessionOutput) SetSlots(v aws.JSONValue) *PutSessionOutput {
3225	s.Slots = v
3226	return s
3227}
3228
3229// The input speech is too long.
3230type RequestTimeoutException struct {
3231	_            struct{}                  `type:"structure"`
3232	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
3233
3234	Message_ *string `locationName:"message" type:"string"`
3235}
3236
3237// String returns the string representation
3238func (s RequestTimeoutException) String() string {
3239	return awsutil.Prettify(s)
3240}
3241
3242// GoString returns the string representation
3243func (s RequestTimeoutException) GoString() string {
3244	return s.String()
3245}
3246
3247func newErrorRequestTimeoutException(v protocol.ResponseMetadata) error {
3248	return &RequestTimeoutException{
3249		RespMetadata: v,
3250	}
3251}
3252
3253// Code returns the exception type name.
3254func (s *RequestTimeoutException) Code() string {
3255	return "RequestTimeoutException"
3256}
3257
3258// Message returns the exception's message.
3259func (s *RequestTimeoutException) Message() string {
3260	if s.Message_ != nil {
3261		return *s.Message_
3262	}
3263	return ""
3264}
3265
3266// OrigErr always returns nil, satisfies awserr.Error interface.
3267func (s *RequestTimeoutException) OrigErr() error {
3268	return nil
3269}
3270
3271func (s *RequestTimeoutException) Error() string {
3272	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
3273}
3274
3275// Status code returns the HTTP status code for the request's response error.
3276func (s *RequestTimeoutException) StatusCode() int {
3277	return s.RespMetadata.StatusCode
3278}
3279
3280// RequestID returns the service's response RequestID for request.
3281func (s *RequestTimeoutException) RequestID() string {
3282	return s.RespMetadata.RequestID
3283}
3284
3285// If you configure a response card when creating your bots, Amazon Lex substitutes
3286// the session attributes and slot values that are available, and then returns
3287// it. The response card can also come from a Lambda function ( dialogCodeHook
3288// and fulfillmentActivity on an intent).
3289type ResponseCard struct {
3290	_ struct{} `type:"structure"`
3291
3292	// The content type of the response.
3293	ContentType *string `locationName:"contentType" type:"string" enum:"ContentType"`
3294
3295	// An array of attachment objects representing options.
3296	GenericAttachments []*GenericAttachment `locationName:"genericAttachments" type:"list"`
3297
3298	// The version of the response card format.
3299	Version *string `locationName:"version" type:"string"`
3300}
3301
3302// String returns the string representation
3303func (s ResponseCard) String() string {
3304	return awsutil.Prettify(s)
3305}
3306
3307// GoString returns the string representation
3308func (s ResponseCard) GoString() string {
3309	return s.String()
3310}
3311
3312// SetContentType sets the ContentType field's value.
3313func (s *ResponseCard) SetContentType(v string) *ResponseCard {
3314	s.ContentType = &v
3315	return s
3316}
3317
3318// SetGenericAttachments sets the GenericAttachments field's value.
3319func (s *ResponseCard) SetGenericAttachments(v []*GenericAttachment) *ResponseCard {
3320	s.GenericAttachments = v
3321	return s
3322}
3323
3324// SetVersion sets the Version field's value.
3325func (s *ResponseCard) SetVersion(v string) *ResponseCard {
3326	s.Version = &v
3327	return s
3328}
3329
3330// The sentiment expressed in an utterance.
3331//
3332// When the bot is configured to send utterances to Amazon Comprehend for sentiment
3333// analysis, this field structure contains the result of the analysis.
3334type SentimentResponse struct {
3335	_ struct{} `type:"structure"`
3336
3337	// The inferred sentiment that Amazon Comprehend has the highest confidence
3338	// in.
3339	SentimentLabel *string `locationName:"sentimentLabel" type:"string"`
3340
3341	// The likelihood that the sentiment was correctly inferred.
3342	SentimentScore *string `locationName:"sentimentScore" type:"string"`
3343}
3344
3345// String returns the string representation
3346func (s SentimentResponse) String() string {
3347	return awsutil.Prettify(s)
3348}
3349
3350// GoString returns the string representation
3351func (s SentimentResponse) GoString() string {
3352	return s.String()
3353}
3354
3355// SetSentimentLabel sets the SentimentLabel field's value.
3356func (s *SentimentResponse) SetSentimentLabel(v string) *SentimentResponse {
3357	s.SentimentLabel = &v
3358	return s
3359}
3360
3361// SetSentimentScore sets the SentimentScore field's value.
3362func (s *SentimentResponse) SetSentimentScore(v string) *SentimentResponse {
3363	s.SentimentScore = &v
3364	return s
3365}
3366
3367// The Content-Type header (PostContent API) has an invalid value.
3368type UnsupportedMediaTypeException struct {
3369	_            struct{}                  `type:"structure"`
3370	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
3371
3372	Message_ *string `locationName:"message" type:"string"`
3373}
3374
3375// String returns the string representation
3376func (s UnsupportedMediaTypeException) String() string {
3377	return awsutil.Prettify(s)
3378}
3379
3380// GoString returns the string representation
3381func (s UnsupportedMediaTypeException) GoString() string {
3382	return s.String()
3383}
3384
3385func newErrorUnsupportedMediaTypeException(v protocol.ResponseMetadata) error {
3386	return &UnsupportedMediaTypeException{
3387		RespMetadata: v,
3388	}
3389}
3390
3391// Code returns the exception type name.
3392func (s *UnsupportedMediaTypeException) Code() string {
3393	return "UnsupportedMediaTypeException"
3394}
3395
3396// Message returns the exception's message.
3397func (s *UnsupportedMediaTypeException) Message() string {
3398	if s.Message_ != nil {
3399		return *s.Message_
3400	}
3401	return ""
3402}
3403
3404// OrigErr always returns nil, satisfies awserr.Error interface.
3405func (s *UnsupportedMediaTypeException) OrigErr() error {
3406	return nil
3407}
3408
3409func (s *UnsupportedMediaTypeException) Error() string {
3410	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
3411}
3412
3413// Status code returns the HTTP status code for the request's response error.
3414func (s *UnsupportedMediaTypeException) StatusCode() int {
3415	return s.RespMetadata.StatusCode
3416}
3417
3418// RequestID returns the service's response RequestID for request.
3419func (s *UnsupportedMediaTypeException) RequestID() string {
3420	return s.RespMetadata.RequestID
3421}
3422
3423const (
3424	// ConfirmationStatusNone is a ConfirmationStatus enum value
3425	ConfirmationStatusNone = "None"
3426
3427	// ConfirmationStatusConfirmed is a ConfirmationStatus enum value
3428	ConfirmationStatusConfirmed = "Confirmed"
3429
3430	// ConfirmationStatusDenied is a ConfirmationStatus enum value
3431	ConfirmationStatusDenied = "Denied"
3432)
3433
3434// ConfirmationStatus_Values returns all elements of the ConfirmationStatus enum
3435func ConfirmationStatus_Values() []string {
3436	return []string{
3437		ConfirmationStatusNone,
3438		ConfirmationStatusConfirmed,
3439		ConfirmationStatusDenied,
3440	}
3441}
3442
3443const (
3444	// ContentTypeApplicationVndAmazonawsCardGeneric is a ContentType enum value
3445	ContentTypeApplicationVndAmazonawsCardGeneric = "application/vnd.amazonaws.card.generic"
3446)
3447
3448// ContentType_Values returns all elements of the ContentType enum
3449func ContentType_Values() []string {
3450	return []string{
3451		ContentTypeApplicationVndAmazonawsCardGeneric,
3452	}
3453}
3454
3455const (
3456	// DialogActionTypeElicitIntent is a DialogActionType enum value
3457	DialogActionTypeElicitIntent = "ElicitIntent"
3458
3459	// DialogActionTypeConfirmIntent is a DialogActionType enum value
3460	DialogActionTypeConfirmIntent = "ConfirmIntent"
3461
3462	// DialogActionTypeElicitSlot is a DialogActionType enum value
3463	DialogActionTypeElicitSlot = "ElicitSlot"
3464
3465	// DialogActionTypeClose is a DialogActionType enum value
3466	DialogActionTypeClose = "Close"
3467
3468	// DialogActionTypeDelegate is a DialogActionType enum value
3469	DialogActionTypeDelegate = "Delegate"
3470)
3471
3472// DialogActionType_Values returns all elements of the DialogActionType enum
3473func DialogActionType_Values() []string {
3474	return []string{
3475		DialogActionTypeElicitIntent,
3476		DialogActionTypeConfirmIntent,
3477		DialogActionTypeElicitSlot,
3478		DialogActionTypeClose,
3479		DialogActionTypeDelegate,
3480	}
3481}
3482
3483const (
3484	// DialogStateElicitIntent is a DialogState enum value
3485	DialogStateElicitIntent = "ElicitIntent"
3486
3487	// DialogStateConfirmIntent is a DialogState enum value
3488	DialogStateConfirmIntent = "ConfirmIntent"
3489
3490	// DialogStateElicitSlot is a DialogState enum value
3491	DialogStateElicitSlot = "ElicitSlot"
3492
3493	// DialogStateFulfilled is a DialogState enum value
3494	DialogStateFulfilled = "Fulfilled"
3495
3496	// DialogStateReadyForFulfillment is a DialogState enum value
3497	DialogStateReadyForFulfillment = "ReadyForFulfillment"
3498
3499	// DialogStateFailed is a DialogState enum value
3500	DialogStateFailed = "Failed"
3501)
3502
3503// DialogState_Values returns all elements of the DialogState enum
3504func DialogState_Values() []string {
3505	return []string{
3506		DialogStateElicitIntent,
3507		DialogStateConfirmIntent,
3508		DialogStateElicitSlot,
3509		DialogStateFulfilled,
3510		DialogStateReadyForFulfillment,
3511		DialogStateFailed,
3512	}
3513}
3514
3515const (
3516	// FulfillmentStateFulfilled is a FulfillmentState enum value
3517	FulfillmentStateFulfilled = "Fulfilled"
3518
3519	// FulfillmentStateFailed is a FulfillmentState enum value
3520	FulfillmentStateFailed = "Failed"
3521
3522	// FulfillmentStateReadyForFulfillment is a FulfillmentState enum value
3523	FulfillmentStateReadyForFulfillment = "ReadyForFulfillment"
3524)
3525
3526// FulfillmentState_Values returns all elements of the FulfillmentState enum
3527func FulfillmentState_Values() []string {
3528	return []string{
3529		FulfillmentStateFulfilled,
3530		FulfillmentStateFailed,
3531		FulfillmentStateReadyForFulfillment,
3532	}
3533}
3534
3535const (
3536	// MessageFormatTypePlainText is a MessageFormatType enum value
3537	MessageFormatTypePlainText = "PlainText"
3538
3539	// MessageFormatTypeCustomPayload is a MessageFormatType enum value
3540	MessageFormatTypeCustomPayload = "CustomPayload"
3541
3542	// MessageFormatTypeSsml is a MessageFormatType enum value
3543	MessageFormatTypeSsml = "SSML"
3544
3545	// MessageFormatTypeComposite is a MessageFormatType enum value
3546	MessageFormatTypeComposite = "Composite"
3547)
3548
3549// MessageFormatType_Values returns all elements of the MessageFormatType enum
3550func MessageFormatType_Values() []string {
3551	return []string{
3552		MessageFormatTypePlainText,
3553		MessageFormatTypeCustomPayload,
3554		MessageFormatTypeSsml,
3555		MessageFormatTypeComposite,
3556	}
3557}
3558