github.com/aavshr/aws-sdk-go@v1.41.3/service/lexruntimeservice/api.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package lexruntimeservice
     4  
     5  import (
     6  	"fmt"
     7  	"io"
     8  
     9  	"github.com/aavshr/aws-sdk-go/aws"
    10  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    11  	"github.com/aavshr/aws-sdk-go/aws/request"
    12  	"github.com/aavshr/aws-sdk-go/aws/signer/v4"
    13  	"github.com/aavshr/aws-sdk-go/private/protocol"
    14  )
    15  
    16  const 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
    42  func (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
    88  func (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.
   102  func (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  
   109  const 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
   135  func (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
   178  func (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.
   192  func (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  
   199  const 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
   225  func (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
   348  func (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.
   362  func (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  
   369  const 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
   395  func (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
   501  func (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.
   515  func (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  
   522  const 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
   548  func (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
   617  func (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.
   631  func (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.
   642  type 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.
   663  //
   664  // API parameter values that are decorated as "sensitive" in the API will not
   665  // be included in the string output. The member name will be present, but the
   666  // value will be replaced with "sensitive".
   667  func (s ActiveContext) String() string {
   668  	return awsutil.Prettify(s)
   669  }
   670  
   671  // GoString returns the string representation.
   672  //
   673  // API parameter values that are decorated as "sensitive" in the API will not
   674  // be included in the string output. The member name will be present, but the
   675  // value will be replaced with "sensitive".
   676  func (s ActiveContext) GoString() string {
   677  	return s.String()
   678  }
   679  
   680  // Validate inspects the fields of the type to determine if they are valid.
   681  func (s *ActiveContext) Validate() error {
   682  	invalidParams := request.ErrInvalidParams{Context: "ActiveContext"}
   683  	if s.Name == nil {
   684  		invalidParams.Add(request.NewErrParamRequired("Name"))
   685  	}
   686  	if s.Name != nil && len(*s.Name) < 1 {
   687  		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
   688  	}
   689  	if s.Parameters == nil {
   690  		invalidParams.Add(request.NewErrParamRequired("Parameters"))
   691  	}
   692  	if s.TimeToLive == nil {
   693  		invalidParams.Add(request.NewErrParamRequired("TimeToLive"))
   694  	}
   695  	if s.TimeToLive != nil {
   696  		if err := s.TimeToLive.Validate(); err != nil {
   697  			invalidParams.AddNested("TimeToLive", err.(request.ErrInvalidParams))
   698  		}
   699  	}
   700  
   701  	if invalidParams.Len() > 0 {
   702  		return invalidParams
   703  	}
   704  	return nil
   705  }
   706  
   707  // SetName sets the Name field's value.
   708  func (s *ActiveContext) SetName(v string) *ActiveContext {
   709  	s.Name = &v
   710  	return s
   711  }
   712  
   713  // SetParameters sets the Parameters field's value.
   714  func (s *ActiveContext) SetParameters(v map[string]*string) *ActiveContext {
   715  	s.Parameters = v
   716  	return s
   717  }
   718  
   719  // SetTimeToLive sets the TimeToLive field's value.
   720  func (s *ActiveContext) SetTimeToLive(v *ActiveContextTimeToLive) *ActiveContext {
   721  	s.TimeToLive = v
   722  	return s
   723  }
   724  
   725  // The length of time or number of turns that a context remains active.
   726  type ActiveContextTimeToLive struct {
   727  	_ struct{} `type:"structure"`
   728  
   729  	// The number of seconds that the context should be active after it is first
   730  	// sent in a PostContent or PostText response. You can set the value between
   731  	// 5 and 86,400 seconds (24 hours).
   732  	TimeToLiveInSeconds *int64 `locationName:"timeToLiveInSeconds" min:"5" type:"integer"`
   733  
   734  	// The number of conversation turns that the context should be active. A conversation
   735  	// turn is one PostContent or PostText request and the corresponding response
   736  	// from Amazon Lex.
   737  	TurnsToLive *int64 `locationName:"turnsToLive" min:"1" type:"integer"`
   738  }
   739  
   740  // String returns the string representation.
   741  //
   742  // API parameter values that are decorated as "sensitive" in the API will not
   743  // be included in the string output. The member name will be present, but the
   744  // value will be replaced with "sensitive".
   745  func (s ActiveContextTimeToLive) String() string {
   746  	return awsutil.Prettify(s)
   747  }
   748  
   749  // GoString returns the string representation.
   750  //
   751  // API parameter values that are decorated as "sensitive" in the API will not
   752  // be included in the string output. The member name will be present, but the
   753  // value will be replaced with "sensitive".
   754  func (s ActiveContextTimeToLive) GoString() string {
   755  	return s.String()
   756  }
   757  
   758  // Validate inspects the fields of the type to determine if they are valid.
   759  func (s *ActiveContextTimeToLive) Validate() error {
   760  	invalidParams := request.ErrInvalidParams{Context: "ActiveContextTimeToLive"}
   761  	if s.TimeToLiveInSeconds != nil && *s.TimeToLiveInSeconds < 5 {
   762  		invalidParams.Add(request.NewErrParamMinValue("TimeToLiveInSeconds", 5))
   763  	}
   764  	if s.TurnsToLive != nil && *s.TurnsToLive < 1 {
   765  		invalidParams.Add(request.NewErrParamMinValue("TurnsToLive", 1))
   766  	}
   767  
   768  	if invalidParams.Len() > 0 {
   769  		return invalidParams
   770  	}
   771  	return nil
   772  }
   773  
   774  // SetTimeToLiveInSeconds sets the TimeToLiveInSeconds field's value.
   775  func (s *ActiveContextTimeToLive) SetTimeToLiveInSeconds(v int64) *ActiveContextTimeToLive {
   776  	s.TimeToLiveInSeconds = &v
   777  	return s
   778  }
   779  
   780  // SetTurnsToLive sets the TurnsToLive field's value.
   781  func (s *ActiveContextTimeToLive) SetTurnsToLive(v int64) *ActiveContextTimeToLive {
   782  	s.TurnsToLive = &v
   783  	return s
   784  }
   785  
   786  // Either the Amazon Lex bot is still building, or one of the dependent services
   787  // (Amazon Polly, AWS Lambda) failed with an internal service error.
   788  type BadGatewayException struct {
   789  	_            struct{}                  `type:"structure"`
   790  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   791  
   792  	Message_ *string `locationName:"Message" type:"string"`
   793  }
   794  
   795  // String returns the string representation.
   796  //
   797  // API parameter values that are decorated as "sensitive" in the API will not
   798  // be included in the string output. The member name will be present, but the
   799  // value will be replaced with "sensitive".
   800  func (s BadGatewayException) String() string {
   801  	return awsutil.Prettify(s)
   802  }
   803  
   804  // GoString returns the string representation.
   805  //
   806  // API parameter values that are decorated as "sensitive" in the API will not
   807  // be included in the string output. The member name will be present, but the
   808  // value will be replaced with "sensitive".
   809  func (s BadGatewayException) GoString() string {
   810  	return s.String()
   811  }
   812  
   813  func newErrorBadGatewayException(v protocol.ResponseMetadata) error {
   814  	return &BadGatewayException{
   815  		RespMetadata: v,
   816  	}
   817  }
   818  
   819  // Code returns the exception type name.
   820  func (s *BadGatewayException) Code() string {
   821  	return "BadGatewayException"
   822  }
   823  
   824  // Message returns the exception's message.
   825  func (s *BadGatewayException) Message() string {
   826  	if s.Message_ != nil {
   827  		return *s.Message_
   828  	}
   829  	return ""
   830  }
   831  
   832  // OrigErr always returns nil, satisfies awserr.Error interface.
   833  func (s *BadGatewayException) OrigErr() error {
   834  	return nil
   835  }
   836  
   837  func (s *BadGatewayException) Error() string {
   838  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   839  }
   840  
   841  // Status code returns the HTTP status code for the request's response error.
   842  func (s *BadGatewayException) StatusCode() int {
   843  	return s.RespMetadata.StatusCode
   844  }
   845  
   846  // RequestID returns the service's response RequestID for request.
   847  func (s *BadGatewayException) RequestID() string {
   848  	return s.RespMetadata.RequestID
   849  }
   850  
   851  // Request validation failed, there is no usable message in the context, or
   852  // the bot build failed, is still in progress, or contains unbuilt changes.
   853  type BadRequestException struct {
   854  	_            struct{}                  `type:"structure"`
   855  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   856  
   857  	Message_ *string `locationName:"message" type:"string"`
   858  }
   859  
   860  // String returns the string representation.
   861  //
   862  // API parameter values that are decorated as "sensitive" in the API will not
   863  // be included in the string output. The member name will be present, but the
   864  // value will be replaced with "sensitive".
   865  func (s BadRequestException) String() string {
   866  	return awsutil.Prettify(s)
   867  }
   868  
   869  // GoString returns the string representation.
   870  //
   871  // API parameter values that are decorated as "sensitive" in the API will not
   872  // be included in the string output. The member name will be present, but the
   873  // value will be replaced with "sensitive".
   874  func (s BadRequestException) GoString() string {
   875  	return s.String()
   876  }
   877  
   878  func newErrorBadRequestException(v protocol.ResponseMetadata) error {
   879  	return &BadRequestException{
   880  		RespMetadata: v,
   881  	}
   882  }
   883  
   884  // Code returns the exception type name.
   885  func (s *BadRequestException) Code() string {
   886  	return "BadRequestException"
   887  }
   888  
   889  // Message returns the exception's message.
   890  func (s *BadRequestException) Message() string {
   891  	if s.Message_ != nil {
   892  		return *s.Message_
   893  	}
   894  	return ""
   895  }
   896  
   897  // OrigErr always returns nil, satisfies awserr.Error interface.
   898  func (s *BadRequestException) OrigErr() error {
   899  	return nil
   900  }
   901  
   902  func (s *BadRequestException) Error() string {
   903  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   904  }
   905  
   906  // Status code returns the HTTP status code for the request's response error.
   907  func (s *BadRequestException) StatusCode() int {
   908  	return s.RespMetadata.StatusCode
   909  }
   910  
   911  // RequestID returns the service's response RequestID for request.
   912  func (s *BadRequestException) RequestID() string {
   913  	return s.RespMetadata.RequestID
   914  }
   915  
   916  // Represents an option to be shown on the client platform (Facebook, Slack,
   917  // etc.)
   918  type Button struct {
   919  	_ struct{} `type:"structure"`
   920  
   921  	// Text that is visible to the user on the button.
   922  	//
   923  	// Text is a required field
   924  	Text *string `locationName:"text" min:"1" type:"string" required:"true"`
   925  
   926  	// The value sent to Amazon Lex when a user chooses the button. For example,
   927  	// consider button text "NYC." When the user chooses the button, the value sent
   928  	// can be "New York City."
   929  	//
   930  	// Value is a required field
   931  	Value *string `locationName:"value" min:"1" type:"string" required:"true"`
   932  }
   933  
   934  // String returns the string representation.
   935  //
   936  // API parameter values that are decorated as "sensitive" in the API will not
   937  // be included in the string output. The member name will be present, but the
   938  // value will be replaced with "sensitive".
   939  func (s Button) String() string {
   940  	return awsutil.Prettify(s)
   941  }
   942  
   943  // GoString returns the string representation.
   944  //
   945  // API parameter values that are decorated as "sensitive" in the API will not
   946  // be included in the string output. The member name will be present, but the
   947  // value will be replaced with "sensitive".
   948  func (s Button) GoString() string {
   949  	return s.String()
   950  }
   951  
   952  // SetText sets the Text field's value.
   953  func (s *Button) SetText(v string) *Button {
   954  	s.Text = &v
   955  	return s
   956  }
   957  
   958  // SetValue sets the Value field's value.
   959  func (s *Button) SetValue(v string) *Button {
   960  	s.Value = &v
   961  	return s
   962  }
   963  
   964  // Two clients are using the same AWS account, Amazon Lex bot, and user ID.
   965  type ConflictException struct {
   966  	_            struct{}                  `type:"structure"`
   967  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   968  
   969  	Message_ *string `locationName:"message" type:"string"`
   970  }
   971  
   972  // String returns the string representation.
   973  //
   974  // API parameter values that are decorated as "sensitive" in the API will not
   975  // be included in the string output. The member name will be present, but the
   976  // value will be replaced with "sensitive".
   977  func (s ConflictException) String() string {
   978  	return awsutil.Prettify(s)
   979  }
   980  
   981  // GoString returns the string representation.
   982  //
   983  // API parameter values that are decorated as "sensitive" in the API will not
   984  // be included in the string output. The member name will be present, but the
   985  // value will be replaced with "sensitive".
   986  func (s ConflictException) GoString() string {
   987  	return s.String()
   988  }
   989  
   990  func newErrorConflictException(v protocol.ResponseMetadata) error {
   991  	return &ConflictException{
   992  		RespMetadata: v,
   993  	}
   994  }
   995  
   996  // Code returns the exception type name.
   997  func (s *ConflictException) Code() string {
   998  	return "ConflictException"
   999  }
  1000  
  1001  // Message returns the exception's message.
  1002  func (s *ConflictException) Message() string {
  1003  	if s.Message_ != nil {
  1004  		return *s.Message_
  1005  	}
  1006  	return ""
  1007  }
  1008  
  1009  // OrigErr always returns nil, satisfies awserr.Error interface.
  1010  func (s *ConflictException) OrigErr() error {
  1011  	return nil
  1012  }
  1013  
  1014  func (s *ConflictException) Error() string {
  1015  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1016  }
  1017  
  1018  // Status code returns the HTTP status code for the request's response error.
  1019  func (s *ConflictException) StatusCode() int {
  1020  	return s.RespMetadata.StatusCode
  1021  }
  1022  
  1023  // RequestID returns the service's response RequestID for request.
  1024  func (s *ConflictException) RequestID() string {
  1025  	return s.RespMetadata.RequestID
  1026  }
  1027  
  1028  type DeleteSessionInput struct {
  1029  	_ struct{} `type:"structure" nopayload:"true"`
  1030  
  1031  	// The alias in use for the bot that contains the session data.
  1032  	//
  1033  	// BotAlias is a required field
  1034  	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
  1035  
  1036  	// The name of the bot that contains the session data.
  1037  	//
  1038  	// BotName is a required field
  1039  	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
  1040  
  1041  	// The identifier of the user associated with the session data.
  1042  	//
  1043  	// UserId is a required field
  1044  	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
  1045  }
  1046  
  1047  // String returns the string representation.
  1048  //
  1049  // API parameter values that are decorated as "sensitive" in the API will not
  1050  // be included in the string output. The member name will be present, but the
  1051  // value will be replaced with "sensitive".
  1052  func (s DeleteSessionInput) String() string {
  1053  	return awsutil.Prettify(s)
  1054  }
  1055  
  1056  // GoString returns the string representation.
  1057  //
  1058  // API parameter values that are decorated as "sensitive" in the API will not
  1059  // be included in the string output. The member name will be present, but the
  1060  // value will be replaced with "sensitive".
  1061  func (s DeleteSessionInput) GoString() string {
  1062  	return s.String()
  1063  }
  1064  
  1065  // Validate inspects the fields of the type to determine if they are valid.
  1066  func (s *DeleteSessionInput) Validate() error {
  1067  	invalidParams := request.ErrInvalidParams{Context: "DeleteSessionInput"}
  1068  	if s.BotAlias == nil {
  1069  		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
  1070  	}
  1071  	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
  1072  		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
  1073  	}
  1074  	if s.BotName == nil {
  1075  		invalidParams.Add(request.NewErrParamRequired("BotName"))
  1076  	}
  1077  	if s.BotName != nil && len(*s.BotName) < 1 {
  1078  		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
  1079  	}
  1080  	if s.UserId == nil {
  1081  		invalidParams.Add(request.NewErrParamRequired("UserId"))
  1082  	}
  1083  	if s.UserId != nil && len(*s.UserId) < 2 {
  1084  		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
  1085  	}
  1086  
  1087  	if invalidParams.Len() > 0 {
  1088  		return invalidParams
  1089  	}
  1090  	return nil
  1091  }
  1092  
  1093  // SetBotAlias sets the BotAlias field's value.
  1094  func (s *DeleteSessionInput) SetBotAlias(v string) *DeleteSessionInput {
  1095  	s.BotAlias = &v
  1096  	return s
  1097  }
  1098  
  1099  // SetBotName sets the BotName field's value.
  1100  func (s *DeleteSessionInput) SetBotName(v string) *DeleteSessionInput {
  1101  	s.BotName = &v
  1102  	return s
  1103  }
  1104  
  1105  // SetUserId sets the UserId field's value.
  1106  func (s *DeleteSessionInput) SetUserId(v string) *DeleteSessionInput {
  1107  	s.UserId = &v
  1108  	return s
  1109  }
  1110  
  1111  type DeleteSessionOutput struct {
  1112  	_ struct{} `type:"structure"`
  1113  
  1114  	// The alias in use for the bot associated with the session data.
  1115  	BotAlias *string `locationName:"botAlias" type:"string"`
  1116  
  1117  	// The name of the bot associated with the session data.
  1118  	BotName *string `locationName:"botName" type:"string"`
  1119  
  1120  	// The unique identifier for the session.
  1121  	SessionId *string `locationName:"sessionId" type:"string"`
  1122  
  1123  	// The ID of the client application user.
  1124  	UserId *string `locationName:"userId" min:"2" type:"string"`
  1125  }
  1126  
  1127  // String returns the string representation.
  1128  //
  1129  // API parameter values that are decorated as "sensitive" in the API will not
  1130  // be included in the string output. The member name will be present, but the
  1131  // value will be replaced with "sensitive".
  1132  func (s DeleteSessionOutput) String() string {
  1133  	return awsutil.Prettify(s)
  1134  }
  1135  
  1136  // GoString returns the string representation.
  1137  //
  1138  // API parameter values that are decorated as "sensitive" in the API will not
  1139  // be included in the string output. The member name will be present, but the
  1140  // value will be replaced with "sensitive".
  1141  func (s DeleteSessionOutput) GoString() string {
  1142  	return s.String()
  1143  }
  1144  
  1145  // SetBotAlias sets the BotAlias field's value.
  1146  func (s *DeleteSessionOutput) SetBotAlias(v string) *DeleteSessionOutput {
  1147  	s.BotAlias = &v
  1148  	return s
  1149  }
  1150  
  1151  // SetBotName sets the BotName field's value.
  1152  func (s *DeleteSessionOutput) SetBotName(v string) *DeleteSessionOutput {
  1153  	s.BotName = &v
  1154  	return s
  1155  }
  1156  
  1157  // SetSessionId sets the SessionId field's value.
  1158  func (s *DeleteSessionOutput) SetSessionId(v string) *DeleteSessionOutput {
  1159  	s.SessionId = &v
  1160  	return s
  1161  }
  1162  
  1163  // SetUserId sets the UserId field's value.
  1164  func (s *DeleteSessionOutput) SetUserId(v string) *DeleteSessionOutput {
  1165  	s.UserId = &v
  1166  	return s
  1167  }
  1168  
  1169  // One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception.
  1170  // For example,
  1171  //
  1172  //    * If Amazon Lex does not have sufficient permissions to call a Lambda
  1173  //    function.
  1174  //
  1175  //    * If a Lambda function takes longer than 30 seconds to execute.
  1176  //
  1177  //    * If a fulfillment Lambda function returns a Delegate dialog action without
  1178  //    removing any slot values.
  1179  type DependencyFailedException struct {
  1180  	_            struct{}                  `type:"structure"`
  1181  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1182  
  1183  	Message_ *string `locationName:"Message" type:"string"`
  1184  }
  1185  
  1186  // String returns the string representation.
  1187  //
  1188  // API parameter values that are decorated as "sensitive" in the API will not
  1189  // be included in the string output. The member name will be present, but the
  1190  // value will be replaced with "sensitive".
  1191  func (s DependencyFailedException) String() string {
  1192  	return awsutil.Prettify(s)
  1193  }
  1194  
  1195  // GoString returns the string representation.
  1196  //
  1197  // API parameter values that are decorated as "sensitive" in the API will not
  1198  // be included in the string output. The member name will be present, but the
  1199  // value will be replaced with "sensitive".
  1200  func (s DependencyFailedException) GoString() string {
  1201  	return s.String()
  1202  }
  1203  
  1204  func newErrorDependencyFailedException(v protocol.ResponseMetadata) error {
  1205  	return &DependencyFailedException{
  1206  		RespMetadata: v,
  1207  	}
  1208  }
  1209  
  1210  // Code returns the exception type name.
  1211  func (s *DependencyFailedException) Code() string {
  1212  	return "DependencyFailedException"
  1213  }
  1214  
  1215  // Message returns the exception's message.
  1216  func (s *DependencyFailedException) Message() string {
  1217  	if s.Message_ != nil {
  1218  		return *s.Message_
  1219  	}
  1220  	return ""
  1221  }
  1222  
  1223  // OrigErr always returns nil, satisfies awserr.Error interface.
  1224  func (s *DependencyFailedException) OrigErr() error {
  1225  	return nil
  1226  }
  1227  
  1228  func (s *DependencyFailedException) Error() string {
  1229  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1230  }
  1231  
  1232  // Status code returns the HTTP status code for the request's response error.
  1233  func (s *DependencyFailedException) StatusCode() int {
  1234  	return s.RespMetadata.StatusCode
  1235  }
  1236  
  1237  // RequestID returns the service's response RequestID for request.
  1238  func (s *DependencyFailedException) RequestID() string {
  1239  	return s.RespMetadata.RequestID
  1240  }
  1241  
  1242  // Describes the next action that the bot should take in its interaction with
  1243  // the user and provides information about the context in which the action takes
  1244  // place. Use the DialogAction data type to set the interaction to a specific
  1245  // state, or to return the interaction to a previous state.
  1246  type DialogAction struct {
  1247  	_ struct{} `type:"structure"`
  1248  
  1249  	// The fulfillment state of the intent. The possible values are:
  1250  	//
  1251  	//    * Failed - The Lambda function associated with the intent failed to fulfill
  1252  	//    the intent.
  1253  	//
  1254  	//    * Fulfilled - The intent has fulfilled by the Lambda function associated
  1255  	//    with the intent.
  1256  	//
  1257  	//    * ReadyForFulfillment - All of the information necessary for the intent
  1258  	//    is present and the intent ready to be fulfilled by the client application.
  1259  	FulfillmentState *string `locationName:"fulfillmentState" type:"string" enum:"FulfillmentState"`
  1260  
  1261  	// The name of the intent.
  1262  	IntentName *string `locationName:"intentName" type:"string"`
  1263  
  1264  	// The message that should be shown to the user. If you don't specify a message,
  1265  	// Amazon Lex will use the message configured for the intent.
  1266  	//
  1267  	// Message is a sensitive parameter and its value will be
  1268  	// replaced with "sensitive" in string returned by DialogAction's
  1269  	// String and GoString methods.
  1270  	Message *string `locationName:"message" min:"1" type:"string" sensitive:"true"`
  1271  
  1272  	//    * PlainText - The message contains plain UTF-8 text.
  1273  	//
  1274  	//    * CustomPayload - The message is a custom format for the client.
  1275  	//
  1276  	//    * SSML - The message contains text formatted for voice output.
  1277  	//
  1278  	//    * Composite - The message contains an escaped JSON object containing one
  1279  	//    or more messages. For more information, see Message Groups (https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html).
  1280  	MessageFormat *string `locationName:"messageFormat" type:"string" enum:"MessageFormatType"`
  1281  
  1282  	// The name of the slot that should be elicited from the user.
  1283  	SlotToElicit *string `locationName:"slotToElicit" type:"string"`
  1284  
  1285  	// Map of the slots that have been gathered and their values.
  1286  	//
  1287  	// Slots is a sensitive parameter and its value will be
  1288  	// replaced with "sensitive" in string returned by DialogAction's
  1289  	// String and GoString methods.
  1290  	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
  1291  
  1292  	// The next action that the bot should take in its interaction with the user.
  1293  	// The possible values are:
  1294  	//
  1295  	//    * ConfirmIntent - The next action is asking the user if the intent is
  1296  	//    complete and ready to be fulfilled. This is a yes/no question such as
  1297  	//    "Place the order?"
  1298  	//
  1299  	//    * Close - Indicates that the there will not be a response from the user.
  1300  	//    For example, the statement "Your order has been placed" does not require
  1301  	//    a response.
  1302  	//
  1303  	//    * Delegate - The next action is determined by Amazon Lex.
  1304  	//
  1305  	//    * ElicitIntent - The next action is to determine the intent that the user
  1306  	//    wants to fulfill.
  1307  	//
  1308  	//    * ElicitSlot - The next action is to elicit a slot value from the user.
  1309  	//
  1310  	// Type is a required field
  1311  	Type *string `locationName:"type" type:"string" required:"true" enum:"DialogActionType"`
  1312  }
  1313  
  1314  // String returns the string representation.
  1315  //
  1316  // API parameter values that are decorated as "sensitive" in the API will not
  1317  // be included in the string output. The member name will be present, but the
  1318  // value will be replaced with "sensitive".
  1319  func (s DialogAction) String() string {
  1320  	return awsutil.Prettify(s)
  1321  }
  1322  
  1323  // GoString returns the string representation.
  1324  //
  1325  // API parameter values that are decorated as "sensitive" in the API will not
  1326  // be included in the string output. The member name will be present, but the
  1327  // value will be replaced with "sensitive".
  1328  func (s DialogAction) GoString() string {
  1329  	return s.String()
  1330  }
  1331  
  1332  // Validate inspects the fields of the type to determine if they are valid.
  1333  func (s *DialogAction) Validate() error {
  1334  	invalidParams := request.ErrInvalidParams{Context: "DialogAction"}
  1335  	if s.Message != nil && len(*s.Message) < 1 {
  1336  		invalidParams.Add(request.NewErrParamMinLen("Message", 1))
  1337  	}
  1338  	if s.Type == nil {
  1339  		invalidParams.Add(request.NewErrParamRequired("Type"))
  1340  	}
  1341  
  1342  	if invalidParams.Len() > 0 {
  1343  		return invalidParams
  1344  	}
  1345  	return nil
  1346  }
  1347  
  1348  // SetFulfillmentState sets the FulfillmentState field's value.
  1349  func (s *DialogAction) SetFulfillmentState(v string) *DialogAction {
  1350  	s.FulfillmentState = &v
  1351  	return s
  1352  }
  1353  
  1354  // SetIntentName sets the IntentName field's value.
  1355  func (s *DialogAction) SetIntentName(v string) *DialogAction {
  1356  	s.IntentName = &v
  1357  	return s
  1358  }
  1359  
  1360  // SetMessage sets the Message field's value.
  1361  func (s *DialogAction) SetMessage(v string) *DialogAction {
  1362  	s.Message = &v
  1363  	return s
  1364  }
  1365  
  1366  // SetMessageFormat sets the MessageFormat field's value.
  1367  func (s *DialogAction) SetMessageFormat(v string) *DialogAction {
  1368  	s.MessageFormat = &v
  1369  	return s
  1370  }
  1371  
  1372  // SetSlotToElicit sets the SlotToElicit field's value.
  1373  func (s *DialogAction) SetSlotToElicit(v string) *DialogAction {
  1374  	s.SlotToElicit = &v
  1375  	return s
  1376  }
  1377  
  1378  // SetSlots sets the Slots field's value.
  1379  func (s *DialogAction) SetSlots(v map[string]*string) *DialogAction {
  1380  	s.Slots = v
  1381  	return s
  1382  }
  1383  
  1384  // SetType sets the Type field's value.
  1385  func (s *DialogAction) SetType(v string) *DialogAction {
  1386  	s.Type = &v
  1387  	return s
  1388  }
  1389  
  1390  // Represents an option rendered to the user when a prompt is shown. It could
  1391  // be an image, a button, a link, or text.
  1392  type GenericAttachment struct {
  1393  	_ struct{} `type:"structure"`
  1394  
  1395  	// The URL of an attachment to the response card.
  1396  	AttachmentLinkUrl *string `locationName:"attachmentLinkUrl" min:"1" type:"string"`
  1397  
  1398  	// The list of options to show to the user.
  1399  	Buttons []*Button `locationName:"buttons" type:"list"`
  1400  
  1401  	// The URL of an image that is displayed to the user.
  1402  	ImageUrl *string `locationName:"imageUrl" min:"1" type:"string"`
  1403  
  1404  	// The subtitle shown below the title.
  1405  	SubTitle *string `locationName:"subTitle" min:"1" type:"string"`
  1406  
  1407  	// The title of the option.
  1408  	Title *string `locationName:"title" min:"1" type:"string"`
  1409  }
  1410  
  1411  // String returns the string representation.
  1412  //
  1413  // API parameter values that are decorated as "sensitive" in the API will not
  1414  // be included in the string output. The member name will be present, but the
  1415  // value will be replaced with "sensitive".
  1416  func (s GenericAttachment) String() string {
  1417  	return awsutil.Prettify(s)
  1418  }
  1419  
  1420  // GoString returns the string representation.
  1421  //
  1422  // API parameter values that are decorated as "sensitive" in the API will not
  1423  // be included in the string output. The member name will be present, but the
  1424  // value will be replaced with "sensitive".
  1425  func (s GenericAttachment) GoString() string {
  1426  	return s.String()
  1427  }
  1428  
  1429  // SetAttachmentLinkUrl sets the AttachmentLinkUrl field's value.
  1430  func (s *GenericAttachment) SetAttachmentLinkUrl(v string) *GenericAttachment {
  1431  	s.AttachmentLinkUrl = &v
  1432  	return s
  1433  }
  1434  
  1435  // SetButtons sets the Buttons field's value.
  1436  func (s *GenericAttachment) SetButtons(v []*Button) *GenericAttachment {
  1437  	s.Buttons = v
  1438  	return s
  1439  }
  1440  
  1441  // SetImageUrl sets the ImageUrl field's value.
  1442  func (s *GenericAttachment) SetImageUrl(v string) *GenericAttachment {
  1443  	s.ImageUrl = &v
  1444  	return s
  1445  }
  1446  
  1447  // SetSubTitle sets the SubTitle field's value.
  1448  func (s *GenericAttachment) SetSubTitle(v string) *GenericAttachment {
  1449  	s.SubTitle = &v
  1450  	return s
  1451  }
  1452  
  1453  // SetTitle sets the Title field's value.
  1454  func (s *GenericAttachment) SetTitle(v string) *GenericAttachment {
  1455  	s.Title = &v
  1456  	return s
  1457  }
  1458  
  1459  type GetSessionInput struct {
  1460  	_ struct{} `type:"structure" nopayload:"true"`
  1461  
  1462  	// The alias in use for the bot that contains the session data.
  1463  	//
  1464  	// BotAlias is a required field
  1465  	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
  1466  
  1467  	// The name of the bot that contains the session data.
  1468  	//
  1469  	// BotName is a required field
  1470  	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
  1471  
  1472  	// A string used to filter the intents returned in the recentIntentSummaryView
  1473  	// structure.
  1474  	//
  1475  	// When you specify a filter, only intents with their checkpointLabel field
  1476  	// set to that string are returned.
  1477  	CheckpointLabelFilter *string `location:"querystring" locationName:"checkpointLabelFilter" min:"1" type:"string"`
  1478  
  1479  	// The ID of the client application user. Amazon Lex uses this to identify a
  1480  	// user's conversation with your bot.
  1481  	//
  1482  	// UserId is a required field
  1483  	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
  1484  }
  1485  
  1486  // String returns the string representation.
  1487  //
  1488  // API parameter values that are decorated as "sensitive" in the API will not
  1489  // be included in the string output. The member name will be present, but the
  1490  // value will be replaced with "sensitive".
  1491  func (s GetSessionInput) String() string {
  1492  	return awsutil.Prettify(s)
  1493  }
  1494  
  1495  // GoString returns the string representation.
  1496  //
  1497  // API parameter values that are decorated as "sensitive" in the API will not
  1498  // be included in the string output. The member name will be present, but the
  1499  // value will be replaced with "sensitive".
  1500  func (s GetSessionInput) GoString() string {
  1501  	return s.String()
  1502  }
  1503  
  1504  // Validate inspects the fields of the type to determine if they are valid.
  1505  func (s *GetSessionInput) Validate() error {
  1506  	invalidParams := request.ErrInvalidParams{Context: "GetSessionInput"}
  1507  	if s.BotAlias == nil {
  1508  		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
  1509  	}
  1510  	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
  1511  		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
  1512  	}
  1513  	if s.BotName == nil {
  1514  		invalidParams.Add(request.NewErrParamRequired("BotName"))
  1515  	}
  1516  	if s.BotName != nil && len(*s.BotName) < 1 {
  1517  		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
  1518  	}
  1519  	if s.CheckpointLabelFilter != nil && len(*s.CheckpointLabelFilter) < 1 {
  1520  		invalidParams.Add(request.NewErrParamMinLen("CheckpointLabelFilter", 1))
  1521  	}
  1522  	if s.UserId == nil {
  1523  		invalidParams.Add(request.NewErrParamRequired("UserId"))
  1524  	}
  1525  	if s.UserId != nil && len(*s.UserId) < 2 {
  1526  		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
  1527  	}
  1528  
  1529  	if invalidParams.Len() > 0 {
  1530  		return invalidParams
  1531  	}
  1532  	return nil
  1533  }
  1534  
  1535  // SetBotAlias sets the BotAlias field's value.
  1536  func (s *GetSessionInput) SetBotAlias(v string) *GetSessionInput {
  1537  	s.BotAlias = &v
  1538  	return s
  1539  }
  1540  
  1541  // SetBotName sets the BotName field's value.
  1542  func (s *GetSessionInput) SetBotName(v string) *GetSessionInput {
  1543  	s.BotName = &v
  1544  	return s
  1545  }
  1546  
  1547  // SetCheckpointLabelFilter sets the CheckpointLabelFilter field's value.
  1548  func (s *GetSessionInput) SetCheckpointLabelFilter(v string) *GetSessionInput {
  1549  	s.CheckpointLabelFilter = &v
  1550  	return s
  1551  }
  1552  
  1553  // SetUserId sets the UserId field's value.
  1554  func (s *GetSessionInput) SetUserId(v string) *GetSessionInput {
  1555  	s.UserId = &v
  1556  	return s
  1557  }
  1558  
  1559  type GetSessionOutput struct {
  1560  	_ struct{} `type:"structure"`
  1561  
  1562  	// A list of active contexts for the session. A context can be set when an intent
  1563  	// is fulfilled or by calling the PostContent, PostText, or PutSession operation.
  1564  	//
  1565  	// You can use a context to control the intents that can follow up an intent,
  1566  	// or to modify the operation of your application.
  1567  	//
  1568  	// ActiveContexts is a sensitive parameter and its value will be
  1569  	// replaced with "sensitive" in string returned by GetSessionOutput's
  1570  	// String and GoString methods.
  1571  	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
  1572  
  1573  	// Describes the current state of the bot.
  1574  	DialogAction *DialogAction `locationName:"dialogAction" type:"structure"`
  1575  
  1576  	// An array of information about the intents used in the session. The array
  1577  	// can contain a maximum of three summaries. If more than three intents are
  1578  	// used in the session, the recentIntentSummaryView operation contains information
  1579  	// about the last three intents used.
  1580  	//
  1581  	// If you set the checkpointLabelFilter parameter in the request, the array
  1582  	// contains only the intents with the specified label.
  1583  	RecentIntentSummaryView []*IntentSummary `locationName:"recentIntentSummaryView" type:"list"`
  1584  
  1585  	// Map of key/value pairs representing the session-specific context information.
  1586  	// It contains application information passed between Amazon Lex and a client
  1587  	// application.
  1588  	//
  1589  	// SessionAttributes is a sensitive parameter and its value will be
  1590  	// replaced with "sensitive" in string returned by GetSessionOutput's
  1591  	// String and GoString methods.
  1592  	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
  1593  
  1594  	// A unique identifier for the session.
  1595  	SessionId *string `locationName:"sessionId" type:"string"`
  1596  }
  1597  
  1598  // String returns the string representation.
  1599  //
  1600  // API parameter values that are decorated as "sensitive" in the API will not
  1601  // be included in the string output. The member name will be present, but the
  1602  // value will be replaced with "sensitive".
  1603  func (s GetSessionOutput) String() string {
  1604  	return awsutil.Prettify(s)
  1605  }
  1606  
  1607  // GoString returns the string representation.
  1608  //
  1609  // API parameter values that are decorated as "sensitive" in the API will not
  1610  // be included in the string output. The member name will be present, but the
  1611  // value will be replaced with "sensitive".
  1612  func (s GetSessionOutput) GoString() string {
  1613  	return s.String()
  1614  }
  1615  
  1616  // SetActiveContexts sets the ActiveContexts field's value.
  1617  func (s *GetSessionOutput) SetActiveContexts(v []*ActiveContext) *GetSessionOutput {
  1618  	s.ActiveContexts = v
  1619  	return s
  1620  }
  1621  
  1622  // SetDialogAction sets the DialogAction field's value.
  1623  func (s *GetSessionOutput) SetDialogAction(v *DialogAction) *GetSessionOutput {
  1624  	s.DialogAction = v
  1625  	return s
  1626  }
  1627  
  1628  // SetRecentIntentSummaryView sets the RecentIntentSummaryView field's value.
  1629  func (s *GetSessionOutput) SetRecentIntentSummaryView(v []*IntentSummary) *GetSessionOutput {
  1630  	s.RecentIntentSummaryView = v
  1631  	return s
  1632  }
  1633  
  1634  // SetSessionAttributes sets the SessionAttributes field's value.
  1635  func (s *GetSessionOutput) SetSessionAttributes(v map[string]*string) *GetSessionOutput {
  1636  	s.SessionAttributes = v
  1637  	return s
  1638  }
  1639  
  1640  // SetSessionId sets the SessionId field's value.
  1641  func (s *GetSessionOutput) SetSessionId(v string) *GetSessionOutput {
  1642  	s.SessionId = &v
  1643  	return s
  1644  }
  1645  
  1646  // Provides a score that indicates the confidence that Amazon Lex has that an
  1647  // intent is the one that satisfies the user's intent.
  1648  type IntentConfidence struct {
  1649  	_ struct{} `type:"structure"`
  1650  
  1651  	// A score that indicates how confident Amazon Lex is that an intent satisfies
  1652  	// the user's intent. Ranges between 0.00 and 1.00. Higher scores indicate higher
  1653  	// confidence.
  1654  	Score *float64 `locationName:"score" type:"double"`
  1655  }
  1656  
  1657  // String returns the string representation.
  1658  //
  1659  // API parameter values that are decorated as "sensitive" in the API will not
  1660  // be included in the string output. The member name will be present, but the
  1661  // value will be replaced with "sensitive".
  1662  func (s IntentConfidence) String() string {
  1663  	return awsutil.Prettify(s)
  1664  }
  1665  
  1666  // GoString returns the string representation.
  1667  //
  1668  // API parameter values that are decorated as "sensitive" in the API will not
  1669  // be included in the string output. The member name will be present, but the
  1670  // value will be replaced with "sensitive".
  1671  func (s IntentConfidence) GoString() string {
  1672  	return s.String()
  1673  }
  1674  
  1675  // SetScore sets the Score field's value.
  1676  func (s *IntentConfidence) SetScore(v float64) *IntentConfidence {
  1677  	s.Score = &v
  1678  	return s
  1679  }
  1680  
  1681  // Provides information about the state of an intent. You can use this information
  1682  // to get the current state of an intent so that you can process the intent,
  1683  // or so that you can return the intent to its previous state.
  1684  type IntentSummary struct {
  1685  	_ struct{} `type:"structure"`
  1686  
  1687  	// A user-defined label that identifies a particular intent. You can use this
  1688  	// label to return to a previous intent.
  1689  	//
  1690  	// Use the checkpointLabelFilter parameter of the GetSessionRequest operation
  1691  	// to filter the intents returned by the operation to those with only the specified
  1692  	// label.
  1693  	CheckpointLabel *string `locationName:"checkpointLabel" min:"1" type:"string"`
  1694  
  1695  	// The status of the intent after the user responds to the confirmation prompt.
  1696  	// If the user confirms the intent, Amazon Lex sets this field to Confirmed.
  1697  	// If the user denies the intent, Amazon Lex sets this value to Denied. The
  1698  	// possible values are:
  1699  	//
  1700  	//    * Confirmed - The user has responded "Yes" to the confirmation prompt,
  1701  	//    confirming that the intent is complete and that it is ready to be fulfilled.
  1702  	//
  1703  	//    * Denied - The user has responded "No" to the confirmation prompt.
  1704  	//
  1705  	//    * None - The user has never been prompted for confirmation; or, the user
  1706  	//    was prompted but did not confirm or deny the prompt.
  1707  	ConfirmationStatus *string `locationName:"confirmationStatus" type:"string" enum:"ConfirmationStatus"`
  1708  
  1709  	// The next action that the bot should take in its interaction with the user.
  1710  	// The possible values are:
  1711  	//
  1712  	//    * ConfirmIntent - The next action is asking the user if the intent is
  1713  	//    complete and ready to be fulfilled. This is a yes/no question such as
  1714  	//    "Place the order?"
  1715  	//
  1716  	//    * Close - Indicates that the there will not be a response from the user.
  1717  	//    For example, the statement "Your order has been placed" does not require
  1718  	//    a response.
  1719  	//
  1720  	//    * ElicitIntent - The next action is to determine the intent that the user
  1721  	//    wants to fulfill.
  1722  	//
  1723  	//    * ElicitSlot - The next action is to elicit a slot value from the user.
  1724  	//
  1725  	// DialogActionType is a required field
  1726  	DialogActionType *string `locationName:"dialogActionType" type:"string" required:"true" enum:"DialogActionType"`
  1727  
  1728  	// The fulfillment state of the intent. The possible values are:
  1729  	//
  1730  	//    * Failed - The Lambda function associated with the intent failed to fulfill
  1731  	//    the intent.
  1732  	//
  1733  	//    * Fulfilled - The intent has fulfilled by the Lambda function associated
  1734  	//    with the intent.
  1735  	//
  1736  	//    * ReadyForFulfillment - All of the information necessary for the intent
  1737  	//    is present and the intent ready to be fulfilled by the client application.
  1738  	FulfillmentState *string `locationName:"fulfillmentState" type:"string" enum:"FulfillmentState"`
  1739  
  1740  	// The name of the intent.
  1741  	IntentName *string `locationName:"intentName" type:"string"`
  1742  
  1743  	// The next slot to elicit from the user. If there is not slot to elicit, the
  1744  	// field is blank.
  1745  	SlotToElicit *string `locationName:"slotToElicit" type:"string"`
  1746  
  1747  	// Map of the slots that have been gathered and their values.
  1748  	//
  1749  	// Slots is a sensitive parameter and its value will be
  1750  	// replaced with "sensitive" in string returned by IntentSummary's
  1751  	// String and GoString methods.
  1752  	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
  1753  }
  1754  
  1755  // String returns the string representation.
  1756  //
  1757  // API parameter values that are decorated as "sensitive" in the API will not
  1758  // be included in the string output. The member name will be present, but the
  1759  // value will be replaced with "sensitive".
  1760  func (s IntentSummary) String() string {
  1761  	return awsutil.Prettify(s)
  1762  }
  1763  
  1764  // GoString returns the string representation.
  1765  //
  1766  // API parameter values that are decorated as "sensitive" in the API will not
  1767  // be included in the string output. The member name will be present, but the
  1768  // value will be replaced with "sensitive".
  1769  func (s IntentSummary) GoString() string {
  1770  	return s.String()
  1771  }
  1772  
  1773  // Validate inspects the fields of the type to determine if they are valid.
  1774  func (s *IntentSummary) Validate() error {
  1775  	invalidParams := request.ErrInvalidParams{Context: "IntentSummary"}
  1776  	if s.CheckpointLabel != nil && len(*s.CheckpointLabel) < 1 {
  1777  		invalidParams.Add(request.NewErrParamMinLen("CheckpointLabel", 1))
  1778  	}
  1779  	if s.DialogActionType == nil {
  1780  		invalidParams.Add(request.NewErrParamRequired("DialogActionType"))
  1781  	}
  1782  
  1783  	if invalidParams.Len() > 0 {
  1784  		return invalidParams
  1785  	}
  1786  	return nil
  1787  }
  1788  
  1789  // SetCheckpointLabel sets the CheckpointLabel field's value.
  1790  func (s *IntentSummary) SetCheckpointLabel(v string) *IntentSummary {
  1791  	s.CheckpointLabel = &v
  1792  	return s
  1793  }
  1794  
  1795  // SetConfirmationStatus sets the ConfirmationStatus field's value.
  1796  func (s *IntentSummary) SetConfirmationStatus(v string) *IntentSummary {
  1797  	s.ConfirmationStatus = &v
  1798  	return s
  1799  }
  1800  
  1801  // SetDialogActionType sets the DialogActionType field's value.
  1802  func (s *IntentSummary) SetDialogActionType(v string) *IntentSummary {
  1803  	s.DialogActionType = &v
  1804  	return s
  1805  }
  1806  
  1807  // SetFulfillmentState sets the FulfillmentState field's value.
  1808  func (s *IntentSummary) SetFulfillmentState(v string) *IntentSummary {
  1809  	s.FulfillmentState = &v
  1810  	return s
  1811  }
  1812  
  1813  // SetIntentName sets the IntentName field's value.
  1814  func (s *IntentSummary) SetIntentName(v string) *IntentSummary {
  1815  	s.IntentName = &v
  1816  	return s
  1817  }
  1818  
  1819  // SetSlotToElicit sets the SlotToElicit field's value.
  1820  func (s *IntentSummary) SetSlotToElicit(v string) *IntentSummary {
  1821  	s.SlotToElicit = &v
  1822  	return s
  1823  }
  1824  
  1825  // SetSlots sets the Slots field's value.
  1826  func (s *IntentSummary) SetSlots(v map[string]*string) *IntentSummary {
  1827  	s.Slots = v
  1828  	return s
  1829  }
  1830  
  1831  // Internal service error. Retry the call.
  1832  type InternalFailureException struct {
  1833  	_            struct{}                  `type:"structure"`
  1834  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1835  
  1836  	Message_ *string `locationName:"message" type:"string"`
  1837  }
  1838  
  1839  // String returns the string representation.
  1840  //
  1841  // API parameter values that are decorated as "sensitive" in the API will not
  1842  // be included in the string output. The member name will be present, but the
  1843  // value will be replaced with "sensitive".
  1844  func (s InternalFailureException) String() string {
  1845  	return awsutil.Prettify(s)
  1846  }
  1847  
  1848  // GoString returns the string representation.
  1849  //
  1850  // API parameter values that are decorated as "sensitive" in the API will not
  1851  // be included in the string output. The member name will be present, but the
  1852  // value will be replaced with "sensitive".
  1853  func (s InternalFailureException) GoString() string {
  1854  	return s.String()
  1855  }
  1856  
  1857  func newErrorInternalFailureException(v protocol.ResponseMetadata) error {
  1858  	return &InternalFailureException{
  1859  		RespMetadata: v,
  1860  	}
  1861  }
  1862  
  1863  // Code returns the exception type name.
  1864  func (s *InternalFailureException) Code() string {
  1865  	return "InternalFailureException"
  1866  }
  1867  
  1868  // Message returns the exception's message.
  1869  func (s *InternalFailureException) Message() string {
  1870  	if s.Message_ != nil {
  1871  		return *s.Message_
  1872  	}
  1873  	return ""
  1874  }
  1875  
  1876  // OrigErr always returns nil, satisfies awserr.Error interface.
  1877  func (s *InternalFailureException) OrigErr() error {
  1878  	return nil
  1879  }
  1880  
  1881  func (s *InternalFailureException) Error() string {
  1882  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1883  }
  1884  
  1885  // Status code returns the HTTP status code for the request's response error.
  1886  func (s *InternalFailureException) StatusCode() int {
  1887  	return s.RespMetadata.StatusCode
  1888  }
  1889  
  1890  // RequestID returns the service's response RequestID for request.
  1891  func (s *InternalFailureException) RequestID() string {
  1892  	return s.RespMetadata.RequestID
  1893  }
  1894  
  1895  // Exceeded a limit.
  1896  type LimitExceededException struct {
  1897  	_            struct{}                  `type:"structure"`
  1898  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1899  
  1900  	Message_ *string `locationName:"message" type:"string"`
  1901  
  1902  	RetryAfterSeconds *string `location:"header" locationName:"Retry-After" type:"string"`
  1903  }
  1904  
  1905  // String returns the string representation.
  1906  //
  1907  // API parameter values that are decorated as "sensitive" in the API will not
  1908  // be included in the string output. The member name will be present, but the
  1909  // value will be replaced with "sensitive".
  1910  func (s LimitExceededException) String() string {
  1911  	return awsutil.Prettify(s)
  1912  }
  1913  
  1914  // GoString returns the string representation.
  1915  //
  1916  // API parameter values that are decorated as "sensitive" in the API will not
  1917  // be included in the string output. The member name will be present, but the
  1918  // value will be replaced with "sensitive".
  1919  func (s LimitExceededException) GoString() string {
  1920  	return s.String()
  1921  }
  1922  
  1923  func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
  1924  	return &LimitExceededException{
  1925  		RespMetadata: v,
  1926  	}
  1927  }
  1928  
  1929  // Code returns the exception type name.
  1930  func (s *LimitExceededException) Code() string {
  1931  	return "LimitExceededException"
  1932  }
  1933  
  1934  // Message returns the exception's message.
  1935  func (s *LimitExceededException) Message() string {
  1936  	if s.Message_ != nil {
  1937  		return *s.Message_
  1938  	}
  1939  	return ""
  1940  }
  1941  
  1942  // OrigErr always returns nil, satisfies awserr.Error interface.
  1943  func (s *LimitExceededException) OrigErr() error {
  1944  	return nil
  1945  }
  1946  
  1947  func (s *LimitExceededException) Error() string {
  1948  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1949  }
  1950  
  1951  // Status code returns the HTTP status code for the request's response error.
  1952  func (s *LimitExceededException) StatusCode() int {
  1953  	return s.RespMetadata.StatusCode
  1954  }
  1955  
  1956  // RequestID returns the service's response RequestID for request.
  1957  func (s *LimitExceededException) RequestID() string {
  1958  	return s.RespMetadata.RequestID
  1959  }
  1960  
  1961  // This exception is not used.
  1962  type LoopDetectedException struct {
  1963  	_            struct{}                  `type:"structure"`
  1964  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1965  
  1966  	Message_ *string `locationName:"Message" type:"string"`
  1967  }
  1968  
  1969  // String returns the string representation.
  1970  //
  1971  // API parameter values that are decorated as "sensitive" in the API will not
  1972  // be included in the string output. The member name will be present, but the
  1973  // value will be replaced with "sensitive".
  1974  func (s LoopDetectedException) String() string {
  1975  	return awsutil.Prettify(s)
  1976  }
  1977  
  1978  // GoString returns the string representation.
  1979  //
  1980  // API parameter values that are decorated as "sensitive" in the API will not
  1981  // be included in the string output. The member name will be present, but the
  1982  // value will be replaced with "sensitive".
  1983  func (s LoopDetectedException) GoString() string {
  1984  	return s.String()
  1985  }
  1986  
  1987  func newErrorLoopDetectedException(v protocol.ResponseMetadata) error {
  1988  	return &LoopDetectedException{
  1989  		RespMetadata: v,
  1990  	}
  1991  }
  1992  
  1993  // Code returns the exception type name.
  1994  func (s *LoopDetectedException) Code() string {
  1995  	return "LoopDetectedException"
  1996  }
  1997  
  1998  // Message returns the exception's message.
  1999  func (s *LoopDetectedException) Message() string {
  2000  	if s.Message_ != nil {
  2001  		return *s.Message_
  2002  	}
  2003  	return ""
  2004  }
  2005  
  2006  // OrigErr always returns nil, satisfies awserr.Error interface.
  2007  func (s *LoopDetectedException) OrigErr() error {
  2008  	return nil
  2009  }
  2010  
  2011  func (s *LoopDetectedException) Error() string {
  2012  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  2013  }
  2014  
  2015  // Status code returns the HTTP status code for the request's response error.
  2016  func (s *LoopDetectedException) StatusCode() int {
  2017  	return s.RespMetadata.StatusCode
  2018  }
  2019  
  2020  // RequestID returns the service's response RequestID for request.
  2021  func (s *LoopDetectedException) RequestID() string {
  2022  	return s.RespMetadata.RequestID
  2023  }
  2024  
  2025  // The accept header in the request does not have a valid value.
  2026  type NotAcceptableException struct {
  2027  	_            struct{}                  `type:"structure"`
  2028  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2029  
  2030  	Message_ *string `locationName:"message" type:"string"`
  2031  }
  2032  
  2033  // String returns the string representation.
  2034  //
  2035  // API parameter values that are decorated as "sensitive" in the API will not
  2036  // be included in the string output. The member name will be present, but the
  2037  // value will be replaced with "sensitive".
  2038  func (s NotAcceptableException) String() string {
  2039  	return awsutil.Prettify(s)
  2040  }
  2041  
  2042  // GoString returns the string representation.
  2043  //
  2044  // API parameter values that are decorated as "sensitive" in the API will not
  2045  // be included in the string output. The member name will be present, but the
  2046  // value will be replaced with "sensitive".
  2047  func (s NotAcceptableException) GoString() string {
  2048  	return s.String()
  2049  }
  2050  
  2051  func newErrorNotAcceptableException(v protocol.ResponseMetadata) error {
  2052  	return &NotAcceptableException{
  2053  		RespMetadata: v,
  2054  	}
  2055  }
  2056  
  2057  // Code returns the exception type name.
  2058  func (s *NotAcceptableException) Code() string {
  2059  	return "NotAcceptableException"
  2060  }
  2061  
  2062  // Message returns the exception's message.
  2063  func (s *NotAcceptableException) Message() string {
  2064  	if s.Message_ != nil {
  2065  		return *s.Message_
  2066  	}
  2067  	return ""
  2068  }
  2069  
  2070  // OrigErr always returns nil, satisfies awserr.Error interface.
  2071  func (s *NotAcceptableException) OrigErr() error {
  2072  	return nil
  2073  }
  2074  
  2075  func (s *NotAcceptableException) Error() string {
  2076  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  2077  }
  2078  
  2079  // Status code returns the HTTP status code for the request's response error.
  2080  func (s *NotAcceptableException) StatusCode() int {
  2081  	return s.RespMetadata.StatusCode
  2082  }
  2083  
  2084  // RequestID returns the service's response RequestID for request.
  2085  func (s *NotAcceptableException) RequestID() string {
  2086  	return s.RespMetadata.RequestID
  2087  }
  2088  
  2089  // The resource (such as the Amazon Lex bot or an alias) that is referred to
  2090  // is not found.
  2091  type NotFoundException struct {
  2092  	_            struct{}                  `type:"structure"`
  2093  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2094  
  2095  	Message_ *string `locationName:"message" type:"string"`
  2096  }
  2097  
  2098  // String returns the string representation.
  2099  //
  2100  // API parameter values that are decorated as "sensitive" in the API will not
  2101  // be included in the string output. The member name will be present, but the
  2102  // value will be replaced with "sensitive".
  2103  func (s NotFoundException) String() string {
  2104  	return awsutil.Prettify(s)
  2105  }
  2106  
  2107  // GoString returns the string representation.
  2108  //
  2109  // API parameter values that are decorated as "sensitive" in the API will not
  2110  // be included in the string output. The member name will be present, but the
  2111  // value will be replaced with "sensitive".
  2112  func (s NotFoundException) GoString() string {
  2113  	return s.String()
  2114  }
  2115  
  2116  func newErrorNotFoundException(v protocol.ResponseMetadata) error {
  2117  	return &NotFoundException{
  2118  		RespMetadata: v,
  2119  	}
  2120  }
  2121  
  2122  // Code returns the exception type name.
  2123  func (s *NotFoundException) Code() string {
  2124  	return "NotFoundException"
  2125  }
  2126  
  2127  // Message returns the exception's message.
  2128  func (s *NotFoundException) Message() string {
  2129  	if s.Message_ != nil {
  2130  		return *s.Message_
  2131  	}
  2132  	return ""
  2133  }
  2134  
  2135  // OrigErr always returns nil, satisfies awserr.Error interface.
  2136  func (s *NotFoundException) OrigErr() error {
  2137  	return nil
  2138  }
  2139  
  2140  func (s *NotFoundException) Error() string {
  2141  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  2142  }
  2143  
  2144  // Status code returns the HTTP status code for the request's response error.
  2145  func (s *NotFoundException) StatusCode() int {
  2146  	return s.RespMetadata.StatusCode
  2147  }
  2148  
  2149  // RequestID returns the service's response RequestID for request.
  2150  func (s *NotFoundException) RequestID() string {
  2151  	return s.RespMetadata.RequestID
  2152  }
  2153  
  2154  type PostContentInput struct {
  2155  	_ struct{} `type:"structure" payload:"InputStream"`
  2156  
  2157  	// You pass this value as the Accept HTTP header.
  2158  	//
  2159  	// The message Amazon Lex returns in the response can be either text or speech
  2160  	// based on the Accept HTTP header value in the request.
  2161  	//
  2162  	//    * If the value is text/plain; charset=utf-8, Amazon Lex returns text in
  2163  	//    the response.
  2164  	//
  2165  	//    * If the value begins with audio/, Amazon Lex returns speech in the response.
  2166  	//    Amazon Lex uses Amazon Polly to generate the speech (using the configuration
  2167  	//    you specified in the Accept header). For example, if you specify audio/mpeg
  2168  	//    as the value, Amazon Lex returns speech in the MPEG format.
  2169  	//
  2170  	//    * If the value is audio/pcm, the speech returned is audio/pcm in 16-bit,
  2171  	//    little endian format.
  2172  	//
  2173  	//    * The following are the accepted values: audio/mpeg audio/ogg audio/pcm
  2174  	//    text/plain; charset=utf-8 audio/* (defaults to mpeg)
  2175  	Accept *string `location:"header" locationName:"Accept" type:"string"`
  2176  
  2177  	// A list of contexts active for the request. A context can be activated when
  2178  	// a previous intent is fulfilled, or by including the context in the request,
  2179  	//
  2180  	// If you don't specify a list of contexts, Amazon Lex will use the current
  2181  	// list of contexts for the session. If you specify an empty list, all contexts
  2182  	// for the session are cleared.
  2183  	ActiveContexts aws.JSONValue `location:"header" locationName:"x-amz-lex-active-contexts" type:"jsonvalue"`
  2184  
  2185  	// Alias of the Amazon Lex bot.
  2186  	//
  2187  	// BotAlias is a required field
  2188  	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
  2189  
  2190  	// Name of the Amazon Lex bot.
  2191  	//
  2192  	// BotName is a required field
  2193  	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
  2194  
  2195  	// You pass this value as the Content-Type HTTP header.
  2196  	//
  2197  	// Indicates the audio format or text. The header value must start with one
  2198  	// of the following prefixes:
  2199  	//
  2200  	//    * PCM format, audio data must be in little-endian byte order. audio/l16;
  2201  	//    rate=16000; channels=1 audio/x-l16; sample-rate=16000; channel-count=1
  2202  	//    audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false
  2203  	//
  2204  	//    * Opus format audio/x-cbr-opus-with-preamble; preamble-size=0; bit-rate=256000;
  2205  	//    frame-size-milliseconds=4
  2206  	//
  2207  	//    * Text format text/plain; charset=utf-8
  2208  	//
  2209  	// ContentType is a required field
  2210  	ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true"`
  2211  
  2212  	// User input in PCM or Opus audio format or text format as described in the
  2213  	// Content-Type HTTP header.
  2214  	//
  2215  	// You can stream audio data to Amazon Lex or you can create a local buffer
  2216  	// that captures all of the audio data before sending. In general, you get better
  2217  	// performance if you stream audio data rather than buffering the data locally.
  2218  	//
  2219  	// To use an non-seekable io.Reader for this request wrap the io.Reader with
  2220  	// "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable
  2221  	// readers. This will allow the SDK to send the reader's payload as chunked
  2222  	// transfer encoding.
  2223  	//
  2224  	// InputStream is a required field
  2225  	InputStream io.ReadSeeker `locationName:"inputStream" type:"blob" required:"true"`
  2226  
  2227  	// You pass this value as the x-amz-lex-request-attributes HTTP header.
  2228  	//
  2229  	// Request-specific information passed between Amazon Lex and a client application.
  2230  	// The value must be a JSON serialized and base64 encoded map with string keys
  2231  	// and values. The total size of the requestAttributes and sessionAttributes
  2232  	// headers is limited to 12 KB.
  2233  	//
  2234  	// The namespace x-amz-lex: is reserved for special attributes. Don't create
  2235  	// any request attributes with the prefix x-amz-lex:.
  2236  	//
  2237  	// For more information, see Setting Request Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs).
  2238  	RequestAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-request-attributes" type:"jsonvalue"`
  2239  
  2240  	// You pass this value as the x-amz-lex-session-attributes HTTP header.
  2241  	//
  2242  	// Application-specific information passed between Amazon Lex and a client application.
  2243  	// The value must be a JSON serialized and base64 encoded map with string keys
  2244  	// and values. The total size of the sessionAttributes and requestAttributes
  2245  	// headers is limited to 12 KB.
  2246  	//
  2247  	// For more information, see Setting Session Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs).
  2248  	SessionAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-session-attributes" type:"jsonvalue"`
  2249  
  2250  	// The ID of the client application user. Amazon Lex uses this to identify a
  2251  	// user's conversation with your bot. At runtime, each request must contain
  2252  	// the userID field.
  2253  	//
  2254  	// To decide the user ID to use for your application, consider the following
  2255  	// factors.
  2256  	//
  2257  	//    * The userID field must not contain any personally identifiable information
  2258  	//    of the user, for example, name, personal identification numbers, or other
  2259  	//    end user personal information.
  2260  	//
  2261  	//    * If you want a user to start a conversation on one device and continue
  2262  	//    on another device, use a user-specific identifier.
  2263  	//
  2264  	//    * If you want the same user to be able to have two independent conversations
  2265  	//    on two different devices, choose a device-specific identifier.
  2266  	//
  2267  	//    * A user can't have two independent conversations with two different versions
  2268  	//    of the same bot. For example, a user can't have a conversation with the
  2269  	//    PROD and BETA versions of the same bot. If you anticipate that a user
  2270  	//    will need to have conversation with two different versions, for example,
  2271  	//    while testing, include the bot alias in the user ID to separate the two
  2272  	//    conversations.
  2273  	//
  2274  	// UserId is a required field
  2275  	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
  2276  }
  2277  
  2278  // String returns the string representation.
  2279  //
  2280  // API parameter values that are decorated as "sensitive" in the API will not
  2281  // be included in the string output. The member name will be present, but the
  2282  // value will be replaced with "sensitive".
  2283  func (s PostContentInput) String() string {
  2284  	return awsutil.Prettify(s)
  2285  }
  2286  
  2287  // GoString returns the string representation.
  2288  //
  2289  // API parameter values that are decorated as "sensitive" in the API will not
  2290  // be included in the string output. The member name will be present, but the
  2291  // value will be replaced with "sensitive".
  2292  func (s PostContentInput) GoString() string {
  2293  	return s.String()
  2294  }
  2295  
  2296  // Validate inspects the fields of the type to determine if they are valid.
  2297  func (s *PostContentInput) Validate() error {
  2298  	invalidParams := request.ErrInvalidParams{Context: "PostContentInput"}
  2299  	if s.BotAlias == nil {
  2300  		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
  2301  	}
  2302  	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
  2303  		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
  2304  	}
  2305  	if s.BotName == nil {
  2306  		invalidParams.Add(request.NewErrParamRequired("BotName"))
  2307  	}
  2308  	if s.BotName != nil && len(*s.BotName) < 1 {
  2309  		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
  2310  	}
  2311  	if s.ContentType == nil {
  2312  		invalidParams.Add(request.NewErrParamRequired("ContentType"))
  2313  	}
  2314  	if s.InputStream == nil {
  2315  		invalidParams.Add(request.NewErrParamRequired("InputStream"))
  2316  	}
  2317  	if s.UserId == nil {
  2318  		invalidParams.Add(request.NewErrParamRequired("UserId"))
  2319  	}
  2320  	if s.UserId != nil && len(*s.UserId) < 2 {
  2321  		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
  2322  	}
  2323  
  2324  	if invalidParams.Len() > 0 {
  2325  		return invalidParams
  2326  	}
  2327  	return nil
  2328  }
  2329  
  2330  // SetAccept sets the Accept field's value.
  2331  func (s *PostContentInput) SetAccept(v string) *PostContentInput {
  2332  	s.Accept = &v
  2333  	return s
  2334  }
  2335  
  2336  // SetActiveContexts sets the ActiveContexts field's value.
  2337  func (s *PostContentInput) SetActiveContexts(v aws.JSONValue) *PostContentInput {
  2338  	s.ActiveContexts = v
  2339  	return s
  2340  }
  2341  
  2342  // SetBotAlias sets the BotAlias field's value.
  2343  func (s *PostContentInput) SetBotAlias(v string) *PostContentInput {
  2344  	s.BotAlias = &v
  2345  	return s
  2346  }
  2347  
  2348  // SetBotName sets the BotName field's value.
  2349  func (s *PostContentInput) SetBotName(v string) *PostContentInput {
  2350  	s.BotName = &v
  2351  	return s
  2352  }
  2353  
  2354  // SetContentType sets the ContentType field's value.
  2355  func (s *PostContentInput) SetContentType(v string) *PostContentInput {
  2356  	s.ContentType = &v
  2357  	return s
  2358  }
  2359  
  2360  // SetInputStream sets the InputStream field's value.
  2361  func (s *PostContentInput) SetInputStream(v io.ReadSeeker) *PostContentInput {
  2362  	s.InputStream = v
  2363  	return s
  2364  }
  2365  
  2366  // SetRequestAttributes sets the RequestAttributes field's value.
  2367  func (s *PostContentInput) SetRequestAttributes(v aws.JSONValue) *PostContentInput {
  2368  	s.RequestAttributes = v
  2369  	return s
  2370  }
  2371  
  2372  // SetSessionAttributes sets the SessionAttributes field's value.
  2373  func (s *PostContentInput) SetSessionAttributes(v aws.JSONValue) *PostContentInput {
  2374  	s.SessionAttributes = v
  2375  	return s
  2376  }
  2377  
  2378  // SetUserId sets the UserId field's value.
  2379  func (s *PostContentInput) SetUserId(v string) *PostContentInput {
  2380  	s.UserId = &v
  2381  	return s
  2382  }
  2383  
  2384  type PostContentOutput struct {
  2385  	_ struct{} `type:"structure" payload:"AudioStream"`
  2386  
  2387  	// A list of active contexts for the session. A context can be set when an intent
  2388  	// is fulfilled or by calling the PostContent, PostText, or PutSession operation.
  2389  	//
  2390  	// You can use a context to control the intents that can follow up an intent,
  2391  	// or to modify the operation of your application.
  2392  	ActiveContexts aws.JSONValue `location:"header" locationName:"x-amz-lex-active-contexts" type:"jsonvalue"`
  2393  
  2394  	// One to four alternative intents that may be applicable to the user's intent.
  2395  	//
  2396  	// Each alternative includes a score that indicates how confident Amazon Lex
  2397  	// is that the intent matches the user's intent. The intents are sorted by the
  2398  	// confidence score.
  2399  	AlternativeIntents aws.JSONValue `location:"header" locationName:"x-amz-lex-alternative-intents" type:"jsonvalue"`
  2400  
  2401  	// The prompt (or statement) to convey to the user. This is based on the bot
  2402  	// configuration and context. For example, if Amazon Lex did not understand
  2403  	// the user intent, it sends the clarificationPrompt configured for the bot.
  2404  	// If the intent requires confirmation before taking the fulfillment action,
  2405  	// it sends the confirmationPrompt. Another example: Suppose that the Lambda
  2406  	// function successfully fulfilled the intent, and sent a message to convey
  2407  	// to the user. Then Amazon Lex sends that message in the response.
  2408  	AudioStream io.ReadCloser `locationName:"audioStream" type:"blob"`
  2409  
  2410  	// The version of the bot that responded to the conversation. You can use this
  2411  	// information to help determine if one version of a bot is performing better
  2412  	// than another version.
  2413  	BotVersion *string `location:"header" locationName:"x-amz-lex-bot-version" min:"1" type:"string"`
  2414  
  2415  	// Content type as specified in the Accept HTTP header in the request.
  2416  	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  2417  
  2418  	// Identifies the current state of the user interaction. Amazon Lex returns
  2419  	// one of the following values as dialogState. The client can optionally use
  2420  	// this information to customize the user interface.
  2421  	//
  2422  	//    * ElicitIntent - Amazon Lex wants to elicit the user's intent. Consider
  2423  	//    the following examples: For example, a user might utter an intent ("I
  2424  	//    want to order a pizza"). If Amazon Lex cannot infer the user intent from
  2425  	//    this utterance, it will return this dialog state.
  2426  	//
  2427  	//    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. For
  2428  	//    example, Amazon Lex wants user confirmation before fulfilling an intent.
  2429  	//    Instead of a simple "yes" or "no" response, a user might respond with
  2430  	//    additional information. For example, "yes, but make it a thick crust pizza"
  2431  	//    or "no, I want to order a drink." Amazon Lex can process such additional
  2432  	//    information (in these examples, update the crust type slot or change the
  2433  	//    intent from OrderPizza to OrderDrink).
  2434  	//
  2435  	//    * ElicitSlot - Amazon Lex is expecting the value of a slot for the current
  2436  	//    intent. For example, suppose that in the response Amazon Lex sends this
  2437  	//    message: "What size pizza would you like?". A user might reply with the
  2438  	//    slot value (e.g., "medium"). The user might also provide additional information
  2439  	//    in the response (e.g., "medium thick crust pizza"). Amazon Lex can process
  2440  	//    such additional information appropriately.
  2441  	//
  2442  	//    * Fulfilled - Conveys that the Lambda function has successfully fulfilled
  2443  	//    the intent.
  2444  	//
  2445  	//    * ReadyForFulfillment - Conveys that the client has to fulfill the request.
  2446  	//
  2447  	//    * Failed - Conveys that the conversation with the user failed. This can
  2448  	//    happen for various reasons, including that the user does not provide an
  2449  	//    appropriate response to prompts from the service (you can configure how
  2450  	//    many times Amazon Lex can prompt a user for specific information), or
  2451  	//    if the Lambda function fails to fulfill the intent.
  2452  	DialogState *string `location:"header" locationName:"x-amz-lex-dialog-state" type:"string" enum:"DialogState"`
  2453  
  2454  	// The text used to process the request.
  2455  	//
  2456  	// If the input was an audio stream, the encodedInputTranscript field contains
  2457  	// the text extracted from the audio stream. This is the text that is actually
  2458  	// processed to recognize intents and slot values. You can use this information
  2459  	// to determine if Amazon Lex is correctly processing the audio that you send.
  2460  	//
  2461  	// The encodedInputTranscript field is base-64 encoded. You must decode the
  2462  	// field before you can use the value.
  2463  	//
  2464  	// EncodedInputTranscript is a sensitive parameter and its value will be
  2465  	// replaced with "sensitive" in string returned by PostContentOutput's
  2466  	// String and GoString methods.
  2467  	EncodedInputTranscript *string `location:"header" locationName:"x-amz-lex-encoded-input-transcript" type:"string" sensitive:"true"`
  2468  
  2469  	// The message to convey to the user. The message can come from the bot's configuration
  2470  	// or from a Lambda function.
  2471  	//
  2472  	// If the intent is not configured with a Lambda function, or if the Lambda
  2473  	// function returned Delegate as the dialogAction.type in its response, Amazon
  2474  	// Lex decides on the next course of action and selects an appropriate message
  2475  	// from the bot's configuration based on the current interaction context. For
  2476  	// example, if Amazon Lex isn't able to understand user input, it uses a clarification
  2477  	// prompt message.
  2478  	//
  2479  	// When you create an intent you can assign messages to groups. When messages
  2480  	// are assigned to groups Amazon Lex returns one message from each group in
  2481  	// the response. The message field is an escaped JSON string containing the
  2482  	// messages. For more information about the structure of the JSON string returned,
  2483  	// see msg-prompts-formats.
  2484  	//
  2485  	// If the Lambda function returns a message, Amazon Lex passes it to the client
  2486  	// in its response.
  2487  	//
  2488  	// The encodedMessage field is base-64 encoded. You must decode the field before
  2489  	// you can use the value.
  2490  	//
  2491  	// EncodedMessage is a sensitive parameter and its value will be
  2492  	// replaced with "sensitive" in string returned by PostContentOutput's
  2493  	// String and GoString methods.
  2494  	EncodedMessage *string `location:"header" locationName:"x-amz-lex-encoded-message" min:"1" type:"string" sensitive:"true"`
  2495  
  2496  	// The text used to process the request.
  2497  	//
  2498  	// You can use this field only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES,
  2499  	// es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the inputTranscript
  2500  	// field is null. You should use the encodedInputTranscript field instead.
  2501  	//
  2502  	// If the input was an audio stream, the inputTranscript field contains the
  2503  	// text extracted from the audio stream. This is the text that is actually processed
  2504  	// to recognize intents and slot values. You can use this information to determine
  2505  	// if Amazon Lex is correctly processing the audio that you send.
  2506  	//
  2507  	// Deprecated: The inputTranscript field is deprecated, use the encodedInputTranscript field instead. The inputTranscript field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales.
  2508  	InputTranscript *string `location:"header" locationName:"x-amz-lex-input-transcript" deprecated:"true" type:"string"`
  2509  
  2510  	// Current user intent that Amazon Lex is aware of.
  2511  	IntentName *string `location:"header" locationName:"x-amz-lex-intent-name" type:"string"`
  2512  
  2513  	// You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES,
  2514  	// es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the message
  2515  	// field is null. You should use the encodedMessage field instead.
  2516  	//
  2517  	// The message to convey to the user. The message can come from the bot's configuration
  2518  	// or from a Lambda function.
  2519  	//
  2520  	// If the intent is not configured with a Lambda function, or if the Lambda
  2521  	// function returned Delegate as the dialogAction.type in its response, Amazon
  2522  	// Lex decides on the next course of action and selects an appropriate message
  2523  	// from the bot's configuration based on the current interaction context. For
  2524  	// example, if Amazon Lex isn't able to understand user input, it uses a clarification
  2525  	// prompt message.
  2526  	//
  2527  	// When you create an intent you can assign messages to groups. When messages
  2528  	// are assigned to groups Amazon Lex returns one message from each group in
  2529  	// the response. The message field is an escaped JSON string containing the
  2530  	// messages. For more information about the structure of the JSON string returned,
  2531  	// see msg-prompts-formats.
  2532  	//
  2533  	// If the Lambda function returns a message, Amazon Lex passes it to the client
  2534  	// in its response.
  2535  	//
  2536  	// Deprecated: The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales.
  2537  	//
  2538  	// Message is a sensitive parameter and its value will be
  2539  	// replaced with "sensitive" in string returned by PostContentOutput's
  2540  	// String and GoString methods.
  2541  	Message *string `location:"header" locationName:"x-amz-lex-message" min:"1" deprecated:"true" type:"string" sensitive:"true"`
  2542  
  2543  	// The format of the response message. One of the following values:
  2544  	//
  2545  	//    * PlainText - The message contains plain UTF-8 text.
  2546  	//
  2547  	//    * CustomPayload - The message is a custom format for the client.
  2548  	//
  2549  	//    * SSML - The message contains text formatted for voice output.
  2550  	//
  2551  	//    * Composite - The message contains an escaped JSON object containing one
  2552  	//    or more messages from the groups that messages were assigned to when the
  2553  	//    intent was created.
  2554  	MessageFormat *string `location:"header" locationName:"x-amz-lex-message-format" type:"string" enum:"MessageFormatType"`
  2555  
  2556  	// Provides a score that indicates how confident Amazon Lex is that the returned
  2557  	// intent is the one that matches the user's intent. The score is between 0.0
  2558  	// and 1.0.
  2559  	//
  2560  	// The score is a relative score, not an absolute score. The score may change
  2561  	// based on improvements to Amazon Lex.
  2562  	NluIntentConfidence aws.JSONValue `location:"header" locationName:"x-amz-lex-nlu-intent-confidence" type:"jsonvalue"`
  2563  
  2564  	// The sentiment expressed in an utterance.
  2565  	//
  2566  	// When the bot is configured to send utterances to Amazon Comprehend for sentiment
  2567  	// analysis, this field contains the result of the analysis.
  2568  	SentimentResponse *string `location:"header" locationName:"x-amz-lex-sentiment" type:"string"`
  2569  
  2570  	// Map of key/value pairs representing the session-specific context information.
  2571  	SessionAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-session-attributes" type:"jsonvalue"`
  2572  
  2573  	// The unique identifier for the session.
  2574  	SessionId *string `location:"header" locationName:"x-amz-lex-session-id" type:"string"`
  2575  
  2576  	// If the dialogState value is ElicitSlot, returns the name of the slot for
  2577  	// which Amazon Lex is eliciting a value.
  2578  	SlotToElicit *string `location:"header" locationName:"x-amz-lex-slot-to-elicit" type:"string"`
  2579  
  2580  	// Map of zero or more intent slots (name/value pairs) Amazon Lex detected from
  2581  	// the user input during the conversation. The field is base-64 encoded.
  2582  	//
  2583  	// Amazon Lex creates a resolution list containing likely values for a slot.
  2584  	// The value that it returns is determined by the valueSelectionStrategy selected
  2585  	// when the slot type was created or updated. If valueSelectionStrategy is set
  2586  	// to ORIGINAL_VALUE, the value provided by the user is returned, if the user
  2587  	// value is similar to the slot values. If valueSelectionStrategy is set to
  2588  	// TOP_RESOLUTION Amazon Lex returns the first value in the resolution list
  2589  	// or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy,
  2590  	// the default is ORIGINAL_VALUE.
  2591  	Slots aws.JSONValue `location:"header" locationName:"x-amz-lex-slots" type:"jsonvalue"`
  2592  }
  2593  
  2594  // String returns the string representation.
  2595  //
  2596  // API parameter values that are decorated as "sensitive" in the API will not
  2597  // be included in the string output. The member name will be present, but the
  2598  // value will be replaced with "sensitive".
  2599  func (s PostContentOutput) String() string {
  2600  	return awsutil.Prettify(s)
  2601  }
  2602  
  2603  // GoString returns the string representation.
  2604  //
  2605  // API parameter values that are decorated as "sensitive" in the API will not
  2606  // be included in the string output. The member name will be present, but the
  2607  // value will be replaced with "sensitive".
  2608  func (s PostContentOutput) GoString() string {
  2609  	return s.String()
  2610  }
  2611  
  2612  // SetActiveContexts sets the ActiveContexts field's value.
  2613  func (s *PostContentOutput) SetActiveContexts(v aws.JSONValue) *PostContentOutput {
  2614  	s.ActiveContexts = v
  2615  	return s
  2616  }
  2617  
  2618  // SetAlternativeIntents sets the AlternativeIntents field's value.
  2619  func (s *PostContentOutput) SetAlternativeIntents(v aws.JSONValue) *PostContentOutput {
  2620  	s.AlternativeIntents = v
  2621  	return s
  2622  }
  2623  
  2624  // SetAudioStream sets the AudioStream field's value.
  2625  func (s *PostContentOutput) SetAudioStream(v io.ReadCloser) *PostContentOutput {
  2626  	s.AudioStream = v
  2627  	return s
  2628  }
  2629  
  2630  // SetBotVersion sets the BotVersion field's value.
  2631  func (s *PostContentOutput) SetBotVersion(v string) *PostContentOutput {
  2632  	s.BotVersion = &v
  2633  	return s
  2634  }
  2635  
  2636  // SetContentType sets the ContentType field's value.
  2637  func (s *PostContentOutput) SetContentType(v string) *PostContentOutput {
  2638  	s.ContentType = &v
  2639  	return s
  2640  }
  2641  
  2642  // SetDialogState sets the DialogState field's value.
  2643  func (s *PostContentOutput) SetDialogState(v string) *PostContentOutput {
  2644  	s.DialogState = &v
  2645  	return s
  2646  }
  2647  
  2648  // SetEncodedInputTranscript sets the EncodedInputTranscript field's value.
  2649  func (s *PostContentOutput) SetEncodedInputTranscript(v string) *PostContentOutput {
  2650  	s.EncodedInputTranscript = &v
  2651  	return s
  2652  }
  2653  
  2654  // SetEncodedMessage sets the EncodedMessage field's value.
  2655  func (s *PostContentOutput) SetEncodedMessage(v string) *PostContentOutput {
  2656  	s.EncodedMessage = &v
  2657  	return s
  2658  }
  2659  
  2660  // SetInputTranscript sets the InputTranscript field's value.
  2661  func (s *PostContentOutput) SetInputTranscript(v string) *PostContentOutput {
  2662  	s.InputTranscript = &v
  2663  	return s
  2664  }
  2665  
  2666  // SetIntentName sets the IntentName field's value.
  2667  func (s *PostContentOutput) SetIntentName(v string) *PostContentOutput {
  2668  	s.IntentName = &v
  2669  	return s
  2670  }
  2671  
  2672  // SetMessage sets the Message field's value.
  2673  func (s *PostContentOutput) SetMessage(v string) *PostContentOutput {
  2674  	s.Message = &v
  2675  	return s
  2676  }
  2677  
  2678  // SetMessageFormat sets the MessageFormat field's value.
  2679  func (s *PostContentOutput) SetMessageFormat(v string) *PostContentOutput {
  2680  	s.MessageFormat = &v
  2681  	return s
  2682  }
  2683  
  2684  // SetNluIntentConfidence sets the NluIntentConfidence field's value.
  2685  func (s *PostContentOutput) SetNluIntentConfidence(v aws.JSONValue) *PostContentOutput {
  2686  	s.NluIntentConfidence = v
  2687  	return s
  2688  }
  2689  
  2690  // SetSentimentResponse sets the SentimentResponse field's value.
  2691  func (s *PostContentOutput) SetSentimentResponse(v string) *PostContentOutput {
  2692  	s.SentimentResponse = &v
  2693  	return s
  2694  }
  2695  
  2696  // SetSessionAttributes sets the SessionAttributes field's value.
  2697  func (s *PostContentOutput) SetSessionAttributes(v aws.JSONValue) *PostContentOutput {
  2698  	s.SessionAttributes = v
  2699  	return s
  2700  }
  2701  
  2702  // SetSessionId sets the SessionId field's value.
  2703  func (s *PostContentOutput) SetSessionId(v string) *PostContentOutput {
  2704  	s.SessionId = &v
  2705  	return s
  2706  }
  2707  
  2708  // SetSlotToElicit sets the SlotToElicit field's value.
  2709  func (s *PostContentOutput) SetSlotToElicit(v string) *PostContentOutput {
  2710  	s.SlotToElicit = &v
  2711  	return s
  2712  }
  2713  
  2714  // SetSlots sets the Slots field's value.
  2715  func (s *PostContentOutput) SetSlots(v aws.JSONValue) *PostContentOutput {
  2716  	s.Slots = v
  2717  	return s
  2718  }
  2719  
  2720  type PostTextInput struct {
  2721  	_ struct{} `type:"structure"`
  2722  
  2723  	// A list of contexts active for the request. A context can be activated when
  2724  	// a previous intent is fulfilled, or by including the context in the request,
  2725  	//
  2726  	// If you don't specify a list of contexts, Amazon Lex will use the current
  2727  	// list of contexts for the session. If you specify an empty list, all contexts
  2728  	// for the session are cleared.
  2729  	//
  2730  	// ActiveContexts is a sensitive parameter and its value will be
  2731  	// replaced with "sensitive" in string returned by PostTextInput's
  2732  	// String and GoString methods.
  2733  	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
  2734  
  2735  	// The alias of the Amazon Lex bot.
  2736  	//
  2737  	// BotAlias is a required field
  2738  	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
  2739  
  2740  	// The name of the Amazon Lex bot.
  2741  	//
  2742  	// BotName is a required field
  2743  	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
  2744  
  2745  	// The text that the user entered (Amazon Lex interprets this text).
  2746  	//
  2747  	// InputText is a sensitive parameter and its value will be
  2748  	// replaced with "sensitive" in string returned by PostTextInput's
  2749  	// String and GoString methods.
  2750  	//
  2751  	// InputText is a required field
  2752  	InputText *string `locationName:"inputText" min:"1" type:"string" required:"true" sensitive:"true"`
  2753  
  2754  	// Request-specific information passed between Amazon Lex and a client application.
  2755  	//
  2756  	// The namespace x-amz-lex: is reserved for special attributes. Don't create
  2757  	// any request attributes with the prefix x-amz-lex:.
  2758  	//
  2759  	// For more information, see Setting Request Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs).
  2760  	//
  2761  	// RequestAttributes is a sensitive parameter and its value will be
  2762  	// replaced with "sensitive" in string returned by PostTextInput's
  2763  	// String and GoString methods.
  2764  	RequestAttributes map[string]*string `locationName:"requestAttributes" type:"map" sensitive:"true"`
  2765  
  2766  	// Application-specific information passed between Amazon Lex and a client application.
  2767  	//
  2768  	// For more information, see Setting Session Attributes (https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs).
  2769  	//
  2770  	// SessionAttributes is a sensitive parameter and its value will be
  2771  	// replaced with "sensitive" in string returned by PostTextInput's
  2772  	// String and GoString methods.
  2773  	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
  2774  
  2775  	// The ID of the client application user. Amazon Lex uses this to identify a
  2776  	// user's conversation with your bot. At runtime, each request must contain
  2777  	// the userID field.
  2778  	//
  2779  	// To decide the user ID to use for your application, consider the following
  2780  	// factors.
  2781  	//
  2782  	//    * The userID field must not contain any personally identifiable information
  2783  	//    of the user, for example, name, personal identification numbers, or other
  2784  	//    end user personal information.
  2785  	//
  2786  	//    * If you want a user to start a conversation on one device and continue
  2787  	//    on another device, use a user-specific identifier.
  2788  	//
  2789  	//    * If you want the same user to be able to have two independent conversations
  2790  	//    on two different devices, choose a device-specific identifier.
  2791  	//
  2792  	//    * A user can't have two independent conversations with two different versions
  2793  	//    of the same bot. For example, a user can't have a conversation with the
  2794  	//    PROD and BETA versions of the same bot. If you anticipate that a user
  2795  	//    will need to have conversation with two different versions, for example,
  2796  	//    while testing, include the bot alias in the user ID to separate the two
  2797  	//    conversations.
  2798  	//
  2799  	// UserId is a required field
  2800  	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
  2801  }
  2802  
  2803  // String returns the string representation.
  2804  //
  2805  // API parameter values that are decorated as "sensitive" in the API will not
  2806  // be included in the string output. The member name will be present, but the
  2807  // value will be replaced with "sensitive".
  2808  func (s PostTextInput) String() string {
  2809  	return awsutil.Prettify(s)
  2810  }
  2811  
  2812  // GoString returns the string representation.
  2813  //
  2814  // API parameter values that are decorated as "sensitive" in the API will not
  2815  // be included in the string output. The member name will be present, but the
  2816  // value will be replaced with "sensitive".
  2817  func (s PostTextInput) GoString() string {
  2818  	return s.String()
  2819  }
  2820  
  2821  // Validate inspects the fields of the type to determine if they are valid.
  2822  func (s *PostTextInput) Validate() error {
  2823  	invalidParams := request.ErrInvalidParams{Context: "PostTextInput"}
  2824  	if s.BotAlias == nil {
  2825  		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
  2826  	}
  2827  	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
  2828  		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
  2829  	}
  2830  	if s.BotName == nil {
  2831  		invalidParams.Add(request.NewErrParamRequired("BotName"))
  2832  	}
  2833  	if s.BotName != nil && len(*s.BotName) < 1 {
  2834  		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
  2835  	}
  2836  	if s.InputText == nil {
  2837  		invalidParams.Add(request.NewErrParamRequired("InputText"))
  2838  	}
  2839  	if s.InputText != nil && len(*s.InputText) < 1 {
  2840  		invalidParams.Add(request.NewErrParamMinLen("InputText", 1))
  2841  	}
  2842  	if s.UserId == nil {
  2843  		invalidParams.Add(request.NewErrParamRequired("UserId"))
  2844  	}
  2845  	if s.UserId != nil && len(*s.UserId) < 2 {
  2846  		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
  2847  	}
  2848  	if s.ActiveContexts != nil {
  2849  		for i, v := range s.ActiveContexts {
  2850  			if v == nil {
  2851  				continue
  2852  			}
  2853  			if err := v.Validate(); err != nil {
  2854  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ActiveContexts", i), err.(request.ErrInvalidParams))
  2855  			}
  2856  		}
  2857  	}
  2858  
  2859  	if invalidParams.Len() > 0 {
  2860  		return invalidParams
  2861  	}
  2862  	return nil
  2863  }
  2864  
  2865  // SetActiveContexts sets the ActiveContexts field's value.
  2866  func (s *PostTextInput) SetActiveContexts(v []*ActiveContext) *PostTextInput {
  2867  	s.ActiveContexts = v
  2868  	return s
  2869  }
  2870  
  2871  // SetBotAlias sets the BotAlias field's value.
  2872  func (s *PostTextInput) SetBotAlias(v string) *PostTextInput {
  2873  	s.BotAlias = &v
  2874  	return s
  2875  }
  2876  
  2877  // SetBotName sets the BotName field's value.
  2878  func (s *PostTextInput) SetBotName(v string) *PostTextInput {
  2879  	s.BotName = &v
  2880  	return s
  2881  }
  2882  
  2883  // SetInputText sets the InputText field's value.
  2884  func (s *PostTextInput) SetInputText(v string) *PostTextInput {
  2885  	s.InputText = &v
  2886  	return s
  2887  }
  2888  
  2889  // SetRequestAttributes sets the RequestAttributes field's value.
  2890  func (s *PostTextInput) SetRequestAttributes(v map[string]*string) *PostTextInput {
  2891  	s.RequestAttributes = v
  2892  	return s
  2893  }
  2894  
  2895  // SetSessionAttributes sets the SessionAttributes field's value.
  2896  func (s *PostTextInput) SetSessionAttributes(v map[string]*string) *PostTextInput {
  2897  	s.SessionAttributes = v
  2898  	return s
  2899  }
  2900  
  2901  // SetUserId sets the UserId field's value.
  2902  func (s *PostTextInput) SetUserId(v string) *PostTextInput {
  2903  	s.UserId = &v
  2904  	return s
  2905  }
  2906  
  2907  type PostTextOutput struct {
  2908  	_ struct{} `type:"structure"`
  2909  
  2910  	// A list of active contexts for the session. A context can be set when an intent
  2911  	// is fulfilled or by calling the PostContent, PostText, or PutSession operation.
  2912  	//
  2913  	// You can use a context to control the intents that can follow up an intent,
  2914  	// or to modify the operation of your application.
  2915  	//
  2916  	// ActiveContexts is a sensitive parameter and its value will be
  2917  	// replaced with "sensitive" in string returned by PostTextOutput's
  2918  	// String and GoString methods.
  2919  	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
  2920  
  2921  	// One to four alternative intents that may be applicable to the user's intent.
  2922  	//
  2923  	// Each alternative includes a score that indicates how confident Amazon Lex
  2924  	// is that the intent matches the user's intent. The intents are sorted by the
  2925  	// confidence score.
  2926  	AlternativeIntents []*PredictedIntent `locationName:"alternativeIntents" type:"list"`
  2927  
  2928  	// The version of the bot that responded to the conversation. You can use this
  2929  	// information to help determine if one version of a bot is performing better
  2930  	// than another version.
  2931  	BotVersion *string `locationName:"botVersion" min:"1" type:"string"`
  2932  
  2933  	// Identifies the current state of the user interaction. Amazon Lex returns
  2934  	// one of the following values as dialogState. The client can optionally use
  2935  	// this information to customize the user interface.
  2936  	//
  2937  	//    * ElicitIntent - Amazon Lex wants to elicit user intent. For example,
  2938  	//    a user might utter an intent ("I want to order a pizza"). If Amazon Lex
  2939  	//    cannot infer the user intent from this utterance, it will return this
  2940  	//    dialogState.
  2941  	//
  2942  	//    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. For
  2943  	//    example, Amazon Lex wants user confirmation before fulfilling an intent.
  2944  	//    Instead of a simple "yes" or "no," a user might respond with additional
  2945  	//    information. For example, "yes, but make it thick crust pizza" or "no,
  2946  	//    I want to order a drink". Amazon Lex can process such additional information
  2947  	//    (in these examples, update the crust type slot value, or change intent
  2948  	//    from OrderPizza to OrderDrink).
  2949  	//
  2950  	//    * ElicitSlot - Amazon Lex is expecting a slot value for the current intent.
  2951  	//    For example, suppose that in the response Amazon Lex sends this message:
  2952  	//    "What size pizza would you like?". A user might reply with the slot value
  2953  	//    (e.g., "medium"). The user might also provide additional information in
  2954  	//    the response (e.g., "medium thick crust pizza"). Amazon Lex can process
  2955  	//    such additional information appropriately.
  2956  	//
  2957  	//    * Fulfilled - Conveys that the Lambda function configured for the intent
  2958  	//    has successfully fulfilled the intent.
  2959  	//
  2960  	//    * ReadyForFulfillment - Conveys that the client has to fulfill the intent.
  2961  	//
  2962  	//    * Failed - Conveys that the conversation with the user failed. This can
  2963  	//    happen for various reasons including that the user did not provide an
  2964  	//    appropriate response to prompts from the service (you can configure how
  2965  	//    many times Amazon Lex can prompt a user for specific information), or
  2966  	//    the Lambda function failed to fulfill the intent.
  2967  	DialogState *string `locationName:"dialogState" type:"string" enum:"DialogState"`
  2968  
  2969  	// The current user intent that Amazon Lex is aware of.
  2970  	IntentName *string `locationName:"intentName" type:"string"`
  2971  
  2972  	// The message to convey to the user. The message can come from the bot's configuration
  2973  	// or from a Lambda function.
  2974  	//
  2975  	// If the intent is not configured with a Lambda function, or if the Lambda
  2976  	// function returned Delegate as the dialogAction.type its response, Amazon
  2977  	// Lex decides on the next course of action and selects an appropriate message
  2978  	// from the bot's configuration based on the current interaction context. For
  2979  	// example, if Amazon Lex isn't able to understand user input, it uses a clarification
  2980  	// prompt message.
  2981  	//
  2982  	// When you create an intent you can assign messages to groups. When messages
  2983  	// are assigned to groups Amazon Lex returns one message from each group in
  2984  	// the response. The message field is an escaped JSON string containing the
  2985  	// messages. For more information about the structure of the JSON string returned,
  2986  	// see msg-prompts-formats.
  2987  	//
  2988  	// If the Lambda function returns a message, Amazon Lex passes it to the client
  2989  	// in its response.
  2990  	//
  2991  	// Message is a sensitive parameter and its value will be
  2992  	// replaced with "sensitive" in string returned by PostTextOutput's
  2993  	// String and GoString methods.
  2994  	Message *string `locationName:"message" min:"1" type:"string" sensitive:"true"`
  2995  
  2996  	// The format of the response message. One of the following values:
  2997  	//
  2998  	//    * PlainText - The message contains plain UTF-8 text.
  2999  	//
  3000  	//    * CustomPayload - The message is a custom format defined by the Lambda
  3001  	//    function.
  3002  	//
  3003  	//    * SSML - The message contains text formatted for voice output.
  3004  	//
  3005  	//    * Composite - The message contains an escaped JSON object containing one
  3006  	//    or more messages from the groups that messages were assigned to when the
  3007  	//    intent was created.
  3008  	MessageFormat *string `locationName:"messageFormat" type:"string" enum:"MessageFormatType"`
  3009  
  3010  	// Provides a score that indicates how confident Amazon Lex is that the returned
  3011  	// intent is the one that matches the user's intent. The score is between 0.0
  3012  	// and 1.0. For more information, see Confidence Scores (https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html).
  3013  	//
  3014  	// The score is a relative score, not an absolute score. The score may change
  3015  	// based on improvements to Amazon Lex.
  3016  	NluIntentConfidence *IntentConfidence `locationName:"nluIntentConfidence" type:"structure"`
  3017  
  3018  	// Represents the options that the user has to respond to the current prompt.
  3019  	// Response Card can come from the bot configuration (in the Amazon Lex console,
  3020  	// choose the settings button next to a slot) or from a code hook (Lambda function).
  3021  	ResponseCard *ResponseCard `locationName:"responseCard" type:"structure"`
  3022  
  3023  	// The sentiment expressed in and utterance.
  3024  	//
  3025  	// When the bot is configured to send utterances to Amazon Comprehend for sentiment
  3026  	// analysis, this field contains the result of the analysis.
  3027  	SentimentResponse *SentimentResponse `locationName:"sentimentResponse" type:"structure"`
  3028  
  3029  	// A map of key-value pairs representing the session-specific context information.
  3030  	//
  3031  	// SessionAttributes is a sensitive parameter and its value will be
  3032  	// replaced with "sensitive" in string returned by PostTextOutput's
  3033  	// String and GoString methods.
  3034  	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
  3035  
  3036  	// A unique identifier for the session.
  3037  	SessionId *string `locationName:"sessionId" type:"string"`
  3038  
  3039  	// If the dialogState value is ElicitSlot, returns the name of the slot for
  3040  	// which Amazon Lex is eliciting a value.
  3041  	SlotToElicit *string `locationName:"slotToElicit" type:"string"`
  3042  
  3043  	// The intent slots that Amazon Lex detected from the user input in the conversation.
  3044  	//
  3045  	// Amazon Lex creates a resolution list containing likely values for a slot.
  3046  	// The value that it returns is determined by the valueSelectionStrategy selected
  3047  	// when the slot type was created or updated. If valueSelectionStrategy is set
  3048  	// to ORIGINAL_VALUE, the value provided by the user is returned, if the user
  3049  	// value is similar to the slot values. If valueSelectionStrategy is set to
  3050  	// TOP_RESOLUTION Amazon Lex returns the first value in the resolution list
  3051  	// or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy,
  3052  	// the default is ORIGINAL_VALUE.
  3053  	//
  3054  	// Slots is a sensitive parameter and its value will be
  3055  	// replaced with "sensitive" in string returned by PostTextOutput's
  3056  	// String and GoString methods.
  3057  	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
  3058  }
  3059  
  3060  // String returns the string representation.
  3061  //
  3062  // API parameter values that are decorated as "sensitive" in the API will not
  3063  // be included in the string output. The member name will be present, but the
  3064  // value will be replaced with "sensitive".
  3065  func (s PostTextOutput) String() string {
  3066  	return awsutil.Prettify(s)
  3067  }
  3068  
  3069  // GoString returns the string representation.
  3070  //
  3071  // API parameter values that are decorated as "sensitive" in the API will not
  3072  // be included in the string output. The member name will be present, but the
  3073  // value will be replaced with "sensitive".
  3074  func (s PostTextOutput) GoString() string {
  3075  	return s.String()
  3076  }
  3077  
  3078  // SetActiveContexts sets the ActiveContexts field's value.
  3079  func (s *PostTextOutput) SetActiveContexts(v []*ActiveContext) *PostTextOutput {
  3080  	s.ActiveContexts = v
  3081  	return s
  3082  }
  3083  
  3084  // SetAlternativeIntents sets the AlternativeIntents field's value.
  3085  func (s *PostTextOutput) SetAlternativeIntents(v []*PredictedIntent) *PostTextOutput {
  3086  	s.AlternativeIntents = v
  3087  	return s
  3088  }
  3089  
  3090  // SetBotVersion sets the BotVersion field's value.
  3091  func (s *PostTextOutput) SetBotVersion(v string) *PostTextOutput {
  3092  	s.BotVersion = &v
  3093  	return s
  3094  }
  3095  
  3096  // SetDialogState sets the DialogState field's value.
  3097  func (s *PostTextOutput) SetDialogState(v string) *PostTextOutput {
  3098  	s.DialogState = &v
  3099  	return s
  3100  }
  3101  
  3102  // SetIntentName sets the IntentName field's value.
  3103  func (s *PostTextOutput) SetIntentName(v string) *PostTextOutput {
  3104  	s.IntentName = &v
  3105  	return s
  3106  }
  3107  
  3108  // SetMessage sets the Message field's value.
  3109  func (s *PostTextOutput) SetMessage(v string) *PostTextOutput {
  3110  	s.Message = &v
  3111  	return s
  3112  }
  3113  
  3114  // SetMessageFormat sets the MessageFormat field's value.
  3115  func (s *PostTextOutput) SetMessageFormat(v string) *PostTextOutput {
  3116  	s.MessageFormat = &v
  3117  	return s
  3118  }
  3119  
  3120  // SetNluIntentConfidence sets the NluIntentConfidence field's value.
  3121  func (s *PostTextOutput) SetNluIntentConfidence(v *IntentConfidence) *PostTextOutput {
  3122  	s.NluIntentConfidence = v
  3123  	return s
  3124  }
  3125  
  3126  // SetResponseCard sets the ResponseCard field's value.
  3127  func (s *PostTextOutput) SetResponseCard(v *ResponseCard) *PostTextOutput {
  3128  	s.ResponseCard = v
  3129  	return s
  3130  }
  3131  
  3132  // SetSentimentResponse sets the SentimentResponse field's value.
  3133  func (s *PostTextOutput) SetSentimentResponse(v *SentimentResponse) *PostTextOutput {
  3134  	s.SentimentResponse = v
  3135  	return s
  3136  }
  3137  
  3138  // SetSessionAttributes sets the SessionAttributes field's value.
  3139  func (s *PostTextOutput) SetSessionAttributes(v map[string]*string) *PostTextOutput {
  3140  	s.SessionAttributes = v
  3141  	return s
  3142  }
  3143  
  3144  // SetSessionId sets the SessionId field's value.
  3145  func (s *PostTextOutput) SetSessionId(v string) *PostTextOutput {
  3146  	s.SessionId = &v
  3147  	return s
  3148  }
  3149  
  3150  // SetSlotToElicit sets the SlotToElicit field's value.
  3151  func (s *PostTextOutput) SetSlotToElicit(v string) *PostTextOutput {
  3152  	s.SlotToElicit = &v
  3153  	return s
  3154  }
  3155  
  3156  // SetSlots sets the Slots field's value.
  3157  func (s *PostTextOutput) SetSlots(v map[string]*string) *PostTextOutput {
  3158  	s.Slots = v
  3159  	return s
  3160  }
  3161  
  3162  // An intent that Amazon Lex suggests satisfies the user's intent. Includes
  3163  // the name of the intent, the confidence that Amazon Lex has that the user's
  3164  // intent is satisfied, and the slots defined for the intent.
  3165  type PredictedIntent struct {
  3166  	_ struct{} `type:"structure"`
  3167  
  3168  	// The name of the intent that Amazon Lex suggests satisfies the user's intent.
  3169  	IntentName *string `locationName:"intentName" type:"string"`
  3170  
  3171  	// Indicates how confident Amazon Lex is that an intent satisfies the user's
  3172  	// intent.
  3173  	NluIntentConfidence *IntentConfidence `locationName:"nluIntentConfidence" type:"structure"`
  3174  
  3175  	// The slot and slot values associated with the predicted intent.
  3176  	//
  3177  	// Slots is a sensitive parameter and its value will be
  3178  	// replaced with "sensitive" in string returned by PredictedIntent's
  3179  	// String and GoString methods.
  3180  	Slots map[string]*string `locationName:"slots" type:"map" sensitive:"true"`
  3181  }
  3182  
  3183  // String returns the string representation.
  3184  //
  3185  // API parameter values that are decorated as "sensitive" in the API will not
  3186  // be included in the string output. The member name will be present, but the
  3187  // value will be replaced with "sensitive".
  3188  func (s PredictedIntent) String() string {
  3189  	return awsutil.Prettify(s)
  3190  }
  3191  
  3192  // GoString returns the string representation.
  3193  //
  3194  // API parameter values that are decorated as "sensitive" in the API will not
  3195  // be included in the string output. The member name will be present, but the
  3196  // value will be replaced with "sensitive".
  3197  func (s PredictedIntent) GoString() string {
  3198  	return s.String()
  3199  }
  3200  
  3201  // SetIntentName sets the IntentName field's value.
  3202  func (s *PredictedIntent) SetIntentName(v string) *PredictedIntent {
  3203  	s.IntentName = &v
  3204  	return s
  3205  }
  3206  
  3207  // SetNluIntentConfidence sets the NluIntentConfidence field's value.
  3208  func (s *PredictedIntent) SetNluIntentConfidence(v *IntentConfidence) *PredictedIntent {
  3209  	s.NluIntentConfidence = v
  3210  	return s
  3211  }
  3212  
  3213  // SetSlots sets the Slots field's value.
  3214  func (s *PredictedIntent) SetSlots(v map[string]*string) *PredictedIntent {
  3215  	s.Slots = v
  3216  	return s
  3217  }
  3218  
  3219  type PutSessionInput struct {
  3220  	_ struct{} `type:"structure"`
  3221  
  3222  	// The message that Amazon Lex returns in the response can be either text or
  3223  	// speech based depending on the value of this field.
  3224  	//
  3225  	//    * If the value is text/plain; charset=utf-8, Amazon Lex returns text in
  3226  	//    the response.
  3227  	//
  3228  	//    * If the value begins with audio/, Amazon Lex returns speech in the response.
  3229  	//    Amazon Lex uses Amazon Polly to generate the speech in the configuration
  3230  	//    that you specify. For example, if you specify audio/mpeg as the value,
  3231  	//    Amazon Lex returns speech in the MPEG format.
  3232  	//
  3233  	//    * If the value is audio/pcm, the speech is returned as audio/pcm in 16-bit,
  3234  	//    little endian format.
  3235  	//
  3236  	//    * The following are the accepted values: audio/mpeg audio/ogg audio/pcm
  3237  	//    audio/* (defaults to mpeg) text/plain; charset=utf-8
  3238  	Accept *string `location:"header" locationName:"Accept" type:"string"`
  3239  
  3240  	// A list of contexts active for the request. A context can be activated when
  3241  	// a previous intent is fulfilled, or by including the context in the request,
  3242  	//
  3243  	// If you don't specify a list of contexts, Amazon Lex will use the current
  3244  	// list of contexts for the session. If you specify an empty list, all contexts
  3245  	// for the session are cleared.
  3246  	//
  3247  	// ActiveContexts is a sensitive parameter and its value will be
  3248  	// replaced with "sensitive" in string returned by PutSessionInput's
  3249  	// String and GoString methods.
  3250  	ActiveContexts []*ActiveContext `locationName:"activeContexts" type:"list" sensitive:"true"`
  3251  
  3252  	// The alias in use for the bot that contains the session data.
  3253  	//
  3254  	// BotAlias is a required field
  3255  	BotAlias *string `location:"uri" locationName:"botAlias" type:"string" required:"true"`
  3256  
  3257  	// The name of the bot that contains the session data.
  3258  	//
  3259  	// BotName is a required field
  3260  	BotName *string `location:"uri" locationName:"botName" type:"string" required:"true"`
  3261  
  3262  	// Sets the next action that the bot should take to fulfill the conversation.
  3263  	DialogAction *DialogAction `locationName:"dialogAction" type:"structure"`
  3264  
  3265  	// A summary of the recent intents for the bot. You can use the intent summary
  3266  	// view to set a checkpoint label on an intent and modify attributes of intents.
  3267  	// You can also use it to remove or add intent summary objects to the list.
  3268  	//
  3269  	// An intent that you modify or add to the list must make sense for the bot.
  3270  	// For example, the intent name must be valid for the bot. You must provide
  3271  	// valid values for:
  3272  	//
  3273  	//    * intentName
  3274  	//
  3275  	//    * slot names
  3276  	//
  3277  	//    * slotToElict
  3278  	//
  3279  	// If you send the recentIntentSummaryView parameter in a PutSession request,
  3280  	// the contents of the new summary view replaces the old summary view. For example,
  3281  	// if a GetSession request returns three intents in the summary view and you
  3282  	// call PutSession with one intent in the summary view, the next call to GetSession
  3283  	// will only return one intent.
  3284  	RecentIntentSummaryView []*IntentSummary `locationName:"recentIntentSummaryView" type:"list"`
  3285  
  3286  	// Map of key/value pairs representing the session-specific context information.
  3287  	// It contains application information passed between Amazon Lex and a client
  3288  	// application.
  3289  	//
  3290  	// SessionAttributes is a sensitive parameter and its value will be
  3291  	// replaced with "sensitive" in string returned by PutSessionInput's
  3292  	// String and GoString methods.
  3293  	SessionAttributes map[string]*string `locationName:"sessionAttributes" type:"map" sensitive:"true"`
  3294  
  3295  	// The ID of the client application user. Amazon Lex uses this to identify a
  3296  	// user's conversation with your bot.
  3297  	//
  3298  	// UserId is a required field
  3299  	UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"`
  3300  }
  3301  
  3302  // String returns the string representation.
  3303  //
  3304  // API parameter values that are decorated as "sensitive" in the API will not
  3305  // be included in the string output. The member name will be present, but the
  3306  // value will be replaced with "sensitive".
  3307  func (s PutSessionInput) String() string {
  3308  	return awsutil.Prettify(s)
  3309  }
  3310  
  3311  // GoString returns the string representation.
  3312  //
  3313  // API parameter values that are decorated as "sensitive" in the API will not
  3314  // be included in the string output. The member name will be present, but the
  3315  // value will be replaced with "sensitive".
  3316  func (s PutSessionInput) GoString() string {
  3317  	return s.String()
  3318  }
  3319  
  3320  // Validate inspects the fields of the type to determine if they are valid.
  3321  func (s *PutSessionInput) Validate() error {
  3322  	invalidParams := request.ErrInvalidParams{Context: "PutSessionInput"}
  3323  	if s.BotAlias == nil {
  3324  		invalidParams.Add(request.NewErrParamRequired("BotAlias"))
  3325  	}
  3326  	if s.BotAlias != nil && len(*s.BotAlias) < 1 {
  3327  		invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1))
  3328  	}
  3329  	if s.BotName == nil {
  3330  		invalidParams.Add(request.NewErrParamRequired("BotName"))
  3331  	}
  3332  	if s.BotName != nil && len(*s.BotName) < 1 {
  3333  		invalidParams.Add(request.NewErrParamMinLen("BotName", 1))
  3334  	}
  3335  	if s.UserId == nil {
  3336  		invalidParams.Add(request.NewErrParamRequired("UserId"))
  3337  	}
  3338  	if s.UserId != nil && len(*s.UserId) < 2 {
  3339  		invalidParams.Add(request.NewErrParamMinLen("UserId", 2))
  3340  	}
  3341  	if s.ActiveContexts != nil {
  3342  		for i, v := range s.ActiveContexts {
  3343  			if v == nil {
  3344  				continue
  3345  			}
  3346  			if err := v.Validate(); err != nil {
  3347  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ActiveContexts", i), err.(request.ErrInvalidParams))
  3348  			}
  3349  		}
  3350  	}
  3351  	if s.DialogAction != nil {
  3352  		if err := s.DialogAction.Validate(); err != nil {
  3353  			invalidParams.AddNested("DialogAction", err.(request.ErrInvalidParams))
  3354  		}
  3355  	}
  3356  	if s.RecentIntentSummaryView != nil {
  3357  		for i, v := range s.RecentIntentSummaryView {
  3358  			if v == nil {
  3359  				continue
  3360  			}
  3361  			if err := v.Validate(); err != nil {
  3362  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecentIntentSummaryView", i), err.(request.ErrInvalidParams))
  3363  			}
  3364  		}
  3365  	}
  3366  
  3367  	if invalidParams.Len() > 0 {
  3368  		return invalidParams
  3369  	}
  3370  	return nil
  3371  }
  3372  
  3373  // SetAccept sets the Accept field's value.
  3374  func (s *PutSessionInput) SetAccept(v string) *PutSessionInput {
  3375  	s.Accept = &v
  3376  	return s
  3377  }
  3378  
  3379  // SetActiveContexts sets the ActiveContexts field's value.
  3380  func (s *PutSessionInput) SetActiveContexts(v []*ActiveContext) *PutSessionInput {
  3381  	s.ActiveContexts = v
  3382  	return s
  3383  }
  3384  
  3385  // SetBotAlias sets the BotAlias field's value.
  3386  func (s *PutSessionInput) SetBotAlias(v string) *PutSessionInput {
  3387  	s.BotAlias = &v
  3388  	return s
  3389  }
  3390  
  3391  // SetBotName sets the BotName field's value.
  3392  func (s *PutSessionInput) SetBotName(v string) *PutSessionInput {
  3393  	s.BotName = &v
  3394  	return s
  3395  }
  3396  
  3397  // SetDialogAction sets the DialogAction field's value.
  3398  func (s *PutSessionInput) SetDialogAction(v *DialogAction) *PutSessionInput {
  3399  	s.DialogAction = v
  3400  	return s
  3401  }
  3402  
  3403  // SetRecentIntentSummaryView sets the RecentIntentSummaryView field's value.
  3404  func (s *PutSessionInput) SetRecentIntentSummaryView(v []*IntentSummary) *PutSessionInput {
  3405  	s.RecentIntentSummaryView = v
  3406  	return s
  3407  }
  3408  
  3409  // SetSessionAttributes sets the SessionAttributes field's value.
  3410  func (s *PutSessionInput) SetSessionAttributes(v map[string]*string) *PutSessionInput {
  3411  	s.SessionAttributes = v
  3412  	return s
  3413  }
  3414  
  3415  // SetUserId sets the UserId field's value.
  3416  func (s *PutSessionInput) SetUserId(v string) *PutSessionInput {
  3417  	s.UserId = &v
  3418  	return s
  3419  }
  3420  
  3421  type PutSessionOutput struct {
  3422  	_ struct{} `type:"structure" payload:"AudioStream"`
  3423  
  3424  	// A list of active contexts for the session.
  3425  	ActiveContexts aws.JSONValue `location:"header" locationName:"x-amz-lex-active-contexts" type:"jsonvalue"`
  3426  
  3427  	// The audio version of the message to convey to the user.
  3428  	AudioStream io.ReadCloser `locationName:"audioStream" type:"blob"`
  3429  
  3430  	// Content type as specified in the Accept HTTP header in the request.
  3431  	ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  3432  
  3433  	//    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response to
  3434  	//    confirm the intent before fulfilling an intent.
  3435  	//
  3436  	//    * ElicitIntent - Amazon Lex wants to elicit the user's intent.
  3437  	//
  3438  	//    * ElicitSlot - Amazon Lex is expecting the value of a slot for the current
  3439  	//    intent.
  3440  	//
  3441  	//    * Failed - Conveys that the conversation with the user has failed. This
  3442  	//    can happen for various reasons, including the user does not provide an
  3443  	//    appropriate response to prompts from the service, or if the Lambda function
  3444  	//    fails to fulfill the intent.
  3445  	//
  3446  	//    * Fulfilled - Conveys that the Lambda function has sucessfully fulfilled
  3447  	//    the intent.
  3448  	//
  3449  	//    * ReadyForFulfillment - Conveys that the client has to fulfill the intent.
  3450  	DialogState *string `location:"header" locationName:"x-amz-lex-dialog-state" type:"string" enum:"DialogState"`
  3451  
  3452  	// The next message that should be presented to the user.
  3453  	//
  3454  	// The encodedMessage field is base-64 encoded. You must decode the field before
  3455  	// you can use the value.
  3456  	//
  3457  	// EncodedMessage is a sensitive parameter and its value will be
  3458  	// replaced with "sensitive" in string returned by PutSessionOutput's
  3459  	// String and GoString methods.
  3460  	EncodedMessage *string `location:"header" locationName:"x-amz-lex-encoded-message" min:"1" type:"string" sensitive:"true"`
  3461  
  3462  	// The name of the current intent.
  3463  	IntentName *string `location:"header" locationName:"x-amz-lex-intent-name" type:"string"`
  3464  
  3465  	// The next message that should be presented to the user.
  3466  	//
  3467  	// You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES,
  3468  	// es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the message
  3469  	// field is null. You should use the encodedMessage field instead.
  3470  	//
  3471  	// Deprecated: The message field is deprecated, use the encodedMessage field instead. The message field is available only in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR and it-IT locales.
  3472  	//
  3473  	// Message is a sensitive parameter and its value will be
  3474  	// replaced with "sensitive" in string returned by PutSessionOutput's
  3475  	// String and GoString methods.
  3476  	Message *string `location:"header" locationName:"x-amz-lex-message" min:"1" deprecated:"true" type:"string" sensitive:"true"`
  3477  
  3478  	// The format of the response message. One of the following values:
  3479  	//
  3480  	//    * PlainText - The message contains plain UTF-8 text.
  3481  	//
  3482  	//    * CustomPayload - The message is a custom format for the client.
  3483  	//
  3484  	//    * SSML - The message contains text formatted for voice output.
  3485  	//
  3486  	//    * Composite - The message contains an escaped JSON object containing one
  3487  	//    or more messages from the groups that messages were assigned to when the
  3488  	//    intent was created.
  3489  	MessageFormat *string `location:"header" locationName:"x-amz-lex-message-format" type:"string" enum:"MessageFormatType"`
  3490  
  3491  	// Map of key/value pairs representing session-specific context information.
  3492  	SessionAttributes aws.JSONValue `location:"header" locationName:"x-amz-lex-session-attributes" type:"jsonvalue"`
  3493  
  3494  	// A unique identifier for the session.
  3495  	SessionId *string `location:"header" locationName:"x-amz-lex-session-id" type:"string"`
  3496  
  3497  	// If the dialogState is ElicitSlot, returns the name of the slot for which
  3498  	// Amazon Lex is eliciting a value.
  3499  	SlotToElicit *string `location:"header" locationName:"x-amz-lex-slot-to-elicit" type:"string"`
  3500  
  3501  	// Map of zero or more intent slots Amazon Lex detected from the user input
  3502  	// during the conversation.
  3503  	//
  3504  	// Amazon Lex creates a resolution list containing likely values for a slot.
  3505  	// The value that it returns is determined by the valueSelectionStrategy selected
  3506  	// when the slot type was created or updated. If valueSelectionStrategy is set
  3507  	// to ORIGINAL_VALUE, the value provided by the user is returned, if the user
  3508  	// value is similar to the slot values. If valueSelectionStrategy is set to
  3509  	// TOP_RESOLUTION Amazon Lex returns the first value in the resolution list
  3510  	// or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy
  3511  	// the default is ORIGINAL_VALUE.
  3512  	Slots aws.JSONValue `location:"header" locationName:"x-amz-lex-slots" type:"jsonvalue"`
  3513  }
  3514  
  3515  // String returns the string representation.
  3516  //
  3517  // API parameter values that are decorated as "sensitive" in the API will not
  3518  // be included in the string output. The member name will be present, but the
  3519  // value will be replaced with "sensitive".
  3520  func (s PutSessionOutput) String() string {
  3521  	return awsutil.Prettify(s)
  3522  }
  3523  
  3524  // GoString returns the string representation.
  3525  //
  3526  // API parameter values that are decorated as "sensitive" in the API will not
  3527  // be included in the string output. The member name will be present, but the
  3528  // value will be replaced with "sensitive".
  3529  func (s PutSessionOutput) GoString() string {
  3530  	return s.String()
  3531  }
  3532  
  3533  // SetActiveContexts sets the ActiveContexts field's value.
  3534  func (s *PutSessionOutput) SetActiveContexts(v aws.JSONValue) *PutSessionOutput {
  3535  	s.ActiveContexts = v
  3536  	return s
  3537  }
  3538  
  3539  // SetAudioStream sets the AudioStream field's value.
  3540  func (s *PutSessionOutput) SetAudioStream(v io.ReadCloser) *PutSessionOutput {
  3541  	s.AudioStream = v
  3542  	return s
  3543  }
  3544  
  3545  // SetContentType sets the ContentType field's value.
  3546  func (s *PutSessionOutput) SetContentType(v string) *PutSessionOutput {
  3547  	s.ContentType = &v
  3548  	return s
  3549  }
  3550  
  3551  // SetDialogState sets the DialogState field's value.
  3552  func (s *PutSessionOutput) SetDialogState(v string) *PutSessionOutput {
  3553  	s.DialogState = &v
  3554  	return s
  3555  }
  3556  
  3557  // SetEncodedMessage sets the EncodedMessage field's value.
  3558  func (s *PutSessionOutput) SetEncodedMessage(v string) *PutSessionOutput {
  3559  	s.EncodedMessage = &v
  3560  	return s
  3561  }
  3562  
  3563  // SetIntentName sets the IntentName field's value.
  3564  func (s *PutSessionOutput) SetIntentName(v string) *PutSessionOutput {
  3565  	s.IntentName = &v
  3566  	return s
  3567  }
  3568  
  3569  // SetMessage sets the Message field's value.
  3570  func (s *PutSessionOutput) SetMessage(v string) *PutSessionOutput {
  3571  	s.Message = &v
  3572  	return s
  3573  }
  3574  
  3575  // SetMessageFormat sets the MessageFormat field's value.
  3576  func (s *PutSessionOutput) SetMessageFormat(v string) *PutSessionOutput {
  3577  	s.MessageFormat = &v
  3578  	return s
  3579  }
  3580  
  3581  // SetSessionAttributes sets the SessionAttributes field's value.
  3582  func (s *PutSessionOutput) SetSessionAttributes(v aws.JSONValue) *PutSessionOutput {
  3583  	s.SessionAttributes = v
  3584  	return s
  3585  }
  3586  
  3587  // SetSessionId sets the SessionId field's value.
  3588  func (s *PutSessionOutput) SetSessionId(v string) *PutSessionOutput {
  3589  	s.SessionId = &v
  3590  	return s
  3591  }
  3592  
  3593  // SetSlotToElicit sets the SlotToElicit field's value.
  3594  func (s *PutSessionOutput) SetSlotToElicit(v string) *PutSessionOutput {
  3595  	s.SlotToElicit = &v
  3596  	return s
  3597  }
  3598  
  3599  // SetSlots sets the Slots field's value.
  3600  func (s *PutSessionOutput) SetSlots(v aws.JSONValue) *PutSessionOutput {
  3601  	s.Slots = v
  3602  	return s
  3603  }
  3604  
  3605  // The input speech is too long.
  3606  type RequestTimeoutException struct {
  3607  	_            struct{}                  `type:"structure"`
  3608  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  3609  
  3610  	Message_ *string `locationName:"message" type:"string"`
  3611  }
  3612  
  3613  // String returns the string representation.
  3614  //
  3615  // API parameter values that are decorated as "sensitive" in the API will not
  3616  // be included in the string output. The member name will be present, but the
  3617  // value will be replaced with "sensitive".
  3618  func (s RequestTimeoutException) String() string {
  3619  	return awsutil.Prettify(s)
  3620  }
  3621  
  3622  // GoString returns the string representation.
  3623  //
  3624  // API parameter values that are decorated as "sensitive" in the API will not
  3625  // be included in the string output. The member name will be present, but the
  3626  // value will be replaced with "sensitive".
  3627  func (s RequestTimeoutException) GoString() string {
  3628  	return s.String()
  3629  }
  3630  
  3631  func newErrorRequestTimeoutException(v protocol.ResponseMetadata) error {
  3632  	return &RequestTimeoutException{
  3633  		RespMetadata: v,
  3634  	}
  3635  }
  3636  
  3637  // Code returns the exception type name.
  3638  func (s *RequestTimeoutException) Code() string {
  3639  	return "RequestTimeoutException"
  3640  }
  3641  
  3642  // Message returns the exception's message.
  3643  func (s *RequestTimeoutException) Message() string {
  3644  	if s.Message_ != nil {
  3645  		return *s.Message_
  3646  	}
  3647  	return ""
  3648  }
  3649  
  3650  // OrigErr always returns nil, satisfies awserr.Error interface.
  3651  func (s *RequestTimeoutException) OrigErr() error {
  3652  	return nil
  3653  }
  3654  
  3655  func (s *RequestTimeoutException) Error() string {
  3656  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  3657  }
  3658  
  3659  // Status code returns the HTTP status code for the request's response error.
  3660  func (s *RequestTimeoutException) StatusCode() int {
  3661  	return s.RespMetadata.StatusCode
  3662  }
  3663  
  3664  // RequestID returns the service's response RequestID for request.
  3665  func (s *RequestTimeoutException) RequestID() string {
  3666  	return s.RespMetadata.RequestID
  3667  }
  3668  
  3669  // If you configure a response card when creating your bots, Amazon Lex substitutes
  3670  // the session attributes and slot values that are available, and then returns
  3671  // it. The response card can also come from a Lambda function ( dialogCodeHook
  3672  // and fulfillmentActivity on an intent).
  3673  type ResponseCard struct {
  3674  	_ struct{} `type:"structure"`
  3675  
  3676  	// The content type of the response.
  3677  	ContentType *string `locationName:"contentType" type:"string" enum:"ContentType"`
  3678  
  3679  	// An array of attachment objects representing options.
  3680  	GenericAttachments []*GenericAttachment `locationName:"genericAttachments" type:"list"`
  3681  
  3682  	// The version of the response card format.
  3683  	Version *string `locationName:"version" type:"string"`
  3684  }
  3685  
  3686  // String returns the string representation.
  3687  //
  3688  // API parameter values that are decorated as "sensitive" in the API will not
  3689  // be included in the string output. The member name will be present, but the
  3690  // value will be replaced with "sensitive".
  3691  func (s ResponseCard) String() string {
  3692  	return awsutil.Prettify(s)
  3693  }
  3694  
  3695  // GoString returns the string representation.
  3696  //
  3697  // API parameter values that are decorated as "sensitive" in the API will not
  3698  // be included in the string output. The member name will be present, but the
  3699  // value will be replaced with "sensitive".
  3700  func (s ResponseCard) GoString() string {
  3701  	return s.String()
  3702  }
  3703  
  3704  // SetContentType sets the ContentType field's value.
  3705  func (s *ResponseCard) SetContentType(v string) *ResponseCard {
  3706  	s.ContentType = &v
  3707  	return s
  3708  }
  3709  
  3710  // SetGenericAttachments sets the GenericAttachments field's value.
  3711  func (s *ResponseCard) SetGenericAttachments(v []*GenericAttachment) *ResponseCard {
  3712  	s.GenericAttachments = v
  3713  	return s
  3714  }
  3715  
  3716  // SetVersion sets the Version field's value.
  3717  func (s *ResponseCard) SetVersion(v string) *ResponseCard {
  3718  	s.Version = &v
  3719  	return s
  3720  }
  3721  
  3722  // The sentiment expressed in an utterance.
  3723  //
  3724  // When the bot is configured to send utterances to Amazon Comprehend for sentiment
  3725  // analysis, this field structure contains the result of the analysis.
  3726  type SentimentResponse struct {
  3727  	_ struct{} `type:"structure"`
  3728  
  3729  	// The inferred sentiment that Amazon Comprehend has the highest confidence
  3730  	// in.
  3731  	SentimentLabel *string `locationName:"sentimentLabel" type:"string"`
  3732  
  3733  	// The likelihood that the sentiment was correctly inferred.
  3734  	SentimentScore *string `locationName:"sentimentScore" type:"string"`
  3735  }
  3736  
  3737  // String returns the string representation.
  3738  //
  3739  // API parameter values that are decorated as "sensitive" in the API will not
  3740  // be included in the string output. The member name will be present, but the
  3741  // value will be replaced with "sensitive".
  3742  func (s SentimentResponse) String() string {
  3743  	return awsutil.Prettify(s)
  3744  }
  3745  
  3746  // GoString returns the string representation.
  3747  //
  3748  // API parameter values that are decorated as "sensitive" in the API will not
  3749  // be included in the string output. The member name will be present, but the
  3750  // value will be replaced with "sensitive".
  3751  func (s SentimentResponse) GoString() string {
  3752  	return s.String()
  3753  }
  3754  
  3755  // SetSentimentLabel sets the SentimentLabel field's value.
  3756  func (s *SentimentResponse) SetSentimentLabel(v string) *SentimentResponse {
  3757  	s.SentimentLabel = &v
  3758  	return s
  3759  }
  3760  
  3761  // SetSentimentScore sets the SentimentScore field's value.
  3762  func (s *SentimentResponse) SetSentimentScore(v string) *SentimentResponse {
  3763  	s.SentimentScore = &v
  3764  	return s
  3765  }
  3766  
  3767  // The Content-Type header (PostContent API) has an invalid value.
  3768  type UnsupportedMediaTypeException struct {
  3769  	_            struct{}                  `type:"structure"`
  3770  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  3771  
  3772  	Message_ *string `locationName:"message" type:"string"`
  3773  }
  3774  
  3775  // String returns the string representation.
  3776  //
  3777  // API parameter values that are decorated as "sensitive" in the API will not
  3778  // be included in the string output. The member name will be present, but the
  3779  // value will be replaced with "sensitive".
  3780  func (s UnsupportedMediaTypeException) String() string {
  3781  	return awsutil.Prettify(s)
  3782  }
  3783  
  3784  // GoString returns the string representation.
  3785  //
  3786  // API parameter values that are decorated as "sensitive" in the API will not
  3787  // be included in the string output. The member name will be present, but the
  3788  // value will be replaced with "sensitive".
  3789  func (s UnsupportedMediaTypeException) GoString() string {
  3790  	return s.String()
  3791  }
  3792  
  3793  func newErrorUnsupportedMediaTypeException(v protocol.ResponseMetadata) error {
  3794  	return &UnsupportedMediaTypeException{
  3795  		RespMetadata: v,
  3796  	}
  3797  }
  3798  
  3799  // Code returns the exception type name.
  3800  func (s *UnsupportedMediaTypeException) Code() string {
  3801  	return "UnsupportedMediaTypeException"
  3802  }
  3803  
  3804  // Message returns the exception's message.
  3805  func (s *UnsupportedMediaTypeException) Message() string {
  3806  	if s.Message_ != nil {
  3807  		return *s.Message_
  3808  	}
  3809  	return ""
  3810  }
  3811  
  3812  // OrigErr always returns nil, satisfies awserr.Error interface.
  3813  func (s *UnsupportedMediaTypeException) OrigErr() error {
  3814  	return nil
  3815  }
  3816  
  3817  func (s *UnsupportedMediaTypeException) Error() string {
  3818  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  3819  }
  3820  
  3821  // Status code returns the HTTP status code for the request's response error.
  3822  func (s *UnsupportedMediaTypeException) StatusCode() int {
  3823  	return s.RespMetadata.StatusCode
  3824  }
  3825  
  3826  // RequestID returns the service's response RequestID for request.
  3827  func (s *UnsupportedMediaTypeException) RequestID() string {
  3828  	return s.RespMetadata.RequestID
  3829  }
  3830  
  3831  const (
  3832  	// ConfirmationStatusNone is a ConfirmationStatus enum value
  3833  	ConfirmationStatusNone = "None"
  3834  
  3835  	// ConfirmationStatusConfirmed is a ConfirmationStatus enum value
  3836  	ConfirmationStatusConfirmed = "Confirmed"
  3837  
  3838  	// ConfirmationStatusDenied is a ConfirmationStatus enum value
  3839  	ConfirmationStatusDenied = "Denied"
  3840  )
  3841  
  3842  // ConfirmationStatus_Values returns all elements of the ConfirmationStatus enum
  3843  func ConfirmationStatus_Values() []string {
  3844  	return []string{
  3845  		ConfirmationStatusNone,
  3846  		ConfirmationStatusConfirmed,
  3847  		ConfirmationStatusDenied,
  3848  	}
  3849  }
  3850  
  3851  const (
  3852  	// ContentTypeApplicationVndAmazonawsCardGeneric is a ContentType enum value
  3853  	ContentTypeApplicationVndAmazonawsCardGeneric = "application/vnd.amazonaws.card.generic"
  3854  )
  3855  
  3856  // ContentType_Values returns all elements of the ContentType enum
  3857  func ContentType_Values() []string {
  3858  	return []string{
  3859  		ContentTypeApplicationVndAmazonawsCardGeneric,
  3860  	}
  3861  }
  3862  
  3863  const (
  3864  	// DialogActionTypeElicitIntent is a DialogActionType enum value
  3865  	DialogActionTypeElicitIntent = "ElicitIntent"
  3866  
  3867  	// DialogActionTypeConfirmIntent is a DialogActionType enum value
  3868  	DialogActionTypeConfirmIntent = "ConfirmIntent"
  3869  
  3870  	// DialogActionTypeElicitSlot is a DialogActionType enum value
  3871  	DialogActionTypeElicitSlot = "ElicitSlot"
  3872  
  3873  	// DialogActionTypeClose is a DialogActionType enum value
  3874  	DialogActionTypeClose = "Close"
  3875  
  3876  	// DialogActionTypeDelegate is a DialogActionType enum value
  3877  	DialogActionTypeDelegate = "Delegate"
  3878  )
  3879  
  3880  // DialogActionType_Values returns all elements of the DialogActionType enum
  3881  func DialogActionType_Values() []string {
  3882  	return []string{
  3883  		DialogActionTypeElicitIntent,
  3884  		DialogActionTypeConfirmIntent,
  3885  		DialogActionTypeElicitSlot,
  3886  		DialogActionTypeClose,
  3887  		DialogActionTypeDelegate,
  3888  	}
  3889  }
  3890  
  3891  const (
  3892  	// DialogStateElicitIntent is a DialogState enum value
  3893  	DialogStateElicitIntent = "ElicitIntent"
  3894  
  3895  	// DialogStateConfirmIntent is a DialogState enum value
  3896  	DialogStateConfirmIntent = "ConfirmIntent"
  3897  
  3898  	// DialogStateElicitSlot is a DialogState enum value
  3899  	DialogStateElicitSlot = "ElicitSlot"
  3900  
  3901  	// DialogStateFulfilled is a DialogState enum value
  3902  	DialogStateFulfilled = "Fulfilled"
  3903  
  3904  	// DialogStateReadyForFulfillment is a DialogState enum value
  3905  	DialogStateReadyForFulfillment = "ReadyForFulfillment"
  3906  
  3907  	// DialogStateFailed is a DialogState enum value
  3908  	DialogStateFailed = "Failed"
  3909  )
  3910  
  3911  // DialogState_Values returns all elements of the DialogState enum
  3912  func DialogState_Values() []string {
  3913  	return []string{
  3914  		DialogStateElicitIntent,
  3915  		DialogStateConfirmIntent,
  3916  		DialogStateElicitSlot,
  3917  		DialogStateFulfilled,
  3918  		DialogStateReadyForFulfillment,
  3919  		DialogStateFailed,
  3920  	}
  3921  }
  3922  
  3923  const (
  3924  	// FulfillmentStateFulfilled is a FulfillmentState enum value
  3925  	FulfillmentStateFulfilled = "Fulfilled"
  3926  
  3927  	// FulfillmentStateFailed is a FulfillmentState enum value
  3928  	FulfillmentStateFailed = "Failed"
  3929  
  3930  	// FulfillmentStateReadyForFulfillment is a FulfillmentState enum value
  3931  	FulfillmentStateReadyForFulfillment = "ReadyForFulfillment"
  3932  )
  3933  
  3934  // FulfillmentState_Values returns all elements of the FulfillmentState enum
  3935  func FulfillmentState_Values() []string {
  3936  	return []string{
  3937  		FulfillmentStateFulfilled,
  3938  		FulfillmentStateFailed,
  3939  		FulfillmentStateReadyForFulfillment,
  3940  	}
  3941  }
  3942  
  3943  const (
  3944  	// MessageFormatTypePlainText is a MessageFormatType enum value
  3945  	MessageFormatTypePlainText = "PlainText"
  3946  
  3947  	// MessageFormatTypeCustomPayload is a MessageFormatType enum value
  3948  	MessageFormatTypeCustomPayload = "CustomPayload"
  3949  
  3950  	// MessageFormatTypeSsml is a MessageFormatType enum value
  3951  	MessageFormatTypeSsml = "SSML"
  3952  
  3953  	// MessageFormatTypeComposite is a MessageFormatType enum value
  3954  	MessageFormatTypeComposite = "Composite"
  3955  )
  3956  
  3957  // MessageFormatType_Values returns all elements of the MessageFormatType enum
  3958  func MessageFormatType_Values() []string {
  3959  	return []string{
  3960  		MessageFormatTypePlainText,
  3961  		MessageFormatTypeCustomPayload,
  3962  		MessageFormatTypeSsml,
  3963  		MessageFormatTypeComposite,
  3964  	}
  3965  }