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