1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package lexmodelbuildingservice 4 5import ( 6 "fmt" 7 "time" 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/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/restjson" 14) 15 16const opCreateBotVersion = "CreateBotVersion" 17 18// CreateBotVersionRequest generates a "aws/request.Request" representing the 19// client's request for the CreateBotVersion operation. The "output" return 20// value will be populated with the request's response once the request complets 21// successfuly. 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 CreateBotVersion for more information on using the CreateBotVersion 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 CreateBotVersionRequest method. 34// req, resp := client.CreateBotVersionRequest(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/lex-models-2017-04-19/CreateBotVersion 42func (c *LexModelBuildingService) CreateBotVersionRequest(input *CreateBotVersionInput) (req *request.Request, output *CreateBotVersionOutput) { 43 op := &request.Operation{ 44 Name: opCreateBotVersion, 45 HTTPMethod: "POST", 46 HTTPPath: "/bots/{name}/versions", 47 } 48 49 if input == nil { 50 input = &CreateBotVersionInput{} 51 } 52 53 output = &CreateBotVersionOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// CreateBotVersion API operation for Amazon Lex Model Building Service. 59// 60// Creates a new version of the bot based on the $LATEST version. If the $LATEST 61// version of this resource hasn't changed since you created the last version, 62// Amazon Lex doesn't create a new version. It returns the last created version. 63// 64// You can update only the $LATEST version of the bot. You can't update the 65// numbered versions that you create with the CreateBotVersion operation. 66// 67// When you create the first version of a bot, Amazon Lex sets the version to 68// 1. Subsequent versions increment by 1. For more information, see versioning-intro. 69// 70// This operation requires permission for the lex:CreateBotVersion action. 71// 72// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 73// with awserr.Error's Code and Message methods to get detailed information about 74// the error. 75// 76// See the AWS API reference guide for Amazon Lex Model Building Service's 77// API operation CreateBotVersion for usage and error information. 78// 79// Returned Error Codes: 80// * ErrCodeNotFoundException "NotFoundException" 81// The resource specified in the request was not found. Check the resource and 82// try again. 83// 84// * ErrCodeConflictException "ConflictException" 85// There was a conflict processing the request. Try your request again. 86// 87// * ErrCodeLimitExceededException "LimitExceededException" 88// The request exceeded a limit. Try your request again. 89// 90// * ErrCodeInternalFailureException "InternalFailureException" 91// An internal Amazon Lex error occurred. Try your request again. 92// 93// * ErrCodeBadRequestException "BadRequestException" 94// The request is not well formed. For example, a value is invalid or a required 95// field is missing. Check the field values, and try again. 96// 97// * ErrCodePreconditionFailedException "PreconditionFailedException" 98// The checksum of the resource that you are trying to change does not match 99// the checksum in the request. Check the resource's checksum and try again. 100// 101// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersion 102func (c *LexModelBuildingService) CreateBotVersion(input *CreateBotVersionInput) (*CreateBotVersionOutput, error) { 103 req, out := c.CreateBotVersionRequest(input) 104 return out, req.Send() 105} 106 107// CreateBotVersionWithContext is the same as CreateBotVersion with the addition of 108// the ability to pass a context and additional request options. 109// 110// See CreateBotVersion for details on how to use this API operation. 111// 112// The context must be non-nil and will be used for request cancellation. If 113// the context is nil a panic will occur. In the future the SDK may create 114// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 115// for more information on using Contexts. 116func (c *LexModelBuildingService) CreateBotVersionWithContext(ctx aws.Context, input *CreateBotVersionInput, opts ...request.Option) (*CreateBotVersionOutput, error) { 117 req, out := c.CreateBotVersionRequest(input) 118 req.SetContext(ctx) 119 req.ApplyOptions(opts...) 120 return out, req.Send() 121} 122 123const opCreateIntentVersion = "CreateIntentVersion" 124 125// CreateIntentVersionRequest generates a "aws/request.Request" representing the 126// client's request for the CreateIntentVersion operation. The "output" return 127// value will be populated with the request's response once the request complets 128// successfuly. 129// 130// Use "Send" method on the returned Request to send the API call to the service. 131// the "output" return value is not valid until after Send returns without error. 132// 133// See CreateIntentVersion for more information on using the CreateIntentVersion 134// API call, and error handling. 135// 136// This method is useful when you want to inject custom logic or configuration 137// into the SDK's request lifecycle. Such as custom headers, or retry logic. 138// 139// 140// // Example sending a request using the CreateIntentVersionRequest method. 141// req, resp := client.CreateIntentVersionRequest(params) 142// 143// err := req.Send() 144// if err == nil { // resp is now filled 145// fmt.Println(resp) 146// } 147// 148// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersion 149func (c *LexModelBuildingService) CreateIntentVersionRequest(input *CreateIntentVersionInput) (req *request.Request, output *CreateIntentVersionOutput) { 150 op := &request.Operation{ 151 Name: opCreateIntentVersion, 152 HTTPMethod: "POST", 153 HTTPPath: "/intents/{name}/versions", 154 } 155 156 if input == nil { 157 input = &CreateIntentVersionInput{} 158 } 159 160 output = &CreateIntentVersionOutput{} 161 req = c.newRequest(op, input, output) 162 return 163} 164 165// CreateIntentVersion API operation for Amazon Lex Model Building Service. 166// 167// Creates a new version of an intent based on the $LATEST version of the intent. 168// If the $LATEST version of this intent hasn't changed since you last updated 169// it, Amazon Lex doesn't create a new version. It returns the last version 170// you created. 171// 172// You can update only the $LATEST version of the intent. You can't update the 173// numbered versions that you create with the CreateIntentVersion operation. 174// 175// When you create a version of an intent, Amazon Lex sets the version to 1. 176// Subsequent versions increment by 1. For more information, see versioning-intro. 177// 178// This operation requires permissions to perform the lex:CreateIntentVersion 179// action. 180// 181// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 182// with awserr.Error's Code and Message methods to get detailed information about 183// the error. 184// 185// See the AWS API reference guide for Amazon Lex Model Building Service's 186// API operation CreateIntentVersion for usage and error information. 187// 188// Returned Error Codes: 189// * ErrCodeNotFoundException "NotFoundException" 190// The resource specified in the request was not found. Check the resource and 191// try again. 192// 193// * ErrCodeConflictException "ConflictException" 194// There was a conflict processing the request. Try your request again. 195// 196// * ErrCodeLimitExceededException "LimitExceededException" 197// The request exceeded a limit. Try your request again. 198// 199// * ErrCodeInternalFailureException "InternalFailureException" 200// An internal Amazon Lex error occurred. Try your request again. 201// 202// * ErrCodeBadRequestException "BadRequestException" 203// The request is not well formed. For example, a value is invalid or a required 204// field is missing. Check the field values, and try again. 205// 206// * ErrCodePreconditionFailedException "PreconditionFailedException" 207// The checksum of the resource that you are trying to change does not match 208// the checksum in the request. Check the resource's checksum and try again. 209// 210// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersion 211func (c *LexModelBuildingService) CreateIntentVersion(input *CreateIntentVersionInput) (*CreateIntentVersionOutput, error) { 212 req, out := c.CreateIntentVersionRequest(input) 213 return out, req.Send() 214} 215 216// CreateIntentVersionWithContext is the same as CreateIntentVersion with the addition of 217// the ability to pass a context and additional request options. 218// 219// See CreateIntentVersion for details on how to use this API operation. 220// 221// The context must be non-nil and will be used for request cancellation. If 222// the context is nil a panic will occur. In the future the SDK may create 223// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 224// for more information on using Contexts. 225func (c *LexModelBuildingService) CreateIntentVersionWithContext(ctx aws.Context, input *CreateIntentVersionInput, opts ...request.Option) (*CreateIntentVersionOutput, error) { 226 req, out := c.CreateIntentVersionRequest(input) 227 req.SetContext(ctx) 228 req.ApplyOptions(opts...) 229 return out, req.Send() 230} 231 232const opCreateSlotTypeVersion = "CreateSlotTypeVersion" 233 234// CreateSlotTypeVersionRequest generates a "aws/request.Request" representing the 235// client's request for the CreateSlotTypeVersion operation. The "output" return 236// value will be populated with the request's response once the request complets 237// successfuly. 238// 239// Use "Send" method on the returned Request to send the API call to the service. 240// the "output" return value is not valid until after Send returns without error. 241// 242// See CreateSlotTypeVersion for more information on using the CreateSlotTypeVersion 243// API call, and error handling. 244// 245// This method is useful when you want to inject custom logic or configuration 246// into the SDK's request lifecycle. Such as custom headers, or retry logic. 247// 248// 249// // Example sending a request using the CreateSlotTypeVersionRequest method. 250// req, resp := client.CreateSlotTypeVersionRequest(params) 251// 252// err := req.Send() 253// if err == nil { // resp is now filled 254// fmt.Println(resp) 255// } 256// 257// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersion 258func (c *LexModelBuildingService) CreateSlotTypeVersionRequest(input *CreateSlotTypeVersionInput) (req *request.Request, output *CreateSlotTypeVersionOutput) { 259 op := &request.Operation{ 260 Name: opCreateSlotTypeVersion, 261 HTTPMethod: "POST", 262 HTTPPath: "/slottypes/{name}/versions", 263 } 264 265 if input == nil { 266 input = &CreateSlotTypeVersionInput{} 267 } 268 269 output = &CreateSlotTypeVersionOutput{} 270 req = c.newRequest(op, input, output) 271 return 272} 273 274// CreateSlotTypeVersion API operation for Amazon Lex Model Building Service. 275// 276// Creates a new version of a slot type based on the $LATEST version of the 277// specified slot type. If the $LATEST version of this resource has not changed 278// since the last version that you created, Amazon Lex doesn't create a new 279// version. It returns the last version that you created. 280// 281// You can update only the $LATEST version of a slot type. You can't update 282// the numbered versions that you create with the CreateSlotTypeVersion operation. 283// 284// When you create a version of a slot type, Amazon Lex sets the version to 285// 1. Subsequent versions increment by 1. For more information, see versioning-intro. 286// 287// This operation requires permissions for the lex:CreateSlotTypeVersion action. 288// 289// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 290// with awserr.Error's Code and Message methods to get detailed information about 291// the error. 292// 293// See the AWS API reference guide for Amazon Lex Model Building Service's 294// API operation CreateSlotTypeVersion for usage and error information. 295// 296// Returned Error Codes: 297// * ErrCodeNotFoundException "NotFoundException" 298// The resource specified in the request was not found. Check the resource and 299// try again. 300// 301// * ErrCodeConflictException "ConflictException" 302// There was a conflict processing the request. Try your request again. 303// 304// * ErrCodeLimitExceededException "LimitExceededException" 305// The request exceeded a limit. Try your request again. 306// 307// * ErrCodeInternalFailureException "InternalFailureException" 308// An internal Amazon Lex error occurred. Try your request again. 309// 310// * ErrCodeBadRequestException "BadRequestException" 311// The request is not well formed. For example, a value is invalid or a required 312// field is missing. Check the field values, and try again. 313// 314// * ErrCodePreconditionFailedException "PreconditionFailedException" 315// The checksum of the resource that you are trying to change does not match 316// the checksum in the request. Check the resource's checksum and try again. 317// 318// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersion 319func (c *LexModelBuildingService) CreateSlotTypeVersion(input *CreateSlotTypeVersionInput) (*CreateSlotTypeVersionOutput, error) { 320 req, out := c.CreateSlotTypeVersionRequest(input) 321 return out, req.Send() 322} 323 324// CreateSlotTypeVersionWithContext is the same as CreateSlotTypeVersion with the addition of 325// the ability to pass a context and additional request options. 326// 327// See CreateSlotTypeVersion for details on how to use this API operation. 328// 329// The context must be non-nil and will be used for request cancellation. If 330// the context is nil a panic will occur. In the future the SDK may create 331// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 332// for more information on using Contexts. 333func (c *LexModelBuildingService) CreateSlotTypeVersionWithContext(ctx aws.Context, input *CreateSlotTypeVersionInput, opts ...request.Option) (*CreateSlotTypeVersionOutput, error) { 334 req, out := c.CreateSlotTypeVersionRequest(input) 335 req.SetContext(ctx) 336 req.ApplyOptions(opts...) 337 return out, req.Send() 338} 339 340const opDeleteBot = "DeleteBot" 341 342// DeleteBotRequest generates a "aws/request.Request" representing the 343// client's request for the DeleteBot operation. The "output" return 344// value will be populated with the request's response once the request complets 345// successfuly. 346// 347// Use "Send" method on the returned Request to send the API call to the service. 348// the "output" return value is not valid until after Send returns without error. 349// 350// See DeleteBot for more information on using the DeleteBot 351// API call, and error handling. 352// 353// This method is useful when you want to inject custom logic or configuration 354// into the SDK's request lifecycle. Such as custom headers, or retry logic. 355// 356// 357// // Example sending a request using the DeleteBotRequest method. 358// req, resp := client.DeleteBotRequest(params) 359// 360// err := req.Send() 361// if err == nil { // resp is now filled 362// fmt.Println(resp) 363// } 364// 365// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBot 366func (c *LexModelBuildingService) DeleteBotRequest(input *DeleteBotInput) (req *request.Request, output *DeleteBotOutput) { 367 op := &request.Operation{ 368 Name: opDeleteBot, 369 HTTPMethod: "DELETE", 370 HTTPPath: "/bots/{name}", 371 } 372 373 if input == nil { 374 input = &DeleteBotInput{} 375 } 376 377 output = &DeleteBotOutput{} 378 req = c.newRequest(op, input, output) 379 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 380 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 381 return 382} 383 384// DeleteBot API operation for Amazon Lex Model Building Service. 385// 386// Deletes all versions of the bot, including the $LATEST version. To delete 387// a specific version of the bot, use the DeleteBotVersion operation. 388// 389// If a bot has an alias, you can't delete it. Instead, the DeleteBot operation 390// returns a ResourceInUseException exception that includes a reference to the 391// alias that refers to the bot. To remove the reference to the bot, delete 392// the alias. If you get the same exception again, delete the referring alias 393// until the DeleteBot operation is successful. 394// 395// This operation requires permissions for the lex:DeleteBot action. 396// 397// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 398// with awserr.Error's Code and Message methods to get detailed information about 399// the error. 400// 401// See the AWS API reference guide for Amazon Lex Model Building Service's 402// API operation DeleteBot for usage and error information. 403// 404// Returned Error Codes: 405// * ErrCodeNotFoundException "NotFoundException" 406// The resource specified in the request was not found. Check the resource and 407// try again. 408// 409// * ErrCodeConflictException "ConflictException" 410// There was a conflict processing the request. Try your request again. 411// 412// * ErrCodeLimitExceededException "LimitExceededException" 413// The request exceeded a limit. Try your request again. 414// 415// * ErrCodeInternalFailureException "InternalFailureException" 416// An internal Amazon Lex error occurred. Try your request again. 417// 418// * ErrCodeBadRequestException "BadRequestException" 419// The request is not well formed. For example, a value is invalid or a required 420// field is missing. Check the field values, and try again. 421// 422// * ErrCodeResourceInUseException "ResourceInUseException" 423// The resource that you are attempting to delete is referred to by another 424// resource. Use this information to remove references to the resource that 425// you are trying to delete. 426// 427// The body of the exception contains a JSON object that describes the resource. 428// 429// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, 430// 431// "resourceReference": { 432// 433// "name": string, "version": string } } 434// 435// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBot 436func (c *LexModelBuildingService) DeleteBot(input *DeleteBotInput) (*DeleteBotOutput, error) { 437 req, out := c.DeleteBotRequest(input) 438 return out, req.Send() 439} 440 441// DeleteBotWithContext is the same as DeleteBot with the addition of 442// the ability to pass a context and additional request options. 443// 444// See DeleteBot for details on how to use this API operation. 445// 446// The context must be non-nil and will be used for request cancellation. If 447// the context is nil a panic will occur. In the future the SDK may create 448// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 449// for more information on using Contexts. 450func (c *LexModelBuildingService) DeleteBotWithContext(ctx aws.Context, input *DeleteBotInput, opts ...request.Option) (*DeleteBotOutput, error) { 451 req, out := c.DeleteBotRequest(input) 452 req.SetContext(ctx) 453 req.ApplyOptions(opts...) 454 return out, req.Send() 455} 456 457const opDeleteBotAlias = "DeleteBotAlias" 458 459// DeleteBotAliasRequest generates a "aws/request.Request" representing the 460// client's request for the DeleteBotAlias operation. The "output" return 461// value will be populated with the request's response once the request complets 462// successfuly. 463// 464// Use "Send" method on the returned Request to send the API call to the service. 465// the "output" return value is not valid until after Send returns without error. 466// 467// See DeleteBotAlias for more information on using the DeleteBotAlias 468// API call, and error handling. 469// 470// This method is useful when you want to inject custom logic or configuration 471// into the SDK's request lifecycle. Such as custom headers, or retry logic. 472// 473// 474// // Example sending a request using the DeleteBotAliasRequest method. 475// req, resp := client.DeleteBotAliasRequest(params) 476// 477// err := req.Send() 478// if err == nil { // resp is now filled 479// fmt.Println(resp) 480// } 481// 482// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAlias 483func (c *LexModelBuildingService) DeleteBotAliasRequest(input *DeleteBotAliasInput) (req *request.Request, output *DeleteBotAliasOutput) { 484 op := &request.Operation{ 485 Name: opDeleteBotAlias, 486 HTTPMethod: "DELETE", 487 HTTPPath: "/bots/{botName}/aliases/{name}", 488 } 489 490 if input == nil { 491 input = &DeleteBotAliasInput{} 492 } 493 494 output = &DeleteBotAliasOutput{} 495 req = c.newRequest(op, input, output) 496 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 497 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 498 return 499} 500 501// DeleteBotAlias API operation for Amazon Lex Model Building Service. 502// 503// Deletes an alias for the specified bot. 504// 505// You can't delete an alias that is used in the association between a bot and 506// a messaging channel. If an alias is used in a channel association, the DeleteBot 507// operation returns a ResourceInUseException exception that includes a reference 508// to the channel association that refers to the bot. You can remove the reference 509// to the alias by deleting the channel association. If you get the same exception 510// again, delete the referring association until the DeleteBotAlias operation 511// is successful. 512// 513// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 514// with awserr.Error's Code and Message methods to get detailed information about 515// the error. 516// 517// See the AWS API reference guide for Amazon Lex Model Building Service's 518// API operation DeleteBotAlias for usage and error information. 519// 520// Returned Error Codes: 521// * ErrCodeNotFoundException "NotFoundException" 522// The resource specified in the request was not found. Check the resource and 523// try again. 524// 525// * ErrCodeConflictException "ConflictException" 526// There was a conflict processing the request. Try your request again. 527// 528// * ErrCodeLimitExceededException "LimitExceededException" 529// The request exceeded a limit. Try your request again. 530// 531// * ErrCodeInternalFailureException "InternalFailureException" 532// An internal Amazon Lex error occurred. Try your request again. 533// 534// * ErrCodeBadRequestException "BadRequestException" 535// The request is not well formed. For example, a value is invalid or a required 536// field is missing. Check the field values, and try again. 537// 538// * ErrCodeResourceInUseException "ResourceInUseException" 539// The resource that you are attempting to delete is referred to by another 540// resource. Use this information to remove references to the resource that 541// you are trying to delete. 542// 543// The body of the exception contains a JSON object that describes the resource. 544// 545// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, 546// 547// "resourceReference": { 548// 549// "name": string, "version": string } } 550// 551// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAlias 552func (c *LexModelBuildingService) DeleteBotAlias(input *DeleteBotAliasInput) (*DeleteBotAliasOutput, error) { 553 req, out := c.DeleteBotAliasRequest(input) 554 return out, req.Send() 555} 556 557// DeleteBotAliasWithContext is the same as DeleteBotAlias with the addition of 558// the ability to pass a context and additional request options. 559// 560// See DeleteBotAlias for details on how to use this API operation. 561// 562// The context must be non-nil and will be used for request cancellation. If 563// the context is nil a panic will occur. In the future the SDK may create 564// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 565// for more information on using Contexts. 566func (c *LexModelBuildingService) DeleteBotAliasWithContext(ctx aws.Context, input *DeleteBotAliasInput, opts ...request.Option) (*DeleteBotAliasOutput, error) { 567 req, out := c.DeleteBotAliasRequest(input) 568 req.SetContext(ctx) 569 req.ApplyOptions(opts...) 570 return out, req.Send() 571} 572 573const opDeleteBotChannelAssociation = "DeleteBotChannelAssociation" 574 575// DeleteBotChannelAssociationRequest generates a "aws/request.Request" representing the 576// client's request for the DeleteBotChannelAssociation operation. The "output" return 577// value will be populated with the request's response once the request complets 578// successfuly. 579// 580// Use "Send" method on the returned Request to send the API call to the service. 581// the "output" return value is not valid until after Send returns without error. 582// 583// See DeleteBotChannelAssociation for more information on using the DeleteBotChannelAssociation 584// API call, and error handling. 585// 586// This method is useful when you want to inject custom logic or configuration 587// into the SDK's request lifecycle. Such as custom headers, or retry logic. 588// 589// 590// // Example sending a request using the DeleteBotChannelAssociationRequest method. 591// req, resp := client.DeleteBotChannelAssociationRequest(params) 592// 593// err := req.Send() 594// if err == nil { // resp is now filled 595// fmt.Println(resp) 596// } 597// 598// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociation 599func (c *LexModelBuildingService) DeleteBotChannelAssociationRequest(input *DeleteBotChannelAssociationInput) (req *request.Request, output *DeleteBotChannelAssociationOutput) { 600 op := &request.Operation{ 601 Name: opDeleteBotChannelAssociation, 602 HTTPMethod: "DELETE", 603 HTTPPath: "/bots/{botName}/aliases/{aliasName}/channels/{name}", 604 } 605 606 if input == nil { 607 input = &DeleteBotChannelAssociationInput{} 608 } 609 610 output = &DeleteBotChannelAssociationOutput{} 611 req = c.newRequest(op, input, output) 612 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 613 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 614 return 615} 616 617// DeleteBotChannelAssociation API operation for Amazon Lex Model Building Service. 618// 619// Deletes the association between an Amazon Lex bot and a messaging platform. 620// 621// This operation requires permission for the lex:DeleteBotChannelAssociation 622// action. 623// 624// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 625// with awserr.Error's Code and Message methods to get detailed information about 626// the error. 627// 628// See the AWS API reference guide for Amazon Lex Model Building Service's 629// API operation DeleteBotChannelAssociation for usage and error information. 630// 631// Returned Error Codes: 632// * ErrCodeNotFoundException "NotFoundException" 633// The resource specified in the request was not found. Check the resource and 634// try again. 635// 636// * ErrCodeConflictException "ConflictException" 637// There was a conflict processing the request. Try your request again. 638// 639// * ErrCodeLimitExceededException "LimitExceededException" 640// The request exceeded a limit. Try your request again. 641// 642// * ErrCodeInternalFailureException "InternalFailureException" 643// An internal Amazon Lex error occurred. Try your request again. 644// 645// * ErrCodeBadRequestException "BadRequestException" 646// The request is not well formed. For example, a value is invalid or a required 647// field is missing. Check the field values, and try again. 648// 649// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociation 650func (c *LexModelBuildingService) DeleteBotChannelAssociation(input *DeleteBotChannelAssociationInput) (*DeleteBotChannelAssociationOutput, error) { 651 req, out := c.DeleteBotChannelAssociationRequest(input) 652 return out, req.Send() 653} 654 655// DeleteBotChannelAssociationWithContext is the same as DeleteBotChannelAssociation with the addition of 656// the ability to pass a context and additional request options. 657// 658// See DeleteBotChannelAssociation for details on how to use this API operation. 659// 660// The context must be non-nil and will be used for request cancellation. If 661// the context is nil a panic will occur. In the future the SDK may create 662// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 663// for more information on using Contexts. 664func (c *LexModelBuildingService) DeleteBotChannelAssociationWithContext(ctx aws.Context, input *DeleteBotChannelAssociationInput, opts ...request.Option) (*DeleteBotChannelAssociationOutput, error) { 665 req, out := c.DeleteBotChannelAssociationRequest(input) 666 req.SetContext(ctx) 667 req.ApplyOptions(opts...) 668 return out, req.Send() 669} 670 671const opDeleteBotVersion = "DeleteBotVersion" 672 673// DeleteBotVersionRequest generates a "aws/request.Request" representing the 674// client's request for the DeleteBotVersion operation. The "output" return 675// value will be populated with the request's response once the request complets 676// successfuly. 677// 678// Use "Send" method on the returned Request to send the API call to the service. 679// the "output" return value is not valid until after Send returns without error. 680// 681// See DeleteBotVersion for more information on using the DeleteBotVersion 682// API call, and error handling. 683// 684// This method is useful when you want to inject custom logic or configuration 685// into the SDK's request lifecycle. Such as custom headers, or retry logic. 686// 687// 688// // Example sending a request using the DeleteBotVersionRequest method. 689// req, resp := client.DeleteBotVersionRequest(params) 690// 691// err := req.Send() 692// if err == nil { // resp is now filled 693// fmt.Println(resp) 694// } 695// 696// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersion 697func (c *LexModelBuildingService) DeleteBotVersionRequest(input *DeleteBotVersionInput) (req *request.Request, output *DeleteBotVersionOutput) { 698 op := &request.Operation{ 699 Name: opDeleteBotVersion, 700 HTTPMethod: "DELETE", 701 HTTPPath: "/bots/{name}/versions/{version}", 702 } 703 704 if input == nil { 705 input = &DeleteBotVersionInput{} 706 } 707 708 output = &DeleteBotVersionOutput{} 709 req = c.newRequest(op, input, output) 710 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 711 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 712 return 713} 714 715// DeleteBotVersion API operation for Amazon Lex Model Building Service. 716// 717// Deletes a specific version of a bot. To delete all versions of a bot, use 718// the DeleteBot operation. 719// 720// This operation requires permissions for the lex:DeleteBotVersion action. 721// 722// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 723// with awserr.Error's Code and Message methods to get detailed information about 724// the error. 725// 726// See the AWS API reference guide for Amazon Lex Model Building Service's 727// API operation DeleteBotVersion for usage and error information. 728// 729// Returned Error Codes: 730// * ErrCodeNotFoundException "NotFoundException" 731// The resource specified in the request was not found. Check the resource and 732// try again. 733// 734// * ErrCodeConflictException "ConflictException" 735// There was a conflict processing the request. Try your request again. 736// 737// * ErrCodeLimitExceededException "LimitExceededException" 738// The request exceeded a limit. Try your request again. 739// 740// * ErrCodeInternalFailureException "InternalFailureException" 741// An internal Amazon Lex error occurred. Try your request again. 742// 743// * ErrCodeBadRequestException "BadRequestException" 744// The request is not well formed. For example, a value is invalid or a required 745// field is missing. Check the field values, and try again. 746// 747// * ErrCodeResourceInUseException "ResourceInUseException" 748// The resource that you are attempting to delete is referred to by another 749// resource. Use this information to remove references to the resource that 750// you are trying to delete. 751// 752// The body of the exception contains a JSON object that describes the resource. 753// 754// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, 755// 756// "resourceReference": { 757// 758// "name": string, "version": string } } 759// 760// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersion 761func (c *LexModelBuildingService) DeleteBotVersion(input *DeleteBotVersionInput) (*DeleteBotVersionOutput, error) { 762 req, out := c.DeleteBotVersionRequest(input) 763 return out, req.Send() 764} 765 766// DeleteBotVersionWithContext is the same as DeleteBotVersion with the addition of 767// the ability to pass a context and additional request options. 768// 769// See DeleteBotVersion for details on how to use this API operation. 770// 771// The context must be non-nil and will be used for request cancellation. If 772// the context is nil a panic will occur. In the future the SDK may create 773// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 774// for more information on using Contexts. 775func (c *LexModelBuildingService) DeleteBotVersionWithContext(ctx aws.Context, input *DeleteBotVersionInput, opts ...request.Option) (*DeleteBotVersionOutput, error) { 776 req, out := c.DeleteBotVersionRequest(input) 777 req.SetContext(ctx) 778 req.ApplyOptions(opts...) 779 return out, req.Send() 780} 781 782const opDeleteIntent = "DeleteIntent" 783 784// DeleteIntentRequest generates a "aws/request.Request" representing the 785// client's request for the DeleteIntent operation. The "output" return 786// value will be populated with the request's response once the request complets 787// successfuly. 788// 789// Use "Send" method on the returned Request to send the API call to the service. 790// the "output" return value is not valid until after Send returns without error. 791// 792// See DeleteIntent for more information on using the DeleteIntent 793// API call, and error handling. 794// 795// This method is useful when you want to inject custom logic or configuration 796// into the SDK's request lifecycle. Such as custom headers, or retry logic. 797// 798// 799// // Example sending a request using the DeleteIntentRequest method. 800// req, resp := client.DeleteIntentRequest(params) 801// 802// err := req.Send() 803// if err == nil { // resp is now filled 804// fmt.Println(resp) 805// } 806// 807// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntent 808func (c *LexModelBuildingService) DeleteIntentRequest(input *DeleteIntentInput) (req *request.Request, output *DeleteIntentOutput) { 809 op := &request.Operation{ 810 Name: opDeleteIntent, 811 HTTPMethod: "DELETE", 812 HTTPPath: "/intents/{name}", 813 } 814 815 if input == nil { 816 input = &DeleteIntentInput{} 817 } 818 819 output = &DeleteIntentOutput{} 820 req = c.newRequest(op, input, output) 821 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 822 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 823 return 824} 825 826// DeleteIntent API operation for Amazon Lex Model Building Service. 827// 828// Deletes all versions of the intent, including the $LATEST version. To delete 829// a specific version of the intent, use the DeleteIntentVersion operation. 830// 831// You can delete a version of an intent only if it is not referenced. To delete 832// an intent that is referred to in one or more bots (see how-it-works), you 833// must remove those references first. 834// 835// If you get the ResourceInUseException exception, it provides an example reference 836// that shows where the intent is referenced. To remove the reference to the 837// intent, either update the bot or delete it. If you get the same exception 838// when you attempt to delete the intent again, repeat until the intent has 839// no references and the call to DeleteIntent is successful. 840// 841// This operation requires permission for the lex:DeleteIntent action. 842// 843// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 844// with awserr.Error's Code and Message methods to get detailed information about 845// the error. 846// 847// See the AWS API reference guide for Amazon Lex Model Building Service's 848// API operation DeleteIntent for usage and error information. 849// 850// Returned Error Codes: 851// * ErrCodeNotFoundException "NotFoundException" 852// The resource specified in the request was not found. Check the resource and 853// try again. 854// 855// * ErrCodeConflictException "ConflictException" 856// There was a conflict processing the request. Try your request again. 857// 858// * ErrCodeLimitExceededException "LimitExceededException" 859// The request exceeded a limit. Try your request again. 860// 861// * ErrCodeInternalFailureException "InternalFailureException" 862// An internal Amazon Lex error occurred. Try your request again. 863// 864// * ErrCodeBadRequestException "BadRequestException" 865// The request is not well formed. For example, a value is invalid or a required 866// field is missing. Check the field values, and try again. 867// 868// * ErrCodeResourceInUseException "ResourceInUseException" 869// The resource that you are attempting to delete is referred to by another 870// resource. Use this information to remove references to the resource that 871// you are trying to delete. 872// 873// The body of the exception contains a JSON object that describes the resource. 874// 875// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, 876// 877// "resourceReference": { 878// 879// "name": string, "version": string } } 880// 881// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntent 882func (c *LexModelBuildingService) DeleteIntent(input *DeleteIntentInput) (*DeleteIntentOutput, error) { 883 req, out := c.DeleteIntentRequest(input) 884 return out, req.Send() 885} 886 887// DeleteIntentWithContext is the same as DeleteIntent with the addition of 888// the ability to pass a context and additional request options. 889// 890// See DeleteIntent for details on how to use this API operation. 891// 892// The context must be non-nil and will be used for request cancellation. If 893// the context is nil a panic will occur. In the future the SDK may create 894// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 895// for more information on using Contexts. 896func (c *LexModelBuildingService) DeleteIntentWithContext(ctx aws.Context, input *DeleteIntentInput, opts ...request.Option) (*DeleteIntentOutput, error) { 897 req, out := c.DeleteIntentRequest(input) 898 req.SetContext(ctx) 899 req.ApplyOptions(opts...) 900 return out, req.Send() 901} 902 903const opDeleteIntentVersion = "DeleteIntentVersion" 904 905// DeleteIntentVersionRequest generates a "aws/request.Request" representing the 906// client's request for the DeleteIntentVersion operation. The "output" return 907// value will be populated with the request's response once the request complets 908// successfuly. 909// 910// Use "Send" method on the returned Request to send the API call to the service. 911// the "output" return value is not valid until after Send returns without error. 912// 913// See DeleteIntentVersion for more information on using the DeleteIntentVersion 914// API call, and error handling. 915// 916// This method is useful when you want to inject custom logic or configuration 917// into the SDK's request lifecycle. Such as custom headers, or retry logic. 918// 919// 920// // Example sending a request using the DeleteIntentVersionRequest method. 921// req, resp := client.DeleteIntentVersionRequest(params) 922// 923// err := req.Send() 924// if err == nil { // resp is now filled 925// fmt.Println(resp) 926// } 927// 928// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersion 929func (c *LexModelBuildingService) DeleteIntentVersionRequest(input *DeleteIntentVersionInput) (req *request.Request, output *DeleteIntentVersionOutput) { 930 op := &request.Operation{ 931 Name: opDeleteIntentVersion, 932 HTTPMethod: "DELETE", 933 HTTPPath: "/intents/{name}/versions/{version}", 934 } 935 936 if input == nil { 937 input = &DeleteIntentVersionInput{} 938 } 939 940 output = &DeleteIntentVersionOutput{} 941 req = c.newRequest(op, input, output) 942 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 943 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 944 return 945} 946 947// DeleteIntentVersion API operation for Amazon Lex Model Building Service. 948// 949// Deletes a specific version of an intent. To delete all versions of a intent, 950// use the DeleteIntent operation. 951// 952// This operation requires permissions for the lex:DeleteIntentVersion action. 953// 954// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 955// with awserr.Error's Code and Message methods to get detailed information about 956// the error. 957// 958// See the AWS API reference guide for Amazon Lex Model Building Service's 959// API operation DeleteIntentVersion for usage and error information. 960// 961// Returned Error Codes: 962// * ErrCodeNotFoundException "NotFoundException" 963// The resource specified in the request was not found. Check the resource and 964// try again. 965// 966// * ErrCodeConflictException "ConflictException" 967// There was a conflict processing the request. Try your request again. 968// 969// * ErrCodeLimitExceededException "LimitExceededException" 970// The request exceeded a limit. Try your request again. 971// 972// * ErrCodeInternalFailureException "InternalFailureException" 973// An internal Amazon Lex error occurred. Try your request again. 974// 975// * ErrCodeBadRequestException "BadRequestException" 976// The request is not well formed. For example, a value is invalid or a required 977// field is missing. Check the field values, and try again. 978// 979// * ErrCodeResourceInUseException "ResourceInUseException" 980// The resource that you are attempting to delete is referred to by another 981// resource. Use this information to remove references to the resource that 982// you are trying to delete. 983// 984// The body of the exception contains a JSON object that describes the resource. 985// 986// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, 987// 988// "resourceReference": { 989// 990// "name": string, "version": string } } 991// 992// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersion 993func (c *LexModelBuildingService) DeleteIntentVersion(input *DeleteIntentVersionInput) (*DeleteIntentVersionOutput, error) { 994 req, out := c.DeleteIntentVersionRequest(input) 995 return out, req.Send() 996} 997 998// DeleteIntentVersionWithContext is the same as DeleteIntentVersion with the addition of 999// the ability to pass a context and additional request options. 1000// 1001// See DeleteIntentVersion for details on how to use this API operation. 1002// 1003// The context must be non-nil and will be used for request cancellation. If 1004// the context is nil a panic will occur. In the future the SDK may create 1005// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1006// for more information on using Contexts. 1007func (c *LexModelBuildingService) DeleteIntentVersionWithContext(ctx aws.Context, input *DeleteIntentVersionInput, opts ...request.Option) (*DeleteIntentVersionOutput, error) { 1008 req, out := c.DeleteIntentVersionRequest(input) 1009 req.SetContext(ctx) 1010 req.ApplyOptions(opts...) 1011 return out, req.Send() 1012} 1013 1014const opDeleteSlotType = "DeleteSlotType" 1015 1016// DeleteSlotTypeRequest generates a "aws/request.Request" representing the 1017// client's request for the DeleteSlotType operation. The "output" return 1018// value will be populated with the request's response once the request complets 1019// successfuly. 1020// 1021// Use "Send" method on the returned Request to send the API call to the service. 1022// the "output" return value is not valid until after Send returns without error. 1023// 1024// See DeleteSlotType for more information on using the DeleteSlotType 1025// API call, and error handling. 1026// 1027// This method is useful when you want to inject custom logic or configuration 1028// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1029// 1030// 1031// // Example sending a request using the DeleteSlotTypeRequest method. 1032// req, resp := client.DeleteSlotTypeRequest(params) 1033// 1034// err := req.Send() 1035// if err == nil { // resp is now filled 1036// fmt.Println(resp) 1037// } 1038// 1039// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotType 1040func (c *LexModelBuildingService) DeleteSlotTypeRequest(input *DeleteSlotTypeInput) (req *request.Request, output *DeleteSlotTypeOutput) { 1041 op := &request.Operation{ 1042 Name: opDeleteSlotType, 1043 HTTPMethod: "DELETE", 1044 HTTPPath: "/slottypes/{name}", 1045 } 1046 1047 if input == nil { 1048 input = &DeleteSlotTypeInput{} 1049 } 1050 1051 output = &DeleteSlotTypeOutput{} 1052 req = c.newRequest(op, input, output) 1053 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 1054 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 1055 return 1056} 1057 1058// DeleteSlotType API operation for Amazon Lex Model Building Service. 1059// 1060// Deletes all versions of the slot type, including the $LATEST version. To 1061// delete a specific version of the slot type, use the DeleteSlotTypeVersion 1062// operation. 1063// 1064// You can delete a version of a slot type only if it is not referenced. To 1065// delete a slot type that is referred to in one or more intents, you must remove 1066// those references first. 1067// 1068// If you get the ResourceInUseException exception, the exception provides an 1069// example reference that shows the intent where the slot type is referenced. 1070// To remove the reference to the slot type, either update the intent or delete 1071// it. If you get the same exception when you attempt to delete the slot type 1072// again, repeat until the slot type has no references and the DeleteSlotType 1073// call is successful. 1074// 1075// This operation requires permission for the lex:DeleteSlotType action. 1076// 1077// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1078// with awserr.Error's Code and Message methods to get detailed information about 1079// the error. 1080// 1081// See the AWS API reference guide for Amazon Lex Model Building Service's 1082// API operation DeleteSlotType for usage and error information. 1083// 1084// Returned Error Codes: 1085// * ErrCodeNotFoundException "NotFoundException" 1086// The resource specified in the request was not found. Check the resource and 1087// try again. 1088// 1089// * ErrCodeConflictException "ConflictException" 1090// There was a conflict processing the request. Try your request again. 1091// 1092// * ErrCodeLimitExceededException "LimitExceededException" 1093// The request exceeded a limit. Try your request again. 1094// 1095// * ErrCodeInternalFailureException "InternalFailureException" 1096// An internal Amazon Lex error occurred. Try your request again. 1097// 1098// * ErrCodeBadRequestException "BadRequestException" 1099// The request is not well formed. For example, a value is invalid or a required 1100// field is missing. Check the field values, and try again. 1101// 1102// * ErrCodeResourceInUseException "ResourceInUseException" 1103// The resource that you are attempting to delete is referred to by another 1104// resource. Use this information to remove references to the resource that 1105// you are trying to delete. 1106// 1107// The body of the exception contains a JSON object that describes the resource. 1108// 1109// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, 1110// 1111// "resourceReference": { 1112// 1113// "name": string, "version": string } } 1114// 1115// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotType 1116func (c *LexModelBuildingService) DeleteSlotType(input *DeleteSlotTypeInput) (*DeleteSlotTypeOutput, error) { 1117 req, out := c.DeleteSlotTypeRequest(input) 1118 return out, req.Send() 1119} 1120 1121// DeleteSlotTypeWithContext is the same as DeleteSlotType with the addition of 1122// the ability to pass a context and additional request options. 1123// 1124// See DeleteSlotType for details on how to use this API operation. 1125// 1126// The context must be non-nil and will be used for request cancellation. If 1127// the context is nil a panic will occur. In the future the SDK may create 1128// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1129// for more information on using Contexts. 1130func (c *LexModelBuildingService) DeleteSlotTypeWithContext(ctx aws.Context, input *DeleteSlotTypeInput, opts ...request.Option) (*DeleteSlotTypeOutput, error) { 1131 req, out := c.DeleteSlotTypeRequest(input) 1132 req.SetContext(ctx) 1133 req.ApplyOptions(opts...) 1134 return out, req.Send() 1135} 1136 1137const opDeleteSlotTypeVersion = "DeleteSlotTypeVersion" 1138 1139// DeleteSlotTypeVersionRequest generates a "aws/request.Request" representing the 1140// client's request for the DeleteSlotTypeVersion operation. The "output" return 1141// value will be populated with the request's response once the request complets 1142// successfuly. 1143// 1144// Use "Send" method on the returned Request to send the API call to the service. 1145// the "output" return value is not valid until after Send returns without error. 1146// 1147// See DeleteSlotTypeVersion for more information on using the DeleteSlotTypeVersion 1148// API call, and error handling. 1149// 1150// This method is useful when you want to inject custom logic or configuration 1151// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1152// 1153// 1154// // Example sending a request using the DeleteSlotTypeVersionRequest method. 1155// req, resp := client.DeleteSlotTypeVersionRequest(params) 1156// 1157// err := req.Send() 1158// if err == nil { // resp is now filled 1159// fmt.Println(resp) 1160// } 1161// 1162// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersion 1163func (c *LexModelBuildingService) DeleteSlotTypeVersionRequest(input *DeleteSlotTypeVersionInput) (req *request.Request, output *DeleteSlotTypeVersionOutput) { 1164 op := &request.Operation{ 1165 Name: opDeleteSlotTypeVersion, 1166 HTTPMethod: "DELETE", 1167 HTTPPath: "/slottypes/{name}/version/{version}", 1168 } 1169 1170 if input == nil { 1171 input = &DeleteSlotTypeVersionInput{} 1172 } 1173 1174 output = &DeleteSlotTypeVersionOutput{} 1175 req = c.newRequest(op, input, output) 1176 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 1177 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 1178 return 1179} 1180 1181// DeleteSlotTypeVersion API operation for Amazon Lex Model Building Service. 1182// 1183// Deletes a specific version of a slot type. To delete all versions of a slot 1184// type, use the DeleteSlotType operation. 1185// 1186// This operation requires permissions for the lex:DeleteSlotTypeVersion action. 1187// 1188// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1189// with awserr.Error's Code and Message methods to get detailed information about 1190// the error. 1191// 1192// See the AWS API reference guide for Amazon Lex Model Building Service's 1193// API operation DeleteSlotTypeVersion for usage and error information. 1194// 1195// Returned Error Codes: 1196// * ErrCodeNotFoundException "NotFoundException" 1197// The resource specified in the request was not found. Check the resource and 1198// try again. 1199// 1200// * ErrCodeConflictException "ConflictException" 1201// There was a conflict processing the request. Try your request again. 1202// 1203// * ErrCodeLimitExceededException "LimitExceededException" 1204// The request exceeded a limit. Try your request again. 1205// 1206// * ErrCodeInternalFailureException "InternalFailureException" 1207// An internal Amazon Lex error occurred. Try your request again. 1208// 1209// * ErrCodeBadRequestException "BadRequestException" 1210// The request is not well formed. For example, a value is invalid or a required 1211// field is missing. Check the field values, and try again. 1212// 1213// * ErrCodeResourceInUseException "ResourceInUseException" 1214// The resource that you are attempting to delete is referred to by another 1215// resource. Use this information to remove references to the resource that 1216// you are trying to delete. 1217// 1218// The body of the exception contains a JSON object that describes the resource. 1219// 1220// { "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT, 1221// 1222// "resourceReference": { 1223// 1224// "name": string, "version": string } } 1225// 1226// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersion 1227func (c *LexModelBuildingService) DeleteSlotTypeVersion(input *DeleteSlotTypeVersionInput) (*DeleteSlotTypeVersionOutput, error) { 1228 req, out := c.DeleteSlotTypeVersionRequest(input) 1229 return out, req.Send() 1230} 1231 1232// DeleteSlotTypeVersionWithContext is the same as DeleteSlotTypeVersion with the addition of 1233// the ability to pass a context and additional request options. 1234// 1235// See DeleteSlotTypeVersion for details on how to use this API operation. 1236// 1237// The context must be non-nil and will be used for request cancellation. If 1238// the context is nil a panic will occur. In the future the SDK may create 1239// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1240// for more information on using Contexts. 1241func (c *LexModelBuildingService) DeleteSlotTypeVersionWithContext(ctx aws.Context, input *DeleteSlotTypeVersionInput, opts ...request.Option) (*DeleteSlotTypeVersionOutput, error) { 1242 req, out := c.DeleteSlotTypeVersionRequest(input) 1243 req.SetContext(ctx) 1244 req.ApplyOptions(opts...) 1245 return out, req.Send() 1246} 1247 1248const opDeleteUtterances = "DeleteUtterances" 1249 1250// DeleteUtterancesRequest generates a "aws/request.Request" representing the 1251// client's request for the DeleteUtterances operation. The "output" return 1252// value will be populated with the request's response once the request complets 1253// successfuly. 1254// 1255// Use "Send" method on the returned Request to send the API call to the service. 1256// the "output" return value is not valid until after Send returns without error. 1257// 1258// See DeleteUtterances for more information on using the DeleteUtterances 1259// API call, and error handling. 1260// 1261// This method is useful when you want to inject custom logic or configuration 1262// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1263// 1264// 1265// // Example sending a request using the DeleteUtterancesRequest method. 1266// req, resp := client.DeleteUtterancesRequest(params) 1267// 1268// err := req.Send() 1269// if err == nil { // resp is now filled 1270// fmt.Println(resp) 1271// } 1272// 1273// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterances 1274func (c *LexModelBuildingService) DeleteUtterancesRequest(input *DeleteUtterancesInput) (req *request.Request, output *DeleteUtterancesOutput) { 1275 op := &request.Operation{ 1276 Name: opDeleteUtterances, 1277 HTTPMethod: "DELETE", 1278 HTTPPath: "/bots/{botName}/utterances/{userId}", 1279 } 1280 1281 if input == nil { 1282 input = &DeleteUtterancesInput{} 1283 } 1284 1285 output = &DeleteUtterancesOutput{} 1286 req = c.newRequest(op, input, output) 1287 req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) 1288 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 1289 return 1290} 1291 1292// DeleteUtterances API operation for Amazon Lex Model Building Service. 1293// 1294// Deletes stored utterances. 1295// 1296// Amazon Lex stores the utterances that users send to your bot unless the childDirected 1297// field in the bot is set to true. Utterances are stored for 15 days for use 1298// with the GetUtterancesView operation, and then stored indefinitely for use 1299// in improving the ability of your bot to respond to user input. 1300// 1301// Use the DeleteStoredUtterances operation to manually delete stored utterances 1302// for a specific user. 1303// 1304// This operation requires permissions for the lex:DeleteUtterances action. 1305// 1306// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1307// with awserr.Error's Code and Message methods to get detailed information about 1308// the error. 1309// 1310// See the AWS API reference guide for Amazon Lex Model Building Service's 1311// API operation DeleteUtterances for usage and error information. 1312// 1313// Returned Error Codes: 1314// * ErrCodeNotFoundException "NotFoundException" 1315// The resource specified in the request was not found. Check the resource and 1316// try again. 1317// 1318// * ErrCodeLimitExceededException "LimitExceededException" 1319// The request exceeded a limit. Try your request again. 1320// 1321// * ErrCodeInternalFailureException "InternalFailureException" 1322// An internal Amazon Lex error occurred. Try your request again. 1323// 1324// * ErrCodeBadRequestException "BadRequestException" 1325// The request is not well formed. For example, a value is invalid or a required 1326// field is missing. Check the field values, and try again. 1327// 1328// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterances 1329func (c *LexModelBuildingService) DeleteUtterances(input *DeleteUtterancesInput) (*DeleteUtterancesOutput, error) { 1330 req, out := c.DeleteUtterancesRequest(input) 1331 return out, req.Send() 1332} 1333 1334// DeleteUtterancesWithContext is the same as DeleteUtterances with the addition of 1335// the ability to pass a context and additional request options. 1336// 1337// See DeleteUtterances for details on how to use this API operation. 1338// 1339// The context must be non-nil and will be used for request cancellation. If 1340// the context is nil a panic will occur. In the future the SDK may create 1341// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1342// for more information on using Contexts. 1343func (c *LexModelBuildingService) DeleteUtterancesWithContext(ctx aws.Context, input *DeleteUtterancesInput, opts ...request.Option) (*DeleteUtterancesOutput, error) { 1344 req, out := c.DeleteUtterancesRequest(input) 1345 req.SetContext(ctx) 1346 req.ApplyOptions(opts...) 1347 return out, req.Send() 1348} 1349 1350const opGetBot = "GetBot" 1351 1352// GetBotRequest generates a "aws/request.Request" representing the 1353// client's request for the GetBot operation. The "output" return 1354// value will be populated with the request's response once the request complets 1355// successfuly. 1356// 1357// Use "Send" method on the returned Request to send the API call to the service. 1358// the "output" return value is not valid until after Send returns without error. 1359// 1360// See GetBot for more information on using the GetBot 1361// API call, and error handling. 1362// 1363// This method is useful when you want to inject custom logic or configuration 1364// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1365// 1366// 1367// // Example sending a request using the GetBotRequest method. 1368// req, resp := client.GetBotRequest(params) 1369// 1370// err := req.Send() 1371// if err == nil { // resp is now filled 1372// fmt.Println(resp) 1373// } 1374// 1375// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBot 1376func (c *LexModelBuildingService) GetBotRequest(input *GetBotInput) (req *request.Request, output *GetBotOutput) { 1377 op := &request.Operation{ 1378 Name: opGetBot, 1379 HTTPMethod: "GET", 1380 HTTPPath: "/bots/{name}/versions/{versionoralias}", 1381 } 1382 1383 if input == nil { 1384 input = &GetBotInput{} 1385 } 1386 1387 output = &GetBotOutput{} 1388 req = c.newRequest(op, input, output) 1389 return 1390} 1391 1392// GetBot API operation for Amazon Lex Model Building Service. 1393// 1394// Returns metadata information for a specific bot. You must provide the bot 1395// name and the bot version or alias. 1396// 1397// This operation requires permissions for the lex:GetBot action. 1398// 1399// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1400// with awserr.Error's Code and Message methods to get detailed information about 1401// the error. 1402// 1403// See the AWS API reference guide for Amazon Lex Model Building Service's 1404// API operation GetBot for usage and error information. 1405// 1406// Returned Error Codes: 1407// * ErrCodeNotFoundException "NotFoundException" 1408// The resource specified in the request was not found. Check the resource and 1409// try again. 1410// 1411// * ErrCodeLimitExceededException "LimitExceededException" 1412// The request exceeded a limit. Try your request again. 1413// 1414// * ErrCodeInternalFailureException "InternalFailureException" 1415// An internal Amazon Lex error occurred. Try your request again. 1416// 1417// * ErrCodeBadRequestException "BadRequestException" 1418// The request is not well formed. For example, a value is invalid or a required 1419// field is missing. Check the field values, and try again. 1420// 1421// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBot 1422func (c *LexModelBuildingService) GetBot(input *GetBotInput) (*GetBotOutput, error) { 1423 req, out := c.GetBotRequest(input) 1424 return out, req.Send() 1425} 1426 1427// GetBotWithContext is the same as GetBot with the addition of 1428// the ability to pass a context and additional request options. 1429// 1430// See GetBot for details on how to use this API operation. 1431// 1432// The context must be non-nil and will be used for request cancellation. If 1433// the context is nil a panic will occur. In the future the SDK may create 1434// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1435// for more information on using Contexts. 1436func (c *LexModelBuildingService) GetBotWithContext(ctx aws.Context, input *GetBotInput, opts ...request.Option) (*GetBotOutput, error) { 1437 req, out := c.GetBotRequest(input) 1438 req.SetContext(ctx) 1439 req.ApplyOptions(opts...) 1440 return out, req.Send() 1441} 1442 1443const opGetBotAlias = "GetBotAlias" 1444 1445// GetBotAliasRequest generates a "aws/request.Request" representing the 1446// client's request for the GetBotAlias operation. The "output" return 1447// value will be populated with the request's response once the request complets 1448// successfuly. 1449// 1450// Use "Send" method on the returned Request to send the API call to the service. 1451// the "output" return value is not valid until after Send returns without error. 1452// 1453// See GetBotAlias for more information on using the GetBotAlias 1454// API call, and error handling. 1455// 1456// This method is useful when you want to inject custom logic or configuration 1457// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1458// 1459// 1460// // Example sending a request using the GetBotAliasRequest method. 1461// req, resp := client.GetBotAliasRequest(params) 1462// 1463// err := req.Send() 1464// if err == nil { // resp is now filled 1465// fmt.Println(resp) 1466// } 1467// 1468// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAlias 1469func (c *LexModelBuildingService) GetBotAliasRequest(input *GetBotAliasInput) (req *request.Request, output *GetBotAliasOutput) { 1470 op := &request.Operation{ 1471 Name: opGetBotAlias, 1472 HTTPMethod: "GET", 1473 HTTPPath: "/bots/{botName}/aliases/{name}", 1474 } 1475 1476 if input == nil { 1477 input = &GetBotAliasInput{} 1478 } 1479 1480 output = &GetBotAliasOutput{} 1481 req = c.newRequest(op, input, output) 1482 return 1483} 1484 1485// GetBotAlias API operation for Amazon Lex Model Building Service. 1486// 1487// Returns information about an Amazon Lex bot alias. For more information about 1488// aliases, see versioning-aliases. 1489// 1490// This operation requires permissions for the lex:GetBotAlias action. 1491// 1492// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1493// with awserr.Error's Code and Message methods to get detailed information about 1494// the error. 1495// 1496// See the AWS API reference guide for Amazon Lex Model Building Service's 1497// API operation GetBotAlias for usage and error information. 1498// 1499// Returned Error Codes: 1500// * ErrCodeNotFoundException "NotFoundException" 1501// The resource specified in the request was not found. Check the resource and 1502// try again. 1503// 1504// * ErrCodeLimitExceededException "LimitExceededException" 1505// The request exceeded a limit. Try your request again. 1506// 1507// * ErrCodeInternalFailureException "InternalFailureException" 1508// An internal Amazon Lex error occurred. Try your request again. 1509// 1510// * ErrCodeBadRequestException "BadRequestException" 1511// The request is not well formed. For example, a value is invalid or a required 1512// field is missing. Check the field values, and try again. 1513// 1514// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAlias 1515func (c *LexModelBuildingService) GetBotAlias(input *GetBotAliasInput) (*GetBotAliasOutput, error) { 1516 req, out := c.GetBotAliasRequest(input) 1517 return out, req.Send() 1518} 1519 1520// GetBotAliasWithContext is the same as GetBotAlias with the addition of 1521// the ability to pass a context and additional request options. 1522// 1523// See GetBotAlias for details on how to use this API operation. 1524// 1525// The context must be non-nil and will be used for request cancellation. If 1526// the context is nil a panic will occur. In the future the SDK may create 1527// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1528// for more information on using Contexts. 1529func (c *LexModelBuildingService) GetBotAliasWithContext(ctx aws.Context, input *GetBotAliasInput, opts ...request.Option) (*GetBotAliasOutput, error) { 1530 req, out := c.GetBotAliasRequest(input) 1531 req.SetContext(ctx) 1532 req.ApplyOptions(opts...) 1533 return out, req.Send() 1534} 1535 1536const opGetBotAliases = "GetBotAliases" 1537 1538// GetBotAliasesRequest generates a "aws/request.Request" representing the 1539// client's request for the GetBotAliases operation. The "output" return 1540// value will be populated with the request's response once the request complets 1541// successfuly. 1542// 1543// Use "Send" method on the returned Request to send the API call to the service. 1544// the "output" return value is not valid until after Send returns without error. 1545// 1546// See GetBotAliases for more information on using the GetBotAliases 1547// API call, and error handling. 1548// 1549// This method is useful when you want to inject custom logic or configuration 1550// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1551// 1552// 1553// // Example sending a request using the GetBotAliasesRequest method. 1554// req, resp := client.GetBotAliasesRequest(params) 1555// 1556// err := req.Send() 1557// if err == nil { // resp is now filled 1558// fmt.Println(resp) 1559// } 1560// 1561// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliases 1562func (c *LexModelBuildingService) GetBotAliasesRequest(input *GetBotAliasesInput) (req *request.Request, output *GetBotAliasesOutput) { 1563 op := &request.Operation{ 1564 Name: opGetBotAliases, 1565 HTTPMethod: "GET", 1566 HTTPPath: "/bots/{botName}/aliases/", 1567 Paginator: &request.Paginator{ 1568 InputTokens: []string{"nextToken"}, 1569 OutputTokens: []string{"nextToken"}, 1570 LimitToken: "maxResults", 1571 TruncationToken: "", 1572 }, 1573 } 1574 1575 if input == nil { 1576 input = &GetBotAliasesInput{} 1577 } 1578 1579 output = &GetBotAliasesOutput{} 1580 req = c.newRequest(op, input, output) 1581 return 1582} 1583 1584// GetBotAliases API operation for Amazon Lex Model Building Service. 1585// 1586// Returns a list of aliases for a specified Amazon Lex bot. 1587// 1588// This operation requires permissions for the lex:GetBotAliases action. 1589// 1590// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1591// with awserr.Error's Code and Message methods to get detailed information about 1592// the error. 1593// 1594// See the AWS API reference guide for Amazon Lex Model Building Service's 1595// API operation GetBotAliases for usage and error information. 1596// 1597// Returned Error Codes: 1598// * ErrCodeLimitExceededException "LimitExceededException" 1599// The request exceeded a limit. Try your request again. 1600// 1601// * ErrCodeInternalFailureException "InternalFailureException" 1602// An internal Amazon Lex error occurred. Try your request again. 1603// 1604// * ErrCodeBadRequestException "BadRequestException" 1605// The request is not well formed. For example, a value is invalid or a required 1606// field is missing. Check the field values, and try again. 1607// 1608// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliases 1609func (c *LexModelBuildingService) GetBotAliases(input *GetBotAliasesInput) (*GetBotAliasesOutput, error) { 1610 req, out := c.GetBotAliasesRequest(input) 1611 return out, req.Send() 1612} 1613 1614// GetBotAliasesWithContext is the same as GetBotAliases with the addition of 1615// the ability to pass a context and additional request options. 1616// 1617// See GetBotAliases for details on how to use this API operation. 1618// 1619// The context must be non-nil and will be used for request cancellation. If 1620// the context is nil a panic will occur. In the future the SDK may create 1621// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1622// for more information on using Contexts. 1623func (c *LexModelBuildingService) GetBotAliasesWithContext(ctx aws.Context, input *GetBotAliasesInput, opts ...request.Option) (*GetBotAliasesOutput, error) { 1624 req, out := c.GetBotAliasesRequest(input) 1625 req.SetContext(ctx) 1626 req.ApplyOptions(opts...) 1627 return out, req.Send() 1628} 1629 1630// GetBotAliasesPages iterates over the pages of a GetBotAliases operation, 1631// calling the "fn" function with the response data for each page. To stop 1632// iterating, return false from the fn function. 1633// 1634// See GetBotAliases method for more information on how to use this operation. 1635// 1636// Note: This operation can generate multiple requests to a service. 1637// 1638// // Example iterating over at most 3 pages of a GetBotAliases operation. 1639// pageNum := 0 1640// err := client.GetBotAliasesPages(params, 1641// func(page *GetBotAliasesOutput, lastPage bool) bool { 1642// pageNum++ 1643// fmt.Println(page) 1644// return pageNum <= 3 1645// }) 1646// 1647func (c *LexModelBuildingService) GetBotAliasesPages(input *GetBotAliasesInput, fn func(*GetBotAliasesOutput, bool) bool) error { 1648 return c.GetBotAliasesPagesWithContext(aws.BackgroundContext(), input, fn) 1649} 1650 1651// GetBotAliasesPagesWithContext same as GetBotAliasesPages except 1652// it takes a Context and allows setting request options on the pages. 1653// 1654// The context must be non-nil and will be used for request cancellation. If 1655// the context is nil a panic will occur. In the future the SDK may create 1656// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1657// for more information on using Contexts. 1658func (c *LexModelBuildingService) GetBotAliasesPagesWithContext(ctx aws.Context, input *GetBotAliasesInput, fn func(*GetBotAliasesOutput, bool) bool, opts ...request.Option) error { 1659 p := request.Pagination{ 1660 NewRequest: func() (*request.Request, error) { 1661 var inCpy *GetBotAliasesInput 1662 if input != nil { 1663 tmp := *input 1664 inCpy = &tmp 1665 } 1666 req, _ := c.GetBotAliasesRequest(inCpy) 1667 req.SetContext(ctx) 1668 req.ApplyOptions(opts...) 1669 return req, nil 1670 }, 1671 } 1672 1673 cont := true 1674 for p.Next() && cont { 1675 cont = fn(p.Page().(*GetBotAliasesOutput), !p.HasNextPage()) 1676 } 1677 return p.Err() 1678} 1679 1680const opGetBotChannelAssociation = "GetBotChannelAssociation" 1681 1682// GetBotChannelAssociationRequest generates a "aws/request.Request" representing the 1683// client's request for the GetBotChannelAssociation operation. The "output" return 1684// value will be populated with the request's response once the request complets 1685// successfuly. 1686// 1687// Use "Send" method on the returned Request to send the API call to the service. 1688// the "output" return value is not valid until after Send returns without error. 1689// 1690// See GetBotChannelAssociation for more information on using the GetBotChannelAssociation 1691// API call, and error handling. 1692// 1693// This method is useful when you want to inject custom logic or configuration 1694// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1695// 1696// 1697// // Example sending a request using the GetBotChannelAssociationRequest method. 1698// req, resp := client.GetBotChannelAssociationRequest(params) 1699// 1700// err := req.Send() 1701// if err == nil { // resp is now filled 1702// fmt.Println(resp) 1703// } 1704// 1705// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociation 1706func (c *LexModelBuildingService) GetBotChannelAssociationRequest(input *GetBotChannelAssociationInput) (req *request.Request, output *GetBotChannelAssociationOutput) { 1707 op := &request.Operation{ 1708 Name: opGetBotChannelAssociation, 1709 HTTPMethod: "GET", 1710 HTTPPath: "/bots/{botName}/aliases/{aliasName}/channels/{name}", 1711 } 1712 1713 if input == nil { 1714 input = &GetBotChannelAssociationInput{} 1715 } 1716 1717 output = &GetBotChannelAssociationOutput{} 1718 req = c.newRequest(op, input, output) 1719 return 1720} 1721 1722// GetBotChannelAssociation API operation for Amazon Lex Model Building Service. 1723// 1724// Returns information about the association between an Amazon Lex bot and a 1725// messaging platform. 1726// 1727// This operation requires permissions for the lex:GetBotChannelAssociation 1728// action. 1729// 1730// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1731// with awserr.Error's Code and Message methods to get detailed information about 1732// the error. 1733// 1734// See the AWS API reference guide for Amazon Lex Model Building Service's 1735// API operation GetBotChannelAssociation for usage and error information. 1736// 1737// Returned Error Codes: 1738// * ErrCodeNotFoundException "NotFoundException" 1739// The resource specified in the request was not found. Check the resource and 1740// try again. 1741// 1742// * ErrCodeLimitExceededException "LimitExceededException" 1743// The request exceeded a limit. Try your request again. 1744// 1745// * ErrCodeInternalFailureException "InternalFailureException" 1746// An internal Amazon Lex error occurred. Try your request again. 1747// 1748// * ErrCodeBadRequestException "BadRequestException" 1749// The request is not well formed. For example, a value is invalid or a required 1750// field is missing. Check the field values, and try again. 1751// 1752// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociation 1753func (c *LexModelBuildingService) GetBotChannelAssociation(input *GetBotChannelAssociationInput) (*GetBotChannelAssociationOutput, error) { 1754 req, out := c.GetBotChannelAssociationRequest(input) 1755 return out, req.Send() 1756} 1757 1758// GetBotChannelAssociationWithContext is the same as GetBotChannelAssociation with the addition of 1759// the ability to pass a context and additional request options. 1760// 1761// See GetBotChannelAssociation for details on how to use this API operation. 1762// 1763// The context must be non-nil and will be used for request cancellation. If 1764// the context is nil a panic will occur. In the future the SDK may create 1765// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1766// for more information on using Contexts. 1767func (c *LexModelBuildingService) GetBotChannelAssociationWithContext(ctx aws.Context, input *GetBotChannelAssociationInput, opts ...request.Option) (*GetBotChannelAssociationOutput, error) { 1768 req, out := c.GetBotChannelAssociationRequest(input) 1769 req.SetContext(ctx) 1770 req.ApplyOptions(opts...) 1771 return out, req.Send() 1772} 1773 1774const opGetBotChannelAssociations = "GetBotChannelAssociations" 1775 1776// GetBotChannelAssociationsRequest generates a "aws/request.Request" representing the 1777// client's request for the GetBotChannelAssociations operation. The "output" return 1778// value will be populated with the request's response once the request complets 1779// successfuly. 1780// 1781// Use "Send" method on the returned Request to send the API call to the service. 1782// the "output" return value is not valid until after Send returns without error. 1783// 1784// See GetBotChannelAssociations for more information on using the GetBotChannelAssociations 1785// API call, and error handling. 1786// 1787// This method is useful when you want to inject custom logic or configuration 1788// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1789// 1790// 1791// // Example sending a request using the GetBotChannelAssociationsRequest method. 1792// req, resp := client.GetBotChannelAssociationsRequest(params) 1793// 1794// err := req.Send() 1795// if err == nil { // resp is now filled 1796// fmt.Println(resp) 1797// } 1798// 1799// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociations 1800func (c *LexModelBuildingService) GetBotChannelAssociationsRequest(input *GetBotChannelAssociationsInput) (req *request.Request, output *GetBotChannelAssociationsOutput) { 1801 op := &request.Operation{ 1802 Name: opGetBotChannelAssociations, 1803 HTTPMethod: "GET", 1804 HTTPPath: "/bots/{botName}/aliases/{aliasName}/channels/", 1805 Paginator: &request.Paginator{ 1806 InputTokens: []string{"nextToken"}, 1807 OutputTokens: []string{"nextToken"}, 1808 LimitToken: "maxResults", 1809 TruncationToken: "", 1810 }, 1811 } 1812 1813 if input == nil { 1814 input = &GetBotChannelAssociationsInput{} 1815 } 1816 1817 output = &GetBotChannelAssociationsOutput{} 1818 req = c.newRequest(op, input, output) 1819 return 1820} 1821 1822// GetBotChannelAssociations API operation for Amazon Lex Model Building Service. 1823// 1824// Returns a list of all of the channels associated with the specified bot. 1825// 1826// The GetBotChannelAssociations operation requires permissions for the lex:GetBotChannelAssociations 1827// action. 1828// 1829// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1830// with awserr.Error's Code and Message methods to get detailed information about 1831// the error. 1832// 1833// See the AWS API reference guide for Amazon Lex Model Building Service's 1834// API operation GetBotChannelAssociations for usage and error information. 1835// 1836// Returned Error Codes: 1837// * ErrCodeLimitExceededException "LimitExceededException" 1838// The request exceeded a limit. Try your request again. 1839// 1840// * ErrCodeInternalFailureException "InternalFailureException" 1841// An internal Amazon Lex error occurred. Try your request again. 1842// 1843// * ErrCodeBadRequestException "BadRequestException" 1844// The request is not well formed. For example, a value is invalid or a required 1845// field is missing. Check the field values, and try again. 1846// 1847// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociations 1848func (c *LexModelBuildingService) GetBotChannelAssociations(input *GetBotChannelAssociationsInput) (*GetBotChannelAssociationsOutput, error) { 1849 req, out := c.GetBotChannelAssociationsRequest(input) 1850 return out, req.Send() 1851} 1852 1853// GetBotChannelAssociationsWithContext is the same as GetBotChannelAssociations with the addition of 1854// the ability to pass a context and additional request options. 1855// 1856// See GetBotChannelAssociations for details on how to use this API operation. 1857// 1858// The context must be non-nil and will be used for request cancellation. If 1859// the context is nil a panic will occur. In the future the SDK may create 1860// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1861// for more information on using Contexts. 1862func (c *LexModelBuildingService) GetBotChannelAssociationsWithContext(ctx aws.Context, input *GetBotChannelAssociationsInput, opts ...request.Option) (*GetBotChannelAssociationsOutput, error) { 1863 req, out := c.GetBotChannelAssociationsRequest(input) 1864 req.SetContext(ctx) 1865 req.ApplyOptions(opts...) 1866 return out, req.Send() 1867} 1868 1869// GetBotChannelAssociationsPages iterates over the pages of a GetBotChannelAssociations operation, 1870// calling the "fn" function with the response data for each page. To stop 1871// iterating, return false from the fn function. 1872// 1873// See GetBotChannelAssociations method for more information on how to use this operation. 1874// 1875// Note: This operation can generate multiple requests to a service. 1876// 1877// // Example iterating over at most 3 pages of a GetBotChannelAssociations operation. 1878// pageNum := 0 1879// err := client.GetBotChannelAssociationsPages(params, 1880// func(page *GetBotChannelAssociationsOutput, lastPage bool) bool { 1881// pageNum++ 1882// fmt.Println(page) 1883// return pageNum <= 3 1884// }) 1885// 1886func (c *LexModelBuildingService) GetBotChannelAssociationsPages(input *GetBotChannelAssociationsInput, fn func(*GetBotChannelAssociationsOutput, bool) bool) error { 1887 return c.GetBotChannelAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) 1888} 1889 1890// GetBotChannelAssociationsPagesWithContext same as GetBotChannelAssociationsPages except 1891// it takes a Context and allows setting request options on the pages. 1892// 1893// The context must be non-nil and will be used for request cancellation. If 1894// the context is nil a panic will occur. In the future the SDK may create 1895// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1896// for more information on using Contexts. 1897func (c *LexModelBuildingService) GetBotChannelAssociationsPagesWithContext(ctx aws.Context, input *GetBotChannelAssociationsInput, fn func(*GetBotChannelAssociationsOutput, bool) bool, opts ...request.Option) error { 1898 p := request.Pagination{ 1899 NewRequest: func() (*request.Request, error) { 1900 var inCpy *GetBotChannelAssociationsInput 1901 if input != nil { 1902 tmp := *input 1903 inCpy = &tmp 1904 } 1905 req, _ := c.GetBotChannelAssociationsRequest(inCpy) 1906 req.SetContext(ctx) 1907 req.ApplyOptions(opts...) 1908 return req, nil 1909 }, 1910 } 1911 1912 cont := true 1913 for p.Next() && cont { 1914 cont = fn(p.Page().(*GetBotChannelAssociationsOutput), !p.HasNextPage()) 1915 } 1916 return p.Err() 1917} 1918 1919const opGetBotVersions = "GetBotVersions" 1920 1921// GetBotVersionsRequest generates a "aws/request.Request" representing the 1922// client's request for the GetBotVersions operation. The "output" return 1923// value will be populated with the request's response once the request complets 1924// successfuly. 1925// 1926// Use "Send" method on the returned Request to send the API call to the service. 1927// the "output" return value is not valid until after Send returns without error. 1928// 1929// See GetBotVersions for more information on using the GetBotVersions 1930// API call, and error handling. 1931// 1932// This method is useful when you want to inject custom logic or configuration 1933// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1934// 1935// 1936// // Example sending a request using the GetBotVersionsRequest method. 1937// req, resp := client.GetBotVersionsRequest(params) 1938// 1939// err := req.Send() 1940// if err == nil { // resp is now filled 1941// fmt.Println(resp) 1942// } 1943// 1944// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersions 1945func (c *LexModelBuildingService) GetBotVersionsRequest(input *GetBotVersionsInput) (req *request.Request, output *GetBotVersionsOutput) { 1946 op := &request.Operation{ 1947 Name: opGetBotVersions, 1948 HTTPMethod: "GET", 1949 HTTPPath: "/bots/{name}/versions/", 1950 Paginator: &request.Paginator{ 1951 InputTokens: []string{"nextToken"}, 1952 OutputTokens: []string{"nextToken"}, 1953 LimitToken: "maxResults", 1954 TruncationToken: "", 1955 }, 1956 } 1957 1958 if input == nil { 1959 input = &GetBotVersionsInput{} 1960 } 1961 1962 output = &GetBotVersionsOutput{} 1963 req = c.newRequest(op, input, output) 1964 return 1965} 1966 1967// GetBotVersions API operation for Amazon Lex Model Building Service. 1968// 1969// Gets information about all of the versions of a bot. 1970// 1971// The GetBotVersions operation returns a BotMetadata object for each version 1972// of a bot. For example, if a bot has three numbered versions, the GetBotVersions 1973// operation returns four BotMetadata objects in the response, one for each 1974// numbered version and one for the $LATEST version. 1975// 1976// The GetBotVersions operation always returns at least one version, the $LATEST 1977// version. 1978// 1979// This operation requires permissions for the lex:GetBotVersions action. 1980// 1981// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1982// with awserr.Error's Code and Message methods to get detailed information about 1983// the error. 1984// 1985// See the AWS API reference guide for Amazon Lex Model Building Service's 1986// API operation GetBotVersions for usage and error information. 1987// 1988// Returned Error Codes: 1989// * ErrCodeNotFoundException "NotFoundException" 1990// The resource specified in the request was not found. Check the resource and 1991// try again. 1992// 1993// * ErrCodeLimitExceededException "LimitExceededException" 1994// The request exceeded a limit. Try your request again. 1995// 1996// * ErrCodeInternalFailureException "InternalFailureException" 1997// An internal Amazon Lex error occurred. Try your request again. 1998// 1999// * ErrCodeBadRequestException "BadRequestException" 2000// The request is not well formed. For example, a value is invalid or a required 2001// field is missing. Check the field values, and try again. 2002// 2003// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersions 2004func (c *LexModelBuildingService) GetBotVersions(input *GetBotVersionsInput) (*GetBotVersionsOutput, error) { 2005 req, out := c.GetBotVersionsRequest(input) 2006 return out, req.Send() 2007} 2008 2009// GetBotVersionsWithContext is the same as GetBotVersions with the addition of 2010// the ability to pass a context and additional request options. 2011// 2012// See GetBotVersions for details on how to use this API operation. 2013// 2014// The context must be non-nil and will be used for request cancellation. If 2015// the context is nil a panic will occur. In the future the SDK may create 2016// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2017// for more information on using Contexts. 2018func (c *LexModelBuildingService) GetBotVersionsWithContext(ctx aws.Context, input *GetBotVersionsInput, opts ...request.Option) (*GetBotVersionsOutput, error) { 2019 req, out := c.GetBotVersionsRequest(input) 2020 req.SetContext(ctx) 2021 req.ApplyOptions(opts...) 2022 return out, req.Send() 2023} 2024 2025// GetBotVersionsPages iterates over the pages of a GetBotVersions operation, 2026// calling the "fn" function with the response data for each page. To stop 2027// iterating, return false from the fn function. 2028// 2029// See GetBotVersions method for more information on how to use this operation. 2030// 2031// Note: This operation can generate multiple requests to a service. 2032// 2033// // Example iterating over at most 3 pages of a GetBotVersions operation. 2034// pageNum := 0 2035// err := client.GetBotVersionsPages(params, 2036// func(page *GetBotVersionsOutput, lastPage bool) bool { 2037// pageNum++ 2038// fmt.Println(page) 2039// return pageNum <= 3 2040// }) 2041// 2042func (c *LexModelBuildingService) GetBotVersionsPages(input *GetBotVersionsInput, fn func(*GetBotVersionsOutput, bool) bool) error { 2043 return c.GetBotVersionsPagesWithContext(aws.BackgroundContext(), input, fn) 2044} 2045 2046// GetBotVersionsPagesWithContext same as GetBotVersionsPages except 2047// it takes a Context and allows setting request options on the pages. 2048// 2049// The context must be non-nil and will be used for request cancellation. If 2050// the context is nil a panic will occur. In the future the SDK may create 2051// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2052// for more information on using Contexts. 2053func (c *LexModelBuildingService) GetBotVersionsPagesWithContext(ctx aws.Context, input *GetBotVersionsInput, fn func(*GetBotVersionsOutput, bool) bool, opts ...request.Option) error { 2054 p := request.Pagination{ 2055 NewRequest: func() (*request.Request, error) { 2056 var inCpy *GetBotVersionsInput 2057 if input != nil { 2058 tmp := *input 2059 inCpy = &tmp 2060 } 2061 req, _ := c.GetBotVersionsRequest(inCpy) 2062 req.SetContext(ctx) 2063 req.ApplyOptions(opts...) 2064 return req, nil 2065 }, 2066 } 2067 2068 cont := true 2069 for p.Next() && cont { 2070 cont = fn(p.Page().(*GetBotVersionsOutput), !p.HasNextPage()) 2071 } 2072 return p.Err() 2073} 2074 2075const opGetBots = "GetBots" 2076 2077// GetBotsRequest generates a "aws/request.Request" representing the 2078// client's request for the GetBots operation. The "output" return 2079// value will be populated with the request's response once the request complets 2080// successfuly. 2081// 2082// Use "Send" method on the returned Request to send the API call to the service. 2083// the "output" return value is not valid until after Send returns without error. 2084// 2085// See GetBots for more information on using the GetBots 2086// API call, and error handling. 2087// 2088// This method is useful when you want to inject custom logic or configuration 2089// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2090// 2091// 2092// // Example sending a request using the GetBotsRequest method. 2093// req, resp := client.GetBotsRequest(params) 2094// 2095// err := req.Send() 2096// if err == nil { // resp is now filled 2097// fmt.Println(resp) 2098// } 2099// 2100// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBots 2101func (c *LexModelBuildingService) GetBotsRequest(input *GetBotsInput) (req *request.Request, output *GetBotsOutput) { 2102 op := &request.Operation{ 2103 Name: opGetBots, 2104 HTTPMethod: "GET", 2105 HTTPPath: "/bots/", 2106 Paginator: &request.Paginator{ 2107 InputTokens: []string{"nextToken"}, 2108 OutputTokens: []string{"nextToken"}, 2109 LimitToken: "maxResults", 2110 TruncationToken: "", 2111 }, 2112 } 2113 2114 if input == nil { 2115 input = &GetBotsInput{} 2116 } 2117 2118 output = &GetBotsOutput{} 2119 req = c.newRequest(op, input, output) 2120 return 2121} 2122 2123// GetBots API operation for Amazon Lex Model Building Service. 2124// 2125// Returns bot information as follows: 2126// 2127// * If you provide the nameContains field, the response includes information 2128// for the $LATEST version of all bots whose name contains the specified 2129// string. 2130// 2131// * If you don't specify the nameContains field, the operation returns information 2132// about the $LATEST version of all of your bots. 2133// 2134// This operation requires permission for the lex:GetBots action. 2135// 2136// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2137// with awserr.Error's Code and Message methods to get detailed information about 2138// the error. 2139// 2140// See the AWS API reference guide for Amazon Lex Model Building Service's 2141// API operation GetBots for usage and error information. 2142// 2143// Returned Error Codes: 2144// * ErrCodeNotFoundException "NotFoundException" 2145// The resource specified in the request was not found. Check the resource and 2146// try again. 2147// 2148// * ErrCodeLimitExceededException "LimitExceededException" 2149// The request exceeded a limit. Try your request again. 2150// 2151// * ErrCodeInternalFailureException "InternalFailureException" 2152// An internal Amazon Lex error occurred. Try your request again. 2153// 2154// * ErrCodeBadRequestException "BadRequestException" 2155// The request is not well formed. For example, a value is invalid or a required 2156// field is missing. Check the field values, and try again. 2157// 2158// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBots 2159func (c *LexModelBuildingService) GetBots(input *GetBotsInput) (*GetBotsOutput, error) { 2160 req, out := c.GetBotsRequest(input) 2161 return out, req.Send() 2162} 2163 2164// GetBotsWithContext is the same as GetBots with the addition of 2165// the ability to pass a context and additional request options. 2166// 2167// See GetBots for details on how to use this API operation. 2168// 2169// The context must be non-nil and will be used for request cancellation. If 2170// the context is nil a panic will occur. In the future the SDK may create 2171// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2172// for more information on using Contexts. 2173func (c *LexModelBuildingService) GetBotsWithContext(ctx aws.Context, input *GetBotsInput, opts ...request.Option) (*GetBotsOutput, error) { 2174 req, out := c.GetBotsRequest(input) 2175 req.SetContext(ctx) 2176 req.ApplyOptions(opts...) 2177 return out, req.Send() 2178} 2179 2180// GetBotsPages iterates over the pages of a GetBots operation, 2181// calling the "fn" function with the response data for each page. To stop 2182// iterating, return false from the fn function. 2183// 2184// See GetBots method for more information on how to use this operation. 2185// 2186// Note: This operation can generate multiple requests to a service. 2187// 2188// // Example iterating over at most 3 pages of a GetBots operation. 2189// pageNum := 0 2190// err := client.GetBotsPages(params, 2191// func(page *GetBotsOutput, lastPage bool) bool { 2192// pageNum++ 2193// fmt.Println(page) 2194// return pageNum <= 3 2195// }) 2196// 2197func (c *LexModelBuildingService) GetBotsPages(input *GetBotsInput, fn func(*GetBotsOutput, bool) bool) error { 2198 return c.GetBotsPagesWithContext(aws.BackgroundContext(), input, fn) 2199} 2200 2201// GetBotsPagesWithContext same as GetBotsPages except 2202// it takes a Context and allows setting request options on the pages. 2203// 2204// The context must be non-nil and will be used for request cancellation. If 2205// the context is nil a panic will occur. In the future the SDK may create 2206// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2207// for more information on using Contexts. 2208func (c *LexModelBuildingService) GetBotsPagesWithContext(ctx aws.Context, input *GetBotsInput, fn func(*GetBotsOutput, bool) bool, opts ...request.Option) error { 2209 p := request.Pagination{ 2210 NewRequest: func() (*request.Request, error) { 2211 var inCpy *GetBotsInput 2212 if input != nil { 2213 tmp := *input 2214 inCpy = &tmp 2215 } 2216 req, _ := c.GetBotsRequest(inCpy) 2217 req.SetContext(ctx) 2218 req.ApplyOptions(opts...) 2219 return req, nil 2220 }, 2221 } 2222 2223 cont := true 2224 for p.Next() && cont { 2225 cont = fn(p.Page().(*GetBotsOutput), !p.HasNextPage()) 2226 } 2227 return p.Err() 2228} 2229 2230const opGetBuiltinIntent = "GetBuiltinIntent" 2231 2232// GetBuiltinIntentRequest generates a "aws/request.Request" representing the 2233// client's request for the GetBuiltinIntent operation. The "output" return 2234// value will be populated with the request's response once the request complets 2235// successfuly. 2236// 2237// Use "Send" method on the returned Request to send the API call to the service. 2238// the "output" return value is not valid until after Send returns without error. 2239// 2240// See GetBuiltinIntent for more information on using the GetBuiltinIntent 2241// API call, and error handling. 2242// 2243// This method is useful when you want to inject custom logic or configuration 2244// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2245// 2246// 2247// // Example sending a request using the GetBuiltinIntentRequest method. 2248// req, resp := client.GetBuiltinIntentRequest(params) 2249// 2250// err := req.Send() 2251// if err == nil { // resp is now filled 2252// fmt.Println(resp) 2253// } 2254// 2255// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntent 2256func (c *LexModelBuildingService) GetBuiltinIntentRequest(input *GetBuiltinIntentInput) (req *request.Request, output *GetBuiltinIntentOutput) { 2257 op := &request.Operation{ 2258 Name: opGetBuiltinIntent, 2259 HTTPMethod: "GET", 2260 HTTPPath: "/builtins/intents/{signature}", 2261 } 2262 2263 if input == nil { 2264 input = &GetBuiltinIntentInput{} 2265 } 2266 2267 output = &GetBuiltinIntentOutput{} 2268 req = c.newRequest(op, input, output) 2269 return 2270} 2271 2272// GetBuiltinIntent API operation for Amazon Lex Model Building Service. 2273// 2274// Returns information about a built-in intent. 2275// 2276// This operation requires permission for the lex:GetBuiltinIntent action. 2277// 2278// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2279// with awserr.Error's Code and Message methods to get detailed information about 2280// the error. 2281// 2282// See the AWS API reference guide for Amazon Lex Model Building Service's 2283// API operation GetBuiltinIntent for usage and error information. 2284// 2285// Returned Error Codes: 2286// * ErrCodeNotFoundException "NotFoundException" 2287// The resource specified in the request was not found. Check the resource and 2288// try again. 2289// 2290// * ErrCodeLimitExceededException "LimitExceededException" 2291// The request exceeded a limit. Try your request again. 2292// 2293// * ErrCodeInternalFailureException "InternalFailureException" 2294// An internal Amazon Lex error occurred. Try your request again. 2295// 2296// * ErrCodeBadRequestException "BadRequestException" 2297// The request is not well formed. For example, a value is invalid or a required 2298// field is missing. Check the field values, and try again. 2299// 2300// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntent 2301func (c *LexModelBuildingService) GetBuiltinIntent(input *GetBuiltinIntentInput) (*GetBuiltinIntentOutput, error) { 2302 req, out := c.GetBuiltinIntentRequest(input) 2303 return out, req.Send() 2304} 2305 2306// GetBuiltinIntentWithContext is the same as GetBuiltinIntent with the addition of 2307// the ability to pass a context and additional request options. 2308// 2309// See GetBuiltinIntent for details on how to use this API operation. 2310// 2311// The context must be non-nil and will be used for request cancellation. If 2312// the context is nil a panic will occur. In the future the SDK may create 2313// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2314// for more information on using Contexts. 2315func (c *LexModelBuildingService) GetBuiltinIntentWithContext(ctx aws.Context, input *GetBuiltinIntentInput, opts ...request.Option) (*GetBuiltinIntentOutput, error) { 2316 req, out := c.GetBuiltinIntentRequest(input) 2317 req.SetContext(ctx) 2318 req.ApplyOptions(opts...) 2319 return out, req.Send() 2320} 2321 2322const opGetBuiltinIntents = "GetBuiltinIntents" 2323 2324// GetBuiltinIntentsRequest generates a "aws/request.Request" representing the 2325// client's request for the GetBuiltinIntents operation. The "output" return 2326// value will be populated with the request's response once the request complets 2327// successfuly. 2328// 2329// Use "Send" method on the returned Request to send the API call to the service. 2330// the "output" return value is not valid until after Send returns without error. 2331// 2332// See GetBuiltinIntents for more information on using the GetBuiltinIntents 2333// API call, and error handling. 2334// 2335// This method is useful when you want to inject custom logic or configuration 2336// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2337// 2338// 2339// // Example sending a request using the GetBuiltinIntentsRequest method. 2340// req, resp := client.GetBuiltinIntentsRequest(params) 2341// 2342// err := req.Send() 2343// if err == nil { // resp is now filled 2344// fmt.Println(resp) 2345// } 2346// 2347// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntents 2348func (c *LexModelBuildingService) GetBuiltinIntentsRequest(input *GetBuiltinIntentsInput) (req *request.Request, output *GetBuiltinIntentsOutput) { 2349 op := &request.Operation{ 2350 Name: opGetBuiltinIntents, 2351 HTTPMethod: "GET", 2352 HTTPPath: "/builtins/intents/", 2353 Paginator: &request.Paginator{ 2354 InputTokens: []string{"nextToken"}, 2355 OutputTokens: []string{"nextToken"}, 2356 LimitToken: "maxResults", 2357 TruncationToken: "", 2358 }, 2359 } 2360 2361 if input == nil { 2362 input = &GetBuiltinIntentsInput{} 2363 } 2364 2365 output = &GetBuiltinIntentsOutput{} 2366 req = c.newRequest(op, input, output) 2367 return 2368} 2369 2370// GetBuiltinIntents API operation for Amazon Lex Model Building Service. 2371// 2372// Gets a list of built-in intents that meet the specified criteria. 2373// 2374// This operation requires permission for the lex:GetBuiltinIntents action. 2375// 2376// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2377// with awserr.Error's Code and Message methods to get detailed information about 2378// the error. 2379// 2380// See the AWS API reference guide for Amazon Lex Model Building Service's 2381// API operation GetBuiltinIntents for usage and error information. 2382// 2383// Returned Error Codes: 2384// * ErrCodeLimitExceededException "LimitExceededException" 2385// The request exceeded a limit. Try your request again. 2386// 2387// * ErrCodeInternalFailureException "InternalFailureException" 2388// An internal Amazon Lex error occurred. Try your request again. 2389// 2390// * ErrCodeBadRequestException "BadRequestException" 2391// The request is not well formed. For example, a value is invalid or a required 2392// field is missing. Check the field values, and try again. 2393// 2394// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntents 2395func (c *LexModelBuildingService) GetBuiltinIntents(input *GetBuiltinIntentsInput) (*GetBuiltinIntentsOutput, error) { 2396 req, out := c.GetBuiltinIntentsRequest(input) 2397 return out, req.Send() 2398} 2399 2400// GetBuiltinIntentsWithContext is the same as GetBuiltinIntents with the addition of 2401// the ability to pass a context and additional request options. 2402// 2403// See GetBuiltinIntents for details on how to use this API operation. 2404// 2405// The context must be non-nil and will be used for request cancellation. If 2406// the context is nil a panic will occur. In the future the SDK may create 2407// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2408// for more information on using Contexts. 2409func (c *LexModelBuildingService) GetBuiltinIntentsWithContext(ctx aws.Context, input *GetBuiltinIntentsInput, opts ...request.Option) (*GetBuiltinIntentsOutput, error) { 2410 req, out := c.GetBuiltinIntentsRequest(input) 2411 req.SetContext(ctx) 2412 req.ApplyOptions(opts...) 2413 return out, req.Send() 2414} 2415 2416// GetBuiltinIntentsPages iterates over the pages of a GetBuiltinIntents operation, 2417// calling the "fn" function with the response data for each page. To stop 2418// iterating, return false from the fn function. 2419// 2420// See GetBuiltinIntents method for more information on how to use this operation. 2421// 2422// Note: This operation can generate multiple requests to a service. 2423// 2424// // Example iterating over at most 3 pages of a GetBuiltinIntents operation. 2425// pageNum := 0 2426// err := client.GetBuiltinIntentsPages(params, 2427// func(page *GetBuiltinIntentsOutput, lastPage bool) bool { 2428// pageNum++ 2429// fmt.Println(page) 2430// return pageNum <= 3 2431// }) 2432// 2433func (c *LexModelBuildingService) GetBuiltinIntentsPages(input *GetBuiltinIntentsInput, fn func(*GetBuiltinIntentsOutput, bool) bool) error { 2434 return c.GetBuiltinIntentsPagesWithContext(aws.BackgroundContext(), input, fn) 2435} 2436 2437// GetBuiltinIntentsPagesWithContext same as GetBuiltinIntentsPages except 2438// it takes a Context and allows setting request options on the pages. 2439// 2440// The context must be non-nil and will be used for request cancellation. If 2441// the context is nil a panic will occur. In the future the SDK may create 2442// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2443// for more information on using Contexts. 2444func (c *LexModelBuildingService) GetBuiltinIntentsPagesWithContext(ctx aws.Context, input *GetBuiltinIntentsInput, fn func(*GetBuiltinIntentsOutput, bool) bool, opts ...request.Option) error { 2445 p := request.Pagination{ 2446 NewRequest: func() (*request.Request, error) { 2447 var inCpy *GetBuiltinIntentsInput 2448 if input != nil { 2449 tmp := *input 2450 inCpy = &tmp 2451 } 2452 req, _ := c.GetBuiltinIntentsRequest(inCpy) 2453 req.SetContext(ctx) 2454 req.ApplyOptions(opts...) 2455 return req, nil 2456 }, 2457 } 2458 2459 cont := true 2460 for p.Next() && cont { 2461 cont = fn(p.Page().(*GetBuiltinIntentsOutput), !p.HasNextPage()) 2462 } 2463 return p.Err() 2464} 2465 2466const opGetBuiltinSlotTypes = "GetBuiltinSlotTypes" 2467 2468// GetBuiltinSlotTypesRequest generates a "aws/request.Request" representing the 2469// client's request for the GetBuiltinSlotTypes operation. The "output" return 2470// value will be populated with the request's response once the request complets 2471// successfuly. 2472// 2473// Use "Send" method on the returned Request to send the API call to the service. 2474// the "output" return value is not valid until after Send returns without error. 2475// 2476// See GetBuiltinSlotTypes for more information on using the GetBuiltinSlotTypes 2477// API call, and error handling. 2478// 2479// This method is useful when you want to inject custom logic or configuration 2480// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2481// 2482// 2483// // Example sending a request using the GetBuiltinSlotTypesRequest method. 2484// req, resp := client.GetBuiltinSlotTypesRequest(params) 2485// 2486// err := req.Send() 2487// if err == nil { // resp is now filled 2488// fmt.Println(resp) 2489// } 2490// 2491// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypes 2492func (c *LexModelBuildingService) GetBuiltinSlotTypesRequest(input *GetBuiltinSlotTypesInput) (req *request.Request, output *GetBuiltinSlotTypesOutput) { 2493 op := &request.Operation{ 2494 Name: opGetBuiltinSlotTypes, 2495 HTTPMethod: "GET", 2496 HTTPPath: "/builtins/slottypes/", 2497 Paginator: &request.Paginator{ 2498 InputTokens: []string{"nextToken"}, 2499 OutputTokens: []string{"nextToken"}, 2500 LimitToken: "maxResults", 2501 TruncationToken: "", 2502 }, 2503 } 2504 2505 if input == nil { 2506 input = &GetBuiltinSlotTypesInput{} 2507 } 2508 2509 output = &GetBuiltinSlotTypesOutput{} 2510 req = c.newRequest(op, input, output) 2511 return 2512} 2513 2514// GetBuiltinSlotTypes API operation for Amazon Lex Model Building Service. 2515// 2516// Gets a list of built-in slot types that meet the specified criteria. 2517// 2518// For a list of built-in slot types, see Slot Type Reference (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) 2519// in the Alexa Skills Kit. 2520// 2521// This operation requires permission for the lex:GetBuiltInSlotTypes action. 2522// 2523// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2524// with awserr.Error's Code and Message methods to get detailed information about 2525// the error. 2526// 2527// See the AWS API reference guide for Amazon Lex Model Building Service's 2528// API operation GetBuiltinSlotTypes for usage and error information. 2529// 2530// Returned Error Codes: 2531// * ErrCodeLimitExceededException "LimitExceededException" 2532// The request exceeded a limit. Try your request again. 2533// 2534// * ErrCodeInternalFailureException "InternalFailureException" 2535// An internal Amazon Lex error occurred. Try your request again. 2536// 2537// * ErrCodeBadRequestException "BadRequestException" 2538// The request is not well formed. For example, a value is invalid or a required 2539// field is missing. Check the field values, and try again. 2540// 2541// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypes 2542func (c *LexModelBuildingService) GetBuiltinSlotTypes(input *GetBuiltinSlotTypesInput) (*GetBuiltinSlotTypesOutput, error) { 2543 req, out := c.GetBuiltinSlotTypesRequest(input) 2544 return out, req.Send() 2545} 2546 2547// GetBuiltinSlotTypesWithContext is the same as GetBuiltinSlotTypes with the addition of 2548// the ability to pass a context and additional request options. 2549// 2550// See GetBuiltinSlotTypes for details on how to use this API operation. 2551// 2552// The context must be non-nil and will be used for request cancellation. If 2553// the context is nil a panic will occur. In the future the SDK may create 2554// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2555// for more information on using Contexts. 2556func (c *LexModelBuildingService) GetBuiltinSlotTypesWithContext(ctx aws.Context, input *GetBuiltinSlotTypesInput, opts ...request.Option) (*GetBuiltinSlotTypesOutput, error) { 2557 req, out := c.GetBuiltinSlotTypesRequest(input) 2558 req.SetContext(ctx) 2559 req.ApplyOptions(opts...) 2560 return out, req.Send() 2561} 2562 2563// GetBuiltinSlotTypesPages iterates over the pages of a GetBuiltinSlotTypes operation, 2564// calling the "fn" function with the response data for each page. To stop 2565// iterating, return false from the fn function. 2566// 2567// See GetBuiltinSlotTypes method for more information on how to use this operation. 2568// 2569// Note: This operation can generate multiple requests to a service. 2570// 2571// // Example iterating over at most 3 pages of a GetBuiltinSlotTypes operation. 2572// pageNum := 0 2573// err := client.GetBuiltinSlotTypesPages(params, 2574// func(page *GetBuiltinSlotTypesOutput, lastPage bool) bool { 2575// pageNum++ 2576// fmt.Println(page) 2577// return pageNum <= 3 2578// }) 2579// 2580func (c *LexModelBuildingService) GetBuiltinSlotTypesPages(input *GetBuiltinSlotTypesInput, fn func(*GetBuiltinSlotTypesOutput, bool) bool) error { 2581 return c.GetBuiltinSlotTypesPagesWithContext(aws.BackgroundContext(), input, fn) 2582} 2583 2584// GetBuiltinSlotTypesPagesWithContext same as GetBuiltinSlotTypesPages except 2585// it takes a Context and allows setting request options on the pages. 2586// 2587// The context must be non-nil and will be used for request cancellation. If 2588// the context is nil a panic will occur. In the future the SDK may create 2589// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2590// for more information on using Contexts. 2591func (c *LexModelBuildingService) GetBuiltinSlotTypesPagesWithContext(ctx aws.Context, input *GetBuiltinSlotTypesInput, fn func(*GetBuiltinSlotTypesOutput, bool) bool, opts ...request.Option) error { 2592 p := request.Pagination{ 2593 NewRequest: func() (*request.Request, error) { 2594 var inCpy *GetBuiltinSlotTypesInput 2595 if input != nil { 2596 tmp := *input 2597 inCpy = &tmp 2598 } 2599 req, _ := c.GetBuiltinSlotTypesRequest(inCpy) 2600 req.SetContext(ctx) 2601 req.ApplyOptions(opts...) 2602 return req, nil 2603 }, 2604 } 2605 2606 cont := true 2607 for p.Next() && cont { 2608 cont = fn(p.Page().(*GetBuiltinSlotTypesOutput), !p.HasNextPage()) 2609 } 2610 return p.Err() 2611} 2612 2613const opGetExport = "GetExport" 2614 2615// GetExportRequest generates a "aws/request.Request" representing the 2616// client's request for the GetExport operation. The "output" return 2617// value will be populated with the request's response once the request complets 2618// successfuly. 2619// 2620// Use "Send" method on the returned Request to send the API call to the service. 2621// the "output" return value is not valid until after Send returns without error. 2622// 2623// See GetExport for more information on using the GetExport 2624// API call, and error handling. 2625// 2626// This method is useful when you want to inject custom logic or configuration 2627// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2628// 2629// 2630// // Example sending a request using the GetExportRequest method. 2631// req, resp := client.GetExportRequest(params) 2632// 2633// err := req.Send() 2634// if err == nil { // resp is now filled 2635// fmt.Println(resp) 2636// } 2637// 2638// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExport 2639func (c *LexModelBuildingService) GetExportRequest(input *GetExportInput) (req *request.Request, output *GetExportOutput) { 2640 op := &request.Operation{ 2641 Name: opGetExport, 2642 HTTPMethod: "GET", 2643 HTTPPath: "/exports/", 2644 } 2645 2646 if input == nil { 2647 input = &GetExportInput{} 2648 } 2649 2650 output = &GetExportOutput{} 2651 req = c.newRequest(op, input, output) 2652 return 2653} 2654 2655// GetExport API operation for Amazon Lex Model Building Service. 2656// 2657// Exports the contents of a Amazon Lex resource in a specified format. 2658// 2659// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2660// with awserr.Error's Code and Message methods to get detailed information about 2661// the error. 2662// 2663// See the AWS API reference guide for Amazon Lex Model Building Service's 2664// API operation GetExport for usage and error information. 2665// 2666// Returned Error Codes: 2667// * ErrCodeNotFoundException "NotFoundException" 2668// The resource specified in the request was not found. Check the resource and 2669// try again. 2670// 2671// * ErrCodeLimitExceededException "LimitExceededException" 2672// The request exceeded a limit. Try your request again. 2673// 2674// * ErrCodeInternalFailureException "InternalFailureException" 2675// An internal Amazon Lex error occurred. Try your request again. 2676// 2677// * ErrCodeBadRequestException "BadRequestException" 2678// The request is not well formed. For example, a value is invalid or a required 2679// field is missing. Check the field values, and try again. 2680// 2681// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExport 2682func (c *LexModelBuildingService) GetExport(input *GetExportInput) (*GetExportOutput, error) { 2683 req, out := c.GetExportRequest(input) 2684 return out, req.Send() 2685} 2686 2687// GetExportWithContext is the same as GetExport with the addition of 2688// the ability to pass a context and additional request options. 2689// 2690// See GetExport for details on how to use this API operation. 2691// 2692// The context must be non-nil and will be used for request cancellation. If 2693// the context is nil a panic will occur. In the future the SDK may create 2694// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2695// for more information on using Contexts. 2696func (c *LexModelBuildingService) GetExportWithContext(ctx aws.Context, input *GetExportInput, opts ...request.Option) (*GetExportOutput, error) { 2697 req, out := c.GetExportRequest(input) 2698 req.SetContext(ctx) 2699 req.ApplyOptions(opts...) 2700 return out, req.Send() 2701} 2702 2703const opGetIntent = "GetIntent" 2704 2705// GetIntentRequest generates a "aws/request.Request" representing the 2706// client's request for the GetIntent operation. The "output" return 2707// value will be populated with the request's response once the request complets 2708// successfuly. 2709// 2710// Use "Send" method on the returned Request to send the API call to the service. 2711// the "output" return value is not valid until after Send returns without error. 2712// 2713// See GetIntent for more information on using the GetIntent 2714// API call, and error handling. 2715// 2716// This method is useful when you want to inject custom logic or configuration 2717// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2718// 2719// 2720// // Example sending a request using the GetIntentRequest method. 2721// req, resp := client.GetIntentRequest(params) 2722// 2723// err := req.Send() 2724// if err == nil { // resp is now filled 2725// fmt.Println(resp) 2726// } 2727// 2728// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntent 2729func (c *LexModelBuildingService) GetIntentRequest(input *GetIntentInput) (req *request.Request, output *GetIntentOutput) { 2730 op := &request.Operation{ 2731 Name: opGetIntent, 2732 HTTPMethod: "GET", 2733 HTTPPath: "/intents/{name}/versions/{version}", 2734 } 2735 2736 if input == nil { 2737 input = &GetIntentInput{} 2738 } 2739 2740 output = &GetIntentOutput{} 2741 req = c.newRequest(op, input, output) 2742 return 2743} 2744 2745// GetIntent API operation for Amazon Lex Model Building Service. 2746// 2747// Returns information about an intent. In addition to the intent name, you 2748// must specify the intent version. 2749// 2750// This operation requires permissions to perform the lex:GetIntent action. 2751// 2752// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2753// with awserr.Error's Code and Message methods to get detailed information about 2754// the error. 2755// 2756// See the AWS API reference guide for Amazon Lex Model Building Service's 2757// API operation GetIntent for usage and error information. 2758// 2759// Returned Error Codes: 2760// * ErrCodeNotFoundException "NotFoundException" 2761// The resource specified in the request was not found. Check the resource and 2762// try again. 2763// 2764// * ErrCodeLimitExceededException "LimitExceededException" 2765// The request exceeded a limit. Try your request again. 2766// 2767// * ErrCodeInternalFailureException "InternalFailureException" 2768// An internal Amazon Lex error occurred. Try your request again. 2769// 2770// * ErrCodeBadRequestException "BadRequestException" 2771// The request is not well formed. For example, a value is invalid or a required 2772// field is missing. Check the field values, and try again. 2773// 2774// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntent 2775func (c *LexModelBuildingService) GetIntent(input *GetIntentInput) (*GetIntentOutput, error) { 2776 req, out := c.GetIntentRequest(input) 2777 return out, req.Send() 2778} 2779 2780// GetIntentWithContext is the same as GetIntent with the addition of 2781// the ability to pass a context and additional request options. 2782// 2783// See GetIntent for details on how to use this API operation. 2784// 2785// The context must be non-nil and will be used for request cancellation. If 2786// the context is nil a panic will occur. In the future the SDK may create 2787// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2788// for more information on using Contexts. 2789func (c *LexModelBuildingService) GetIntentWithContext(ctx aws.Context, input *GetIntentInput, opts ...request.Option) (*GetIntentOutput, error) { 2790 req, out := c.GetIntentRequest(input) 2791 req.SetContext(ctx) 2792 req.ApplyOptions(opts...) 2793 return out, req.Send() 2794} 2795 2796const opGetIntentVersions = "GetIntentVersions" 2797 2798// GetIntentVersionsRequest generates a "aws/request.Request" representing the 2799// client's request for the GetIntentVersions operation. The "output" return 2800// value will be populated with the request's response once the request complets 2801// successfuly. 2802// 2803// Use "Send" method on the returned Request to send the API call to the service. 2804// the "output" return value is not valid until after Send returns without error. 2805// 2806// See GetIntentVersions for more information on using the GetIntentVersions 2807// API call, and error handling. 2808// 2809// This method is useful when you want to inject custom logic or configuration 2810// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2811// 2812// 2813// // Example sending a request using the GetIntentVersionsRequest method. 2814// req, resp := client.GetIntentVersionsRequest(params) 2815// 2816// err := req.Send() 2817// if err == nil { // resp is now filled 2818// fmt.Println(resp) 2819// } 2820// 2821// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersions 2822func (c *LexModelBuildingService) GetIntentVersionsRequest(input *GetIntentVersionsInput) (req *request.Request, output *GetIntentVersionsOutput) { 2823 op := &request.Operation{ 2824 Name: opGetIntentVersions, 2825 HTTPMethod: "GET", 2826 HTTPPath: "/intents/{name}/versions/", 2827 Paginator: &request.Paginator{ 2828 InputTokens: []string{"nextToken"}, 2829 OutputTokens: []string{"nextToken"}, 2830 LimitToken: "maxResults", 2831 TruncationToken: "", 2832 }, 2833 } 2834 2835 if input == nil { 2836 input = &GetIntentVersionsInput{} 2837 } 2838 2839 output = &GetIntentVersionsOutput{} 2840 req = c.newRequest(op, input, output) 2841 return 2842} 2843 2844// GetIntentVersions API operation for Amazon Lex Model Building Service. 2845// 2846// Gets information about all of the versions of an intent. 2847// 2848// The GetIntentVersions operation returns an IntentMetadata object for each 2849// version of an intent. For example, if an intent has three numbered versions, 2850// the GetIntentVersions operation returns four IntentMetadata objects in the 2851// response, one for each numbered version and one for the $LATEST version. 2852// 2853// The GetIntentVersions operation always returns at least one version, the 2854// $LATEST version. 2855// 2856// This operation requires permissions for the lex:GetIntentVersions action. 2857// 2858// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2859// with awserr.Error's Code and Message methods to get detailed information about 2860// the error. 2861// 2862// See the AWS API reference guide for Amazon Lex Model Building Service's 2863// API operation GetIntentVersions for usage and error information. 2864// 2865// Returned Error Codes: 2866// * ErrCodeNotFoundException "NotFoundException" 2867// The resource specified in the request was not found. Check the resource and 2868// try again. 2869// 2870// * ErrCodeLimitExceededException "LimitExceededException" 2871// The request exceeded a limit. Try your request again. 2872// 2873// * ErrCodeInternalFailureException "InternalFailureException" 2874// An internal Amazon Lex error occurred. Try your request again. 2875// 2876// * ErrCodeBadRequestException "BadRequestException" 2877// The request is not well formed. For example, a value is invalid or a required 2878// field is missing. Check the field values, and try again. 2879// 2880// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersions 2881func (c *LexModelBuildingService) GetIntentVersions(input *GetIntentVersionsInput) (*GetIntentVersionsOutput, error) { 2882 req, out := c.GetIntentVersionsRequest(input) 2883 return out, req.Send() 2884} 2885 2886// GetIntentVersionsWithContext is the same as GetIntentVersions with the addition of 2887// the ability to pass a context and additional request options. 2888// 2889// See GetIntentVersions for details on how to use this API operation. 2890// 2891// The context must be non-nil and will be used for request cancellation. If 2892// the context is nil a panic will occur. In the future the SDK may create 2893// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2894// for more information on using Contexts. 2895func (c *LexModelBuildingService) GetIntentVersionsWithContext(ctx aws.Context, input *GetIntentVersionsInput, opts ...request.Option) (*GetIntentVersionsOutput, error) { 2896 req, out := c.GetIntentVersionsRequest(input) 2897 req.SetContext(ctx) 2898 req.ApplyOptions(opts...) 2899 return out, req.Send() 2900} 2901 2902// GetIntentVersionsPages iterates over the pages of a GetIntentVersions operation, 2903// calling the "fn" function with the response data for each page. To stop 2904// iterating, return false from the fn function. 2905// 2906// See GetIntentVersions method for more information on how to use this operation. 2907// 2908// Note: This operation can generate multiple requests to a service. 2909// 2910// // Example iterating over at most 3 pages of a GetIntentVersions operation. 2911// pageNum := 0 2912// err := client.GetIntentVersionsPages(params, 2913// func(page *GetIntentVersionsOutput, lastPage bool) bool { 2914// pageNum++ 2915// fmt.Println(page) 2916// return pageNum <= 3 2917// }) 2918// 2919func (c *LexModelBuildingService) GetIntentVersionsPages(input *GetIntentVersionsInput, fn func(*GetIntentVersionsOutput, bool) bool) error { 2920 return c.GetIntentVersionsPagesWithContext(aws.BackgroundContext(), input, fn) 2921} 2922 2923// GetIntentVersionsPagesWithContext same as GetIntentVersionsPages except 2924// it takes a Context and allows setting request options on the pages. 2925// 2926// The context must be non-nil and will be used for request cancellation. If 2927// the context is nil a panic will occur. In the future the SDK may create 2928// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2929// for more information on using Contexts. 2930func (c *LexModelBuildingService) GetIntentVersionsPagesWithContext(ctx aws.Context, input *GetIntentVersionsInput, fn func(*GetIntentVersionsOutput, bool) bool, opts ...request.Option) error { 2931 p := request.Pagination{ 2932 NewRequest: func() (*request.Request, error) { 2933 var inCpy *GetIntentVersionsInput 2934 if input != nil { 2935 tmp := *input 2936 inCpy = &tmp 2937 } 2938 req, _ := c.GetIntentVersionsRequest(inCpy) 2939 req.SetContext(ctx) 2940 req.ApplyOptions(opts...) 2941 return req, nil 2942 }, 2943 } 2944 2945 cont := true 2946 for p.Next() && cont { 2947 cont = fn(p.Page().(*GetIntentVersionsOutput), !p.HasNextPage()) 2948 } 2949 return p.Err() 2950} 2951 2952const opGetIntents = "GetIntents" 2953 2954// GetIntentsRequest generates a "aws/request.Request" representing the 2955// client's request for the GetIntents operation. The "output" return 2956// value will be populated with the request's response once the request complets 2957// successfuly. 2958// 2959// Use "Send" method on the returned Request to send the API call to the service. 2960// the "output" return value is not valid until after Send returns without error. 2961// 2962// See GetIntents for more information on using the GetIntents 2963// API call, and error handling. 2964// 2965// This method is useful when you want to inject custom logic or configuration 2966// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2967// 2968// 2969// // Example sending a request using the GetIntentsRequest method. 2970// req, resp := client.GetIntentsRequest(params) 2971// 2972// err := req.Send() 2973// if err == nil { // resp is now filled 2974// fmt.Println(resp) 2975// } 2976// 2977// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntents 2978func (c *LexModelBuildingService) GetIntentsRequest(input *GetIntentsInput) (req *request.Request, output *GetIntentsOutput) { 2979 op := &request.Operation{ 2980 Name: opGetIntents, 2981 HTTPMethod: "GET", 2982 HTTPPath: "/intents/", 2983 Paginator: &request.Paginator{ 2984 InputTokens: []string{"nextToken"}, 2985 OutputTokens: []string{"nextToken"}, 2986 LimitToken: "maxResults", 2987 TruncationToken: "", 2988 }, 2989 } 2990 2991 if input == nil { 2992 input = &GetIntentsInput{} 2993 } 2994 2995 output = &GetIntentsOutput{} 2996 req = c.newRequest(op, input, output) 2997 return 2998} 2999 3000// GetIntents API operation for Amazon Lex Model Building Service. 3001// 3002// Returns intent information as follows: 3003// 3004// * If you specify the nameContains field, returns the $LATEST version of 3005// all intents that contain the specified string. 3006// 3007// * If you don't specify the nameContains field, returns information about 3008// the $LATEST version of all intents. 3009// 3010// The operation requires permission for the lex:GetIntents action. 3011// 3012// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3013// with awserr.Error's Code and Message methods to get detailed information about 3014// the error. 3015// 3016// See the AWS API reference guide for Amazon Lex Model Building Service's 3017// API operation GetIntents for usage and error information. 3018// 3019// Returned Error Codes: 3020// * ErrCodeNotFoundException "NotFoundException" 3021// The resource specified in the request was not found. Check the resource and 3022// try again. 3023// 3024// * ErrCodeLimitExceededException "LimitExceededException" 3025// The request exceeded a limit. Try your request again. 3026// 3027// * ErrCodeInternalFailureException "InternalFailureException" 3028// An internal Amazon Lex error occurred. Try your request again. 3029// 3030// * ErrCodeBadRequestException "BadRequestException" 3031// The request is not well formed. For example, a value is invalid or a required 3032// field is missing. Check the field values, and try again. 3033// 3034// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntents 3035func (c *LexModelBuildingService) GetIntents(input *GetIntentsInput) (*GetIntentsOutput, error) { 3036 req, out := c.GetIntentsRequest(input) 3037 return out, req.Send() 3038} 3039 3040// GetIntentsWithContext is the same as GetIntents with the addition of 3041// the ability to pass a context and additional request options. 3042// 3043// See GetIntents for details on how to use this API operation. 3044// 3045// The context must be non-nil and will be used for request cancellation. If 3046// the context is nil a panic will occur. In the future the SDK may create 3047// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3048// for more information on using Contexts. 3049func (c *LexModelBuildingService) GetIntentsWithContext(ctx aws.Context, input *GetIntentsInput, opts ...request.Option) (*GetIntentsOutput, error) { 3050 req, out := c.GetIntentsRequest(input) 3051 req.SetContext(ctx) 3052 req.ApplyOptions(opts...) 3053 return out, req.Send() 3054} 3055 3056// GetIntentsPages iterates over the pages of a GetIntents operation, 3057// calling the "fn" function with the response data for each page. To stop 3058// iterating, return false from the fn function. 3059// 3060// See GetIntents method for more information on how to use this operation. 3061// 3062// Note: This operation can generate multiple requests to a service. 3063// 3064// // Example iterating over at most 3 pages of a GetIntents operation. 3065// pageNum := 0 3066// err := client.GetIntentsPages(params, 3067// func(page *GetIntentsOutput, lastPage bool) bool { 3068// pageNum++ 3069// fmt.Println(page) 3070// return pageNum <= 3 3071// }) 3072// 3073func (c *LexModelBuildingService) GetIntentsPages(input *GetIntentsInput, fn func(*GetIntentsOutput, bool) bool) error { 3074 return c.GetIntentsPagesWithContext(aws.BackgroundContext(), input, fn) 3075} 3076 3077// GetIntentsPagesWithContext same as GetIntentsPages except 3078// it takes a Context and allows setting request options on the pages. 3079// 3080// The context must be non-nil and will be used for request cancellation. If 3081// the context is nil a panic will occur. In the future the SDK may create 3082// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3083// for more information on using Contexts. 3084func (c *LexModelBuildingService) GetIntentsPagesWithContext(ctx aws.Context, input *GetIntentsInput, fn func(*GetIntentsOutput, bool) bool, opts ...request.Option) error { 3085 p := request.Pagination{ 3086 NewRequest: func() (*request.Request, error) { 3087 var inCpy *GetIntentsInput 3088 if input != nil { 3089 tmp := *input 3090 inCpy = &tmp 3091 } 3092 req, _ := c.GetIntentsRequest(inCpy) 3093 req.SetContext(ctx) 3094 req.ApplyOptions(opts...) 3095 return req, nil 3096 }, 3097 } 3098 3099 cont := true 3100 for p.Next() && cont { 3101 cont = fn(p.Page().(*GetIntentsOutput), !p.HasNextPage()) 3102 } 3103 return p.Err() 3104} 3105 3106const opGetSlotType = "GetSlotType" 3107 3108// GetSlotTypeRequest generates a "aws/request.Request" representing the 3109// client's request for the GetSlotType operation. The "output" return 3110// value will be populated with the request's response once the request complets 3111// successfuly. 3112// 3113// Use "Send" method on the returned Request to send the API call to the service. 3114// the "output" return value is not valid until after Send returns without error. 3115// 3116// See GetSlotType for more information on using the GetSlotType 3117// API call, and error handling. 3118// 3119// This method is useful when you want to inject custom logic or configuration 3120// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3121// 3122// 3123// // Example sending a request using the GetSlotTypeRequest method. 3124// req, resp := client.GetSlotTypeRequest(params) 3125// 3126// err := req.Send() 3127// if err == nil { // resp is now filled 3128// fmt.Println(resp) 3129// } 3130// 3131// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotType 3132func (c *LexModelBuildingService) GetSlotTypeRequest(input *GetSlotTypeInput) (req *request.Request, output *GetSlotTypeOutput) { 3133 op := &request.Operation{ 3134 Name: opGetSlotType, 3135 HTTPMethod: "GET", 3136 HTTPPath: "/slottypes/{name}/versions/{version}", 3137 } 3138 3139 if input == nil { 3140 input = &GetSlotTypeInput{} 3141 } 3142 3143 output = &GetSlotTypeOutput{} 3144 req = c.newRequest(op, input, output) 3145 return 3146} 3147 3148// GetSlotType API operation for Amazon Lex Model Building Service. 3149// 3150// Returns information about a specific version of a slot type. In addition 3151// to specifying the slot type name, you must specify the slot type version. 3152// 3153// This operation requires permissions for the lex:GetSlotType action. 3154// 3155// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3156// with awserr.Error's Code and Message methods to get detailed information about 3157// the error. 3158// 3159// See the AWS API reference guide for Amazon Lex Model Building Service's 3160// API operation GetSlotType for usage and error information. 3161// 3162// Returned Error Codes: 3163// * ErrCodeNotFoundException "NotFoundException" 3164// The resource specified in the request was not found. Check the resource and 3165// try again. 3166// 3167// * ErrCodeLimitExceededException "LimitExceededException" 3168// The request exceeded a limit. Try your request again. 3169// 3170// * ErrCodeInternalFailureException "InternalFailureException" 3171// An internal Amazon Lex error occurred. Try your request again. 3172// 3173// * ErrCodeBadRequestException "BadRequestException" 3174// The request is not well formed. For example, a value is invalid or a required 3175// field is missing. Check the field values, and try again. 3176// 3177// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotType 3178func (c *LexModelBuildingService) GetSlotType(input *GetSlotTypeInput) (*GetSlotTypeOutput, error) { 3179 req, out := c.GetSlotTypeRequest(input) 3180 return out, req.Send() 3181} 3182 3183// GetSlotTypeWithContext is the same as GetSlotType with the addition of 3184// the ability to pass a context and additional request options. 3185// 3186// See GetSlotType for details on how to use this API operation. 3187// 3188// The context must be non-nil and will be used for request cancellation. If 3189// the context is nil a panic will occur. In the future the SDK may create 3190// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3191// for more information on using Contexts. 3192func (c *LexModelBuildingService) GetSlotTypeWithContext(ctx aws.Context, input *GetSlotTypeInput, opts ...request.Option) (*GetSlotTypeOutput, error) { 3193 req, out := c.GetSlotTypeRequest(input) 3194 req.SetContext(ctx) 3195 req.ApplyOptions(opts...) 3196 return out, req.Send() 3197} 3198 3199const opGetSlotTypeVersions = "GetSlotTypeVersions" 3200 3201// GetSlotTypeVersionsRequest generates a "aws/request.Request" representing the 3202// client's request for the GetSlotTypeVersions operation. The "output" return 3203// value will be populated with the request's response once the request complets 3204// successfuly. 3205// 3206// Use "Send" method on the returned Request to send the API call to the service. 3207// the "output" return value is not valid until after Send returns without error. 3208// 3209// See GetSlotTypeVersions for more information on using the GetSlotTypeVersions 3210// API call, and error handling. 3211// 3212// This method is useful when you want to inject custom logic or configuration 3213// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3214// 3215// 3216// // Example sending a request using the GetSlotTypeVersionsRequest method. 3217// req, resp := client.GetSlotTypeVersionsRequest(params) 3218// 3219// err := req.Send() 3220// if err == nil { // resp is now filled 3221// fmt.Println(resp) 3222// } 3223// 3224// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersions 3225func (c *LexModelBuildingService) GetSlotTypeVersionsRequest(input *GetSlotTypeVersionsInput) (req *request.Request, output *GetSlotTypeVersionsOutput) { 3226 op := &request.Operation{ 3227 Name: opGetSlotTypeVersions, 3228 HTTPMethod: "GET", 3229 HTTPPath: "/slottypes/{name}/versions/", 3230 Paginator: &request.Paginator{ 3231 InputTokens: []string{"nextToken"}, 3232 OutputTokens: []string{"nextToken"}, 3233 LimitToken: "maxResults", 3234 TruncationToken: "", 3235 }, 3236 } 3237 3238 if input == nil { 3239 input = &GetSlotTypeVersionsInput{} 3240 } 3241 3242 output = &GetSlotTypeVersionsOutput{} 3243 req = c.newRequest(op, input, output) 3244 return 3245} 3246 3247// GetSlotTypeVersions API operation for Amazon Lex Model Building Service. 3248// 3249// Gets information about all versions of a slot type. 3250// 3251// The GetSlotTypeVersions operation returns a SlotTypeMetadata object for each 3252// version of a slot type. For example, if a slot type has three numbered versions, 3253// the GetSlotTypeVersions operation returns four SlotTypeMetadata objects in 3254// the response, one for each numbered version and one for the $LATEST version. 3255// 3256// The GetSlotTypeVersions operation always returns at least one version, the 3257// $LATEST version. 3258// 3259// This operation requires permissions for the lex:GetSlotTypeVersions action. 3260// 3261// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3262// with awserr.Error's Code and Message methods to get detailed information about 3263// the error. 3264// 3265// See the AWS API reference guide for Amazon Lex Model Building Service's 3266// API operation GetSlotTypeVersions for usage and error information. 3267// 3268// Returned Error Codes: 3269// * ErrCodeNotFoundException "NotFoundException" 3270// The resource specified in the request was not found. Check the resource and 3271// try again. 3272// 3273// * ErrCodeLimitExceededException "LimitExceededException" 3274// The request exceeded a limit. Try your request again. 3275// 3276// * ErrCodeInternalFailureException "InternalFailureException" 3277// An internal Amazon Lex error occurred. Try your request again. 3278// 3279// * ErrCodeBadRequestException "BadRequestException" 3280// The request is not well formed. For example, a value is invalid or a required 3281// field is missing. Check the field values, and try again. 3282// 3283// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersions 3284func (c *LexModelBuildingService) GetSlotTypeVersions(input *GetSlotTypeVersionsInput) (*GetSlotTypeVersionsOutput, error) { 3285 req, out := c.GetSlotTypeVersionsRequest(input) 3286 return out, req.Send() 3287} 3288 3289// GetSlotTypeVersionsWithContext is the same as GetSlotTypeVersions with the addition of 3290// the ability to pass a context and additional request options. 3291// 3292// See GetSlotTypeVersions for details on how to use this API operation. 3293// 3294// The context must be non-nil and will be used for request cancellation. If 3295// the context is nil a panic will occur. In the future the SDK may create 3296// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3297// for more information on using Contexts. 3298func (c *LexModelBuildingService) GetSlotTypeVersionsWithContext(ctx aws.Context, input *GetSlotTypeVersionsInput, opts ...request.Option) (*GetSlotTypeVersionsOutput, error) { 3299 req, out := c.GetSlotTypeVersionsRequest(input) 3300 req.SetContext(ctx) 3301 req.ApplyOptions(opts...) 3302 return out, req.Send() 3303} 3304 3305// GetSlotTypeVersionsPages iterates over the pages of a GetSlotTypeVersions operation, 3306// calling the "fn" function with the response data for each page. To stop 3307// iterating, return false from the fn function. 3308// 3309// See GetSlotTypeVersions method for more information on how to use this operation. 3310// 3311// Note: This operation can generate multiple requests to a service. 3312// 3313// // Example iterating over at most 3 pages of a GetSlotTypeVersions operation. 3314// pageNum := 0 3315// err := client.GetSlotTypeVersionsPages(params, 3316// func(page *GetSlotTypeVersionsOutput, lastPage bool) bool { 3317// pageNum++ 3318// fmt.Println(page) 3319// return pageNum <= 3 3320// }) 3321// 3322func (c *LexModelBuildingService) GetSlotTypeVersionsPages(input *GetSlotTypeVersionsInput, fn func(*GetSlotTypeVersionsOutput, bool) bool) error { 3323 return c.GetSlotTypeVersionsPagesWithContext(aws.BackgroundContext(), input, fn) 3324} 3325 3326// GetSlotTypeVersionsPagesWithContext same as GetSlotTypeVersionsPages except 3327// it takes a Context and allows setting request options on the pages. 3328// 3329// The context must be non-nil and will be used for request cancellation. If 3330// the context is nil a panic will occur. In the future the SDK may create 3331// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3332// for more information on using Contexts. 3333func (c *LexModelBuildingService) GetSlotTypeVersionsPagesWithContext(ctx aws.Context, input *GetSlotTypeVersionsInput, fn func(*GetSlotTypeVersionsOutput, bool) bool, opts ...request.Option) error { 3334 p := request.Pagination{ 3335 NewRequest: func() (*request.Request, error) { 3336 var inCpy *GetSlotTypeVersionsInput 3337 if input != nil { 3338 tmp := *input 3339 inCpy = &tmp 3340 } 3341 req, _ := c.GetSlotTypeVersionsRequest(inCpy) 3342 req.SetContext(ctx) 3343 req.ApplyOptions(opts...) 3344 return req, nil 3345 }, 3346 } 3347 3348 cont := true 3349 for p.Next() && cont { 3350 cont = fn(p.Page().(*GetSlotTypeVersionsOutput), !p.HasNextPage()) 3351 } 3352 return p.Err() 3353} 3354 3355const opGetSlotTypes = "GetSlotTypes" 3356 3357// GetSlotTypesRequest generates a "aws/request.Request" representing the 3358// client's request for the GetSlotTypes operation. The "output" return 3359// value will be populated with the request's response once the request complets 3360// successfuly. 3361// 3362// Use "Send" method on the returned Request to send the API call to the service. 3363// the "output" return value is not valid until after Send returns without error. 3364// 3365// See GetSlotTypes for more information on using the GetSlotTypes 3366// API call, and error handling. 3367// 3368// This method is useful when you want to inject custom logic or configuration 3369// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3370// 3371// 3372// // Example sending a request using the GetSlotTypesRequest method. 3373// req, resp := client.GetSlotTypesRequest(params) 3374// 3375// err := req.Send() 3376// if err == nil { // resp is now filled 3377// fmt.Println(resp) 3378// } 3379// 3380// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypes 3381func (c *LexModelBuildingService) GetSlotTypesRequest(input *GetSlotTypesInput) (req *request.Request, output *GetSlotTypesOutput) { 3382 op := &request.Operation{ 3383 Name: opGetSlotTypes, 3384 HTTPMethod: "GET", 3385 HTTPPath: "/slottypes/", 3386 Paginator: &request.Paginator{ 3387 InputTokens: []string{"nextToken"}, 3388 OutputTokens: []string{"nextToken"}, 3389 LimitToken: "maxResults", 3390 TruncationToken: "", 3391 }, 3392 } 3393 3394 if input == nil { 3395 input = &GetSlotTypesInput{} 3396 } 3397 3398 output = &GetSlotTypesOutput{} 3399 req = c.newRequest(op, input, output) 3400 return 3401} 3402 3403// GetSlotTypes API operation for Amazon Lex Model Building Service. 3404// 3405// Returns slot type information as follows: 3406// 3407// * If you specify the nameContains field, returns the $LATEST version of 3408// all slot types that contain the specified string. 3409// 3410// * If you don't specify the nameContains field, returns information about 3411// the $LATEST version of all slot types. 3412// 3413// The operation requires permission for the lex:GetSlotTypes action. 3414// 3415// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3416// with awserr.Error's Code and Message methods to get detailed information about 3417// the error. 3418// 3419// See the AWS API reference guide for Amazon Lex Model Building Service's 3420// API operation GetSlotTypes for usage and error information. 3421// 3422// Returned Error Codes: 3423// * ErrCodeNotFoundException "NotFoundException" 3424// The resource specified in the request was not found. Check the resource and 3425// try again. 3426// 3427// * ErrCodeLimitExceededException "LimitExceededException" 3428// The request exceeded a limit. Try your request again. 3429// 3430// * ErrCodeInternalFailureException "InternalFailureException" 3431// An internal Amazon Lex error occurred. Try your request again. 3432// 3433// * ErrCodeBadRequestException "BadRequestException" 3434// The request is not well formed. For example, a value is invalid or a required 3435// field is missing. Check the field values, and try again. 3436// 3437// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypes 3438func (c *LexModelBuildingService) GetSlotTypes(input *GetSlotTypesInput) (*GetSlotTypesOutput, error) { 3439 req, out := c.GetSlotTypesRequest(input) 3440 return out, req.Send() 3441} 3442 3443// GetSlotTypesWithContext is the same as GetSlotTypes with the addition of 3444// the ability to pass a context and additional request options. 3445// 3446// See GetSlotTypes for details on how to use this API operation. 3447// 3448// The context must be non-nil and will be used for request cancellation. If 3449// the context is nil a panic will occur. In the future the SDK may create 3450// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3451// for more information on using Contexts. 3452func (c *LexModelBuildingService) GetSlotTypesWithContext(ctx aws.Context, input *GetSlotTypesInput, opts ...request.Option) (*GetSlotTypesOutput, error) { 3453 req, out := c.GetSlotTypesRequest(input) 3454 req.SetContext(ctx) 3455 req.ApplyOptions(opts...) 3456 return out, req.Send() 3457} 3458 3459// GetSlotTypesPages iterates over the pages of a GetSlotTypes operation, 3460// calling the "fn" function with the response data for each page. To stop 3461// iterating, return false from the fn function. 3462// 3463// See GetSlotTypes method for more information on how to use this operation. 3464// 3465// Note: This operation can generate multiple requests to a service. 3466// 3467// // Example iterating over at most 3 pages of a GetSlotTypes operation. 3468// pageNum := 0 3469// err := client.GetSlotTypesPages(params, 3470// func(page *GetSlotTypesOutput, lastPage bool) bool { 3471// pageNum++ 3472// fmt.Println(page) 3473// return pageNum <= 3 3474// }) 3475// 3476func (c *LexModelBuildingService) GetSlotTypesPages(input *GetSlotTypesInput, fn func(*GetSlotTypesOutput, bool) bool) error { 3477 return c.GetSlotTypesPagesWithContext(aws.BackgroundContext(), input, fn) 3478} 3479 3480// GetSlotTypesPagesWithContext same as GetSlotTypesPages except 3481// it takes a Context and allows setting request options on the pages. 3482// 3483// The context must be non-nil and will be used for request cancellation. If 3484// the context is nil a panic will occur. In the future the SDK may create 3485// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3486// for more information on using Contexts. 3487func (c *LexModelBuildingService) GetSlotTypesPagesWithContext(ctx aws.Context, input *GetSlotTypesInput, fn func(*GetSlotTypesOutput, bool) bool, opts ...request.Option) error { 3488 p := request.Pagination{ 3489 NewRequest: func() (*request.Request, error) { 3490 var inCpy *GetSlotTypesInput 3491 if input != nil { 3492 tmp := *input 3493 inCpy = &tmp 3494 } 3495 req, _ := c.GetSlotTypesRequest(inCpy) 3496 req.SetContext(ctx) 3497 req.ApplyOptions(opts...) 3498 return req, nil 3499 }, 3500 } 3501 3502 cont := true 3503 for p.Next() && cont { 3504 cont = fn(p.Page().(*GetSlotTypesOutput), !p.HasNextPage()) 3505 } 3506 return p.Err() 3507} 3508 3509const opGetUtterancesView = "GetUtterancesView" 3510 3511// GetUtterancesViewRequest generates a "aws/request.Request" representing the 3512// client's request for the GetUtterancesView operation. The "output" return 3513// value will be populated with the request's response once the request complets 3514// successfuly. 3515// 3516// Use "Send" method on the returned Request to send the API call to the service. 3517// the "output" return value is not valid until after Send returns without error. 3518// 3519// See GetUtterancesView for more information on using the GetUtterancesView 3520// API call, and error handling. 3521// 3522// This method is useful when you want to inject custom logic or configuration 3523// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3524// 3525// 3526// // Example sending a request using the GetUtterancesViewRequest method. 3527// req, resp := client.GetUtterancesViewRequest(params) 3528// 3529// err := req.Send() 3530// if err == nil { // resp is now filled 3531// fmt.Println(resp) 3532// } 3533// 3534// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesView 3535func (c *LexModelBuildingService) GetUtterancesViewRequest(input *GetUtterancesViewInput) (req *request.Request, output *GetUtterancesViewOutput) { 3536 op := &request.Operation{ 3537 Name: opGetUtterancesView, 3538 HTTPMethod: "GET", 3539 HTTPPath: "/bots/{botname}/utterances?view=aggregation", 3540 } 3541 3542 if input == nil { 3543 input = &GetUtterancesViewInput{} 3544 } 3545 3546 output = &GetUtterancesViewOutput{} 3547 req = c.newRequest(op, input, output) 3548 return 3549} 3550 3551// GetUtterancesView API operation for Amazon Lex Model Building Service. 3552// 3553// Use the GetUtterancesView operation to get information about the utterances 3554// that your users have made to your bot. You can use this list to tune the 3555// utterances that your bot responds to. 3556// 3557// For example, say that you have created a bot to order flowers. After your 3558// users have used your bot for a while, use the GetUtterancesView operation 3559// to see the requests that they have made and whether they have been successful. 3560// You might find that the utterance "I want flowers" is not being recognized. 3561// You could add this utterance to the OrderFlowers intent so that your bot 3562// recognizes that utterance. 3563// 3564// After you publish a new version of a bot, you can get information about the 3565// old version and the new so that you can compare the performance across the 3566// two versions. 3567// 3568// Data is available for the last 15 days. You can request information for up 3569// to 5 versions in each request. The response contains information about a 3570// maximum of 100 utterances for each version. 3571// 3572// If the bot's childDirected field is set to true, utterances for the bot are 3573// not stored and cannot be retrieved with the GetUtterancesView operation. 3574// For more information, see PutBot. 3575// 3576// This operation requires permissions for the lex:GetUtterancesView action. 3577// 3578// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3579// with awserr.Error's Code and Message methods to get detailed information about 3580// the error. 3581// 3582// See the AWS API reference guide for Amazon Lex Model Building Service's 3583// API operation GetUtterancesView for usage and error information. 3584// 3585// Returned Error Codes: 3586// * ErrCodeLimitExceededException "LimitExceededException" 3587// The request exceeded a limit. Try your request again. 3588// 3589// * ErrCodeInternalFailureException "InternalFailureException" 3590// An internal Amazon Lex error occurred. Try your request again. 3591// 3592// * ErrCodeBadRequestException "BadRequestException" 3593// The request is not well formed. For example, a value is invalid or a required 3594// field is missing. Check the field values, and try again. 3595// 3596// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesView 3597func (c *LexModelBuildingService) GetUtterancesView(input *GetUtterancesViewInput) (*GetUtterancesViewOutput, error) { 3598 req, out := c.GetUtterancesViewRequest(input) 3599 return out, req.Send() 3600} 3601 3602// GetUtterancesViewWithContext is the same as GetUtterancesView with the addition of 3603// the ability to pass a context and additional request options. 3604// 3605// See GetUtterancesView for details on how to use this API operation. 3606// 3607// The context must be non-nil and will be used for request cancellation. If 3608// the context is nil a panic will occur. In the future the SDK may create 3609// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3610// for more information on using Contexts. 3611func (c *LexModelBuildingService) GetUtterancesViewWithContext(ctx aws.Context, input *GetUtterancesViewInput, opts ...request.Option) (*GetUtterancesViewOutput, error) { 3612 req, out := c.GetUtterancesViewRequest(input) 3613 req.SetContext(ctx) 3614 req.ApplyOptions(opts...) 3615 return out, req.Send() 3616} 3617 3618const opPutBot = "PutBot" 3619 3620// PutBotRequest generates a "aws/request.Request" representing the 3621// client's request for the PutBot operation. The "output" return 3622// value will be populated with the request's response once the request complets 3623// successfuly. 3624// 3625// Use "Send" method on the returned Request to send the API call to the service. 3626// the "output" return value is not valid until after Send returns without error. 3627// 3628// See PutBot for more information on using the PutBot 3629// API call, and error handling. 3630// 3631// This method is useful when you want to inject custom logic or configuration 3632// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3633// 3634// 3635// // Example sending a request using the PutBotRequest method. 3636// req, resp := client.PutBotRequest(params) 3637// 3638// err := req.Send() 3639// if err == nil { // resp is now filled 3640// fmt.Println(resp) 3641// } 3642// 3643// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBot 3644func (c *LexModelBuildingService) PutBotRequest(input *PutBotInput) (req *request.Request, output *PutBotOutput) { 3645 op := &request.Operation{ 3646 Name: opPutBot, 3647 HTTPMethod: "PUT", 3648 HTTPPath: "/bots/{name}/versions/$LATEST", 3649 } 3650 3651 if input == nil { 3652 input = &PutBotInput{} 3653 } 3654 3655 output = &PutBotOutput{} 3656 req = c.newRequest(op, input, output) 3657 return 3658} 3659 3660// PutBot API operation for Amazon Lex Model Building Service. 3661// 3662// Creates an Amazon Lex conversational bot or replaces an existing bot. When 3663// you create or update a bot you are only required to specify a name. You can 3664// use this to add intents later, or to remove intents from an existing bot. 3665// When you create a bot with a name only, the bot is created or updated but 3666// Amazon Lex returns the response FAILED. You can build the bot after you add one or more intents. For more information 3667// about Amazon Lex bots, see how-it-works. 3668// 3669// If you specify the name of an existing bot, the fields in the request replace 3670// the existing values in the $LATESTversion of the bot. Amazon Lex removes any fields that you don't provide 3671// values for in the request, except for the idleTTLInSecondsand privacySettingsfields, which are set to their default values. If you don't specify values 3672// for required fields, Amazon Lex throws an exception. 3673// 3674// This operation requires permissions for the lex:PutBotaction. For more information, see auth-and-access-control 3675// 3676// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3677// with awserr.Error's Code and Message methods to get detailed information about 3678// the error. 3679// 3680// See the AWS API reference guide for Amazon Lex Model Building Service's 3681// API operation PutBot for usage and error information. 3682// 3683// Returned Error Codes: 3684// * ErrCodeConflictException "ConflictException" 3685// There was a conflict processing the request. Try your request again. 3686// 3687// * ErrCodeLimitExceededException "LimitExceededException" 3688// The request exceeded a limit. Try your request again. 3689// 3690// * ErrCodeInternalFailureException "InternalFailureException" 3691// An internal Amazon Lex error occurred. Try your request again. 3692// 3693// * ErrCodeBadRequestException "BadRequestException" 3694// The request is not well formed. For example, a value is invalid or a required 3695// field is missing. Check the field values, and try again. 3696// 3697// * ErrCodePreconditionFailedException "PreconditionFailedException" 3698// The checksum of the resource that you are trying to change does not match 3699// the checksum in the request. Check the resource's checksum and try again. 3700// 3701// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBot 3702func (c *LexModelBuildingService) PutBot(input *PutBotInput) (*PutBotOutput, error) { 3703 req, out := c.PutBotRequest(input) 3704 return out, req.Send() 3705} 3706 3707// PutBotWithContext is the same as PutBot with the addition of 3708// the ability to pass a context and additional request options. 3709// 3710// See PutBot for details on how to use this API operation. 3711// 3712// The context must be non-nil and will be used for request cancellation. If 3713// the context is nil a panic will occur. In the future the SDK may create 3714// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3715// for more information on using Contexts. 3716func (c *LexModelBuildingService) PutBotWithContext(ctx aws.Context, input *PutBotInput, opts ...request.Option) (*PutBotOutput, error) { 3717 req, out := c.PutBotRequest(input) 3718 req.SetContext(ctx) 3719 req.ApplyOptions(opts...) 3720 return out, req.Send() 3721} 3722 3723const opPutBotAlias = "PutBotAlias" 3724 3725// PutBotAliasRequest generates a "aws/request.Request" representing the 3726// client's request for the PutBotAlias operation. The "output" return 3727// value will be populated with the request's response once the request complets 3728// successfuly. 3729// 3730// Use "Send" method on the returned Request to send the API call to the service. 3731// the "output" return value is not valid until after Send returns without error. 3732// 3733// See PutBotAlias for more information on using the PutBotAlias 3734// API call, and error handling. 3735// 3736// This method is useful when you want to inject custom logic or configuration 3737// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3738// 3739// 3740// // Example sending a request using the PutBotAliasRequest method. 3741// req, resp := client.PutBotAliasRequest(params) 3742// 3743// err := req.Send() 3744// if err == nil { // resp is now filled 3745// fmt.Println(resp) 3746// } 3747// 3748// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAlias 3749func (c *LexModelBuildingService) PutBotAliasRequest(input *PutBotAliasInput) (req *request.Request, output *PutBotAliasOutput) { 3750 op := &request.Operation{ 3751 Name: opPutBotAlias, 3752 HTTPMethod: "PUT", 3753 HTTPPath: "/bots/{botName}/aliases/{name}", 3754 } 3755 3756 if input == nil { 3757 input = &PutBotAliasInput{} 3758 } 3759 3760 output = &PutBotAliasOutput{} 3761 req = c.newRequest(op, input, output) 3762 return 3763} 3764 3765// PutBotAlias API operation for Amazon Lex Model Building Service. 3766// 3767// Creates an alias for the specified version of the bot or replaces an alias 3768// for the specified bot. To change the version of the bot that the alias points 3769// to, replace the alias. For more information about aliases, see versioning-aliases. 3770// 3771// This operation requires permissions for the lex:PutBotAlias action. 3772// 3773// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3774// with awserr.Error's Code and Message methods to get detailed information about 3775// the error. 3776// 3777// See the AWS API reference guide for Amazon Lex Model Building Service's 3778// API operation PutBotAlias for usage and error information. 3779// 3780// Returned Error Codes: 3781// * ErrCodeConflictException "ConflictException" 3782// There was a conflict processing the request. Try your request again. 3783// 3784// * ErrCodeLimitExceededException "LimitExceededException" 3785// The request exceeded a limit. Try your request again. 3786// 3787// * ErrCodeInternalFailureException "InternalFailureException" 3788// An internal Amazon Lex error occurred. Try your request again. 3789// 3790// * ErrCodeBadRequestException "BadRequestException" 3791// The request is not well formed. For example, a value is invalid or a required 3792// field is missing. Check the field values, and try again. 3793// 3794// * ErrCodePreconditionFailedException "PreconditionFailedException" 3795// The checksum of the resource that you are trying to change does not match 3796// the checksum in the request. Check the resource's checksum and try again. 3797// 3798// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAlias 3799func (c *LexModelBuildingService) PutBotAlias(input *PutBotAliasInput) (*PutBotAliasOutput, error) { 3800 req, out := c.PutBotAliasRequest(input) 3801 return out, req.Send() 3802} 3803 3804// PutBotAliasWithContext is the same as PutBotAlias with the addition of 3805// the ability to pass a context and additional request options. 3806// 3807// See PutBotAlias for details on how to use this API operation. 3808// 3809// The context must be non-nil and will be used for request cancellation. If 3810// the context is nil a panic will occur. In the future the SDK may create 3811// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3812// for more information on using Contexts. 3813func (c *LexModelBuildingService) PutBotAliasWithContext(ctx aws.Context, input *PutBotAliasInput, opts ...request.Option) (*PutBotAliasOutput, error) { 3814 req, out := c.PutBotAliasRequest(input) 3815 req.SetContext(ctx) 3816 req.ApplyOptions(opts...) 3817 return out, req.Send() 3818} 3819 3820const opPutIntent = "PutIntent" 3821 3822// PutIntentRequest generates a "aws/request.Request" representing the 3823// client's request for the PutIntent operation. The "output" return 3824// value will be populated with the request's response once the request complets 3825// successfuly. 3826// 3827// Use "Send" method on the returned Request to send the API call to the service. 3828// the "output" return value is not valid until after Send returns without error. 3829// 3830// See PutIntent for more information on using the PutIntent 3831// API call, and error handling. 3832// 3833// This method is useful when you want to inject custom logic or configuration 3834// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3835// 3836// 3837// // Example sending a request using the PutIntentRequest method. 3838// req, resp := client.PutIntentRequest(params) 3839// 3840// err := req.Send() 3841// if err == nil { // resp is now filled 3842// fmt.Println(resp) 3843// } 3844// 3845// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntent 3846func (c *LexModelBuildingService) PutIntentRequest(input *PutIntentInput) (req *request.Request, output *PutIntentOutput) { 3847 op := &request.Operation{ 3848 Name: opPutIntent, 3849 HTTPMethod: "PUT", 3850 HTTPPath: "/intents/{name}/versions/$LATEST", 3851 } 3852 3853 if input == nil { 3854 input = &PutIntentInput{} 3855 } 3856 3857 output = &PutIntentOutput{} 3858 req = c.newRequest(op, input, output) 3859 return 3860} 3861 3862// PutIntent API operation for Amazon Lex Model Building Service. 3863// 3864// Creates an intent or replaces an existing intent. 3865// 3866// To define the interaction between the user and your bot, you use one or more 3867// intents. For a pizza ordering bot, for example, you would create an OrderPizza 3868// intent. 3869// 3870// To create an intent or replace an existing intent, you must provide the following: 3871// 3872// * Intent name. For example, OrderPizza. 3873// 3874// * Sample utterances. For example, "Can I order a pizza, please." and "I 3875// want to order a pizza." 3876// 3877// * Information to be gathered. You specify slot types for the information 3878// that your bot will request from the user. You can specify standard slot 3879// types, such as a date or a time, or custom slot types such as the size 3880// and crust of a pizza. 3881// 3882// * How the intent will be fulfilled. You can provide a Lambda function 3883// or configure the intent to return the intent information to the client 3884// application. If you use a Lambda function, when all of the intent information 3885// is available, Amazon Lex invokes your Lambda function. If you configure 3886// your intent to return the intent information to the client application. 3887// 3888// 3889// You can specify other optional information in the request, such as: 3890// 3891// * A confirmation prompt to ask the user to confirm an intent. For example, 3892// "Shall I order your pizza?" 3893// 3894// * A conclusion statement to send to the user after the intent has been 3895// fulfilled. For example, "I placed your pizza order." 3896// 3897// * A follow-up prompt that asks the user for additional activity. For example, 3898// asking "Do you want to order a drink with your pizza?" 3899// 3900// If you specify an existing intent name to update the intent, Amazon Lex replaces 3901// the values in the $LATEST version of the intent with the values in the request. 3902// Amazon Lex removes fields that you don't provide in the request. If you don't 3903// specify the required fields, Amazon Lex throws an exception. When you update 3904// the $LATEST version of an intent, the status field of any bot that uses the 3905// $LATEST version of the intent is set to NOT_BUILT. 3906// 3907// For more information, see how-it-works. 3908// 3909// This operation requires permissions for the lex:PutIntent action. 3910// 3911// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3912// with awserr.Error's Code and Message methods to get detailed information about 3913// the error. 3914// 3915// See the AWS API reference guide for Amazon Lex Model Building Service's 3916// API operation PutIntent for usage and error information. 3917// 3918// Returned Error Codes: 3919// * ErrCodeConflictException "ConflictException" 3920// There was a conflict processing the request. Try your request again. 3921// 3922// * ErrCodeLimitExceededException "LimitExceededException" 3923// The request exceeded a limit. Try your request again. 3924// 3925// * ErrCodeInternalFailureException "InternalFailureException" 3926// An internal Amazon Lex error occurred. Try your request again. 3927// 3928// * ErrCodeBadRequestException "BadRequestException" 3929// The request is not well formed. For example, a value is invalid or a required 3930// field is missing. Check the field values, and try again. 3931// 3932// * ErrCodePreconditionFailedException "PreconditionFailedException" 3933// The checksum of the resource that you are trying to change does not match 3934// the checksum in the request. Check the resource's checksum and try again. 3935// 3936// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntent 3937func (c *LexModelBuildingService) PutIntent(input *PutIntentInput) (*PutIntentOutput, error) { 3938 req, out := c.PutIntentRequest(input) 3939 return out, req.Send() 3940} 3941 3942// PutIntentWithContext is the same as PutIntent with the addition of 3943// the ability to pass a context and additional request options. 3944// 3945// See PutIntent for details on how to use this API operation. 3946// 3947// The context must be non-nil and will be used for request cancellation. If 3948// the context is nil a panic will occur. In the future the SDK may create 3949// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3950// for more information on using Contexts. 3951func (c *LexModelBuildingService) PutIntentWithContext(ctx aws.Context, input *PutIntentInput, opts ...request.Option) (*PutIntentOutput, error) { 3952 req, out := c.PutIntentRequest(input) 3953 req.SetContext(ctx) 3954 req.ApplyOptions(opts...) 3955 return out, req.Send() 3956} 3957 3958const opPutSlotType = "PutSlotType" 3959 3960// PutSlotTypeRequest generates a "aws/request.Request" representing the 3961// client's request for the PutSlotType operation. The "output" return 3962// value will be populated with the request's response once the request complets 3963// successfuly. 3964// 3965// Use "Send" method on the returned Request to send the API call to the service. 3966// the "output" return value is not valid until after Send returns without error. 3967// 3968// See PutSlotType for more information on using the PutSlotType 3969// API call, and error handling. 3970// 3971// This method is useful when you want to inject custom logic or configuration 3972// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3973// 3974// 3975// // Example sending a request using the PutSlotTypeRequest method. 3976// req, resp := client.PutSlotTypeRequest(params) 3977// 3978// err := req.Send() 3979// if err == nil { // resp is now filled 3980// fmt.Println(resp) 3981// } 3982// 3983// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotType 3984func (c *LexModelBuildingService) PutSlotTypeRequest(input *PutSlotTypeInput) (req *request.Request, output *PutSlotTypeOutput) { 3985 op := &request.Operation{ 3986 Name: opPutSlotType, 3987 HTTPMethod: "PUT", 3988 HTTPPath: "/slottypes/{name}/versions/$LATEST", 3989 } 3990 3991 if input == nil { 3992 input = &PutSlotTypeInput{} 3993 } 3994 3995 output = &PutSlotTypeOutput{} 3996 req = c.newRequest(op, input, output) 3997 return 3998} 3999 4000// PutSlotType API operation for Amazon Lex Model Building Service. 4001// 4002// Creates a custom slot type or replaces an existing custom slot type. 4003// 4004// To create a custom slot type, specify a name for the slot type and a set 4005// of enumeration values, which are the values that a slot of this type can 4006// assume. For more information, see how-it-works. 4007// 4008// If you specify the name of an existing slot type, the fields in the request 4009// replace the existing values in the $LATEST version of the slot type. Amazon 4010// Lex removes the fields that you don't provide in the request. If you don't 4011// specify required fields, Amazon Lex throws an exception. When you update 4012// the $LATEST version of a slot type, if a bot uses the $LATEST version of 4013// an intent that contains the slot type, the bot's status field is set to NOT_BUILT. 4014// 4015// This operation requires permissions for the lex:PutSlotType action. 4016// 4017// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4018// with awserr.Error's Code and Message methods to get detailed information about 4019// the error. 4020// 4021// See the AWS API reference guide for Amazon Lex Model Building Service's 4022// API operation PutSlotType for usage and error information. 4023// 4024// Returned Error Codes: 4025// * ErrCodeConflictException "ConflictException" 4026// There was a conflict processing the request. Try your request again. 4027// 4028// * ErrCodeLimitExceededException "LimitExceededException" 4029// The request exceeded a limit. Try your request again. 4030// 4031// * ErrCodeInternalFailureException "InternalFailureException" 4032// An internal Amazon Lex error occurred. Try your request again. 4033// 4034// * ErrCodeBadRequestException "BadRequestException" 4035// The request is not well formed. For example, a value is invalid or a required 4036// field is missing. Check the field values, and try again. 4037// 4038// * ErrCodePreconditionFailedException "PreconditionFailedException" 4039// The checksum of the resource that you are trying to change does not match 4040// the checksum in the request. Check the resource's checksum and try again. 4041// 4042// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotType 4043func (c *LexModelBuildingService) PutSlotType(input *PutSlotTypeInput) (*PutSlotTypeOutput, error) { 4044 req, out := c.PutSlotTypeRequest(input) 4045 return out, req.Send() 4046} 4047 4048// PutSlotTypeWithContext is the same as PutSlotType with the addition of 4049// the ability to pass a context and additional request options. 4050// 4051// See PutSlotType for details on how to use this API operation. 4052// 4053// The context must be non-nil and will be used for request cancellation. If 4054// the context is nil a panic will occur. In the future the SDK may create 4055// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4056// for more information on using Contexts. 4057func (c *LexModelBuildingService) PutSlotTypeWithContext(ctx aws.Context, input *PutSlotTypeInput, opts ...request.Option) (*PutSlotTypeOutput, error) { 4058 req, out := c.PutSlotTypeRequest(input) 4059 req.SetContext(ctx) 4060 req.ApplyOptions(opts...) 4061 return out, req.Send() 4062} 4063 4064// Provides information about a bot alias. 4065// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BotAliasMetadata 4066type BotAliasMetadata struct { 4067 _ struct{} `type:"structure"` 4068 4069 // The name of the bot to which the alias points. 4070 BotName *string `locationName:"botName" min:"2" type:"string"` 4071 4072 // The version of the Amazon Lex bot to which the alias points. 4073 BotVersion *string `locationName:"botVersion" min:"1" type:"string"` 4074 4075 // Checksum of the bot alias. 4076 Checksum *string `locationName:"checksum" type:"string"` 4077 4078 // The date that the bot alias was created. 4079 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 4080 4081 // A description of the bot alias. 4082 Description *string `locationName:"description" type:"string"` 4083 4084 // The date that the bot alias was updated. When you create a resource, the 4085 // creation date and last updated date are the same. 4086 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 4087 4088 // The name of the bot alias. 4089 Name *string `locationName:"name" min:"1" type:"string"` 4090} 4091 4092// String returns the string representation 4093func (s BotAliasMetadata) String() string { 4094 return awsutil.Prettify(s) 4095} 4096 4097// GoString returns the string representation 4098func (s BotAliasMetadata) GoString() string { 4099 return s.String() 4100} 4101 4102// SetBotName sets the BotName field's value. 4103func (s *BotAliasMetadata) SetBotName(v string) *BotAliasMetadata { 4104 s.BotName = &v 4105 return s 4106} 4107 4108// SetBotVersion sets the BotVersion field's value. 4109func (s *BotAliasMetadata) SetBotVersion(v string) *BotAliasMetadata { 4110 s.BotVersion = &v 4111 return s 4112} 4113 4114// SetChecksum sets the Checksum field's value. 4115func (s *BotAliasMetadata) SetChecksum(v string) *BotAliasMetadata { 4116 s.Checksum = &v 4117 return s 4118} 4119 4120// SetCreatedDate sets the CreatedDate field's value. 4121func (s *BotAliasMetadata) SetCreatedDate(v time.Time) *BotAliasMetadata { 4122 s.CreatedDate = &v 4123 return s 4124} 4125 4126// SetDescription sets the Description field's value. 4127func (s *BotAliasMetadata) SetDescription(v string) *BotAliasMetadata { 4128 s.Description = &v 4129 return s 4130} 4131 4132// SetLastUpdatedDate sets the LastUpdatedDate field's value. 4133func (s *BotAliasMetadata) SetLastUpdatedDate(v time.Time) *BotAliasMetadata { 4134 s.LastUpdatedDate = &v 4135 return s 4136} 4137 4138// SetName sets the Name field's value. 4139func (s *BotAliasMetadata) SetName(v string) *BotAliasMetadata { 4140 s.Name = &v 4141 return s 4142} 4143 4144// Represents an association between an Amazon Lex bot and an external messaging 4145// platform. 4146// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BotChannelAssociation 4147type BotChannelAssociation struct { 4148 _ struct{} `type:"structure"` 4149 4150 // An alias pointing to the specific version of the Amazon Lex bot to which 4151 // this association is being made. 4152 BotAlias *string `locationName:"botAlias" min:"1" type:"string"` 4153 4154 // Provides information necessary to communicate with the messaging platform. 4155 BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map"` 4156 4157 // The name of the Amazon Lex bot to which this association is being made. 4158 // 4159 // Currently, Amazon Lex supports associations with Facebook and Slack, and 4160 // Twilio. 4161 BotName *string `locationName:"botName" min:"2" type:"string"` 4162 4163 // The date that the association between the Amazon Lex bot and the channel 4164 // was created. 4165 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 4166 4167 // A text description of the association you are creating. 4168 Description *string `locationName:"description" type:"string"` 4169 4170 // If status is FAILED, Amazon Lex provides the reason that it failed to create 4171 // the association. 4172 FailureReason *string `locationName:"failureReason" type:"string"` 4173 4174 // The name of the association between the bot and the channel. 4175 Name *string `locationName:"name" min:"1" type:"string"` 4176 4177 // The status of the bot channel. 4178 // 4179 // * CREATED - The channel has been created and is ready for use. 4180 // 4181 // * IN_PROGRESS - Channel creation is in progress. 4182 // 4183 // * FAILED - There was an error creating the channel. For information about 4184 // the reason for the failure, see the failureReason field. 4185 Status *string `locationName:"status" type:"string" enum:"ChannelStatus"` 4186 4187 // Specifies the type of association by indicating the type of channel being 4188 // established between the Amazon Lex bot and the external messaging platform. 4189 Type *string `locationName:"type" type:"string" enum:"ChannelType"` 4190} 4191 4192// String returns the string representation 4193func (s BotChannelAssociation) String() string { 4194 return awsutil.Prettify(s) 4195} 4196 4197// GoString returns the string representation 4198func (s BotChannelAssociation) GoString() string { 4199 return s.String() 4200} 4201 4202// SetBotAlias sets the BotAlias field's value. 4203func (s *BotChannelAssociation) SetBotAlias(v string) *BotChannelAssociation { 4204 s.BotAlias = &v 4205 return s 4206} 4207 4208// SetBotConfiguration sets the BotConfiguration field's value. 4209func (s *BotChannelAssociation) SetBotConfiguration(v map[string]*string) *BotChannelAssociation { 4210 s.BotConfiguration = v 4211 return s 4212} 4213 4214// SetBotName sets the BotName field's value. 4215func (s *BotChannelAssociation) SetBotName(v string) *BotChannelAssociation { 4216 s.BotName = &v 4217 return s 4218} 4219 4220// SetCreatedDate sets the CreatedDate field's value. 4221func (s *BotChannelAssociation) SetCreatedDate(v time.Time) *BotChannelAssociation { 4222 s.CreatedDate = &v 4223 return s 4224} 4225 4226// SetDescription sets the Description field's value. 4227func (s *BotChannelAssociation) SetDescription(v string) *BotChannelAssociation { 4228 s.Description = &v 4229 return s 4230} 4231 4232// SetFailureReason sets the FailureReason field's value. 4233func (s *BotChannelAssociation) SetFailureReason(v string) *BotChannelAssociation { 4234 s.FailureReason = &v 4235 return s 4236} 4237 4238// SetName sets the Name field's value. 4239func (s *BotChannelAssociation) SetName(v string) *BotChannelAssociation { 4240 s.Name = &v 4241 return s 4242} 4243 4244// SetStatus sets the Status field's value. 4245func (s *BotChannelAssociation) SetStatus(v string) *BotChannelAssociation { 4246 s.Status = &v 4247 return s 4248} 4249 4250// SetType sets the Type field's value. 4251func (s *BotChannelAssociation) SetType(v string) *BotChannelAssociation { 4252 s.Type = &v 4253 return s 4254} 4255 4256// Provides information about a bot. . 4257// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BotMetadata 4258type BotMetadata struct { 4259 _ struct{} `type:"structure"` 4260 4261 // The date that the bot was created. 4262 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 4263 4264 // A description of the bot. 4265 Description *string `locationName:"description" type:"string"` 4266 4267 // The date that the bot was updated. When you create a bot, the creation date 4268 // and last updated date are the same. 4269 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 4270 4271 // The name of the bot. 4272 Name *string `locationName:"name" min:"2" type:"string"` 4273 4274 // The status of the bot. 4275 Status *string `locationName:"status" type:"string" enum:"Status"` 4276 4277 // The version of the bot. For a new bot, the version is always $LATEST. 4278 Version *string `locationName:"version" min:"1" type:"string"` 4279} 4280 4281// String returns the string representation 4282func (s BotMetadata) String() string { 4283 return awsutil.Prettify(s) 4284} 4285 4286// GoString returns the string representation 4287func (s BotMetadata) GoString() string { 4288 return s.String() 4289} 4290 4291// SetCreatedDate sets the CreatedDate field's value. 4292func (s *BotMetadata) SetCreatedDate(v time.Time) *BotMetadata { 4293 s.CreatedDate = &v 4294 return s 4295} 4296 4297// SetDescription sets the Description field's value. 4298func (s *BotMetadata) SetDescription(v string) *BotMetadata { 4299 s.Description = &v 4300 return s 4301} 4302 4303// SetLastUpdatedDate sets the LastUpdatedDate field's value. 4304func (s *BotMetadata) SetLastUpdatedDate(v time.Time) *BotMetadata { 4305 s.LastUpdatedDate = &v 4306 return s 4307} 4308 4309// SetName sets the Name field's value. 4310func (s *BotMetadata) SetName(v string) *BotMetadata { 4311 s.Name = &v 4312 return s 4313} 4314 4315// SetStatus sets the Status field's value. 4316func (s *BotMetadata) SetStatus(v string) *BotMetadata { 4317 s.Status = &v 4318 return s 4319} 4320 4321// SetVersion sets the Version field's value. 4322func (s *BotMetadata) SetVersion(v string) *BotMetadata { 4323 s.Version = &v 4324 return s 4325} 4326 4327// Provides metadata for a built-in intent. 4328// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BuiltinIntentMetadata 4329type BuiltinIntentMetadata struct { 4330 _ struct{} `type:"structure"` 4331 4332 // A unique identifier for the built-in intent. To find the signature for an 4333 // intent, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) 4334 // in the Alexa Skills Kit. 4335 Signature *string `locationName:"signature" type:"string"` 4336 4337 // A list of identifiers for the locales that the intent supports. 4338 SupportedLocales []*string `locationName:"supportedLocales" type:"list"` 4339} 4340 4341// String returns the string representation 4342func (s BuiltinIntentMetadata) String() string { 4343 return awsutil.Prettify(s) 4344} 4345 4346// GoString returns the string representation 4347func (s BuiltinIntentMetadata) GoString() string { 4348 return s.String() 4349} 4350 4351// SetSignature sets the Signature field's value. 4352func (s *BuiltinIntentMetadata) SetSignature(v string) *BuiltinIntentMetadata { 4353 s.Signature = &v 4354 return s 4355} 4356 4357// SetSupportedLocales sets the SupportedLocales field's value. 4358func (s *BuiltinIntentMetadata) SetSupportedLocales(v []*string) *BuiltinIntentMetadata { 4359 s.SupportedLocales = v 4360 return s 4361} 4362 4363// Provides information about a slot used in a built-in intent. 4364// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BuiltinIntentSlot 4365type BuiltinIntentSlot struct { 4366 _ struct{} `type:"structure"` 4367 4368 // A list of the slots defined for the intent. 4369 Name *string `locationName:"name" type:"string"` 4370} 4371 4372// String returns the string representation 4373func (s BuiltinIntentSlot) String() string { 4374 return awsutil.Prettify(s) 4375} 4376 4377// GoString returns the string representation 4378func (s BuiltinIntentSlot) GoString() string { 4379 return s.String() 4380} 4381 4382// SetName sets the Name field's value. 4383func (s *BuiltinIntentSlot) SetName(v string) *BuiltinIntentSlot { 4384 s.Name = &v 4385 return s 4386} 4387 4388// Provides information about a built in slot type. 4389// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BuiltinSlotTypeMetadata 4390type BuiltinSlotTypeMetadata struct { 4391 _ struct{} `type:"structure"` 4392 4393 // A unique identifier for the built-in slot type. To find the signature for 4394 // a slot type, see Slot Type Reference (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) 4395 // in the Alexa Skills Kit. 4396 Signature *string `locationName:"signature" type:"string"` 4397 4398 // A list of target locales for the slot. 4399 SupportedLocales []*string `locationName:"supportedLocales" type:"list"` 4400} 4401 4402// String returns the string representation 4403func (s BuiltinSlotTypeMetadata) String() string { 4404 return awsutil.Prettify(s) 4405} 4406 4407// GoString returns the string representation 4408func (s BuiltinSlotTypeMetadata) GoString() string { 4409 return s.String() 4410} 4411 4412// SetSignature sets the Signature field's value. 4413func (s *BuiltinSlotTypeMetadata) SetSignature(v string) *BuiltinSlotTypeMetadata { 4414 s.Signature = &v 4415 return s 4416} 4417 4418// SetSupportedLocales sets the SupportedLocales field's value. 4419func (s *BuiltinSlotTypeMetadata) SetSupportedLocales(v []*string) *BuiltinSlotTypeMetadata { 4420 s.SupportedLocales = v 4421 return s 4422} 4423 4424// Specifies a Lambda function that verifies requests to a bot or fulfills the 4425// user's request to a bot.. 4426// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CodeHook 4427type CodeHook struct { 4428 _ struct{} `type:"structure"` 4429 4430 // The version of the request-response that you want Amazon Lex to use to invoke 4431 // your Lambda function. For more information, see using-lambda. 4432 // 4433 // MessageVersion is a required field 4434 MessageVersion *string `locationName:"messageVersion" min:"1" type:"string" required:"true"` 4435 4436 // The Amazon Resource Name (ARN) of the Lambda function. 4437 // 4438 // Uri is a required field 4439 Uri *string `locationName:"uri" min:"20" type:"string" required:"true"` 4440} 4441 4442// String returns the string representation 4443func (s CodeHook) String() string { 4444 return awsutil.Prettify(s) 4445} 4446 4447// GoString returns the string representation 4448func (s CodeHook) GoString() string { 4449 return s.String() 4450} 4451 4452// Validate inspects the fields of the type to determine if they are valid. 4453func (s *CodeHook) Validate() error { 4454 invalidParams := request.ErrInvalidParams{Context: "CodeHook"} 4455 if s.MessageVersion == nil { 4456 invalidParams.Add(request.NewErrParamRequired("MessageVersion")) 4457 } 4458 if s.MessageVersion != nil && len(*s.MessageVersion) < 1 { 4459 invalidParams.Add(request.NewErrParamMinLen("MessageVersion", 1)) 4460 } 4461 if s.Uri == nil { 4462 invalidParams.Add(request.NewErrParamRequired("Uri")) 4463 } 4464 if s.Uri != nil && len(*s.Uri) < 20 { 4465 invalidParams.Add(request.NewErrParamMinLen("Uri", 20)) 4466 } 4467 4468 if invalidParams.Len() > 0 { 4469 return invalidParams 4470 } 4471 return nil 4472} 4473 4474// SetMessageVersion sets the MessageVersion field's value. 4475func (s *CodeHook) SetMessageVersion(v string) *CodeHook { 4476 s.MessageVersion = &v 4477 return s 4478} 4479 4480// SetUri sets the Uri field's value. 4481func (s *CodeHook) SetUri(v string) *CodeHook { 4482 s.Uri = &v 4483 return s 4484} 4485 4486// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersionRequest 4487type CreateBotVersionInput struct { 4488 _ struct{} `type:"structure"` 4489 4490 // Identifies a specific revision of the $LATEST version of the bot. If you 4491 // specify a checksum and the $LATEST version of the bot has a different checksum, 4492 // a PreconditionFailedException exception is returned and Amazon Lex doesn't 4493 // publish a new version. If you don't specify a checksum, Amazon Lex publishes 4494 // the $LATEST version. 4495 Checksum *string `locationName:"checksum" type:"string"` 4496 4497 // The name of the bot that you want to create a new version of. The name is 4498 // case sensitive. 4499 // 4500 // Name is a required field 4501 Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` 4502} 4503 4504// String returns the string representation 4505func (s CreateBotVersionInput) String() string { 4506 return awsutil.Prettify(s) 4507} 4508 4509// GoString returns the string representation 4510func (s CreateBotVersionInput) GoString() string { 4511 return s.String() 4512} 4513 4514// Validate inspects the fields of the type to determine if they are valid. 4515func (s *CreateBotVersionInput) Validate() error { 4516 invalidParams := request.ErrInvalidParams{Context: "CreateBotVersionInput"} 4517 if s.Name == nil { 4518 invalidParams.Add(request.NewErrParamRequired("Name")) 4519 } 4520 if s.Name != nil && len(*s.Name) < 2 { 4521 invalidParams.Add(request.NewErrParamMinLen("Name", 2)) 4522 } 4523 4524 if invalidParams.Len() > 0 { 4525 return invalidParams 4526 } 4527 return nil 4528} 4529 4530// SetChecksum sets the Checksum field's value. 4531func (s *CreateBotVersionInput) SetChecksum(v string) *CreateBotVersionInput { 4532 s.Checksum = &v 4533 return s 4534} 4535 4536// SetName sets the Name field's value. 4537func (s *CreateBotVersionInput) SetName(v string) *CreateBotVersionInput { 4538 s.Name = &v 4539 return s 4540} 4541 4542// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersionResponse 4543type CreateBotVersionOutput struct { 4544 _ struct{} `type:"structure"` 4545 4546 // The message that Amazon Lex uses to abort a conversation. For more information, 4547 // see PutBot. 4548 AbortStatement *Statement `locationName:"abortStatement" type:"structure"` 4549 4550 // Checksum identifying the version of the bot that was created. 4551 Checksum *string `locationName:"checksum" type:"string"` 4552 4553 // For each Amazon Lex bot created with the Amazon Lex Model Building Service, 4554 // you must specify whether your use of Amazon Lex is related to a website, 4555 // program, or other application that is directed or targeted, in whole or in 4556 // part, to children under age 13 and subject to the Children's Online Privacy 4557 // Protection Act (COPPA) by specifying true or false in the childDirected field. 4558 // By specifying true in the childDirected field, you confirm that your use 4559 // of Amazon Lex is related to a website, program, or other application that 4560 // is directed or targeted, in whole or in part, to children under age 13 and 4561 // subject to COPPA. By specifying false in the childDirected field, you confirm 4562 // that your use of Amazon Lex is not related to a website, program, or other 4563 // application that is directed or targeted, in whole or in part, to children 4564 // under age 13 and subject to COPPA. You may not specify a default value for 4565 // the childDirected field that does not accurately reflect whether your use 4566 // of Amazon Lex is related to a website, program, or other application that 4567 // is directed or targeted, in whole or in part, to children under age 13 and 4568 // subject to COPPA. 4569 // 4570 // If your use of Amazon Lex relates to a website, program, or other application 4571 // that is directed in whole or in part, to children under age 13, you must 4572 // obtain any required verifiable parental consent under COPPA. For information 4573 // regarding the use of Amazon Lex in connection with websites, programs, or 4574 // other applications that are directed or targeted, in whole or in part, to 4575 // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) 4576 ChildDirected *bool `locationName:"childDirected" type:"boolean"` 4577 4578 // The message that Amazon Lex uses when it doesn't understand the user's request. 4579 // For more information, see PutBot. 4580 ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` 4581 4582 // The date when the bot version was created. 4583 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 4584 4585 // A description of the bot. 4586 Description *string `locationName:"description" type:"string"` 4587 4588 // If status is FAILED, Amazon Lex provides the reason that it failed to build 4589 // the bot. 4590 FailureReason *string `locationName:"failureReason" type:"string"` 4591 4592 // The maximum time in seconds that Amazon Lex retains the data gathered in 4593 // a conversation. For more information, see PutBot. 4594 IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` 4595 4596 // An array of Intent objects. For more information, see PutBot. 4597 Intents []*Intent `locationName:"intents" type:"list"` 4598 4599 // The date when the $LATEST version of this bot was updated. 4600 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 4601 4602 // Specifies the target locale for the bot. 4603 Locale *string `locationName:"locale" type:"string" enum:"Locale"` 4604 4605 // The name of the bot. 4606 Name *string `locationName:"name" min:"2" type:"string"` 4607 4608 // When you send a request to create or update a bot, Amazon Lex sets the status 4609 // response element to BUILDING. After Amazon Lex builds the bot, it sets status 4610 // to READY. If Amazon Lex can't build the bot, it sets status to FAILED. Amazon 4611 // Lex returns the reason for the failure in the failureReason response element. 4612 Status *string `locationName:"status" type:"string" enum:"Status"` 4613 4614 // The version of the bot. 4615 Version *string `locationName:"version" min:"1" type:"string"` 4616 4617 // The Amazon Polly voice ID that Amazon Lex uses for voice interactions with 4618 // the user. 4619 VoiceId *string `locationName:"voiceId" type:"string"` 4620} 4621 4622// String returns the string representation 4623func (s CreateBotVersionOutput) String() string { 4624 return awsutil.Prettify(s) 4625} 4626 4627// GoString returns the string representation 4628func (s CreateBotVersionOutput) GoString() string { 4629 return s.String() 4630} 4631 4632// SetAbortStatement sets the AbortStatement field's value. 4633func (s *CreateBotVersionOutput) SetAbortStatement(v *Statement) *CreateBotVersionOutput { 4634 s.AbortStatement = v 4635 return s 4636} 4637 4638// SetChecksum sets the Checksum field's value. 4639func (s *CreateBotVersionOutput) SetChecksum(v string) *CreateBotVersionOutput { 4640 s.Checksum = &v 4641 return s 4642} 4643 4644// SetChildDirected sets the ChildDirected field's value. 4645func (s *CreateBotVersionOutput) SetChildDirected(v bool) *CreateBotVersionOutput { 4646 s.ChildDirected = &v 4647 return s 4648} 4649 4650// SetClarificationPrompt sets the ClarificationPrompt field's value. 4651func (s *CreateBotVersionOutput) SetClarificationPrompt(v *Prompt) *CreateBotVersionOutput { 4652 s.ClarificationPrompt = v 4653 return s 4654} 4655 4656// SetCreatedDate sets the CreatedDate field's value. 4657func (s *CreateBotVersionOutput) SetCreatedDate(v time.Time) *CreateBotVersionOutput { 4658 s.CreatedDate = &v 4659 return s 4660} 4661 4662// SetDescription sets the Description field's value. 4663func (s *CreateBotVersionOutput) SetDescription(v string) *CreateBotVersionOutput { 4664 s.Description = &v 4665 return s 4666} 4667 4668// SetFailureReason sets the FailureReason field's value. 4669func (s *CreateBotVersionOutput) SetFailureReason(v string) *CreateBotVersionOutput { 4670 s.FailureReason = &v 4671 return s 4672} 4673 4674// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. 4675func (s *CreateBotVersionOutput) SetIdleSessionTTLInSeconds(v int64) *CreateBotVersionOutput { 4676 s.IdleSessionTTLInSeconds = &v 4677 return s 4678} 4679 4680// SetIntents sets the Intents field's value. 4681func (s *CreateBotVersionOutput) SetIntents(v []*Intent) *CreateBotVersionOutput { 4682 s.Intents = v 4683 return s 4684} 4685 4686// SetLastUpdatedDate sets the LastUpdatedDate field's value. 4687func (s *CreateBotVersionOutput) SetLastUpdatedDate(v time.Time) *CreateBotVersionOutput { 4688 s.LastUpdatedDate = &v 4689 return s 4690} 4691 4692// SetLocale sets the Locale field's value. 4693func (s *CreateBotVersionOutput) SetLocale(v string) *CreateBotVersionOutput { 4694 s.Locale = &v 4695 return s 4696} 4697 4698// SetName sets the Name field's value. 4699func (s *CreateBotVersionOutput) SetName(v string) *CreateBotVersionOutput { 4700 s.Name = &v 4701 return s 4702} 4703 4704// SetStatus sets the Status field's value. 4705func (s *CreateBotVersionOutput) SetStatus(v string) *CreateBotVersionOutput { 4706 s.Status = &v 4707 return s 4708} 4709 4710// SetVersion sets the Version field's value. 4711func (s *CreateBotVersionOutput) SetVersion(v string) *CreateBotVersionOutput { 4712 s.Version = &v 4713 return s 4714} 4715 4716// SetVoiceId sets the VoiceId field's value. 4717func (s *CreateBotVersionOutput) SetVoiceId(v string) *CreateBotVersionOutput { 4718 s.VoiceId = &v 4719 return s 4720} 4721 4722// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersionRequest 4723type CreateIntentVersionInput struct { 4724 _ struct{} `type:"structure"` 4725 4726 // Checksum of the $LATEST version of the intent that should be used to create 4727 // the new version. If you specify a checksum and the $LATEST version of the 4728 // intent has a different checksum, Amazon Lex returns a PreconditionFailedException 4729 // exception and doesn't publish a new version. If you don't specify a checksum, 4730 // Amazon Lex publishes the $LATEST version. 4731 Checksum *string `locationName:"checksum" type:"string"` 4732 4733 // The name of the intent that you want to create a new version of. The name 4734 // is case sensitive. 4735 // 4736 // Name is a required field 4737 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 4738} 4739 4740// String returns the string representation 4741func (s CreateIntentVersionInput) String() string { 4742 return awsutil.Prettify(s) 4743} 4744 4745// GoString returns the string representation 4746func (s CreateIntentVersionInput) GoString() string { 4747 return s.String() 4748} 4749 4750// Validate inspects the fields of the type to determine if they are valid. 4751func (s *CreateIntentVersionInput) Validate() error { 4752 invalidParams := request.ErrInvalidParams{Context: "CreateIntentVersionInput"} 4753 if s.Name == nil { 4754 invalidParams.Add(request.NewErrParamRequired("Name")) 4755 } 4756 if s.Name != nil && len(*s.Name) < 1 { 4757 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4758 } 4759 4760 if invalidParams.Len() > 0 { 4761 return invalidParams 4762 } 4763 return nil 4764} 4765 4766// SetChecksum sets the Checksum field's value. 4767func (s *CreateIntentVersionInput) SetChecksum(v string) *CreateIntentVersionInput { 4768 s.Checksum = &v 4769 return s 4770} 4771 4772// SetName sets the Name field's value. 4773func (s *CreateIntentVersionInput) SetName(v string) *CreateIntentVersionInput { 4774 s.Name = &v 4775 return s 4776} 4777 4778// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersionResponse 4779type CreateIntentVersionOutput struct { 4780 _ struct{} `type:"structure"` 4781 4782 // Checksum of the intent version created. 4783 Checksum *string `locationName:"checksum" type:"string"` 4784 4785 // After the Lambda function specified in the fulfillmentActivity field fulfills 4786 // the intent, Amazon Lex conveys this statement to the user. 4787 ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` 4788 4789 // If defined, the prompt that Amazon Lex uses to confirm the user's intent 4790 // before fulfilling it. 4791 ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` 4792 4793 // The date that the intent was created. 4794 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 4795 4796 // A description of the intent. 4797 Description *string `locationName:"description" type:"string"` 4798 4799 // If defined, Amazon Lex invokes this Lambda function for each user input. 4800 DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` 4801 4802 // If defined, Amazon Lex uses this prompt to solicit additional user activity 4803 // after the intent is fulfilled. 4804 FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` 4805 4806 // Describes how the intent is fulfilled. 4807 FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` 4808 4809 // The date that the intent was updated. 4810 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 4811 4812 // The name of the intent. 4813 Name *string `locationName:"name" min:"1" type:"string"` 4814 4815 // A unique identifier for a built-in intent. 4816 ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` 4817 4818 // If the user answers "no" to the question defined in confirmationPrompt, Amazon 4819 // Lex responds with this statement to acknowledge that the intent was canceled. 4820 RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` 4821 4822 // An array of sample utterances configured for the intent. 4823 SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` 4824 4825 // An array of slot types that defines the information required to fulfill the 4826 // intent. 4827 Slots []*Slot `locationName:"slots" type:"list"` 4828 4829 // The version number assigned to the new version of the intent. 4830 Version *string `locationName:"version" min:"1" type:"string"` 4831} 4832 4833// String returns the string representation 4834func (s CreateIntentVersionOutput) String() string { 4835 return awsutil.Prettify(s) 4836} 4837 4838// GoString returns the string representation 4839func (s CreateIntentVersionOutput) GoString() string { 4840 return s.String() 4841} 4842 4843// SetChecksum sets the Checksum field's value. 4844func (s *CreateIntentVersionOutput) SetChecksum(v string) *CreateIntentVersionOutput { 4845 s.Checksum = &v 4846 return s 4847} 4848 4849// SetConclusionStatement sets the ConclusionStatement field's value. 4850func (s *CreateIntentVersionOutput) SetConclusionStatement(v *Statement) *CreateIntentVersionOutput { 4851 s.ConclusionStatement = v 4852 return s 4853} 4854 4855// SetConfirmationPrompt sets the ConfirmationPrompt field's value. 4856func (s *CreateIntentVersionOutput) SetConfirmationPrompt(v *Prompt) *CreateIntentVersionOutput { 4857 s.ConfirmationPrompt = v 4858 return s 4859} 4860 4861// SetCreatedDate sets the CreatedDate field's value. 4862func (s *CreateIntentVersionOutput) SetCreatedDate(v time.Time) *CreateIntentVersionOutput { 4863 s.CreatedDate = &v 4864 return s 4865} 4866 4867// SetDescription sets the Description field's value. 4868func (s *CreateIntentVersionOutput) SetDescription(v string) *CreateIntentVersionOutput { 4869 s.Description = &v 4870 return s 4871} 4872 4873// SetDialogCodeHook sets the DialogCodeHook field's value. 4874func (s *CreateIntentVersionOutput) SetDialogCodeHook(v *CodeHook) *CreateIntentVersionOutput { 4875 s.DialogCodeHook = v 4876 return s 4877} 4878 4879// SetFollowUpPrompt sets the FollowUpPrompt field's value. 4880func (s *CreateIntentVersionOutput) SetFollowUpPrompt(v *FollowUpPrompt) *CreateIntentVersionOutput { 4881 s.FollowUpPrompt = v 4882 return s 4883} 4884 4885// SetFulfillmentActivity sets the FulfillmentActivity field's value. 4886func (s *CreateIntentVersionOutput) SetFulfillmentActivity(v *FulfillmentActivity) *CreateIntentVersionOutput { 4887 s.FulfillmentActivity = v 4888 return s 4889} 4890 4891// SetLastUpdatedDate sets the LastUpdatedDate field's value. 4892func (s *CreateIntentVersionOutput) SetLastUpdatedDate(v time.Time) *CreateIntentVersionOutput { 4893 s.LastUpdatedDate = &v 4894 return s 4895} 4896 4897// SetName sets the Name field's value. 4898func (s *CreateIntentVersionOutput) SetName(v string) *CreateIntentVersionOutput { 4899 s.Name = &v 4900 return s 4901} 4902 4903// SetParentIntentSignature sets the ParentIntentSignature field's value. 4904func (s *CreateIntentVersionOutput) SetParentIntentSignature(v string) *CreateIntentVersionOutput { 4905 s.ParentIntentSignature = &v 4906 return s 4907} 4908 4909// SetRejectionStatement sets the RejectionStatement field's value. 4910func (s *CreateIntentVersionOutput) SetRejectionStatement(v *Statement) *CreateIntentVersionOutput { 4911 s.RejectionStatement = v 4912 return s 4913} 4914 4915// SetSampleUtterances sets the SampleUtterances field's value. 4916func (s *CreateIntentVersionOutput) SetSampleUtterances(v []*string) *CreateIntentVersionOutput { 4917 s.SampleUtterances = v 4918 return s 4919} 4920 4921// SetSlots sets the Slots field's value. 4922func (s *CreateIntentVersionOutput) SetSlots(v []*Slot) *CreateIntentVersionOutput { 4923 s.Slots = v 4924 return s 4925} 4926 4927// SetVersion sets the Version field's value. 4928func (s *CreateIntentVersionOutput) SetVersion(v string) *CreateIntentVersionOutput { 4929 s.Version = &v 4930 return s 4931} 4932 4933// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersionRequest 4934type CreateSlotTypeVersionInput struct { 4935 _ struct{} `type:"structure"` 4936 4937 // Checksum for the $LATEST version of the slot type that you want to publish. 4938 // If you specify a checksum and the $LATEST version of the slot type has a 4939 // different checksum, Amazon Lex returns a PreconditionFailedException exception 4940 // and doesn't publish the new version. If you don't specify a checksum, Amazon 4941 // Lex publishes the $LATEST version. 4942 Checksum *string `locationName:"checksum" type:"string"` 4943 4944 // The name of the slot type that you want to create a new version for. The 4945 // name is case sensitive. 4946 // 4947 // Name is a required field 4948 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 4949} 4950 4951// String returns the string representation 4952func (s CreateSlotTypeVersionInput) String() string { 4953 return awsutil.Prettify(s) 4954} 4955 4956// GoString returns the string representation 4957func (s CreateSlotTypeVersionInput) GoString() string { 4958 return s.String() 4959} 4960 4961// Validate inspects the fields of the type to determine if they are valid. 4962func (s *CreateSlotTypeVersionInput) Validate() error { 4963 invalidParams := request.ErrInvalidParams{Context: "CreateSlotTypeVersionInput"} 4964 if s.Name == nil { 4965 invalidParams.Add(request.NewErrParamRequired("Name")) 4966 } 4967 if s.Name != nil && len(*s.Name) < 1 { 4968 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4969 } 4970 4971 if invalidParams.Len() > 0 { 4972 return invalidParams 4973 } 4974 return nil 4975} 4976 4977// SetChecksum sets the Checksum field's value. 4978func (s *CreateSlotTypeVersionInput) SetChecksum(v string) *CreateSlotTypeVersionInput { 4979 s.Checksum = &v 4980 return s 4981} 4982 4983// SetName sets the Name field's value. 4984func (s *CreateSlotTypeVersionInput) SetName(v string) *CreateSlotTypeVersionInput { 4985 s.Name = &v 4986 return s 4987} 4988 4989// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersionResponse 4990type CreateSlotTypeVersionOutput struct { 4991 _ struct{} `type:"structure"` 4992 4993 // Checksum of the $LATEST version of the slot type. 4994 Checksum *string `locationName:"checksum" type:"string"` 4995 4996 // The date that the slot type was created. 4997 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 4998 4999 // A description of the slot type. 5000 Description *string `locationName:"description" type:"string"` 5001 5002 // A list of EnumerationValue objects that defines the values that the slot 5003 // type can take. 5004 EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` 5005 5006 // The date that the slot type was updated. When you create a resource, the 5007 // creation date and last update date are the same. 5008 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 5009 5010 // The name of the slot type. 5011 Name *string `locationName:"name" min:"1" type:"string"` 5012 5013 // The strategy that Amazon Lex uses to determine the value of the slot. For 5014 // more information, see PutSlotType. 5015 ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` 5016 5017 // The version assigned to the new slot type version. 5018 Version *string `locationName:"version" min:"1" type:"string"` 5019} 5020 5021// String returns the string representation 5022func (s CreateSlotTypeVersionOutput) String() string { 5023 return awsutil.Prettify(s) 5024} 5025 5026// GoString returns the string representation 5027func (s CreateSlotTypeVersionOutput) GoString() string { 5028 return s.String() 5029} 5030 5031// SetChecksum sets the Checksum field's value. 5032func (s *CreateSlotTypeVersionOutput) SetChecksum(v string) *CreateSlotTypeVersionOutput { 5033 s.Checksum = &v 5034 return s 5035} 5036 5037// SetCreatedDate sets the CreatedDate field's value. 5038func (s *CreateSlotTypeVersionOutput) SetCreatedDate(v time.Time) *CreateSlotTypeVersionOutput { 5039 s.CreatedDate = &v 5040 return s 5041} 5042 5043// SetDescription sets the Description field's value. 5044func (s *CreateSlotTypeVersionOutput) SetDescription(v string) *CreateSlotTypeVersionOutput { 5045 s.Description = &v 5046 return s 5047} 5048 5049// SetEnumerationValues sets the EnumerationValues field's value. 5050func (s *CreateSlotTypeVersionOutput) SetEnumerationValues(v []*EnumerationValue) *CreateSlotTypeVersionOutput { 5051 s.EnumerationValues = v 5052 return s 5053} 5054 5055// SetLastUpdatedDate sets the LastUpdatedDate field's value. 5056func (s *CreateSlotTypeVersionOutput) SetLastUpdatedDate(v time.Time) *CreateSlotTypeVersionOutput { 5057 s.LastUpdatedDate = &v 5058 return s 5059} 5060 5061// SetName sets the Name field's value. 5062func (s *CreateSlotTypeVersionOutput) SetName(v string) *CreateSlotTypeVersionOutput { 5063 s.Name = &v 5064 return s 5065} 5066 5067// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. 5068func (s *CreateSlotTypeVersionOutput) SetValueSelectionStrategy(v string) *CreateSlotTypeVersionOutput { 5069 s.ValueSelectionStrategy = &v 5070 return s 5071} 5072 5073// SetVersion sets the Version field's value. 5074func (s *CreateSlotTypeVersionOutput) SetVersion(v string) *CreateSlotTypeVersionOutput { 5075 s.Version = &v 5076 return s 5077} 5078 5079// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAliasRequest 5080type DeleteBotAliasInput struct { 5081 _ struct{} `type:"structure"` 5082 5083 // The name of the bot that the alias points to. 5084 // 5085 // BotName is a required field 5086 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 5087 5088 // The name of the alias to delete. The name is case sensitive. 5089 // 5090 // Name is a required field 5091 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 5092} 5093 5094// String returns the string representation 5095func (s DeleteBotAliasInput) String() string { 5096 return awsutil.Prettify(s) 5097} 5098 5099// GoString returns the string representation 5100func (s DeleteBotAliasInput) GoString() string { 5101 return s.String() 5102} 5103 5104// Validate inspects the fields of the type to determine if they are valid. 5105func (s *DeleteBotAliasInput) Validate() error { 5106 invalidParams := request.ErrInvalidParams{Context: "DeleteBotAliasInput"} 5107 if s.BotName == nil { 5108 invalidParams.Add(request.NewErrParamRequired("BotName")) 5109 } 5110 if s.BotName != nil && len(*s.BotName) < 2 { 5111 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 5112 } 5113 if s.Name == nil { 5114 invalidParams.Add(request.NewErrParamRequired("Name")) 5115 } 5116 if s.Name != nil && len(*s.Name) < 1 { 5117 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5118 } 5119 5120 if invalidParams.Len() > 0 { 5121 return invalidParams 5122 } 5123 return nil 5124} 5125 5126// SetBotName sets the BotName field's value. 5127func (s *DeleteBotAliasInput) SetBotName(v string) *DeleteBotAliasInput { 5128 s.BotName = &v 5129 return s 5130} 5131 5132// SetName sets the Name field's value. 5133func (s *DeleteBotAliasInput) SetName(v string) *DeleteBotAliasInput { 5134 s.Name = &v 5135 return s 5136} 5137 5138// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAliasOutput 5139type DeleteBotAliasOutput struct { 5140 _ struct{} `type:"structure"` 5141} 5142 5143// String returns the string representation 5144func (s DeleteBotAliasOutput) String() string { 5145 return awsutil.Prettify(s) 5146} 5147 5148// GoString returns the string representation 5149func (s DeleteBotAliasOutput) GoString() string { 5150 return s.String() 5151} 5152 5153// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociationRequest 5154type DeleteBotChannelAssociationInput struct { 5155 _ struct{} `type:"structure"` 5156 5157 // An alias that points to the specific version of the Amazon Lex bot to which 5158 // this association is being made. 5159 // 5160 // BotAlias is a required field 5161 BotAlias *string `location:"uri" locationName:"aliasName" min:"1" type:"string" required:"true"` 5162 5163 // The name of the Amazon Lex bot. 5164 // 5165 // BotName is a required field 5166 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 5167 5168 // The name of the association. The name is case sensitive. 5169 // 5170 // Name is a required field 5171 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 5172} 5173 5174// String returns the string representation 5175func (s DeleteBotChannelAssociationInput) String() string { 5176 return awsutil.Prettify(s) 5177} 5178 5179// GoString returns the string representation 5180func (s DeleteBotChannelAssociationInput) GoString() string { 5181 return s.String() 5182} 5183 5184// Validate inspects the fields of the type to determine if they are valid. 5185func (s *DeleteBotChannelAssociationInput) Validate() error { 5186 invalidParams := request.ErrInvalidParams{Context: "DeleteBotChannelAssociationInput"} 5187 if s.BotAlias == nil { 5188 invalidParams.Add(request.NewErrParamRequired("BotAlias")) 5189 } 5190 if s.BotAlias != nil && len(*s.BotAlias) < 1 { 5191 invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1)) 5192 } 5193 if s.BotName == nil { 5194 invalidParams.Add(request.NewErrParamRequired("BotName")) 5195 } 5196 if s.BotName != nil && len(*s.BotName) < 2 { 5197 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 5198 } 5199 if s.Name == nil { 5200 invalidParams.Add(request.NewErrParamRequired("Name")) 5201 } 5202 if s.Name != nil && len(*s.Name) < 1 { 5203 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5204 } 5205 5206 if invalidParams.Len() > 0 { 5207 return invalidParams 5208 } 5209 return nil 5210} 5211 5212// SetBotAlias sets the BotAlias field's value. 5213func (s *DeleteBotChannelAssociationInput) SetBotAlias(v string) *DeleteBotChannelAssociationInput { 5214 s.BotAlias = &v 5215 return s 5216} 5217 5218// SetBotName sets the BotName field's value. 5219func (s *DeleteBotChannelAssociationInput) SetBotName(v string) *DeleteBotChannelAssociationInput { 5220 s.BotName = &v 5221 return s 5222} 5223 5224// SetName sets the Name field's value. 5225func (s *DeleteBotChannelAssociationInput) SetName(v string) *DeleteBotChannelAssociationInput { 5226 s.Name = &v 5227 return s 5228} 5229 5230// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociationOutput 5231type DeleteBotChannelAssociationOutput struct { 5232 _ struct{} `type:"structure"` 5233} 5234 5235// String returns the string representation 5236func (s DeleteBotChannelAssociationOutput) String() string { 5237 return awsutil.Prettify(s) 5238} 5239 5240// GoString returns the string representation 5241func (s DeleteBotChannelAssociationOutput) GoString() string { 5242 return s.String() 5243} 5244 5245// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotRequest 5246type DeleteBotInput struct { 5247 _ struct{} `type:"structure"` 5248 5249 // The name of the bot. The name is case sensitive. 5250 // 5251 // Name is a required field 5252 Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` 5253} 5254 5255// String returns the string representation 5256func (s DeleteBotInput) String() string { 5257 return awsutil.Prettify(s) 5258} 5259 5260// GoString returns the string representation 5261func (s DeleteBotInput) GoString() string { 5262 return s.String() 5263} 5264 5265// Validate inspects the fields of the type to determine if they are valid. 5266func (s *DeleteBotInput) Validate() error { 5267 invalidParams := request.ErrInvalidParams{Context: "DeleteBotInput"} 5268 if s.Name == nil { 5269 invalidParams.Add(request.NewErrParamRequired("Name")) 5270 } 5271 if s.Name != nil && len(*s.Name) < 2 { 5272 invalidParams.Add(request.NewErrParamMinLen("Name", 2)) 5273 } 5274 5275 if invalidParams.Len() > 0 { 5276 return invalidParams 5277 } 5278 return nil 5279} 5280 5281// SetName sets the Name field's value. 5282func (s *DeleteBotInput) SetName(v string) *DeleteBotInput { 5283 s.Name = &v 5284 return s 5285} 5286 5287// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotOutput 5288type DeleteBotOutput struct { 5289 _ struct{} `type:"structure"` 5290} 5291 5292// String returns the string representation 5293func (s DeleteBotOutput) String() string { 5294 return awsutil.Prettify(s) 5295} 5296 5297// GoString returns the string representation 5298func (s DeleteBotOutput) GoString() string { 5299 return s.String() 5300} 5301 5302// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersionRequest 5303type DeleteBotVersionInput struct { 5304 _ struct{} `type:"structure"` 5305 5306 // The name of the bot. 5307 // 5308 // Name is a required field 5309 Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` 5310 5311 // The version of the bot to delete. You cannot delete the $LATEST version of 5312 // the bot. To delete the $LATEST version, use the DeleteBot operation. 5313 // 5314 // Version is a required field 5315 Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` 5316} 5317 5318// String returns the string representation 5319func (s DeleteBotVersionInput) String() string { 5320 return awsutil.Prettify(s) 5321} 5322 5323// GoString returns the string representation 5324func (s DeleteBotVersionInput) GoString() string { 5325 return s.String() 5326} 5327 5328// Validate inspects the fields of the type to determine if they are valid. 5329func (s *DeleteBotVersionInput) Validate() error { 5330 invalidParams := request.ErrInvalidParams{Context: "DeleteBotVersionInput"} 5331 if s.Name == nil { 5332 invalidParams.Add(request.NewErrParamRequired("Name")) 5333 } 5334 if s.Name != nil && len(*s.Name) < 2 { 5335 invalidParams.Add(request.NewErrParamMinLen("Name", 2)) 5336 } 5337 if s.Version == nil { 5338 invalidParams.Add(request.NewErrParamRequired("Version")) 5339 } 5340 if s.Version != nil && len(*s.Version) < 1 { 5341 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 5342 } 5343 5344 if invalidParams.Len() > 0 { 5345 return invalidParams 5346 } 5347 return nil 5348} 5349 5350// SetName sets the Name field's value. 5351func (s *DeleteBotVersionInput) SetName(v string) *DeleteBotVersionInput { 5352 s.Name = &v 5353 return s 5354} 5355 5356// SetVersion sets the Version field's value. 5357func (s *DeleteBotVersionInput) SetVersion(v string) *DeleteBotVersionInput { 5358 s.Version = &v 5359 return s 5360} 5361 5362// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersionOutput 5363type DeleteBotVersionOutput struct { 5364 _ struct{} `type:"structure"` 5365} 5366 5367// String returns the string representation 5368func (s DeleteBotVersionOutput) String() string { 5369 return awsutil.Prettify(s) 5370} 5371 5372// GoString returns the string representation 5373func (s DeleteBotVersionOutput) GoString() string { 5374 return s.String() 5375} 5376 5377// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentRequest 5378type DeleteIntentInput struct { 5379 _ struct{} `type:"structure"` 5380 5381 // The name of the intent. The name is case sensitive. 5382 // 5383 // Name is a required field 5384 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 5385} 5386 5387// String returns the string representation 5388func (s DeleteIntentInput) String() string { 5389 return awsutil.Prettify(s) 5390} 5391 5392// GoString returns the string representation 5393func (s DeleteIntentInput) GoString() string { 5394 return s.String() 5395} 5396 5397// Validate inspects the fields of the type to determine if they are valid. 5398func (s *DeleteIntentInput) Validate() error { 5399 invalidParams := request.ErrInvalidParams{Context: "DeleteIntentInput"} 5400 if s.Name == nil { 5401 invalidParams.Add(request.NewErrParamRequired("Name")) 5402 } 5403 if s.Name != nil && len(*s.Name) < 1 { 5404 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5405 } 5406 5407 if invalidParams.Len() > 0 { 5408 return invalidParams 5409 } 5410 return nil 5411} 5412 5413// SetName sets the Name field's value. 5414func (s *DeleteIntentInput) SetName(v string) *DeleteIntentInput { 5415 s.Name = &v 5416 return s 5417} 5418 5419// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentOutput 5420type DeleteIntentOutput struct { 5421 _ struct{} `type:"structure"` 5422} 5423 5424// String returns the string representation 5425func (s DeleteIntentOutput) String() string { 5426 return awsutil.Prettify(s) 5427} 5428 5429// GoString returns the string representation 5430func (s DeleteIntentOutput) GoString() string { 5431 return s.String() 5432} 5433 5434// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersionRequest 5435type DeleteIntentVersionInput struct { 5436 _ struct{} `type:"structure"` 5437 5438 // The name of the intent. 5439 // 5440 // Name is a required field 5441 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 5442 5443 // The version of the intent to delete. You cannot delete the $LATEST version 5444 // of the intent. To delete the $LATEST version, use the DeleteIntent operation. 5445 // 5446 // Version is a required field 5447 Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` 5448} 5449 5450// String returns the string representation 5451func (s DeleteIntentVersionInput) String() string { 5452 return awsutil.Prettify(s) 5453} 5454 5455// GoString returns the string representation 5456func (s DeleteIntentVersionInput) GoString() string { 5457 return s.String() 5458} 5459 5460// Validate inspects the fields of the type to determine if they are valid. 5461func (s *DeleteIntentVersionInput) Validate() error { 5462 invalidParams := request.ErrInvalidParams{Context: "DeleteIntentVersionInput"} 5463 if s.Name == nil { 5464 invalidParams.Add(request.NewErrParamRequired("Name")) 5465 } 5466 if s.Name != nil && len(*s.Name) < 1 { 5467 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5468 } 5469 if s.Version == nil { 5470 invalidParams.Add(request.NewErrParamRequired("Version")) 5471 } 5472 if s.Version != nil && len(*s.Version) < 1 { 5473 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 5474 } 5475 5476 if invalidParams.Len() > 0 { 5477 return invalidParams 5478 } 5479 return nil 5480} 5481 5482// SetName sets the Name field's value. 5483func (s *DeleteIntentVersionInput) SetName(v string) *DeleteIntentVersionInput { 5484 s.Name = &v 5485 return s 5486} 5487 5488// SetVersion sets the Version field's value. 5489func (s *DeleteIntentVersionInput) SetVersion(v string) *DeleteIntentVersionInput { 5490 s.Version = &v 5491 return s 5492} 5493 5494// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersionOutput 5495type DeleteIntentVersionOutput struct { 5496 _ struct{} `type:"structure"` 5497} 5498 5499// String returns the string representation 5500func (s DeleteIntentVersionOutput) String() string { 5501 return awsutil.Prettify(s) 5502} 5503 5504// GoString returns the string representation 5505func (s DeleteIntentVersionOutput) GoString() string { 5506 return s.String() 5507} 5508 5509// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeRequest 5510type DeleteSlotTypeInput struct { 5511 _ struct{} `type:"structure"` 5512 5513 // The name of the slot type. The name is case sensitive. 5514 // 5515 // Name is a required field 5516 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 5517} 5518 5519// String returns the string representation 5520func (s DeleteSlotTypeInput) String() string { 5521 return awsutil.Prettify(s) 5522} 5523 5524// GoString returns the string representation 5525func (s DeleteSlotTypeInput) GoString() string { 5526 return s.String() 5527} 5528 5529// Validate inspects the fields of the type to determine if they are valid. 5530func (s *DeleteSlotTypeInput) Validate() error { 5531 invalidParams := request.ErrInvalidParams{Context: "DeleteSlotTypeInput"} 5532 if s.Name == nil { 5533 invalidParams.Add(request.NewErrParamRequired("Name")) 5534 } 5535 if s.Name != nil && len(*s.Name) < 1 { 5536 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5537 } 5538 5539 if invalidParams.Len() > 0 { 5540 return invalidParams 5541 } 5542 return nil 5543} 5544 5545// SetName sets the Name field's value. 5546func (s *DeleteSlotTypeInput) SetName(v string) *DeleteSlotTypeInput { 5547 s.Name = &v 5548 return s 5549} 5550 5551// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeOutput 5552type DeleteSlotTypeOutput struct { 5553 _ struct{} `type:"structure"` 5554} 5555 5556// String returns the string representation 5557func (s DeleteSlotTypeOutput) String() string { 5558 return awsutil.Prettify(s) 5559} 5560 5561// GoString returns the string representation 5562func (s DeleteSlotTypeOutput) GoString() string { 5563 return s.String() 5564} 5565 5566// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersionRequest 5567type DeleteSlotTypeVersionInput struct { 5568 _ struct{} `type:"structure"` 5569 5570 // The name of the slot type. 5571 // 5572 // Name is a required field 5573 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 5574 5575 // The version of the slot type to delete. You cannot delete the $LATEST version 5576 // of the slot type. To delete the $LATEST version, use the DeleteSlotType operation. 5577 // 5578 // Version is a required field 5579 Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` 5580} 5581 5582// String returns the string representation 5583func (s DeleteSlotTypeVersionInput) String() string { 5584 return awsutil.Prettify(s) 5585} 5586 5587// GoString returns the string representation 5588func (s DeleteSlotTypeVersionInput) GoString() string { 5589 return s.String() 5590} 5591 5592// Validate inspects the fields of the type to determine if they are valid. 5593func (s *DeleteSlotTypeVersionInput) Validate() error { 5594 invalidParams := request.ErrInvalidParams{Context: "DeleteSlotTypeVersionInput"} 5595 if s.Name == nil { 5596 invalidParams.Add(request.NewErrParamRequired("Name")) 5597 } 5598 if s.Name != nil && len(*s.Name) < 1 { 5599 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5600 } 5601 if s.Version == nil { 5602 invalidParams.Add(request.NewErrParamRequired("Version")) 5603 } 5604 if s.Version != nil && len(*s.Version) < 1 { 5605 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 5606 } 5607 5608 if invalidParams.Len() > 0 { 5609 return invalidParams 5610 } 5611 return nil 5612} 5613 5614// SetName sets the Name field's value. 5615func (s *DeleteSlotTypeVersionInput) SetName(v string) *DeleteSlotTypeVersionInput { 5616 s.Name = &v 5617 return s 5618} 5619 5620// SetVersion sets the Version field's value. 5621func (s *DeleteSlotTypeVersionInput) SetVersion(v string) *DeleteSlotTypeVersionInput { 5622 s.Version = &v 5623 return s 5624} 5625 5626// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersionOutput 5627type DeleteSlotTypeVersionOutput struct { 5628 _ struct{} `type:"structure"` 5629} 5630 5631// String returns the string representation 5632func (s DeleteSlotTypeVersionOutput) String() string { 5633 return awsutil.Prettify(s) 5634} 5635 5636// GoString returns the string representation 5637func (s DeleteSlotTypeVersionOutput) GoString() string { 5638 return s.String() 5639} 5640 5641// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterancesRequest 5642type DeleteUtterancesInput struct { 5643 _ struct{} `type:"structure"` 5644 5645 // The name of the bot that stored the utterances. 5646 // 5647 // BotName is a required field 5648 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 5649 5650 // The unique identifier for the user that made the utterances. This is the 5651 // user ID that was sent in the PostContent (http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html) 5652 // or PostText (http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html) 5653 // operation request that contained the utterance. 5654 // 5655 // UserId is a required field 5656 UserId *string `location:"uri" locationName:"userId" min:"2" type:"string" required:"true"` 5657} 5658 5659// String returns the string representation 5660func (s DeleteUtterancesInput) String() string { 5661 return awsutil.Prettify(s) 5662} 5663 5664// GoString returns the string representation 5665func (s DeleteUtterancesInput) GoString() string { 5666 return s.String() 5667} 5668 5669// Validate inspects the fields of the type to determine if they are valid. 5670func (s *DeleteUtterancesInput) Validate() error { 5671 invalidParams := request.ErrInvalidParams{Context: "DeleteUtterancesInput"} 5672 if s.BotName == nil { 5673 invalidParams.Add(request.NewErrParamRequired("BotName")) 5674 } 5675 if s.BotName != nil && len(*s.BotName) < 2 { 5676 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 5677 } 5678 if s.UserId == nil { 5679 invalidParams.Add(request.NewErrParamRequired("UserId")) 5680 } 5681 if s.UserId != nil && len(*s.UserId) < 2 { 5682 invalidParams.Add(request.NewErrParamMinLen("UserId", 2)) 5683 } 5684 5685 if invalidParams.Len() > 0 { 5686 return invalidParams 5687 } 5688 return nil 5689} 5690 5691// SetBotName sets the BotName field's value. 5692func (s *DeleteUtterancesInput) SetBotName(v string) *DeleteUtterancesInput { 5693 s.BotName = &v 5694 return s 5695} 5696 5697// SetUserId sets the UserId field's value. 5698func (s *DeleteUtterancesInput) SetUserId(v string) *DeleteUtterancesInput { 5699 s.UserId = &v 5700 return s 5701} 5702 5703// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterancesOutput 5704type DeleteUtterancesOutput struct { 5705 _ struct{} `type:"structure"` 5706} 5707 5708// String returns the string representation 5709func (s DeleteUtterancesOutput) String() string { 5710 return awsutil.Prettify(s) 5711} 5712 5713// GoString returns the string representation 5714func (s DeleteUtterancesOutput) GoString() string { 5715 return s.String() 5716} 5717 5718// Each slot type can have a set of values. Each enumeration value represents 5719// a value the slot type can take. 5720// 5721// For example, a pizza ordering bot could have a slot type that specifies the 5722// type of crust that the pizza should have. The slot type could include the 5723// values 5724// 5725// * thick 5726// 5727// * thin 5728// 5729// * stuffed 5730// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/EnumerationValue 5731type EnumerationValue struct { 5732 _ struct{} `type:"structure"` 5733 5734 // Additional values related to the slot type value. 5735 Synonyms []*string `locationName:"synonyms" type:"list"` 5736 5737 // The value of the slot type. 5738 // 5739 // Value is a required field 5740 Value *string `locationName:"value" min:"1" type:"string" required:"true"` 5741} 5742 5743// String returns the string representation 5744func (s EnumerationValue) String() string { 5745 return awsutil.Prettify(s) 5746} 5747 5748// GoString returns the string representation 5749func (s EnumerationValue) GoString() string { 5750 return s.String() 5751} 5752 5753// Validate inspects the fields of the type to determine if they are valid. 5754func (s *EnumerationValue) Validate() error { 5755 invalidParams := request.ErrInvalidParams{Context: "EnumerationValue"} 5756 if s.Value == nil { 5757 invalidParams.Add(request.NewErrParamRequired("Value")) 5758 } 5759 if s.Value != nil && len(*s.Value) < 1 { 5760 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 5761 } 5762 5763 if invalidParams.Len() > 0 { 5764 return invalidParams 5765 } 5766 return nil 5767} 5768 5769// SetSynonyms sets the Synonyms field's value. 5770func (s *EnumerationValue) SetSynonyms(v []*string) *EnumerationValue { 5771 s.Synonyms = v 5772 return s 5773} 5774 5775// SetValue sets the Value field's value. 5776func (s *EnumerationValue) SetValue(v string) *EnumerationValue { 5777 s.Value = &v 5778 return s 5779} 5780 5781// A prompt for additional activity after an intent is fulfilled. For example, 5782// after the OrderPizza intent is fulfilled, you might prompt the user to find 5783// out whether the user wants to order drinks. 5784// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/FollowUpPrompt 5785type FollowUpPrompt struct { 5786 _ struct{} `type:"structure"` 5787 5788 // Prompts for information from the user. 5789 // 5790 // Prompt is a required field 5791 Prompt *Prompt `locationName:"prompt" type:"structure" required:"true"` 5792 5793 // If the user answers "no" to the question defined in the prompt field, Amazon 5794 // Lex responds with this statement to acknowledge that the intent was canceled. 5795 // 5796 // RejectionStatement is a required field 5797 RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure" required:"true"` 5798} 5799 5800// String returns the string representation 5801func (s FollowUpPrompt) String() string { 5802 return awsutil.Prettify(s) 5803} 5804 5805// GoString returns the string representation 5806func (s FollowUpPrompt) GoString() string { 5807 return s.String() 5808} 5809 5810// Validate inspects the fields of the type to determine if they are valid. 5811func (s *FollowUpPrompt) Validate() error { 5812 invalidParams := request.ErrInvalidParams{Context: "FollowUpPrompt"} 5813 if s.Prompt == nil { 5814 invalidParams.Add(request.NewErrParamRequired("Prompt")) 5815 } 5816 if s.RejectionStatement == nil { 5817 invalidParams.Add(request.NewErrParamRequired("RejectionStatement")) 5818 } 5819 if s.Prompt != nil { 5820 if err := s.Prompt.Validate(); err != nil { 5821 invalidParams.AddNested("Prompt", err.(request.ErrInvalidParams)) 5822 } 5823 } 5824 if s.RejectionStatement != nil { 5825 if err := s.RejectionStatement.Validate(); err != nil { 5826 invalidParams.AddNested("RejectionStatement", err.(request.ErrInvalidParams)) 5827 } 5828 } 5829 5830 if invalidParams.Len() > 0 { 5831 return invalidParams 5832 } 5833 return nil 5834} 5835 5836// SetPrompt sets the Prompt field's value. 5837func (s *FollowUpPrompt) SetPrompt(v *Prompt) *FollowUpPrompt { 5838 s.Prompt = v 5839 return s 5840} 5841 5842// SetRejectionStatement sets the RejectionStatement field's value. 5843func (s *FollowUpPrompt) SetRejectionStatement(v *Statement) *FollowUpPrompt { 5844 s.RejectionStatement = v 5845 return s 5846} 5847 5848// Describes how the intent is fulfilled after the user provides all of the 5849// information required for the intent. You can provide a Lambda function to 5850// process the intent, or you can return the intent information to the client 5851// application. We recommend that you use a Lambda function so that the relevant 5852// logic lives in the Cloud and limit the client-side code primarily to presentation. 5853// If you need to update the logic, you only update the Lambda function; you 5854// don't need to upgrade your client application. 5855// 5856// Consider the following examples: 5857// 5858// * In a pizza ordering application, after the user provides all of the 5859// information for placing an order, you use a Lambda function to place an 5860// order with a pizzeria. 5861// 5862// * In a gaming application, when a user says "pick up a rock," this information 5863// must go back to the client application so that it can perform the operation 5864// and update the graphics. In this case, you want Amazon Lex to return the 5865// intent data to the client. 5866// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/FulfillmentActivity 5867type FulfillmentActivity struct { 5868 _ struct{} `type:"structure"` 5869 5870 // A description of the Lambda function that is run to fulfill the intent. 5871 CodeHook *CodeHook `locationName:"codeHook" type:"structure"` 5872 5873 // How the intent should be fulfilled, either by running a Lambda function or 5874 // by returning the slot data to the client application. 5875 // 5876 // Type is a required field 5877 Type *string `locationName:"type" type:"string" required:"true" enum:"FulfillmentActivityType"` 5878} 5879 5880// String returns the string representation 5881func (s FulfillmentActivity) String() string { 5882 return awsutil.Prettify(s) 5883} 5884 5885// GoString returns the string representation 5886func (s FulfillmentActivity) GoString() string { 5887 return s.String() 5888} 5889 5890// Validate inspects the fields of the type to determine if they are valid. 5891func (s *FulfillmentActivity) Validate() error { 5892 invalidParams := request.ErrInvalidParams{Context: "FulfillmentActivity"} 5893 if s.Type == nil { 5894 invalidParams.Add(request.NewErrParamRequired("Type")) 5895 } 5896 if s.CodeHook != nil { 5897 if err := s.CodeHook.Validate(); err != nil { 5898 invalidParams.AddNested("CodeHook", err.(request.ErrInvalidParams)) 5899 } 5900 } 5901 5902 if invalidParams.Len() > 0 { 5903 return invalidParams 5904 } 5905 return nil 5906} 5907 5908// SetCodeHook sets the CodeHook field's value. 5909func (s *FulfillmentActivity) SetCodeHook(v *CodeHook) *FulfillmentActivity { 5910 s.CodeHook = v 5911 return s 5912} 5913 5914// SetType sets the Type field's value. 5915func (s *FulfillmentActivity) SetType(v string) *FulfillmentActivity { 5916 s.Type = &v 5917 return s 5918} 5919 5920// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasRequest 5921type GetBotAliasInput struct { 5922 _ struct{} `type:"structure"` 5923 5924 // The name of the bot. 5925 // 5926 // BotName is a required field 5927 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 5928 5929 // The name of the bot alias. The name is case sensitive. 5930 // 5931 // Name is a required field 5932 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 5933} 5934 5935// String returns the string representation 5936func (s GetBotAliasInput) String() string { 5937 return awsutil.Prettify(s) 5938} 5939 5940// GoString returns the string representation 5941func (s GetBotAliasInput) GoString() string { 5942 return s.String() 5943} 5944 5945// Validate inspects the fields of the type to determine if they are valid. 5946func (s *GetBotAliasInput) Validate() error { 5947 invalidParams := request.ErrInvalidParams{Context: "GetBotAliasInput"} 5948 if s.BotName == nil { 5949 invalidParams.Add(request.NewErrParamRequired("BotName")) 5950 } 5951 if s.BotName != nil && len(*s.BotName) < 2 { 5952 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 5953 } 5954 if s.Name == nil { 5955 invalidParams.Add(request.NewErrParamRequired("Name")) 5956 } 5957 if s.Name != nil && len(*s.Name) < 1 { 5958 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5959 } 5960 5961 if invalidParams.Len() > 0 { 5962 return invalidParams 5963 } 5964 return nil 5965} 5966 5967// SetBotName sets the BotName field's value. 5968func (s *GetBotAliasInput) SetBotName(v string) *GetBotAliasInput { 5969 s.BotName = &v 5970 return s 5971} 5972 5973// SetName sets the Name field's value. 5974func (s *GetBotAliasInput) SetName(v string) *GetBotAliasInput { 5975 s.Name = &v 5976 return s 5977} 5978 5979// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasResponse 5980type GetBotAliasOutput struct { 5981 _ struct{} `type:"structure"` 5982 5983 // The name of the bot that the alias points to. 5984 BotName *string `locationName:"botName" min:"2" type:"string"` 5985 5986 // The version of the bot that the alias points to. 5987 BotVersion *string `locationName:"botVersion" min:"1" type:"string"` 5988 5989 // Checksum of the bot alias. 5990 Checksum *string `locationName:"checksum" type:"string"` 5991 5992 // The date that the bot alias was created. 5993 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 5994 5995 // A description of the bot alias. 5996 Description *string `locationName:"description" type:"string"` 5997 5998 // The date that the bot alias was updated. When you create a resource, the 5999 // creation date and the last updated date are the same. 6000 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 6001 6002 // The name of the bot alias. 6003 Name *string `locationName:"name" min:"1" type:"string"` 6004} 6005 6006// String returns the string representation 6007func (s GetBotAliasOutput) String() string { 6008 return awsutil.Prettify(s) 6009} 6010 6011// GoString returns the string representation 6012func (s GetBotAliasOutput) GoString() string { 6013 return s.String() 6014} 6015 6016// SetBotName sets the BotName field's value. 6017func (s *GetBotAliasOutput) SetBotName(v string) *GetBotAliasOutput { 6018 s.BotName = &v 6019 return s 6020} 6021 6022// SetBotVersion sets the BotVersion field's value. 6023func (s *GetBotAliasOutput) SetBotVersion(v string) *GetBotAliasOutput { 6024 s.BotVersion = &v 6025 return s 6026} 6027 6028// SetChecksum sets the Checksum field's value. 6029func (s *GetBotAliasOutput) SetChecksum(v string) *GetBotAliasOutput { 6030 s.Checksum = &v 6031 return s 6032} 6033 6034// SetCreatedDate sets the CreatedDate field's value. 6035func (s *GetBotAliasOutput) SetCreatedDate(v time.Time) *GetBotAliasOutput { 6036 s.CreatedDate = &v 6037 return s 6038} 6039 6040// SetDescription sets the Description field's value. 6041func (s *GetBotAliasOutput) SetDescription(v string) *GetBotAliasOutput { 6042 s.Description = &v 6043 return s 6044} 6045 6046// SetLastUpdatedDate sets the LastUpdatedDate field's value. 6047func (s *GetBotAliasOutput) SetLastUpdatedDate(v time.Time) *GetBotAliasOutput { 6048 s.LastUpdatedDate = &v 6049 return s 6050} 6051 6052// SetName sets the Name field's value. 6053func (s *GetBotAliasOutput) SetName(v string) *GetBotAliasOutput { 6054 s.Name = &v 6055 return s 6056} 6057 6058// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasesRequest 6059type GetBotAliasesInput struct { 6060 _ struct{} `type:"structure"` 6061 6062 // The name of the bot. 6063 // 6064 // BotName is a required field 6065 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 6066 6067 // The maximum number of aliases to return in the response. The default is 50. 6068 // . 6069 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 6070 6071 // Substring to match in bot alias names. An alias will be returned if any part 6072 // of its name matches the substring. For example, "xyz" matches both "xyzabc" 6073 // and "abcxyz." 6074 NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` 6075 6076 // A pagination token for fetching the next page of aliases. If the response 6077 // to this call is truncated, Amazon Lex returns a pagination token in the response. 6078 // To fetch the next page of aliases, specify the pagination token in the next 6079 // request. 6080 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6081} 6082 6083// String returns the string representation 6084func (s GetBotAliasesInput) String() string { 6085 return awsutil.Prettify(s) 6086} 6087 6088// GoString returns the string representation 6089func (s GetBotAliasesInput) GoString() string { 6090 return s.String() 6091} 6092 6093// Validate inspects the fields of the type to determine if they are valid. 6094func (s *GetBotAliasesInput) Validate() error { 6095 invalidParams := request.ErrInvalidParams{Context: "GetBotAliasesInput"} 6096 if s.BotName == nil { 6097 invalidParams.Add(request.NewErrParamRequired("BotName")) 6098 } 6099 if s.BotName != nil && len(*s.BotName) < 2 { 6100 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 6101 } 6102 if s.MaxResults != nil && *s.MaxResults < 1 { 6103 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6104 } 6105 if s.NameContains != nil && len(*s.NameContains) < 1 { 6106 invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) 6107 } 6108 6109 if invalidParams.Len() > 0 { 6110 return invalidParams 6111 } 6112 return nil 6113} 6114 6115// SetBotName sets the BotName field's value. 6116func (s *GetBotAliasesInput) SetBotName(v string) *GetBotAliasesInput { 6117 s.BotName = &v 6118 return s 6119} 6120 6121// SetMaxResults sets the MaxResults field's value. 6122func (s *GetBotAliasesInput) SetMaxResults(v int64) *GetBotAliasesInput { 6123 s.MaxResults = &v 6124 return s 6125} 6126 6127// SetNameContains sets the NameContains field's value. 6128func (s *GetBotAliasesInput) SetNameContains(v string) *GetBotAliasesInput { 6129 s.NameContains = &v 6130 return s 6131} 6132 6133// SetNextToken sets the NextToken field's value. 6134func (s *GetBotAliasesInput) SetNextToken(v string) *GetBotAliasesInput { 6135 s.NextToken = &v 6136 return s 6137} 6138 6139// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasesResponse 6140type GetBotAliasesOutput struct { 6141 _ struct{} `type:"structure"` 6142 6143 // An array of BotAliasMetadata objects, each describing a bot alias. 6144 BotAliases []*BotAliasMetadata `type:"list"` 6145 6146 // A pagination token for fetching next page of aliases. If the response to 6147 // this call is truncated, Amazon Lex returns a pagination token in the response. 6148 // To fetch the next page of aliases, specify the pagination token in the next 6149 // request. 6150 NextToken *string `locationName:"nextToken" type:"string"` 6151} 6152 6153// String returns the string representation 6154func (s GetBotAliasesOutput) String() string { 6155 return awsutil.Prettify(s) 6156} 6157 6158// GoString returns the string representation 6159func (s GetBotAliasesOutput) GoString() string { 6160 return s.String() 6161} 6162 6163// SetBotAliases sets the BotAliases field's value. 6164func (s *GetBotAliasesOutput) SetBotAliases(v []*BotAliasMetadata) *GetBotAliasesOutput { 6165 s.BotAliases = v 6166 return s 6167} 6168 6169// SetNextToken sets the NextToken field's value. 6170func (s *GetBotAliasesOutput) SetNextToken(v string) *GetBotAliasesOutput { 6171 s.NextToken = &v 6172 return s 6173} 6174 6175// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationRequest 6176type GetBotChannelAssociationInput struct { 6177 _ struct{} `type:"structure"` 6178 6179 // An alias pointing to the specific version of the Amazon Lex bot to which 6180 // this association is being made. 6181 // 6182 // BotAlias is a required field 6183 BotAlias *string `location:"uri" locationName:"aliasName" min:"1" type:"string" required:"true"` 6184 6185 // The name of the Amazon Lex bot. 6186 // 6187 // BotName is a required field 6188 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 6189 6190 // The name of the association between the bot and the channel. The name is 6191 // case sensitive. 6192 // 6193 // Name is a required field 6194 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 6195} 6196 6197// String returns the string representation 6198func (s GetBotChannelAssociationInput) String() string { 6199 return awsutil.Prettify(s) 6200} 6201 6202// GoString returns the string representation 6203func (s GetBotChannelAssociationInput) GoString() string { 6204 return s.String() 6205} 6206 6207// Validate inspects the fields of the type to determine if they are valid. 6208func (s *GetBotChannelAssociationInput) Validate() error { 6209 invalidParams := request.ErrInvalidParams{Context: "GetBotChannelAssociationInput"} 6210 if s.BotAlias == nil { 6211 invalidParams.Add(request.NewErrParamRequired("BotAlias")) 6212 } 6213 if s.BotAlias != nil && len(*s.BotAlias) < 1 { 6214 invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1)) 6215 } 6216 if s.BotName == nil { 6217 invalidParams.Add(request.NewErrParamRequired("BotName")) 6218 } 6219 if s.BotName != nil && len(*s.BotName) < 2 { 6220 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 6221 } 6222 if s.Name == nil { 6223 invalidParams.Add(request.NewErrParamRequired("Name")) 6224 } 6225 if s.Name != nil && len(*s.Name) < 1 { 6226 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 6227 } 6228 6229 if invalidParams.Len() > 0 { 6230 return invalidParams 6231 } 6232 return nil 6233} 6234 6235// SetBotAlias sets the BotAlias field's value. 6236func (s *GetBotChannelAssociationInput) SetBotAlias(v string) *GetBotChannelAssociationInput { 6237 s.BotAlias = &v 6238 return s 6239} 6240 6241// SetBotName sets the BotName field's value. 6242func (s *GetBotChannelAssociationInput) SetBotName(v string) *GetBotChannelAssociationInput { 6243 s.BotName = &v 6244 return s 6245} 6246 6247// SetName sets the Name field's value. 6248func (s *GetBotChannelAssociationInput) SetName(v string) *GetBotChannelAssociationInput { 6249 s.Name = &v 6250 return s 6251} 6252 6253// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationResponse 6254type GetBotChannelAssociationOutput struct { 6255 _ struct{} `type:"structure"` 6256 6257 // An alias pointing to the specific version of the Amazon Lex bot to which 6258 // this association is being made. 6259 BotAlias *string `locationName:"botAlias" min:"1" type:"string"` 6260 6261 // Provides information that the messaging platform needs to communicate with 6262 // the Amazon Lex bot. 6263 BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map"` 6264 6265 // The name of the Amazon Lex bot. 6266 BotName *string `locationName:"botName" min:"2" type:"string"` 6267 6268 // The date that the association between the bot and the channel was created. 6269 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 6270 6271 // A description of the association between the bot and the channel. 6272 Description *string `locationName:"description" type:"string"` 6273 6274 // If status is FAILED, Amazon Lex provides the reason that it failed to create 6275 // the association. 6276 FailureReason *string `locationName:"failureReason" type:"string"` 6277 6278 // The name of the association between the bot and the channel. 6279 Name *string `locationName:"name" min:"1" type:"string"` 6280 6281 // The status of the bot channel. 6282 // 6283 // * CREATED - The channel has been created and is ready for use. 6284 // 6285 // * IN_PROGRESS - Channel creation is in progress. 6286 // 6287 // * FAILED - There was an error creating the channel. For information about 6288 // the reason for the failure, see the failureReason field. 6289 Status *string `locationName:"status" type:"string" enum:"ChannelStatus"` 6290 6291 // The type of the messaging platform. 6292 Type *string `locationName:"type" type:"string" enum:"ChannelType"` 6293} 6294 6295// String returns the string representation 6296func (s GetBotChannelAssociationOutput) String() string { 6297 return awsutil.Prettify(s) 6298} 6299 6300// GoString returns the string representation 6301func (s GetBotChannelAssociationOutput) GoString() string { 6302 return s.String() 6303} 6304 6305// SetBotAlias sets the BotAlias field's value. 6306func (s *GetBotChannelAssociationOutput) SetBotAlias(v string) *GetBotChannelAssociationOutput { 6307 s.BotAlias = &v 6308 return s 6309} 6310 6311// SetBotConfiguration sets the BotConfiguration field's value. 6312func (s *GetBotChannelAssociationOutput) SetBotConfiguration(v map[string]*string) *GetBotChannelAssociationOutput { 6313 s.BotConfiguration = v 6314 return s 6315} 6316 6317// SetBotName sets the BotName field's value. 6318func (s *GetBotChannelAssociationOutput) SetBotName(v string) *GetBotChannelAssociationOutput { 6319 s.BotName = &v 6320 return s 6321} 6322 6323// SetCreatedDate sets the CreatedDate field's value. 6324func (s *GetBotChannelAssociationOutput) SetCreatedDate(v time.Time) *GetBotChannelAssociationOutput { 6325 s.CreatedDate = &v 6326 return s 6327} 6328 6329// SetDescription sets the Description field's value. 6330func (s *GetBotChannelAssociationOutput) SetDescription(v string) *GetBotChannelAssociationOutput { 6331 s.Description = &v 6332 return s 6333} 6334 6335// SetFailureReason sets the FailureReason field's value. 6336func (s *GetBotChannelAssociationOutput) SetFailureReason(v string) *GetBotChannelAssociationOutput { 6337 s.FailureReason = &v 6338 return s 6339} 6340 6341// SetName sets the Name field's value. 6342func (s *GetBotChannelAssociationOutput) SetName(v string) *GetBotChannelAssociationOutput { 6343 s.Name = &v 6344 return s 6345} 6346 6347// SetStatus sets the Status field's value. 6348func (s *GetBotChannelAssociationOutput) SetStatus(v string) *GetBotChannelAssociationOutput { 6349 s.Status = &v 6350 return s 6351} 6352 6353// SetType sets the Type field's value. 6354func (s *GetBotChannelAssociationOutput) SetType(v string) *GetBotChannelAssociationOutput { 6355 s.Type = &v 6356 return s 6357} 6358 6359// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationsRequest 6360type GetBotChannelAssociationsInput struct { 6361 _ struct{} `type:"structure"` 6362 6363 // An alias pointing to the specific version of the Amazon Lex bot to which 6364 // this association is being made. 6365 // 6366 // BotAlias is a required field 6367 BotAlias *string `location:"uri" locationName:"aliasName" min:"1" type:"string" required:"true"` 6368 6369 // The name of the Amazon Lex bot in the association. 6370 // 6371 // BotName is a required field 6372 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 6373 6374 // The maximum number of associations to return in the response. The default 6375 // is 50. 6376 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 6377 6378 // Substring to match in channel association names. An association will be returned 6379 // if any part of its name matches the substring. For example, "xyz" matches 6380 // both "xyzabc" and "abcxyz." To return all bot channel associations, use a 6381 // hyphen ("-") as the nameContains parameter. 6382 NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` 6383 6384 // A pagination token for fetching the next page of associations. If the response 6385 // to this call is truncated, Amazon Lex returns a pagination token in the response. 6386 // To fetch the next page of associations, specify the pagination token in the 6387 // next request. 6388 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6389} 6390 6391// String returns the string representation 6392func (s GetBotChannelAssociationsInput) String() string { 6393 return awsutil.Prettify(s) 6394} 6395 6396// GoString returns the string representation 6397func (s GetBotChannelAssociationsInput) GoString() string { 6398 return s.String() 6399} 6400 6401// Validate inspects the fields of the type to determine if they are valid. 6402func (s *GetBotChannelAssociationsInput) Validate() error { 6403 invalidParams := request.ErrInvalidParams{Context: "GetBotChannelAssociationsInput"} 6404 if s.BotAlias == nil { 6405 invalidParams.Add(request.NewErrParamRequired("BotAlias")) 6406 } 6407 if s.BotAlias != nil && len(*s.BotAlias) < 1 { 6408 invalidParams.Add(request.NewErrParamMinLen("BotAlias", 1)) 6409 } 6410 if s.BotName == nil { 6411 invalidParams.Add(request.NewErrParamRequired("BotName")) 6412 } 6413 if s.BotName != nil && len(*s.BotName) < 2 { 6414 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 6415 } 6416 if s.MaxResults != nil && *s.MaxResults < 1 { 6417 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6418 } 6419 if s.NameContains != nil && len(*s.NameContains) < 1 { 6420 invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) 6421 } 6422 6423 if invalidParams.Len() > 0 { 6424 return invalidParams 6425 } 6426 return nil 6427} 6428 6429// SetBotAlias sets the BotAlias field's value. 6430func (s *GetBotChannelAssociationsInput) SetBotAlias(v string) *GetBotChannelAssociationsInput { 6431 s.BotAlias = &v 6432 return s 6433} 6434 6435// SetBotName sets the BotName field's value. 6436func (s *GetBotChannelAssociationsInput) SetBotName(v string) *GetBotChannelAssociationsInput { 6437 s.BotName = &v 6438 return s 6439} 6440 6441// SetMaxResults sets the MaxResults field's value. 6442func (s *GetBotChannelAssociationsInput) SetMaxResults(v int64) *GetBotChannelAssociationsInput { 6443 s.MaxResults = &v 6444 return s 6445} 6446 6447// SetNameContains sets the NameContains field's value. 6448func (s *GetBotChannelAssociationsInput) SetNameContains(v string) *GetBotChannelAssociationsInput { 6449 s.NameContains = &v 6450 return s 6451} 6452 6453// SetNextToken sets the NextToken field's value. 6454func (s *GetBotChannelAssociationsInput) SetNextToken(v string) *GetBotChannelAssociationsInput { 6455 s.NextToken = &v 6456 return s 6457} 6458 6459// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationsResponse 6460type GetBotChannelAssociationsOutput struct { 6461 _ struct{} `type:"structure"` 6462 6463 // An array of objects, one for each association, that provides information 6464 // about the Amazon Lex bot and its association with the channel. 6465 BotChannelAssociations []*BotChannelAssociation `locationName:"botChannelAssociations" type:"list"` 6466 6467 // A pagination token that fetches the next page of associations. If the response 6468 // to this call is truncated, Amazon Lex returns a pagination token in the response. 6469 // To fetch the next page of associations, specify the pagination token in the 6470 // next request. 6471 NextToken *string `locationName:"nextToken" type:"string"` 6472} 6473 6474// String returns the string representation 6475func (s GetBotChannelAssociationsOutput) String() string { 6476 return awsutil.Prettify(s) 6477} 6478 6479// GoString returns the string representation 6480func (s GetBotChannelAssociationsOutput) GoString() string { 6481 return s.String() 6482} 6483 6484// SetBotChannelAssociations sets the BotChannelAssociations field's value. 6485func (s *GetBotChannelAssociationsOutput) SetBotChannelAssociations(v []*BotChannelAssociation) *GetBotChannelAssociationsOutput { 6486 s.BotChannelAssociations = v 6487 return s 6488} 6489 6490// SetNextToken sets the NextToken field's value. 6491func (s *GetBotChannelAssociationsOutput) SetNextToken(v string) *GetBotChannelAssociationsOutput { 6492 s.NextToken = &v 6493 return s 6494} 6495 6496// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotRequest 6497type GetBotInput struct { 6498 _ struct{} `type:"structure"` 6499 6500 // The name of the bot. The name is case sensitive. 6501 // 6502 // Name is a required field 6503 Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` 6504 6505 // The version or alias of the bot. 6506 // 6507 // VersionOrAlias is a required field 6508 VersionOrAlias *string `location:"uri" locationName:"versionoralias" type:"string" required:"true"` 6509} 6510 6511// String returns the string representation 6512func (s GetBotInput) String() string { 6513 return awsutil.Prettify(s) 6514} 6515 6516// GoString returns the string representation 6517func (s GetBotInput) GoString() string { 6518 return s.String() 6519} 6520 6521// Validate inspects the fields of the type to determine if they are valid. 6522func (s *GetBotInput) Validate() error { 6523 invalidParams := request.ErrInvalidParams{Context: "GetBotInput"} 6524 if s.Name == nil { 6525 invalidParams.Add(request.NewErrParamRequired("Name")) 6526 } 6527 if s.Name != nil && len(*s.Name) < 2 { 6528 invalidParams.Add(request.NewErrParamMinLen("Name", 2)) 6529 } 6530 if s.VersionOrAlias == nil { 6531 invalidParams.Add(request.NewErrParamRequired("VersionOrAlias")) 6532 } 6533 6534 if invalidParams.Len() > 0 { 6535 return invalidParams 6536 } 6537 return nil 6538} 6539 6540// SetName sets the Name field's value. 6541func (s *GetBotInput) SetName(v string) *GetBotInput { 6542 s.Name = &v 6543 return s 6544} 6545 6546// SetVersionOrAlias sets the VersionOrAlias field's value. 6547func (s *GetBotInput) SetVersionOrAlias(v string) *GetBotInput { 6548 s.VersionOrAlias = &v 6549 return s 6550} 6551 6552// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotResponse 6553type GetBotOutput struct { 6554 _ struct{} `type:"structure"` 6555 6556 // The message that Amazon Lex returns when the user elects to end the conversation 6557 // without completing it. For more information, see PutBot. 6558 AbortStatement *Statement `locationName:"abortStatement" type:"structure"` 6559 6560 // Checksum of the bot used to identify a specific revision of the bot's $LATEST 6561 // version. 6562 Checksum *string `locationName:"checksum" type:"string"` 6563 6564 // For each Amazon Lex bot created with the Amazon Lex Model Building Service, 6565 // you must specify whether your use of Amazon Lex is related to a website, 6566 // program, or other application that is directed or targeted, in whole or in 6567 // part, to children under age 13 and subject to the Children's Online Privacy 6568 // Protection Act (COPPA) by specifying true or false in the childDirected field. 6569 // By specifying true in the childDirected field, you confirm that your use 6570 // of Amazon Lex is related to a website, program, or other application that 6571 // is directed or targeted, in whole or in part, to children under age 13 and 6572 // subject to COPPA. By specifying false in the childDirected field, you confirm 6573 // that your use of Amazon Lex is not related to a website, program, or other 6574 // application that is directed or targeted, in whole or in part, to children 6575 // under age 13 and subject to COPPA. You may not specify a default value for 6576 // the childDirected field that does not accurately reflect whether your use 6577 // of Amazon Lex is related to a website, program, or other application that 6578 // is directed or targeted, in whole or in part, to children under age 13 and 6579 // subject to COPPA. 6580 // 6581 // If your use of Amazon Lex relates to a website, program, or other application 6582 // that is directed in whole or in part, to children under age 13, you must 6583 // obtain any required verifiable parental consent under COPPA. For information 6584 // regarding the use of Amazon Lex in connection with websites, programs, or 6585 // other applications that are directed or targeted, in whole or in part, to 6586 // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) 6587 ChildDirected *bool `locationName:"childDirected" type:"boolean"` 6588 6589 // The message Amazon Lex uses when it doesn't understand the user's request. 6590 // For more information, see PutBot. 6591 ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` 6592 6593 // The date that the bot was created. 6594 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 6595 6596 // A description of the bot. 6597 Description *string `locationName:"description" type:"string"` 6598 6599 // If status is FAILED, Amazon Lex explains why it failed to build the bot. 6600 FailureReason *string `locationName:"failureReason" type:"string"` 6601 6602 // The maximum time in seconds that Amazon Lex retains the data gathered in 6603 // a conversation. For more information, see PutBot. 6604 IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` 6605 6606 // An array of intent objects. For more information, see PutBot. 6607 Intents []*Intent `locationName:"intents" type:"list"` 6608 6609 // The date that the bot was updated. When you create a resource, the creation 6610 // date and last updated date are the same. 6611 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 6612 6613 // The target locale for the bot. 6614 Locale *string `locationName:"locale" type:"string" enum:"Locale"` 6615 6616 // The name of the bot. 6617 Name *string `locationName:"name" min:"2" type:"string"` 6618 6619 // The status of the bot. If the bot is ready to run, the status is READY. If 6620 // there was a problem with building the bot, the status is FAILED and the failureReason 6621 // explains why the bot did not build. If the bot was saved but not built, the 6622 // status is NOT BUILT. 6623 Status *string `locationName:"status" type:"string" enum:"Status"` 6624 6625 // The version of the bot. For a new bot, the version is always $LATEST. 6626 Version *string `locationName:"version" min:"1" type:"string"` 6627 6628 // The Amazon Polly voice ID that Amazon Lex uses for voice interaction with 6629 // the user. For more information, see PutBot. 6630 VoiceId *string `locationName:"voiceId" type:"string"` 6631} 6632 6633// String returns the string representation 6634func (s GetBotOutput) String() string { 6635 return awsutil.Prettify(s) 6636} 6637 6638// GoString returns the string representation 6639func (s GetBotOutput) GoString() string { 6640 return s.String() 6641} 6642 6643// SetAbortStatement sets the AbortStatement field's value. 6644func (s *GetBotOutput) SetAbortStatement(v *Statement) *GetBotOutput { 6645 s.AbortStatement = v 6646 return s 6647} 6648 6649// SetChecksum sets the Checksum field's value. 6650func (s *GetBotOutput) SetChecksum(v string) *GetBotOutput { 6651 s.Checksum = &v 6652 return s 6653} 6654 6655// SetChildDirected sets the ChildDirected field's value. 6656func (s *GetBotOutput) SetChildDirected(v bool) *GetBotOutput { 6657 s.ChildDirected = &v 6658 return s 6659} 6660 6661// SetClarificationPrompt sets the ClarificationPrompt field's value. 6662func (s *GetBotOutput) SetClarificationPrompt(v *Prompt) *GetBotOutput { 6663 s.ClarificationPrompt = v 6664 return s 6665} 6666 6667// SetCreatedDate sets the CreatedDate field's value. 6668func (s *GetBotOutput) SetCreatedDate(v time.Time) *GetBotOutput { 6669 s.CreatedDate = &v 6670 return s 6671} 6672 6673// SetDescription sets the Description field's value. 6674func (s *GetBotOutput) SetDescription(v string) *GetBotOutput { 6675 s.Description = &v 6676 return s 6677} 6678 6679// SetFailureReason sets the FailureReason field's value. 6680func (s *GetBotOutput) SetFailureReason(v string) *GetBotOutput { 6681 s.FailureReason = &v 6682 return s 6683} 6684 6685// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. 6686func (s *GetBotOutput) SetIdleSessionTTLInSeconds(v int64) *GetBotOutput { 6687 s.IdleSessionTTLInSeconds = &v 6688 return s 6689} 6690 6691// SetIntents sets the Intents field's value. 6692func (s *GetBotOutput) SetIntents(v []*Intent) *GetBotOutput { 6693 s.Intents = v 6694 return s 6695} 6696 6697// SetLastUpdatedDate sets the LastUpdatedDate field's value. 6698func (s *GetBotOutput) SetLastUpdatedDate(v time.Time) *GetBotOutput { 6699 s.LastUpdatedDate = &v 6700 return s 6701} 6702 6703// SetLocale sets the Locale field's value. 6704func (s *GetBotOutput) SetLocale(v string) *GetBotOutput { 6705 s.Locale = &v 6706 return s 6707} 6708 6709// SetName sets the Name field's value. 6710func (s *GetBotOutput) SetName(v string) *GetBotOutput { 6711 s.Name = &v 6712 return s 6713} 6714 6715// SetStatus sets the Status field's value. 6716func (s *GetBotOutput) SetStatus(v string) *GetBotOutput { 6717 s.Status = &v 6718 return s 6719} 6720 6721// SetVersion sets the Version field's value. 6722func (s *GetBotOutput) SetVersion(v string) *GetBotOutput { 6723 s.Version = &v 6724 return s 6725} 6726 6727// SetVoiceId sets the VoiceId field's value. 6728func (s *GetBotOutput) SetVoiceId(v string) *GetBotOutput { 6729 s.VoiceId = &v 6730 return s 6731} 6732 6733// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersionsRequest 6734type GetBotVersionsInput struct { 6735 _ struct{} `type:"structure"` 6736 6737 // The maximum number of bot versions to return in the response. The default 6738 // is 10. 6739 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 6740 6741 // The name of the bot for which versions should be returned. 6742 // 6743 // Name is a required field 6744 Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` 6745 6746 // A pagination token for fetching the next page of bot versions. If the response 6747 // to this call is truncated, Amazon Lex returns a pagination token in the response. 6748 // To fetch the next page of versions, specify the pagination token in the next 6749 // request. 6750 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6751} 6752 6753// String returns the string representation 6754func (s GetBotVersionsInput) String() string { 6755 return awsutil.Prettify(s) 6756} 6757 6758// GoString returns the string representation 6759func (s GetBotVersionsInput) GoString() string { 6760 return s.String() 6761} 6762 6763// Validate inspects the fields of the type to determine if they are valid. 6764func (s *GetBotVersionsInput) Validate() error { 6765 invalidParams := request.ErrInvalidParams{Context: "GetBotVersionsInput"} 6766 if s.MaxResults != nil && *s.MaxResults < 1 { 6767 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6768 } 6769 if s.Name == nil { 6770 invalidParams.Add(request.NewErrParamRequired("Name")) 6771 } 6772 if s.Name != nil && len(*s.Name) < 2 { 6773 invalidParams.Add(request.NewErrParamMinLen("Name", 2)) 6774 } 6775 6776 if invalidParams.Len() > 0 { 6777 return invalidParams 6778 } 6779 return nil 6780} 6781 6782// SetMaxResults sets the MaxResults field's value. 6783func (s *GetBotVersionsInput) SetMaxResults(v int64) *GetBotVersionsInput { 6784 s.MaxResults = &v 6785 return s 6786} 6787 6788// SetName sets the Name field's value. 6789func (s *GetBotVersionsInput) SetName(v string) *GetBotVersionsInput { 6790 s.Name = &v 6791 return s 6792} 6793 6794// SetNextToken sets the NextToken field's value. 6795func (s *GetBotVersionsInput) SetNextToken(v string) *GetBotVersionsInput { 6796 s.NextToken = &v 6797 return s 6798} 6799 6800// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersionsResponse 6801type GetBotVersionsOutput struct { 6802 _ struct{} `type:"structure"` 6803 6804 // An array of BotMetadata objects, one for each numbered version of the bot 6805 // plus one for the $LATEST version. 6806 Bots []*BotMetadata `locationName:"bots" type:"list"` 6807 6808 // A pagination token for fetching the next page of bot versions. If the response 6809 // to this call is truncated, Amazon Lex returns a pagination token in the response. 6810 // To fetch the next page of versions, specify the pagination token in the next 6811 // request. 6812 NextToken *string `locationName:"nextToken" type:"string"` 6813} 6814 6815// String returns the string representation 6816func (s GetBotVersionsOutput) String() string { 6817 return awsutil.Prettify(s) 6818} 6819 6820// GoString returns the string representation 6821func (s GetBotVersionsOutput) GoString() string { 6822 return s.String() 6823} 6824 6825// SetBots sets the Bots field's value. 6826func (s *GetBotVersionsOutput) SetBots(v []*BotMetadata) *GetBotVersionsOutput { 6827 s.Bots = v 6828 return s 6829} 6830 6831// SetNextToken sets the NextToken field's value. 6832func (s *GetBotVersionsOutput) SetNextToken(v string) *GetBotVersionsOutput { 6833 s.NextToken = &v 6834 return s 6835} 6836 6837// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotsRequest 6838type GetBotsInput struct { 6839 _ struct{} `type:"structure"` 6840 6841 // The maximum number of bots to return in the response that the request will 6842 // return. The default is 10. 6843 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 6844 6845 // Substring to match in bot names. A bot will be returned if any part of its 6846 // name matches the substring. For example, "xyz" matches both "xyzabc" and 6847 // "abcxyz." 6848 NameContains *string `location:"querystring" locationName:"nameContains" min:"2" type:"string"` 6849 6850 // A pagination token that fetches the next page of bots. If the response to 6851 // this call is truncated, Amazon Lex returns a pagination token in the response. 6852 // To fetch the next page of bots, specify the pagination token in the next 6853 // request. 6854 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 6855} 6856 6857// String returns the string representation 6858func (s GetBotsInput) String() string { 6859 return awsutil.Prettify(s) 6860} 6861 6862// GoString returns the string representation 6863func (s GetBotsInput) GoString() string { 6864 return s.String() 6865} 6866 6867// Validate inspects the fields of the type to determine if they are valid. 6868func (s *GetBotsInput) Validate() error { 6869 invalidParams := request.ErrInvalidParams{Context: "GetBotsInput"} 6870 if s.MaxResults != nil && *s.MaxResults < 1 { 6871 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6872 } 6873 if s.NameContains != nil && len(*s.NameContains) < 2 { 6874 invalidParams.Add(request.NewErrParamMinLen("NameContains", 2)) 6875 } 6876 6877 if invalidParams.Len() > 0 { 6878 return invalidParams 6879 } 6880 return nil 6881} 6882 6883// SetMaxResults sets the MaxResults field's value. 6884func (s *GetBotsInput) SetMaxResults(v int64) *GetBotsInput { 6885 s.MaxResults = &v 6886 return s 6887} 6888 6889// SetNameContains sets the NameContains field's value. 6890func (s *GetBotsInput) SetNameContains(v string) *GetBotsInput { 6891 s.NameContains = &v 6892 return s 6893} 6894 6895// SetNextToken sets the NextToken field's value. 6896func (s *GetBotsInput) SetNextToken(v string) *GetBotsInput { 6897 s.NextToken = &v 6898 return s 6899} 6900 6901// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotsResponse 6902type GetBotsOutput struct { 6903 _ struct{} `type:"structure"` 6904 6905 // An array of botMetadata objects, with one entry for each bot. 6906 Bots []*BotMetadata `locationName:"bots" type:"list"` 6907 6908 // If the response is truncated, it includes a pagination token that you can 6909 // specify in your next request to fetch the next page of bots. 6910 NextToken *string `locationName:"nextToken" type:"string"` 6911} 6912 6913// String returns the string representation 6914func (s GetBotsOutput) String() string { 6915 return awsutil.Prettify(s) 6916} 6917 6918// GoString returns the string representation 6919func (s GetBotsOutput) GoString() string { 6920 return s.String() 6921} 6922 6923// SetBots sets the Bots field's value. 6924func (s *GetBotsOutput) SetBots(v []*BotMetadata) *GetBotsOutput { 6925 s.Bots = v 6926 return s 6927} 6928 6929// SetNextToken sets the NextToken field's value. 6930func (s *GetBotsOutput) SetNextToken(v string) *GetBotsOutput { 6931 s.NextToken = &v 6932 return s 6933} 6934 6935// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentRequest 6936type GetBuiltinIntentInput struct { 6937 _ struct{} `type:"structure"` 6938 6939 // The unique identifier for a built-in intent. To find the signature for an 6940 // intent, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) 6941 // in the Alexa Skills Kit. 6942 // 6943 // Signature is a required field 6944 Signature *string `location:"uri" locationName:"signature" type:"string" required:"true"` 6945} 6946 6947// String returns the string representation 6948func (s GetBuiltinIntentInput) String() string { 6949 return awsutil.Prettify(s) 6950} 6951 6952// GoString returns the string representation 6953func (s GetBuiltinIntentInput) GoString() string { 6954 return s.String() 6955} 6956 6957// Validate inspects the fields of the type to determine if they are valid. 6958func (s *GetBuiltinIntentInput) Validate() error { 6959 invalidParams := request.ErrInvalidParams{Context: "GetBuiltinIntentInput"} 6960 if s.Signature == nil { 6961 invalidParams.Add(request.NewErrParamRequired("Signature")) 6962 } 6963 6964 if invalidParams.Len() > 0 { 6965 return invalidParams 6966 } 6967 return nil 6968} 6969 6970// SetSignature sets the Signature field's value. 6971func (s *GetBuiltinIntentInput) SetSignature(v string) *GetBuiltinIntentInput { 6972 s.Signature = &v 6973 return s 6974} 6975 6976// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentResponse 6977type GetBuiltinIntentOutput struct { 6978 _ struct{} `type:"structure"` 6979 6980 // The unique identifier for a built-in intent. 6981 Signature *string `locationName:"signature" type:"string"` 6982 6983 // An array of BuiltinIntentSlot objects, one entry for each slot type in the 6984 // intent. 6985 Slots []*BuiltinIntentSlot `locationName:"slots" type:"list"` 6986 6987 // A list of locales that the intent supports. 6988 SupportedLocales []*string `locationName:"supportedLocales" type:"list"` 6989} 6990 6991// String returns the string representation 6992func (s GetBuiltinIntentOutput) String() string { 6993 return awsutil.Prettify(s) 6994} 6995 6996// GoString returns the string representation 6997func (s GetBuiltinIntentOutput) GoString() string { 6998 return s.String() 6999} 7000 7001// SetSignature sets the Signature field's value. 7002func (s *GetBuiltinIntentOutput) SetSignature(v string) *GetBuiltinIntentOutput { 7003 s.Signature = &v 7004 return s 7005} 7006 7007// SetSlots sets the Slots field's value. 7008func (s *GetBuiltinIntentOutput) SetSlots(v []*BuiltinIntentSlot) *GetBuiltinIntentOutput { 7009 s.Slots = v 7010 return s 7011} 7012 7013// SetSupportedLocales sets the SupportedLocales field's value. 7014func (s *GetBuiltinIntentOutput) SetSupportedLocales(v []*string) *GetBuiltinIntentOutput { 7015 s.SupportedLocales = v 7016 return s 7017} 7018 7019// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentsRequest 7020type GetBuiltinIntentsInput struct { 7021 _ struct{} `type:"structure"` 7022 7023 // A list of locales that the intent supports. 7024 Locale *string `location:"querystring" locationName:"locale" type:"string" enum:"Locale"` 7025 7026 // The maximum number of intents to return in the response. The default is 10. 7027 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 7028 7029 // A pagination token that fetches the next page of intents. If this API call 7030 // is truncated, Amazon Lex returns a pagination token in the response. To fetch 7031 // the next page of intents, use the pagination token in the next request. 7032 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 7033 7034 // Substring to match in built-in intent signatures. An intent will be returned 7035 // if any part of its signature matches the substring. For example, "xyz" matches 7036 // both "xyzabc" and "abcxyz." To find the signature for an intent, see Standard 7037 // Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) 7038 // in the Alexa Skills Kit. 7039 SignatureContains *string `location:"querystring" locationName:"signatureContains" type:"string"` 7040} 7041 7042// String returns the string representation 7043func (s GetBuiltinIntentsInput) String() string { 7044 return awsutil.Prettify(s) 7045} 7046 7047// GoString returns the string representation 7048func (s GetBuiltinIntentsInput) GoString() string { 7049 return s.String() 7050} 7051 7052// Validate inspects the fields of the type to determine if they are valid. 7053func (s *GetBuiltinIntentsInput) Validate() error { 7054 invalidParams := request.ErrInvalidParams{Context: "GetBuiltinIntentsInput"} 7055 if s.MaxResults != nil && *s.MaxResults < 1 { 7056 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7057 } 7058 7059 if invalidParams.Len() > 0 { 7060 return invalidParams 7061 } 7062 return nil 7063} 7064 7065// SetLocale sets the Locale field's value. 7066func (s *GetBuiltinIntentsInput) SetLocale(v string) *GetBuiltinIntentsInput { 7067 s.Locale = &v 7068 return s 7069} 7070 7071// SetMaxResults sets the MaxResults field's value. 7072func (s *GetBuiltinIntentsInput) SetMaxResults(v int64) *GetBuiltinIntentsInput { 7073 s.MaxResults = &v 7074 return s 7075} 7076 7077// SetNextToken sets the NextToken field's value. 7078func (s *GetBuiltinIntentsInput) SetNextToken(v string) *GetBuiltinIntentsInput { 7079 s.NextToken = &v 7080 return s 7081} 7082 7083// SetSignatureContains sets the SignatureContains field's value. 7084func (s *GetBuiltinIntentsInput) SetSignatureContains(v string) *GetBuiltinIntentsInput { 7085 s.SignatureContains = &v 7086 return s 7087} 7088 7089// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentsResponse 7090type GetBuiltinIntentsOutput struct { 7091 _ struct{} `type:"structure"` 7092 7093 // An array of builtinIntentMetadata objects, one for each intent in the response. 7094 Intents []*BuiltinIntentMetadata `locationName:"intents" type:"list"` 7095 7096 // A pagination token that fetches the next page of intents. If the response 7097 // to this API call is truncated, Amazon Lex returns a pagination token in the 7098 // response. To fetch the next page of intents, specify the pagination token 7099 // in the next request. 7100 NextToken *string `locationName:"nextToken" type:"string"` 7101} 7102 7103// String returns the string representation 7104func (s GetBuiltinIntentsOutput) String() string { 7105 return awsutil.Prettify(s) 7106} 7107 7108// GoString returns the string representation 7109func (s GetBuiltinIntentsOutput) GoString() string { 7110 return s.String() 7111} 7112 7113// SetIntents sets the Intents field's value. 7114func (s *GetBuiltinIntentsOutput) SetIntents(v []*BuiltinIntentMetadata) *GetBuiltinIntentsOutput { 7115 s.Intents = v 7116 return s 7117} 7118 7119// SetNextToken sets the NextToken field's value. 7120func (s *GetBuiltinIntentsOutput) SetNextToken(v string) *GetBuiltinIntentsOutput { 7121 s.NextToken = &v 7122 return s 7123} 7124 7125// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypesRequest 7126type GetBuiltinSlotTypesInput struct { 7127 _ struct{} `type:"structure"` 7128 7129 // A list of locales that the slot type supports. 7130 Locale *string `location:"querystring" locationName:"locale" type:"string" enum:"Locale"` 7131 7132 // The maximum number of slot types to return in the response. The default is 7133 // 10. 7134 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 7135 7136 // A pagination token that fetches the next page of slot types. If the response 7137 // to this API call is truncated, Amazon Lex returns a pagination token in the 7138 // response. To fetch the next page of slot types, specify the pagination token 7139 // in the next request. 7140 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 7141 7142 // Substring to match in built-in slot type signatures. A slot type will be 7143 // returned if any part of its signature matches the substring. For example, 7144 // "xyz" matches both "xyzabc" and "abcxyz." 7145 SignatureContains *string `location:"querystring" locationName:"signatureContains" type:"string"` 7146} 7147 7148// String returns the string representation 7149func (s GetBuiltinSlotTypesInput) String() string { 7150 return awsutil.Prettify(s) 7151} 7152 7153// GoString returns the string representation 7154func (s GetBuiltinSlotTypesInput) GoString() string { 7155 return s.String() 7156} 7157 7158// Validate inspects the fields of the type to determine if they are valid. 7159func (s *GetBuiltinSlotTypesInput) Validate() error { 7160 invalidParams := request.ErrInvalidParams{Context: "GetBuiltinSlotTypesInput"} 7161 if s.MaxResults != nil && *s.MaxResults < 1 { 7162 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7163 } 7164 7165 if invalidParams.Len() > 0 { 7166 return invalidParams 7167 } 7168 return nil 7169} 7170 7171// SetLocale sets the Locale field's value. 7172func (s *GetBuiltinSlotTypesInput) SetLocale(v string) *GetBuiltinSlotTypesInput { 7173 s.Locale = &v 7174 return s 7175} 7176 7177// SetMaxResults sets the MaxResults field's value. 7178func (s *GetBuiltinSlotTypesInput) SetMaxResults(v int64) *GetBuiltinSlotTypesInput { 7179 s.MaxResults = &v 7180 return s 7181} 7182 7183// SetNextToken sets the NextToken field's value. 7184func (s *GetBuiltinSlotTypesInput) SetNextToken(v string) *GetBuiltinSlotTypesInput { 7185 s.NextToken = &v 7186 return s 7187} 7188 7189// SetSignatureContains sets the SignatureContains field's value. 7190func (s *GetBuiltinSlotTypesInput) SetSignatureContains(v string) *GetBuiltinSlotTypesInput { 7191 s.SignatureContains = &v 7192 return s 7193} 7194 7195// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypesResponse 7196type GetBuiltinSlotTypesOutput struct { 7197 _ struct{} `type:"structure"` 7198 7199 // If the response is truncated, the response includes a pagination token that 7200 // you can use in your next request to fetch the next page of slot types. 7201 NextToken *string `locationName:"nextToken" type:"string"` 7202 7203 // An array of BuiltInSlotTypeMetadata objects, one entry for each slot type 7204 // returned. 7205 SlotTypes []*BuiltinSlotTypeMetadata `locationName:"slotTypes" type:"list"` 7206} 7207 7208// String returns the string representation 7209func (s GetBuiltinSlotTypesOutput) String() string { 7210 return awsutil.Prettify(s) 7211} 7212 7213// GoString returns the string representation 7214func (s GetBuiltinSlotTypesOutput) GoString() string { 7215 return s.String() 7216} 7217 7218// SetNextToken sets the NextToken field's value. 7219func (s *GetBuiltinSlotTypesOutput) SetNextToken(v string) *GetBuiltinSlotTypesOutput { 7220 s.NextToken = &v 7221 return s 7222} 7223 7224// SetSlotTypes sets the SlotTypes field's value. 7225func (s *GetBuiltinSlotTypesOutput) SetSlotTypes(v []*BuiltinSlotTypeMetadata) *GetBuiltinSlotTypesOutput { 7226 s.SlotTypes = v 7227 return s 7228} 7229 7230// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExportRequest 7231type GetExportInput struct { 7232 _ struct{} `type:"structure"` 7233 7234 // The format of the exported data. 7235 // 7236 // ExportType is a required field 7237 ExportType *string `location:"querystring" locationName:"exportType" type:"string" required:"true" enum:"ExportType"` 7238 7239 // The name of the bot to export. 7240 // 7241 // Name is a required field 7242 Name *string `location:"querystring" locationName:"name" min:"1" type:"string" required:"true"` 7243 7244 // The type of resource to export. 7245 // 7246 // ResourceType is a required field 7247 ResourceType *string `location:"querystring" locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` 7248 7249 // The version of the bot to export. 7250 // 7251 // Version is a required field 7252 Version *string `location:"querystring" locationName:"version" min:"1" type:"string" required:"true"` 7253} 7254 7255// String returns the string representation 7256func (s GetExportInput) String() string { 7257 return awsutil.Prettify(s) 7258} 7259 7260// GoString returns the string representation 7261func (s GetExportInput) GoString() string { 7262 return s.String() 7263} 7264 7265// Validate inspects the fields of the type to determine if they are valid. 7266func (s *GetExportInput) Validate() error { 7267 invalidParams := request.ErrInvalidParams{Context: "GetExportInput"} 7268 if s.ExportType == nil { 7269 invalidParams.Add(request.NewErrParamRequired("ExportType")) 7270 } 7271 if s.Name == nil { 7272 invalidParams.Add(request.NewErrParamRequired("Name")) 7273 } 7274 if s.Name != nil && len(*s.Name) < 1 { 7275 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 7276 } 7277 if s.ResourceType == nil { 7278 invalidParams.Add(request.NewErrParamRequired("ResourceType")) 7279 } 7280 if s.Version == nil { 7281 invalidParams.Add(request.NewErrParamRequired("Version")) 7282 } 7283 if s.Version != nil && len(*s.Version) < 1 { 7284 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 7285 } 7286 7287 if invalidParams.Len() > 0 { 7288 return invalidParams 7289 } 7290 return nil 7291} 7292 7293// SetExportType sets the ExportType field's value. 7294func (s *GetExportInput) SetExportType(v string) *GetExportInput { 7295 s.ExportType = &v 7296 return s 7297} 7298 7299// SetName sets the Name field's value. 7300func (s *GetExportInput) SetName(v string) *GetExportInput { 7301 s.Name = &v 7302 return s 7303} 7304 7305// SetResourceType sets the ResourceType field's value. 7306func (s *GetExportInput) SetResourceType(v string) *GetExportInput { 7307 s.ResourceType = &v 7308 return s 7309} 7310 7311// SetVersion sets the Version field's value. 7312func (s *GetExportInput) SetVersion(v string) *GetExportInput { 7313 s.Version = &v 7314 return s 7315} 7316 7317// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExportResponse 7318type GetExportOutput struct { 7319 _ struct{} `type:"structure"` 7320 7321 // The status of the export. 7322 // 7323 // * IN_PROGRESS - The export is in progress. 7324 // 7325 // * READY - The export is complete. 7326 // 7327 // * FAILED - The export could not be completed. 7328 ExportStatus *string `locationName:"exportStatus" type:"string" enum:"ExportStatus"` 7329 7330 // The format of the exported data. 7331 ExportType *string `locationName:"exportType" type:"string" enum:"ExportType"` 7332 7333 // If status is FAILED, Amazon Lex provides the reason that it failed to export 7334 // the resource. 7335 FailureReason *string `locationName:"failureReason" type:"string"` 7336 7337 // The name of the bot being exported. 7338 Name *string `locationName:"name" min:"1" type:"string"` 7339 7340 // The type of the exported resource. 7341 ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` 7342 7343 // An S3 pre-signed URL that provides the location of the exported resource. 7344 // The exported resource is a ZIP archive that contains the exported resource 7345 // in JSON format. The structure of the archive may change. Your code should 7346 // not rely on the archive structure. 7347 Url *string `locationName:"url" type:"string"` 7348 7349 // The version of the bot being exported. 7350 Version *string `locationName:"version" min:"1" type:"string"` 7351} 7352 7353// String returns the string representation 7354func (s GetExportOutput) String() string { 7355 return awsutil.Prettify(s) 7356} 7357 7358// GoString returns the string representation 7359func (s GetExportOutput) GoString() string { 7360 return s.String() 7361} 7362 7363// SetExportStatus sets the ExportStatus field's value. 7364func (s *GetExportOutput) SetExportStatus(v string) *GetExportOutput { 7365 s.ExportStatus = &v 7366 return s 7367} 7368 7369// SetExportType sets the ExportType field's value. 7370func (s *GetExportOutput) SetExportType(v string) *GetExportOutput { 7371 s.ExportType = &v 7372 return s 7373} 7374 7375// SetFailureReason sets the FailureReason field's value. 7376func (s *GetExportOutput) SetFailureReason(v string) *GetExportOutput { 7377 s.FailureReason = &v 7378 return s 7379} 7380 7381// SetName sets the Name field's value. 7382func (s *GetExportOutput) SetName(v string) *GetExportOutput { 7383 s.Name = &v 7384 return s 7385} 7386 7387// SetResourceType sets the ResourceType field's value. 7388func (s *GetExportOutput) SetResourceType(v string) *GetExportOutput { 7389 s.ResourceType = &v 7390 return s 7391} 7392 7393// SetUrl sets the Url field's value. 7394func (s *GetExportOutput) SetUrl(v string) *GetExportOutput { 7395 s.Url = &v 7396 return s 7397} 7398 7399// SetVersion sets the Version field's value. 7400func (s *GetExportOutput) SetVersion(v string) *GetExportOutput { 7401 s.Version = &v 7402 return s 7403} 7404 7405// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentRequest 7406type GetIntentInput struct { 7407 _ struct{} `type:"structure"` 7408 7409 // The name of the intent. The name is case sensitive. 7410 // 7411 // Name is a required field 7412 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 7413 7414 // The version of the intent. 7415 // 7416 // Version is a required field 7417 Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` 7418} 7419 7420// String returns the string representation 7421func (s GetIntentInput) String() string { 7422 return awsutil.Prettify(s) 7423} 7424 7425// GoString returns the string representation 7426func (s GetIntentInput) GoString() string { 7427 return s.String() 7428} 7429 7430// Validate inspects the fields of the type to determine if they are valid. 7431func (s *GetIntentInput) Validate() error { 7432 invalidParams := request.ErrInvalidParams{Context: "GetIntentInput"} 7433 if s.Name == nil { 7434 invalidParams.Add(request.NewErrParamRequired("Name")) 7435 } 7436 if s.Name != nil && len(*s.Name) < 1 { 7437 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 7438 } 7439 if s.Version == nil { 7440 invalidParams.Add(request.NewErrParamRequired("Version")) 7441 } 7442 if s.Version != nil && len(*s.Version) < 1 { 7443 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 7444 } 7445 7446 if invalidParams.Len() > 0 { 7447 return invalidParams 7448 } 7449 return nil 7450} 7451 7452// SetName sets the Name field's value. 7453func (s *GetIntentInput) SetName(v string) *GetIntentInput { 7454 s.Name = &v 7455 return s 7456} 7457 7458// SetVersion sets the Version field's value. 7459func (s *GetIntentInput) SetVersion(v string) *GetIntentInput { 7460 s.Version = &v 7461 return s 7462} 7463 7464// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentResponse 7465type GetIntentOutput struct { 7466 _ struct{} `type:"structure"` 7467 7468 // Checksum of the intent. 7469 Checksum *string `locationName:"checksum" type:"string"` 7470 7471 // After the Lambda function specified in the fulfillmentActivity element fulfills 7472 // the intent, Amazon Lex conveys this statement to the user. 7473 ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` 7474 7475 // If defined in the bot, Amazon Lex uses prompt to confirm the intent before 7476 // fulfilling the user's request. For more information, see PutIntent. 7477 ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` 7478 7479 // The date that the intent was created. 7480 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 7481 7482 // A description of the intent. 7483 Description *string `locationName:"description" type:"string"` 7484 7485 // If defined in the bot, Amazon Amazon Lex invokes this Lambda function for 7486 // each user input. For more information, see PutIntent. 7487 DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` 7488 7489 // If defined in the bot, Amazon Lex uses this prompt to solicit additional 7490 // user activity after the intent is fulfilled. For more information, see PutIntent. 7491 FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` 7492 7493 // Describes how the intent is fulfilled. For more information, see PutIntent. 7494 FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` 7495 7496 // The date that the intent was updated. When you create a resource, the creation 7497 // date and the last updated date are the same. 7498 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 7499 7500 // The name of the intent. 7501 Name *string `locationName:"name" min:"1" type:"string"` 7502 7503 // A unique identifier for a built-in intent. 7504 ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` 7505 7506 // If the user answers "no" to the question defined in confirmationPrompt, Amazon 7507 // Lex responds with this statement to acknowledge that the intent was canceled. 7508 RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` 7509 7510 // An array of sample utterances configured for the intent. 7511 SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` 7512 7513 // An array of intent slots configured for the intent. 7514 Slots []*Slot `locationName:"slots" type:"list"` 7515 7516 // The version of the intent. 7517 Version *string `locationName:"version" min:"1" type:"string"` 7518} 7519 7520// String returns the string representation 7521func (s GetIntentOutput) String() string { 7522 return awsutil.Prettify(s) 7523} 7524 7525// GoString returns the string representation 7526func (s GetIntentOutput) GoString() string { 7527 return s.String() 7528} 7529 7530// SetChecksum sets the Checksum field's value. 7531func (s *GetIntentOutput) SetChecksum(v string) *GetIntentOutput { 7532 s.Checksum = &v 7533 return s 7534} 7535 7536// SetConclusionStatement sets the ConclusionStatement field's value. 7537func (s *GetIntentOutput) SetConclusionStatement(v *Statement) *GetIntentOutput { 7538 s.ConclusionStatement = v 7539 return s 7540} 7541 7542// SetConfirmationPrompt sets the ConfirmationPrompt field's value. 7543func (s *GetIntentOutput) SetConfirmationPrompt(v *Prompt) *GetIntentOutput { 7544 s.ConfirmationPrompt = v 7545 return s 7546} 7547 7548// SetCreatedDate sets the CreatedDate field's value. 7549func (s *GetIntentOutput) SetCreatedDate(v time.Time) *GetIntentOutput { 7550 s.CreatedDate = &v 7551 return s 7552} 7553 7554// SetDescription sets the Description field's value. 7555func (s *GetIntentOutput) SetDescription(v string) *GetIntentOutput { 7556 s.Description = &v 7557 return s 7558} 7559 7560// SetDialogCodeHook sets the DialogCodeHook field's value. 7561func (s *GetIntentOutput) SetDialogCodeHook(v *CodeHook) *GetIntentOutput { 7562 s.DialogCodeHook = v 7563 return s 7564} 7565 7566// SetFollowUpPrompt sets the FollowUpPrompt field's value. 7567func (s *GetIntentOutput) SetFollowUpPrompt(v *FollowUpPrompt) *GetIntentOutput { 7568 s.FollowUpPrompt = v 7569 return s 7570} 7571 7572// SetFulfillmentActivity sets the FulfillmentActivity field's value. 7573func (s *GetIntentOutput) SetFulfillmentActivity(v *FulfillmentActivity) *GetIntentOutput { 7574 s.FulfillmentActivity = v 7575 return s 7576} 7577 7578// SetLastUpdatedDate sets the LastUpdatedDate field's value. 7579func (s *GetIntentOutput) SetLastUpdatedDate(v time.Time) *GetIntentOutput { 7580 s.LastUpdatedDate = &v 7581 return s 7582} 7583 7584// SetName sets the Name field's value. 7585func (s *GetIntentOutput) SetName(v string) *GetIntentOutput { 7586 s.Name = &v 7587 return s 7588} 7589 7590// SetParentIntentSignature sets the ParentIntentSignature field's value. 7591func (s *GetIntentOutput) SetParentIntentSignature(v string) *GetIntentOutput { 7592 s.ParentIntentSignature = &v 7593 return s 7594} 7595 7596// SetRejectionStatement sets the RejectionStatement field's value. 7597func (s *GetIntentOutput) SetRejectionStatement(v *Statement) *GetIntentOutput { 7598 s.RejectionStatement = v 7599 return s 7600} 7601 7602// SetSampleUtterances sets the SampleUtterances field's value. 7603func (s *GetIntentOutput) SetSampleUtterances(v []*string) *GetIntentOutput { 7604 s.SampleUtterances = v 7605 return s 7606} 7607 7608// SetSlots sets the Slots field's value. 7609func (s *GetIntentOutput) SetSlots(v []*Slot) *GetIntentOutput { 7610 s.Slots = v 7611 return s 7612} 7613 7614// SetVersion sets the Version field's value. 7615func (s *GetIntentOutput) SetVersion(v string) *GetIntentOutput { 7616 s.Version = &v 7617 return s 7618} 7619 7620// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersionsRequest 7621type GetIntentVersionsInput struct { 7622 _ struct{} `type:"structure"` 7623 7624 // The maximum number of intent versions to return in the response. The default 7625 // is 10. 7626 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 7627 7628 // The name of the intent for which versions should be returned. 7629 // 7630 // Name is a required field 7631 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 7632 7633 // A pagination token for fetching the next page of intent versions. If the 7634 // response to this call is truncated, Amazon Lex returns a pagination token 7635 // in the response. To fetch the next page of versions, specify the pagination 7636 // token in the next request. 7637 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 7638} 7639 7640// String returns the string representation 7641func (s GetIntentVersionsInput) String() string { 7642 return awsutil.Prettify(s) 7643} 7644 7645// GoString returns the string representation 7646func (s GetIntentVersionsInput) GoString() string { 7647 return s.String() 7648} 7649 7650// Validate inspects the fields of the type to determine if they are valid. 7651func (s *GetIntentVersionsInput) Validate() error { 7652 invalidParams := request.ErrInvalidParams{Context: "GetIntentVersionsInput"} 7653 if s.MaxResults != nil && *s.MaxResults < 1 { 7654 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7655 } 7656 if s.Name == nil { 7657 invalidParams.Add(request.NewErrParamRequired("Name")) 7658 } 7659 if s.Name != nil && len(*s.Name) < 1 { 7660 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 7661 } 7662 7663 if invalidParams.Len() > 0 { 7664 return invalidParams 7665 } 7666 return nil 7667} 7668 7669// SetMaxResults sets the MaxResults field's value. 7670func (s *GetIntentVersionsInput) SetMaxResults(v int64) *GetIntentVersionsInput { 7671 s.MaxResults = &v 7672 return s 7673} 7674 7675// SetName sets the Name field's value. 7676func (s *GetIntentVersionsInput) SetName(v string) *GetIntentVersionsInput { 7677 s.Name = &v 7678 return s 7679} 7680 7681// SetNextToken sets the NextToken field's value. 7682func (s *GetIntentVersionsInput) SetNextToken(v string) *GetIntentVersionsInput { 7683 s.NextToken = &v 7684 return s 7685} 7686 7687// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersionsResponse 7688type GetIntentVersionsOutput struct { 7689 _ struct{} `type:"structure"` 7690 7691 // An array of IntentMetadata objects, one for each numbered version of the 7692 // intent plus one for the $LATEST version. 7693 Intents []*IntentMetadata `locationName:"intents" type:"list"` 7694 7695 // A pagination token for fetching the next page of intent versions. If the 7696 // response to this call is truncated, Amazon Lex returns a pagination token 7697 // in the response. To fetch the next page of versions, specify the pagination 7698 // token in the next request. 7699 NextToken *string `locationName:"nextToken" type:"string"` 7700} 7701 7702// String returns the string representation 7703func (s GetIntentVersionsOutput) String() string { 7704 return awsutil.Prettify(s) 7705} 7706 7707// GoString returns the string representation 7708func (s GetIntentVersionsOutput) GoString() string { 7709 return s.String() 7710} 7711 7712// SetIntents sets the Intents field's value. 7713func (s *GetIntentVersionsOutput) SetIntents(v []*IntentMetadata) *GetIntentVersionsOutput { 7714 s.Intents = v 7715 return s 7716} 7717 7718// SetNextToken sets the NextToken field's value. 7719func (s *GetIntentVersionsOutput) SetNextToken(v string) *GetIntentVersionsOutput { 7720 s.NextToken = &v 7721 return s 7722} 7723 7724// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentsRequest 7725type GetIntentsInput struct { 7726 _ struct{} `type:"structure"` 7727 7728 // The maximum number of intents to return in the response. The default is 10. 7729 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 7730 7731 // Substring to match in intent names. An intent will be returned if any part 7732 // of its name matches the substring. For example, "xyz" matches both "xyzabc" 7733 // and "abcxyz." 7734 NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` 7735 7736 // A pagination token that fetches the next page of intents. If the response 7737 // to this API call is truncated, Amazon Lex returns a pagination token in the 7738 // response. To fetch the next page of intents, specify the pagination token 7739 // in the next request. 7740 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 7741} 7742 7743// String returns the string representation 7744func (s GetIntentsInput) String() string { 7745 return awsutil.Prettify(s) 7746} 7747 7748// GoString returns the string representation 7749func (s GetIntentsInput) GoString() string { 7750 return s.String() 7751} 7752 7753// Validate inspects the fields of the type to determine if they are valid. 7754func (s *GetIntentsInput) Validate() error { 7755 invalidParams := request.ErrInvalidParams{Context: "GetIntentsInput"} 7756 if s.MaxResults != nil && *s.MaxResults < 1 { 7757 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7758 } 7759 if s.NameContains != nil && len(*s.NameContains) < 1 { 7760 invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) 7761 } 7762 7763 if invalidParams.Len() > 0 { 7764 return invalidParams 7765 } 7766 return nil 7767} 7768 7769// SetMaxResults sets the MaxResults field's value. 7770func (s *GetIntentsInput) SetMaxResults(v int64) *GetIntentsInput { 7771 s.MaxResults = &v 7772 return s 7773} 7774 7775// SetNameContains sets the NameContains field's value. 7776func (s *GetIntentsInput) SetNameContains(v string) *GetIntentsInput { 7777 s.NameContains = &v 7778 return s 7779} 7780 7781// SetNextToken sets the NextToken field's value. 7782func (s *GetIntentsInput) SetNextToken(v string) *GetIntentsInput { 7783 s.NextToken = &v 7784 return s 7785} 7786 7787// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentsResponse 7788type GetIntentsOutput struct { 7789 _ struct{} `type:"structure"` 7790 7791 // An array of Intent objects. For more information, see PutBot. 7792 Intents []*IntentMetadata `locationName:"intents" type:"list"` 7793 7794 // If the response is truncated, the response includes a pagination token that 7795 // you can specify in your next request to fetch the next page of intents. 7796 NextToken *string `locationName:"nextToken" type:"string"` 7797} 7798 7799// String returns the string representation 7800func (s GetIntentsOutput) String() string { 7801 return awsutil.Prettify(s) 7802} 7803 7804// GoString returns the string representation 7805func (s GetIntentsOutput) GoString() string { 7806 return s.String() 7807} 7808 7809// SetIntents sets the Intents field's value. 7810func (s *GetIntentsOutput) SetIntents(v []*IntentMetadata) *GetIntentsOutput { 7811 s.Intents = v 7812 return s 7813} 7814 7815// SetNextToken sets the NextToken field's value. 7816func (s *GetIntentsOutput) SetNextToken(v string) *GetIntentsOutput { 7817 s.NextToken = &v 7818 return s 7819} 7820 7821// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeRequest 7822type GetSlotTypeInput struct { 7823 _ struct{} `type:"structure"` 7824 7825 // The name of the slot type. The name is case sensitive. 7826 // 7827 // Name is a required field 7828 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 7829 7830 // The version of the slot type. 7831 // 7832 // Version is a required field 7833 Version *string `location:"uri" locationName:"version" min:"1" type:"string" required:"true"` 7834} 7835 7836// String returns the string representation 7837func (s GetSlotTypeInput) String() string { 7838 return awsutil.Prettify(s) 7839} 7840 7841// GoString returns the string representation 7842func (s GetSlotTypeInput) GoString() string { 7843 return s.String() 7844} 7845 7846// Validate inspects the fields of the type to determine if they are valid. 7847func (s *GetSlotTypeInput) Validate() error { 7848 invalidParams := request.ErrInvalidParams{Context: "GetSlotTypeInput"} 7849 if s.Name == nil { 7850 invalidParams.Add(request.NewErrParamRequired("Name")) 7851 } 7852 if s.Name != nil && len(*s.Name) < 1 { 7853 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 7854 } 7855 if s.Version == nil { 7856 invalidParams.Add(request.NewErrParamRequired("Version")) 7857 } 7858 if s.Version != nil && len(*s.Version) < 1 { 7859 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 7860 } 7861 7862 if invalidParams.Len() > 0 { 7863 return invalidParams 7864 } 7865 return nil 7866} 7867 7868// SetName sets the Name field's value. 7869func (s *GetSlotTypeInput) SetName(v string) *GetSlotTypeInput { 7870 s.Name = &v 7871 return s 7872} 7873 7874// SetVersion sets the Version field's value. 7875func (s *GetSlotTypeInput) SetVersion(v string) *GetSlotTypeInput { 7876 s.Version = &v 7877 return s 7878} 7879 7880// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeResponse 7881type GetSlotTypeOutput struct { 7882 _ struct{} `type:"structure"` 7883 7884 // Checksum of the $LATEST version of the slot type. 7885 Checksum *string `locationName:"checksum" type:"string"` 7886 7887 // The date that the slot type was created. 7888 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 7889 7890 // A description of the slot type. 7891 Description *string `locationName:"description" type:"string"` 7892 7893 // A list of EnumerationValue objects that defines the values that the slot 7894 // type can take. 7895 EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` 7896 7897 // The date that the slot type was updated. When you create a resource, the 7898 // creation date and last update date are the same. 7899 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 7900 7901 // The name of the slot type. 7902 Name *string `locationName:"name" min:"1" type:"string"` 7903 7904 // The strategy that Amazon Lex uses to determine the value of the slot. For 7905 // more information, see PutSlotType. 7906 ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` 7907 7908 // The version of the slot type. 7909 Version *string `locationName:"version" min:"1" type:"string"` 7910} 7911 7912// String returns the string representation 7913func (s GetSlotTypeOutput) String() string { 7914 return awsutil.Prettify(s) 7915} 7916 7917// GoString returns the string representation 7918func (s GetSlotTypeOutput) GoString() string { 7919 return s.String() 7920} 7921 7922// SetChecksum sets the Checksum field's value. 7923func (s *GetSlotTypeOutput) SetChecksum(v string) *GetSlotTypeOutput { 7924 s.Checksum = &v 7925 return s 7926} 7927 7928// SetCreatedDate sets the CreatedDate field's value. 7929func (s *GetSlotTypeOutput) SetCreatedDate(v time.Time) *GetSlotTypeOutput { 7930 s.CreatedDate = &v 7931 return s 7932} 7933 7934// SetDescription sets the Description field's value. 7935func (s *GetSlotTypeOutput) SetDescription(v string) *GetSlotTypeOutput { 7936 s.Description = &v 7937 return s 7938} 7939 7940// SetEnumerationValues sets the EnumerationValues field's value. 7941func (s *GetSlotTypeOutput) SetEnumerationValues(v []*EnumerationValue) *GetSlotTypeOutput { 7942 s.EnumerationValues = v 7943 return s 7944} 7945 7946// SetLastUpdatedDate sets the LastUpdatedDate field's value. 7947func (s *GetSlotTypeOutput) SetLastUpdatedDate(v time.Time) *GetSlotTypeOutput { 7948 s.LastUpdatedDate = &v 7949 return s 7950} 7951 7952// SetName sets the Name field's value. 7953func (s *GetSlotTypeOutput) SetName(v string) *GetSlotTypeOutput { 7954 s.Name = &v 7955 return s 7956} 7957 7958// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. 7959func (s *GetSlotTypeOutput) SetValueSelectionStrategy(v string) *GetSlotTypeOutput { 7960 s.ValueSelectionStrategy = &v 7961 return s 7962} 7963 7964// SetVersion sets the Version field's value. 7965func (s *GetSlotTypeOutput) SetVersion(v string) *GetSlotTypeOutput { 7966 s.Version = &v 7967 return s 7968} 7969 7970// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersionsRequest 7971type GetSlotTypeVersionsInput struct { 7972 _ struct{} `type:"structure"` 7973 7974 // The maximum number of slot type versions to return in the response. The default 7975 // is 10. 7976 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 7977 7978 // The name of the slot type for which versions should be returned. 7979 // 7980 // Name is a required field 7981 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 7982 7983 // A pagination token for fetching the next page of slot type versions. If the 7984 // response to this call is truncated, Amazon Lex returns a pagination token 7985 // in the response. To fetch the next page of versions, specify the pagination 7986 // token in the next request. 7987 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 7988} 7989 7990// String returns the string representation 7991func (s GetSlotTypeVersionsInput) String() string { 7992 return awsutil.Prettify(s) 7993} 7994 7995// GoString returns the string representation 7996func (s GetSlotTypeVersionsInput) GoString() string { 7997 return s.String() 7998} 7999 8000// Validate inspects the fields of the type to determine if they are valid. 8001func (s *GetSlotTypeVersionsInput) Validate() error { 8002 invalidParams := request.ErrInvalidParams{Context: "GetSlotTypeVersionsInput"} 8003 if s.MaxResults != nil && *s.MaxResults < 1 { 8004 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 8005 } 8006 if s.Name == nil { 8007 invalidParams.Add(request.NewErrParamRequired("Name")) 8008 } 8009 if s.Name != nil && len(*s.Name) < 1 { 8010 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 8011 } 8012 8013 if invalidParams.Len() > 0 { 8014 return invalidParams 8015 } 8016 return nil 8017} 8018 8019// SetMaxResults sets the MaxResults field's value. 8020func (s *GetSlotTypeVersionsInput) SetMaxResults(v int64) *GetSlotTypeVersionsInput { 8021 s.MaxResults = &v 8022 return s 8023} 8024 8025// SetName sets the Name field's value. 8026func (s *GetSlotTypeVersionsInput) SetName(v string) *GetSlotTypeVersionsInput { 8027 s.Name = &v 8028 return s 8029} 8030 8031// SetNextToken sets the NextToken field's value. 8032func (s *GetSlotTypeVersionsInput) SetNextToken(v string) *GetSlotTypeVersionsInput { 8033 s.NextToken = &v 8034 return s 8035} 8036 8037// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersionsResponse 8038type GetSlotTypeVersionsOutput struct { 8039 _ struct{} `type:"structure"` 8040 8041 // A pagination token for fetching the next page of slot type versions. If the 8042 // response to this call is truncated, Amazon Lex returns a pagination token 8043 // in the response. To fetch the next page of versions, specify the pagination 8044 // token in the next request. 8045 NextToken *string `locationName:"nextToken" type:"string"` 8046 8047 // An array of SlotTypeMetadata objects, one for each numbered version of the 8048 // slot type plus one for the $LATEST version. 8049 SlotTypes []*SlotTypeMetadata `locationName:"slotTypes" type:"list"` 8050} 8051 8052// String returns the string representation 8053func (s GetSlotTypeVersionsOutput) String() string { 8054 return awsutil.Prettify(s) 8055} 8056 8057// GoString returns the string representation 8058func (s GetSlotTypeVersionsOutput) GoString() string { 8059 return s.String() 8060} 8061 8062// SetNextToken sets the NextToken field's value. 8063func (s *GetSlotTypeVersionsOutput) SetNextToken(v string) *GetSlotTypeVersionsOutput { 8064 s.NextToken = &v 8065 return s 8066} 8067 8068// SetSlotTypes sets the SlotTypes field's value. 8069func (s *GetSlotTypeVersionsOutput) SetSlotTypes(v []*SlotTypeMetadata) *GetSlotTypeVersionsOutput { 8070 s.SlotTypes = v 8071 return s 8072} 8073 8074// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypesRequest 8075type GetSlotTypesInput struct { 8076 _ struct{} `type:"structure"` 8077 8078 // The maximum number of slot types to return in the response. The default is 8079 // 10. 8080 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 8081 8082 // Substring to match in slot type names. A slot type will be returned if any 8083 // part of its name matches the substring. For example, "xyz" matches both "xyzabc" 8084 // and "abcxyz." 8085 NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` 8086 8087 // A pagination token that fetches the next page of slot types. If the response 8088 // to this API call is truncated, Amazon Lex returns a pagination token in the 8089 // response. To fetch next page of slot types, specify the pagination token 8090 // in the next request. 8091 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 8092} 8093 8094// String returns the string representation 8095func (s GetSlotTypesInput) String() string { 8096 return awsutil.Prettify(s) 8097} 8098 8099// GoString returns the string representation 8100func (s GetSlotTypesInput) GoString() string { 8101 return s.String() 8102} 8103 8104// Validate inspects the fields of the type to determine if they are valid. 8105func (s *GetSlotTypesInput) Validate() error { 8106 invalidParams := request.ErrInvalidParams{Context: "GetSlotTypesInput"} 8107 if s.MaxResults != nil && *s.MaxResults < 1 { 8108 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 8109 } 8110 if s.NameContains != nil && len(*s.NameContains) < 1 { 8111 invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) 8112 } 8113 8114 if invalidParams.Len() > 0 { 8115 return invalidParams 8116 } 8117 return nil 8118} 8119 8120// SetMaxResults sets the MaxResults field's value. 8121func (s *GetSlotTypesInput) SetMaxResults(v int64) *GetSlotTypesInput { 8122 s.MaxResults = &v 8123 return s 8124} 8125 8126// SetNameContains sets the NameContains field's value. 8127func (s *GetSlotTypesInput) SetNameContains(v string) *GetSlotTypesInput { 8128 s.NameContains = &v 8129 return s 8130} 8131 8132// SetNextToken sets the NextToken field's value. 8133func (s *GetSlotTypesInput) SetNextToken(v string) *GetSlotTypesInput { 8134 s.NextToken = &v 8135 return s 8136} 8137 8138// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypesResponse 8139type GetSlotTypesOutput struct { 8140 _ struct{} `type:"structure"` 8141 8142 // If the response is truncated, it includes a pagination token that you can 8143 // specify in your next request to fetch the next page of slot types. 8144 NextToken *string `locationName:"nextToken" type:"string"` 8145 8146 // An array of objects, one for each slot type, that provides information such 8147 // as the name of the slot type, the version, and a description. 8148 SlotTypes []*SlotTypeMetadata `locationName:"slotTypes" type:"list"` 8149} 8150 8151// String returns the string representation 8152func (s GetSlotTypesOutput) String() string { 8153 return awsutil.Prettify(s) 8154} 8155 8156// GoString returns the string representation 8157func (s GetSlotTypesOutput) GoString() string { 8158 return s.String() 8159} 8160 8161// SetNextToken sets the NextToken field's value. 8162func (s *GetSlotTypesOutput) SetNextToken(v string) *GetSlotTypesOutput { 8163 s.NextToken = &v 8164 return s 8165} 8166 8167// SetSlotTypes sets the SlotTypes field's value. 8168func (s *GetSlotTypesOutput) SetSlotTypes(v []*SlotTypeMetadata) *GetSlotTypesOutput { 8169 s.SlotTypes = v 8170 return s 8171} 8172 8173// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesViewRequest 8174type GetUtterancesViewInput struct { 8175 _ struct{} `type:"structure"` 8176 8177 // The name of the bot for which utterance information should be returned. 8178 // 8179 // BotName is a required field 8180 BotName *string `location:"uri" locationName:"botname" min:"2" type:"string" required:"true"` 8181 8182 // An array of bot versions for which utterance information should be returned. 8183 // The limit is 5 versions per request. 8184 // 8185 // BotVersions is a required field 8186 BotVersions []*string `location:"querystring" locationName:"bot_versions" min:"1" type:"list" required:"true"` 8187 8188 // To return utterances that were recognized and handled, useDetected. To return 8189 // utterances that were not recognized, use Missed. 8190 // 8191 // StatusType is a required field 8192 StatusType *string `location:"querystring" locationName:"status_type" type:"string" required:"true" enum:"StatusType"` 8193} 8194 8195// String returns the string representation 8196func (s GetUtterancesViewInput) String() string { 8197 return awsutil.Prettify(s) 8198} 8199 8200// GoString returns the string representation 8201func (s GetUtterancesViewInput) GoString() string { 8202 return s.String() 8203} 8204 8205// Validate inspects the fields of the type to determine if they are valid. 8206func (s *GetUtterancesViewInput) Validate() error { 8207 invalidParams := request.ErrInvalidParams{Context: "GetUtterancesViewInput"} 8208 if s.BotName == nil { 8209 invalidParams.Add(request.NewErrParamRequired("BotName")) 8210 } 8211 if s.BotName != nil && len(*s.BotName) < 2 { 8212 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 8213 } 8214 if s.BotVersions == nil { 8215 invalidParams.Add(request.NewErrParamRequired("BotVersions")) 8216 } 8217 if s.BotVersions != nil && len(s.BotVersions) < 1 { 8218 invalidParams.Add(request.NewErrParamMinLen("BotVersions", 1)) 8219 } 8220 if s.StatusType == nil { 8221 invalidParams.Add(request.NewErrParamRequired("StatusType")) 8222 } 8223 8224 if invalidParams.Len() > 0 { 8225 return invalidParams 8226 } 8227 return nil 8228} 8229 8230// SetBotName sets the BotName field's value. 8231func (s *GetUtterancesViewInput) SetBotName(v string) *GetUtterancesViewInput { 8232 s.BotName = &v 8233 return s 8234} 8235 8236// SetBotVersions sets the BotVersions field's value. 8237func (s *GetUtterancesViewInput) SetBotVersions(v []*string) *GetUtterancesViewInput { 8238 s.BotVersions = v 8239 return s 8240} 8241 8242// SetStatusType sets the StatusType field's value. 8243func (s *GetUtterancesViewInput) SetStatusType(v string) *GetUtterancesViewInput { 8244 s.StatusType = &v 8245 return s 8246} 8247 8248// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesViewResponse 8249type GetUtterancesViewOutput struct { 8250 _ struct{} `type:"structure"` 8251 8252 // The name of the bot for which utterance information was returned. 8253 BotName *string `locationName:"botName" min:"2" type:"string"` 8254 8255 // An array of UtteranceList objects, each containing a list of UtteranceData 8256 // objects describing the utterances that were processed by your bot. The response 8257 // contains a maximum of 100 UtteranceData objects for each version. 8258 Utterances []*UtteranceList `locationName:"utterances" type:"list"` 8259} 8260 8261// String returns the string representation 8262func (s GetUtterancesViewOutput) String() string { 8263 return awsutil.Prettify(s) 8264} 8265 8266// GoString returns the string representation 8267func (s GetUtterancesViewOutput) GoString() string { 8268 return s.String() 8269} 8270 8271// SetBotName sets the BotName field's value. 8272func (s *GetUtterancesViewOutput) SetBotName(v string) *GetUtterancesViewOutput { 8273 s.BotName = &v 8274 return s 8275} 8276 8277// SetUtterances sets the Utterances field's value. 8278func (s *GetUtterancesViewOutput) SetUtterances(v []*UtteranceList) *GetUtterancesViewOutput { 8279 s.Utterances = v 8280 return s 8281} 8282 8283// Identifies the specific version of an intent. 8284// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Intent 8285type Intent struct { 8286 _ struct{} `type:"structure"` 8287 8288 // The name of the intent. 8289 // 8290 // IntentName is a required field 8291 IntentName *string `locationName:"intentName" min:"1" type:"string" required:"true"` 8292 8293 // The version of the intent. 8294 // 8295 // IntentVersion is a required field 8296 IntentVersion *string `locationName:"intentVersion" min:"1" type:"string" required:"true"` 8297} 8298 8299// String returns the string representation 8300func (s Intent) String() string { 8301 return awsutil.Prettify(s) 8302} 8303 8304// GoString returns the string representation 8305func (s Intent) GoString() string { 8306 return s.String() 8307} 8308 8309// Validate inspects the fields of the type to determine if they are valid. 8310func (s *Intent) Validate() error { 8311 invalidParams := request.ErrInvalidParams{Context: "Intent"} 8312 if s.IntentName == nil { 8313 invalidParams.Add(request.NewErrParamRequired("IntentName")) 8314 } 8315 if s.IntentName != nil && len(*s.IntentName) < 1 { 8316 invalidParams.Add(request.NewErrParamMinLen("IntentName", 1)) 8317 } 8318 if s.IntentVersion == nil { 8319 invalidParams.Add(request.NewErrParamRequired("IntentVersion")) 8320 } 8321 if s.IntentVersion != nil && len(*s.IntentVersion) < 1 { 8322 invalidParams.Add(request.NewErrParamMinLen("IntentVersion", 1)) 8323 } 8324 8325 if invalidParams.Len() > 0 { 8326 return invalidParams 8327 } 8328 return nil 8329} 8330 8331// SetIntentName sets the IntentName field's value. 8332func (s *Intent) SetIntentName(v string) *Intent { 8333 s.IntentName = &v 8334 return s 8335} 8336 8337// SetIntentVersion sets the IntentVersion field's value. 8338func (s *Intent) SetIntentVersion(v string) *Intent { 8339 s.IntentVersion = &v 8340 return s 8341} 8342 8343// Provides information about an intent. 8344// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/IntentMetadata 8345type IntentMetadata struct { 8346 _ struct{} `type:"structure"` 8347 8348 // The date that the intent was created. 8349 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 8350 8351 // A description of the intent. 8352 Description *string `locationName:"description" type:"string"` 8353 8354 // The date that the intent was updated. When you create an intent, the creation 8355 // date and last updated date are the same. 8356 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 8357 8358 // The name of the intent. 8359 Name *string `locationName:"name" min:"1" type:"string"` 8360 8361 // The version of the intent. 8362 Version *string `locationName:"version" min:"1" type:"string"` 8363} 8364 8365// String returns the string representation 8366func (s IntentMetadata) String() string { 8367 return awsutil.Prettify(s) 8368} 8369 8370// GoString returns the string representation 8371func (s IntentMetadata) GoString() string { 8372 return s.String() 8373} 8374 8375// SetCreatedDate sets the CreatedDate field's value. 8376func (s *IntentMetadata) SetCreatedDate(v time.Time) *IntentMetadata { 8377 s.CreatedDate = &v 8378 return s 8379} 8380 8381// SetDescription sets the Description field's value. 8382func (s *IntentMetadata) SetDescription(v string) *IntentMetadata { 8383 s.Description = &v 8384 return s 8385} 8386 8387// SetLastUpdatedDate sets the LastUpdatedDate field's value. 8388func (s *IntentMetadata) SetLastUpdatedDate(v time.Time) *IntentMetadata { 8389 s.LastUpdatedDate = &v 8390 return s 8391} 8392 8393// SetName sets the Name field's value. 8394func (s *IntentMetadata) SetName(v string) *IntentMetadata { 8395 s.Name = &v 8396 return s 8397} 8398 8399// SetVersion sets the Version field's value. 8400func (s *IntentMetadata) SetVersion(v string) *IntentMetadata { 8401 s.Version = &v 8402 return s 8403} 8404 8405// The message object that provides the message text and its type. 8406// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Message 8407type Message struct { 8408 _ struct{} `type:"structure"` 8409 8410 // The text of the message. 8411 // 8412 // Content is a required field 8413 Content *string `locationName:"content" min:"1" type:"string" required:"true"` 8414 8415 // The content type of the message string. 8416 // 8417 // ContentType is a required field 8418 ContentType *string `locationName:"contentType" type:"string" required:"true" enum:"ContentType"` 8419} 8420 8421// String returns the string representation 8422func (s Message) String() string { 8423 return awsutil.Prettify(s) 8424} 8425 8426// GoString returns the string representation 8427func (s Message) GoString() string { 8428 return s.String() 8429} 8430 8431// Validate inspects the fields of the type to determine if they are valid. 8432func (s *Message) Validate() error { 8433 invalidParams := request.ErrInvalidParams{Context: "Message"} 8434 if s.Content == nil { 8435 invalidParams.Add(request.NewErrParamRequired("Content")) 8436 } 8437 if s.Content != nil && len(*s.Content) < 1 { 8438 invalidParams.Add(request.NewErrParamMinLen("Content", 1)) 8439 } 8440 if s.ContentType == nil { 8441 invalidParams.Add(request.NewErrParamRequired("ContentType")) 8442 } 8443 8444 if invalidParams.Len() > 0 { 8445 return invalidParams 8446 } 8447 return nil 8448} 8449 8450// SetContent sets the Content field's value. 8451func (s *Message) SetContent(v string) *Message { 8452 s.Content = &v 8453 return s 8454} 8455 8456// SetContentType sets the ContentType field's value. 8457func (s *Message) SetContentType(v string) *Message { 8458 s.ContentType = &v 8459 return s 8460} 8461 8462// Obtains information from the user. To define a prompt, provide one or more 8463// messages and specify the number of attempts to get information from the user. 8464// If you provide more than one message, Amazon Lex chooses one of the messages 8465// to use to prompt the user. For more information, see how-it-works. 8466// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Prompt 8467type Prompt struct { 8468 _ struct{} `type:"structure"` 8469 8470 // The number of times to prompt the user for information. 8471 // 8472 // MaxAttempts is a required field 8473 MaxAttempts *int64 `locationName:"maxAttempts" min:"1" type:"integer" required:"true"` 8474 8475 // An array of objects, each of which provides a message string and its type. 8476 // You can specify the message string in plain text or in Speech Synthesis Markup 8477 // Language (SSML). 8478 // 8479 // Messages is a required field 8480 Messages []*Message `locationName:"messages" min:"1" type:"list" required:"true"` 8481 8482 // A response card. Amazon Lex uses this prompt at runtime, in the PostText 8483 // API response. It substitutes session attributes and slot values for placeholders 8484 // in the response card. For more information, see ex-resp-card. 8485 ResponseCard *string `locationName:"responseCard" min:"1" type:"string"` 8486} 8487 8488// String returns the string representation 8489func (s Prompt) String() string { 8490 return awsutil.Prettify(s) 8491} 8492 8493// GoString returns the string representation 8494func (s Prompt) GoString() string { 8495 return s.String() 8496} 8497 8498// Validate inspects the fields of the type to determine if they are valid. 8499func (s *Prompt) Validate() error { 8500 invalidParams := request.ErrInvalidParams{Context: "Prompt"} 8501 if s.MaxAttempts == nil { 8502 invalidParams.Add(request.NewErrParamRequired("MaxAttempts")) 8503 } 8504 if s.MaxAttempts != nil && *s.MaxAttempts < 1 { 8505 invalidParams.Add(request.NewErrParamMinValue("MaxAttempts", 1)) 8506 } 8507 if s.Messages == nil { 8508 invalidParams.Add(request.NewErrParamRequired("Messages")) 8509 } 8510 if s.Messages != nil && len(s.Messages) < 1 { 8511 invalidParams.Add(request.NewErrParamMinLen("Messages", 1)) 8512 } 8513 if s.ResponseCard != nil && len(*s.ResponseCard) < 1 { 8514 invalidParams.Add(request.NewErrParamMinLen("ResponseCard", 1)) 8515 } 8516 if s.Messages != nil { 8517 for i, v := range s.Messages { 8518 if v == nil { 8519 continue 8520 } 8521 if err := v.Validate(); err != nil { 8522 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Messages", i), err.(request.ErrInvalidParams)) 8523 } 8524 } 8525 } 8526 8527 if invalidParams.Len() > 0 { 8528 return invalidParams 8529 } 8530 return nil 8531} 8532 8533// SetMaxAttempts sets the MaxAttempts field's value. 8534func (s *Prompt) SetMaxAttempts(v int64) *Prompt { 8535 s.MaxAttempts = &v 8536 return s 8537} 8538 8539// SetMessages sets the Messages field's value. 8540func (s *Prompt) SetMessages(v []*Message) *Prompt { 8541 s.Messages = v 8542 return s 8543} 8544 8545// SetResponseCard sets the ResponseCard field's value. 8546func (s *Prompt) SetResponseCard(v string) *Prompt { 8547 s.ResponseCard = &v 8548 return s 8549} 8550 8551// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAliasRequest 8552type PutBotAliasInput struct { 8553 _ struct{} `type:"structure"` 8554 8555 // The name of the bot. 8556 // 8557 // BotName is a required field 8558 BotName *string `location:"uri" locationName:"botName" min:"2" type:"string" required:"true"` 8559 8560 // The version of the bot. 8561 // 8562 // BotVersion is a required field 8563 BotVersion *string `locationName:"botVersion" min:"1" type:"string" required:"true"` 8564 8565 // Identifies a specific revision of the $LATEST version. 8566 // 8567 // When you create a new bot alias, leave the checksum field blank. If you specify 8568 // a checksum you get a BadRequestException exception. 8569 // 8570 // When you want to update a bot alias, set the checksum field to the checksum 8571 // of the most recent revision of the $LATEST version. If you don't specify 8572 // the checksum field, or if the checksum does not match the $LATEST version, 8573 // you get a PreconditionFailedException exception. 8574 Checksum *string `locationName:"checksum" type:"string"` 8575 8576 // A description of the alias. 8577 Description *string `locationName:"description" type:"string"` 8578 8579 // The name of the alias. The name is not case sensitive. 8580 // 8581 // Name is a required field 8582 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 8583} 8584 8585// String returns the string representation 8586func (s PutBotAliasInput) String() string { 8587 return awsutil.Prettify(s) 8588} 8589 8590// GoString returns the string representation 8591func (s PutBotAliasInput) GoString() string { 8592 return s.String() 8593} 8594 8595// Validate inspects the fields of the type to determine if they are valid. 8596func (s *PutBotAliasInput) Validate() error { 8597 invalidParams := request.ErrInvalidParams{Context: "PutBotAliasInput"} 8598 if s.BotName == nil { 8599 invalidParams.Add(request.NewErrParamRequired("BotName")) 8600 } 8601 if s.BotName != nil && len(*s.BotName) < 2 { 8602 invalidParams.Add(request.NewErrParamMinLen("BotName", 2)) 8603 } 8604 if s.BotVersion == nil { 8605 invalidParams.Add(request.NewErrParamRequired("BotVersion")) 8606 } 8607 if s.BotVersion != nil && len(*s.BotVersion) < 1 { 8608 invalidParams.Add(request.NewErrParamMinLen("BotVersion", 1)) 8609 } 8610 if s.Name == nil { 8611 invalidParams.Add(request.NewErrParamRequired("Name")) 8612 } 8613 if s.Name != nil && len(*s.Name) < 1 { 8614 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 8615 } 8616 8617 if invalidParams.Len() > 0 { 8618 return invalidParams 8619 } 8620 return nil 8621} 8622 8623// SetBotName sets the BotName field's value. 8624func (s *PutBotAliasInput) SetBotName(v string) *PutBotAliasInput { 8625 s.BotName = &v 8626 return s 8627} 8628 8629// SetBotVersion sets the BotVersion field's value. 8630func (s *PutBotAliasInput) SetBotVersion(v string) *PutBotAliasInput { 8631 s.BotVersion = &v 8632 return s 8633} 8634 8635// SetChecksum sets the Checksum field's value. 8636func (s *PutBotAliasInput) SetChecksum(v string) *PutBotAliasInput { 8637 s.Checksum = &v 8638 return s 8639} 8640 8641// SetDescription sets the Description field's value. 8642func (s *PutBotAliasInput) SetDescription(v string) *PutBotAliasInput { 8643 s.Description = &v 8644 return s 8645} 8646 8647// SetName sets the Name field's value. 8648func (s *PutBotAliasInput) SetName(v string) *PutBotAliasInput { 8649 s.Name = &v 8650 return s 8651} 8652 8653// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAliasResponse 8654type PutBotAliasOutput struct { 8655 _ struct{} `type:"structure"` 8656 8657 // The name of the bot that the alias points to. 8658 BotName *string `locationName:"botName" min:"2" type:"string"` 8659 8660 // The version of the bot that the alias points to. 8661 BotVersion *string `locationName:"botVersion" min:"1" type:"string"` 8662 8663 // The checksum for the current version of the alias. 8664 Checksum *string `locationName:"checksum" type:"string"` 8665 8666 // The date that the bot alias was created. 8667 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 8668 8669 // A description of the alias. 8670 Description *string `locationName:"description" type:"string"` 8671 8672 // The date that the bot alias was updated. When you create a resource, the 8673 // creation date and the last updated date are the same. 8674 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 8675 8676 // The name of the alias. 8677 Name *string `locationName:"name" min:"1" type:"string"` 8678} 8679 8680// String returns the string representation 8681func (s PutBotAliasOutput) String() string { 8682 return awsutil.Prettify(s) 8683} 8684 8685// GoString returns the string representation 8686func (s PutBotAliasOutput) GoString() string { 8687 return s.String() 8688} 8689 8690// SetBotName sets the BotName field's value. 8691func (s *PutBotAliasOutput) SetBotName(v string) *PutBotAliasOutput { 8692 s.BotName = &v 8693 return s 8694} 8695 8696// SetBotVersion sets the BotVersion field's value. 8697func (s *PutBotAliasOutput) SetBotVersion(v string) *PutBotAliasOutput { 8698 s.BotVersion = &v 8699 return s 8700} 8701 8702// SetChecksum sets the Checksum field's value. 8703func (s *PutBotAliasOutput) SetChecksum(v string) *PutBotAliasOutput { 8704 s.Checksum = &v 8705 return s 8706} 8707 8708// SetCreatedDate sets the CreatedDate field's value. 8709func (s *PutBotAliasOutput) SetCreatedDate(v time.Time) *PutBotAliasOutput { 8710 s.CreatedDate = &v 8711 return s 8712} 8713 8714// SetDescription sets the Description field's value. 8715func (s *PutBotAliasOutput) SetDescription(v string) *PutBotAliasOutput { 8716 s.Description = &v 8717 return s 8718} 8719 8720// SetLastUpdatedDate sets the LastUpdatedDate field's value. 8721func (s *PutBotAliasOutput) SetLastUpdatedDate(v time.Time) *PutBotAliasOutput { 8722 s.LastUpdatedDate = &v 8723 return s 8724} 8725 8726// SetName sets the Name field's value. 8727func (s *PutBotAliasOutput) SetName(v string) *PutBotAliasOutput { 8728 s.Name = &v 8729 return s 8730} 8731 8732// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotRequest 8733type PutBotInput struct { 8734 _ struct{} `type:"structure"` 8735 8736 // When Amazon Lex can't understand the user's input in context, it tries to 8737 // elicit the information a few times. After that, Amazon Lex sends the message 8738 // defined in abortStatement to the user, and then aborts the conversation. 8739 // To set the number of retries, use the valueElicitationPrompt field for the 8740 // slot type. 8741 // 8742 // For example, in a pizza ordering bot, Amazon Lex might ask a user "What type 8743 // of crust would you like?" If the user's response is not one of the expected 8744 // responses (for example, "thin crust, "deep dish," etc.), Amazon Lex tries 8745 // to elicit a correct response a few more times. 8746 // 8747 // For example, in a pizza ordering application, OrderPizza might be one of 8748 // the intents. This intent might require the CrustType slot. You specify the 8749 // valueElicitationPrompt field when you create the CrustType slot. 8750 AbortStatement *Statement `locationName:"abortStatement" type:"structure"` 8751 8752 // Identifies a specific revision of the $LATEST version. 8753 // 8754 // When you create a new bot, leave the checksum field blank. If you specify 8755 // a checksum you get a BadRequestException exception. 8756 // 8757 // When you want to update a bot, set the checksum field to the checksum of 8758 // the most recent revision of the $LATEST version. If you don't specify the 8759 // checksum field, or if the checksum does not match the $LATEST version, you 8760 // get a PreconditionFailedException exception. 8761 Checksum *string `locationName:"checksum" type:"string"` 8762 8763 // For each Amazon Lex bot created with the Amazon Lex Model Building Service, 8764 // you must specify whether your use of Amazon Lex is related to a website, 8765 // program, or other application that is directed or targeted, in whole or in 8766 // part, to children under age 13 and subject to the Children's Online Privacy 8767 // Protection Act (COPPA) by specifying true or false in the childDirected field. 8768 // By specifying true in the childDirected field, you confirm that your use 8769 // of Amazon Lex is related to a website, program, or other application that 8770 // is directed or targeted, in whole or in part, to children under age 13 and 8771 // subject to COPPA. By specifying false in the childDirected field, you confirm 8772 // that your use of Amazon Lex is not related to a website, program, or other 8773 // application that is directed or targeted, in whole or in part, to children 8774 // under age 13 and subject to COPPA. You may not specify a default value for 8775 // the childDirected field that does not accurately reflect whether your use 8776 // of Amazon Lex is related to a website, program, or other application that 8777 // is directed or targeted, in whole or in part, to children under age 13 and 8778 // subject to COPPA. 8779 // 8780 // If your use of Amazon Lex relates to a website, program, or other application 8781 // that is directed in whole or in part, to children under age 13, you must 8782 // obtain any required verifiable parental consent under COPPA. For information 8783 // regarding the use of Amazon Lex in connection with websites, programs, or 8784 // other applications that are directed or targeted, in whole or in part, to 8785 // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) 8786 // 8787 // ChildDirected is a required field 8788 ChildDirected *bool `locationName:"childDirected" type:"boolean" required:"true"` 8789 8790 // When Amazon Lex doesn't understand the user's intent, it uses this message 8791 // to get clarification. To specify how many times Amazon Lex should repeate 8792 // the clarification prompt, use the maxAttempts field. If Amazon Lex still 8793 // doesn't understand, it sends the message in the abortStatement field. 8794 // 8795 // When you create a clarification prompt, make sure that it suggests the correct 8796 // response from the user. for example, for a bot that orders pizza and drinks, 8797 // you might create this clarification prompt: "What would you like to do? You 8798 // can say 'Order a pizza' or 'Order a drink.'" 8799 ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` 8800 8801 // A description of the bot. 8802 Description *string `locationName:"description" type:"string"` 8803 8804 // The maximum time in seconds that Amazon Lex retains the data gathered in 8805 // a conversation. 8806 // 8807 // A user interaction session remains active for the amount of time specified. 8808 // If no conversation occurs during this time, the session expires and Amazon 8809 // Lex deletes any data provided before the timeout. 8810 // 8811 // For example, suppose that a user chooses the OrderPizza intent, but gets 8812 // sidetracked halfway through placing an order. If the user doesn't complete 8813 // the order within the specified time, Amazon Lex discards the slot information 8814 // that it gathered, and the user must start over. 8815 // 8816 // If you don't include the idleSessionTTLInSeconds element in a PutBot operation 8817 // request, Amazon Lex uses the default value. This is also true if the request 8818 // replaces an existing bot. 8819 // 8820 // The default is 300 seconds (5 minutes). 8821 IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` 8822 8823 // An array of Intent objects. Each intent represents a command that a user 8824 // can express. For example, a pizza ordering bot might support an OrderPizza 8825 // intent. For more information, see how-it-works. 8826 Intents []*Intent `locationName:"intents" type:"list"` 8827 8828 // Specifies the target locale for the bot. Any intent used in the bot must 8829 // be compatible with the locale of the bot. 8830 // 8831 // The default is en-US. 8832 // 8833 // Locale is a required field 8834 Locale *string `locationName:"locale" type:"string" required:"true" enum:"Locale"` 8835 8836 // The name of the bot. The name is not case sensitive. 8837 // 8838 // Name is a required field 8839 Name *string `location:"uri" locationName:"name" min:"2" type:"string" required:"true"` 8840 8841 // If you set the processBehavior element to Build, Amazon Lex builds the bot 8842 // so that it can be run. If you set the element to SaveAmazon Lex saves the 8843 // bot, but doesn't build it. 8844 // 8845 // If you don't specify this value, the default value is Save. 8846 ProcessBehavior *string `locationName:"processBehavior" type:"string" enum:"ProcessBehavior"` 8847 8848 // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions 8849 // with the user. The locale configured for the voice must match the locale 8850 // of the bot. For more information, see Available Voices (http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) 8851 // in the Amazon Polly Developer Guide. 8852 VoiceId *string `locationName:"voiceId" type:"string"` 8853} 8854 8855// String returns the string representation 8856func (s PutBotInput) String() string { 8857 return awsutil.Prettify(s) 8858} 8859 8860// GoString returns the string representation 8861func (s PutBotInput) GoString() string { 8862 return s.String() 8863} 8864 8865// Validate inspects the fields of the type to determine if they are valid. 8866func (s *PutBotInput) Validate() error { 8867 invalidParams := request.ErrInvalidParams{Context: "PutBotInput"} 8868 if s.ChildDirected == nil { 8869 invalidParams.Add(request.NewErrParamRequired("ChildDirected")) 8870 } 8871 if s.IdleSessionTTLInSeconds != nil && *s.IdleSessionTTLInSeconds < 60 { 8872 invalidParams.Add(request.NewErrParamMinValue("IdleSessionTTLInSeconds", 60)) 8873 } 8874 if s.Locale == nil { 8875 invalidParams.Add(request.NewErrParamRequired("Locale")) 8876 } 8877 if s.Name == nil { 8878 invalidParams.Add(request.NewErrParamRequired("Name")) 8879 } 8880 if s.Name != nil && len(*s.Name) < 2 { 8881 invalidParams.Add(request.NewErrParamMinLen("Name", 2)) 8882 } 8883 if s.AbortStatement != nil { 8884 if err := s.AbortStatement.Validate(); err != nil { 8885 invalidParams.AddNested("AbortStatement", err.(request.ErrInvalidParams)) 8886 } 8887 } 8888 if s.ClarificationPrompt != nil { 8889 if err := s.ClarificationPrompt.Validate(); err != nil { 8890 invalidParams.AddNested("ClarificationPrompt", err.(request.ErrInvalidParams)) 8891 } 8892 } 8893 if s.Intents != nil { 8894 for i, v := range s.Intents { 8895 if v == nil { 8896 continue 8897 } 8898 if err := v.Validate(); err != nil { 8899 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Intents", i), err.(request.ErrInvalidParams)) 8900 } 8901 } 8902 } 8903 8904 if invalidParams.Len() > 0 { 8905 return invalidParams 8906 } 8907 return nil 8908} 8909 8910// SetAbortStatement sets the AbortStatement field's value. 8911func (s *PutBotInput) SetAbortStatement(v *Statement) *PutBotInput { 8912 s.AbortStatement = v 8913 return s 8914} 8915 8916// SetChecksum sets the Checksum field's value. 8917func (s *PutBotInput) SetChecksum(v string) *PutBotInput { 8918 s.Checksum = &v 8919 return s 8920} 8921 8922// SetChildDirected sets the ChildDirected field's value. 8923func (s *PutBotInput) SetChildDirected(v bool) *PutBotInput { 8924 s.ChildDirected = &v 8925 return s 8926} 8927 8928// SetClarificationPrompt sets the ClarificationPrompt field's value. 8929func (s *PutBotInput) SetClarificationPrompt(v *Prompt) *PutBotInput { 8930 s.ClarificationPrompt = v 8931 return s 8932} 8933 8934// SetDescription sets the Description field's value. 8935func (s *PutBotInput) SetDescription(v string) *PutBotInput { 8936 s.Description = &v 8937 return s 8938} 8939 8940// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. 8941func (s *PutBotInput) SetIdleSessionTTLInSeconds(v int64) *PutBotInput { 8942 s.IdleSessionTTLInSeconds = &v 8943 return s 8944} 8945 8946// SetIntents sets the Intents field's value. 8947func (s *PutBotInput) SetIntents(v []*Intent) *PutBotInput { 8948 s.Intents = v 8949 return s 8950} 8951 8952// SetLocale sets the Locale field's value. 8953func (s *PutBotInput) SetLocale(v string) *PutBotInput { 8954 s.Locale = &v 8955 return s 8956} 8957 8958// SetName sets the Name field's value. 8959func (s *PutBotInput) SetName(v string) *PutBotInput { 8960 s.Name = &v 8961 return s 8962} 8963 8964// SetProcessBehavior sets the ProcessBehavior field's value. 8965func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput { 8966 s.ProcessBehavior = &v 8967 return s 8968} 8969 8970// SetVoiceId sets the VoiceId field's value. 8971func (s *PutBotInput) SetVoiceId(v string) *PutBotInput { 8972 s.VoiceId = &v 8973 return s 8974} 8975 8976// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotResponse 8977type PutBotOutput struct { 8978 _ struct{} `type:"structure"` 8979 8980 // The message that Amazon Lex uses to abort a conversation. For more information, 8981 // see PutBot. 8982 AbortStatement *Statement `locationName:"abortStatement" type:"structure"` 8983 8984 // Checksum of the bot that you created. 8985 Checksum *string `locationName:"checksum" type:"string"` 8986 8987 // For each Amazon Lex bot created with the Amazon Lex Model Building Service, 8988 // you must specify whether your use of Amazon Lex is related to a website, 8989 // program, or other application that is directed or targeted, in whole or in 8990 // part, to children under age 13 and subject to the Children's Online Privacy 8991 // Protection Act (COPPA) by specifying true or false in the childDirected field. 8992 // By specifying true in the childDirected field, you confirm that your use 8993 // of Amazon Lex is related to a website, program, or other application that 8994 // is directed or targeted, in whole or in part, to children under age 13 and 8995 // subject to COPPA. By specifying false in the childDirected field, you confirm 8996 // that your use of Amazon Lex is not related to a website, program, or other 8997 // application that is directed or targeted, in whole or in part, to children 8998 // under age 13 and subject to COPPA. You may not specify a default value for 8999 // the childDirected field that does not accurately reflect whether your use 9000 // of Amazon Lex is related to a website, program, or other application that 9001 // is directed or targeted, in whole or in part, to children under age 13 and 9002 // subject to COPPA. 9003 // 9004 // If your use of Amazon Lex relates to a website, program, or other application 9005 // that is directed in whole or in part, to children under age 13, you must 9006 // obtain any required verifiable parental consent under COPPA. For information 9007 // regarding the use of Amazon Lex in connection with websites, programs, or 9008 // other applications that are directed or targeted, in whole or in part, to 9009 // children under age 13, see the Amazon Lex FAQ. (https://aws.amazon.com/lex/faqs#data-security) 9010 ChildDirected *bool `locationName:"childDirected" type:"boolean"` 9011 9012 // The prompts that Amazon Lex uses when it doesn't understand the user's intent. 9013 // For more information, see PutBot. 9014 ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` 9015 9016 // The date that the bot was created. 9017 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 9018 9019 // A description of the bot. 9020 Description *string `locationName:"description" type:"string"` 9021 9022 // If status is FAILED, Amazon Lex provides the reason that it failed to build 9023 // the bot. 9024 FailureReason *string `locationName:"failureReason" type:"string"` 9025 9026 // The maximum length of time that Amazon Lex retains the data gathered in a 9027 // conversation. For more information, see PutBot. 9028 IdleSessionTTLInSeconds *int64 `locationName:"idleSessionTTLInSeconds" min:"60" type:"integer"` 9029 9030 // An array of Intent objects. For more information, see PutBot. 9031 Intents []*Intent `locationName:"intents" type:"list"` 9032 9033 // The date that the bot was updated. When you create a resource, the creation 9034 // date and last updated date are the same. 9035 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 9036 9037 // The target locale for the bot. 9038 Locale *string `locationName:"locale" type:"string" enum:"Locale"` 9039 9040 // The name of the bot. 9041 Name *string `locationName:"name" min:"2" type:"string"` 9042 9043 // When you send a request to create a bot with processBehavior set to BUILD, 9044 // Amazon Lex sets the status response element to BUILDING. After Amazon Lex 9045 // builds the bot, it sets status to READY. If Amazon Lex can't build the bot, 9046 // Amazon Lex sets status to FAILED. Amazon Lex returns the reason for the failure 9047 // in the failureReason response element. 9048 // 9049 // When you set processBehaviorto SAVE, Amazon Lex sets the status code to NOT 9050 // BUILT. 9051 Status *string `locationName:"status" type:"string" enum:"Status"` 9052 9053 // The version of the bot. For a new bot, the version is always $LATEST. 9054 Version *string `locationName:"version" min:"1" type:"string"` 9055 9056 // The Amazon Polly voice ID that Amazon Lex uses for voice interaction with 9057 // the user. For more information, see PutBot. 9058 VoiceId *string `locationName:"voiceId" type:"string"` 9059} 9060 9061// String returns the string representation 9062func (s PutBotOutput) String() string { 9063 return awsutil.Prettify(s) 9064} 9065 9066// GoString returns the string representation 9067func (s PutBotOutput) GoString() string { 9068 return s.String() 9069} 9070 9071// SetAbortStatement sets the AbortStatement field's value. 9072func (s *PutBotOutput) SetAbortStatement(v *Statement) *PutBotOutput { 9073 s.AbortStatement = v 9074 return s 9075} 9076 9077// SetChecksum sets the Checksum field's value. 9078func (s *PutBotOutput) SetChecksum(v string) *PutBotOutput { 9079 s.Checksum = &v 9080 return s 9081} 9082 9083// SetChildDirected sets the ChildDirected field's value. 9084func (s *PutBotOutput) SetChildDirected(v bool) *PutBotOutput { 9085 s.ChildDirected = &v 9086 return s 9087} 9088 9089// SetClarificationPrompt sets the ClarificationPrompt field's value. 9090func (s *PutBotOutput) SetClarificationPrompt(v *Prompt) *PutBotOutput { 9091 s.ClarificationPrompt = v 9092 return s 9093} 9094 9095// SetCreatedDate sets the CreatedDate field's value. 9096func (s *PutBotOutput) SetCreatedDate(v time.Time) *PutBotOutput { 9097 s.CreatedDate = &v 9098 return s 9099} 9100 9101// SetDescription sets the Description field's value. 9102func (s *PutBotOutput) SetDescription(v string) *PutBotOutput { 9103 s.Description = &v 9104 return s 9105} 9106 9107// SetFailureReason sets the FailureReason field's value. 9108func (s *PutBotOutput) SetFailureReason(v string) *PutBotOutput { 9109 s.FailureReason = &v 9110 return s 9111} 9112 9113// SetIdleSessionTTLInSeconds sets the IdleSessionTTLInSeconds field's value. 9114func (s *PutBotOutput) SetIdleSessionTTLInSeconds(v int64) *PutBotOutput { 9115 s.IdleSessionTTLInSeconds = &v 9116 return s 9117} 9118 9119// SetIntents sets the Intents field's value. 9120func (s *PutBotOutput) SetIntents(v []*Intent) *PutBotOutput { 9121 s.Intents = v 9122 return s 9123} 9124 9125// SetLastUpdatedDate sets the LastUpdatedDate field's value. 9126func (s *PutBotOutput) SetLastUpdatedDate(v time.Time) *PutBotOutput { 9127 s.LastUpdatedDate = &v 9128 return s 9129} 9130 9131// SetLocale sets the Locale field's value. 9132func (s *PutBotOutput) SetLocale(v string) *PutBotOutput { 9133 s.Locale = &v 9134 return s 9135} 9136 9137// SetName sets the Name field's value. 9138func (s *PutBotOutput) SetName(v string) *PutBotOutput { 9139 s.Name = &v 9140 return s 9141} 9142 9143// SetStatus sets the Status field's value. 9144func (s *PutBotOutput) SetStatus(v string) *PutBotOutput { 9145 s.Status = &v 9146 return s 9147} 9148 9149// SetVersion sets the Version field's value. 9150func (s *PutBotOutput) SetVersion(v string) *PutBotOutput { 9151 s.Version = &v 9152 return s 9153} 9154 9155// SetVoiceId sets the VoiceId field's value. 9156func (s *PutBotOutput) SetVoiceId(v string) *PutBotOutput { 9157 s.VoiceId = &v 9158 return s 9159} 9160 9161// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntentRequest 9162type PutIntentInput struct { 9163 _ struct{} `type:"structure"` 9164 9165 // Identifies a specific revision of the $LATEST version. 9166 // 9167 // When you create a new intent, leave the checksum field blank. If you specify 9168 // a checksum you get a BadRequestException exception. 9169 // 9170 // When you want to update a intent, set the checksum field to the checksum 9171 // of the most recent revision of the $LATEST version. If you don't specify 9172 // the checksum field, or if the checksum does not match the $LATEST version, 9173 // you get a PreconditionFailedException exception. 9174 Checksum *string `locationName:"checksum" type:"string"` 9175 9176 // The statement that you want Amazon Lex to convey to the user after the intent 9177 // is successfully fulfilled by the Lambda function. 9178 // 9179 // This element is relevant only if you provide a Lambda function in the fulfillmentActivity. 9180 // If you return the intent to the client application, you can't specify this 9181 // element. 9182 // 9183 // The followUpPrompt and conclusionStatement are mutually exclusive. You can 9184 // specify only one. 9185 ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` 9186 9187 // Prompts the user to confirm the intent. This question should have a yes or 9188 // no answer. 9189 // 9190 // Amazon Lex uses this prompt to ensure that the user acknowledges that the 9191 // intent is ready for fulfillment. For example, with the OrderPizza intent, 9192 // you might want to confirm that the order is correct before placing it. For 9193 // other intents, such as intents that simply respond to user questions, you 9194 // might not need to ask the user for confirmation before providing the information. 9195 // 9196 // You you must provide both the rejectionStatement and the confirmationPrompt, 9197 // or neither. 9198 ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` 9199 9200 // A description of the intent. 9201 Description *string `locationName:"description" type:"string"` 9202 9203 // Specifies a Lambda function to invoke for each user input. You can invoke 9204 // this Lambda function to personalize user interaction. 9205 // 9206 // For example, suppose your bot determines that the user is John. Your Lambda 9207 // function might retrieve John's information from a backend database and prepopulate 9208 // some of the values. For example, if you find that John is gluten intolerant, 9209 // you might set the corresponding intent slot, GlutenIntolerant, to true. You 9210 // might find John's phone number and set the corresponding session attribute. 9211 DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` 9212 9213 // Amazon Lex uses this prompt to solicit additional activity after fulfilling 9214 // an intent. For example, after the OrderPizza intent is fulfilled, you might 9215 // prompt the user to order a drink. 9216 // 9217 // The action that Amazon Lex takes depends on the user's response, as follows: 9218 // 9219 // * If the user says "Yes" it responds with the clarification prompt that 9220 // is configured for the bot. 9221 // 9222 // * if the user says "Yes" and continues with an utterance that triggers 9223 // an intent it starts a conversation for the intent. 9224 // 9225 // * If the user says "No" it responds with the rejection statement configured 9226 // for the the follow-up prompt. 9227 // 9228 // * If it doesn't recognize the utterance it repeats the follow-up prompt 9229 // again. 9230 // 9231 // The followUpPrompt field and the conclusionStatement field are mutually exclusive. 9232 // You can specify only one. 9233 FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` 9234 9235 // Required. Describes how the intent is fulfilled. For example, after a user 9236 // provides all of the information for a pizza order, fulfillmentActivity defines 9237 // how the bot places an order with a local pizza store. 9238 // 9239 // You might configure Amazon Lex to return all of the intent information to 9240 // the client application, or direct it to invoke a Lambda function that can 9241 // process the intent (for example, place an order with a pizzeria). 9242 FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` 9243 9244 // The name of the intent. The name is not case sensitive. 9245 // 9246 // The name can't match a built-in intent name, or a built-in intent name with 9247 // "AMAZON." removed. For example, because there is a built-in intent called 9248 // AMAZON.HelpIntent, you can't create a custom intent called HelpIntent. 9249 // 9250 // For a list of built-in intents, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) 9251 // in the Alexa Skills Kit. 9252 // 9253 // Name is a required field 9254 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 9255 9256 // A unique identifier for the built-in intent to base this intent on. To find 9257 // the signature for an intent, see Standard Built-in Intents (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents) 9258 // in the Alexa Skills Kit. 9259 ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` 9260 9261 // When the user answers "no" to the question defined in confirmationPrompt, 9262 // Amazon Lex responds with this statement to acknowledge that the intent was 9263 // canceled. 9264 // 9265 // You must provide both the rejectionStatement and the confirmationPrompt, 9266 // or neither. 9267 RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` 9268 9269 // An array of utterances (strings) that a user might say to signal the intent. 9270 // For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas". 9271 // 9272 // In each utterance, a slot name is enclosed in curly braces. 9273 SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` 9274 9275 // An array of intent slots. At runtime, Amazon Lex elicits required slot values 9276 // from the user using prompts defined in the slots. For more information, see 9277 // how-it-works. 9278 Slots []*Slot `locationName:"slots" type:"list"` 9279} 9280 9281// String returns the string representation 9282func (s PutIntentInput) String() string { 9283 return awsutil.Prettify(s) 9284} 9285 9286// GoString returns the string representation 9287func (s PutIntentInput) GoString() string { 9288 return s.String() 9289} 9290 9291// Validate inspects the fields of the type to determine if they are valid. 9292func (s *PutIntentInput) Validate() error { 9293 invalidParams := request.ErrInvalidParams{Context: "PutIntentInput"} 9294 if s.Name == nil { 9295 invalidParams.Add(request.NewErrParamRequired("Name")) 9296 } 9297 if s.Name != nil && len(*s.Name) < 1 { 9298 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 9299 } 9300 if s.ConclusionStatement != nil { 9301 if err := s.ConclusionStatement.Validate(); err != nil { 9302 invalidParams.AddNested("ConclusionStatement", err.(request.ErrInvalidParams)) 9303 } 9304 } 9305 if s.ConfirmationPrompt != nil { 9306 if err := s.ConfirmationPrompt.Validate(); err != nil { 9307 invalidParams.AddNested("ConfirmationPrompt", err.(request.ErrInvalidParams)) 9308 } 9309 } 9310 if s.DialogCodeHook != nil { 9311 if err := s.DialogCodeHook.Validate(); err != nil { 9312 invalidParams.AddNested("DialogCodeHook", err.(request.ErrInvalidParams)) 9313 } 9314 } 9315 if s.FollowUpPrompt != nil { 9316 if err := s.FollowUpPrompt.Validate(); err != nil { 9317 invalidParams.AddNested("FollowUpPrompt", err.(request.ErrInvalidParams)) 9318 } 9319 } 9320 if s.FulfillmentActivity != nil { 9321 if err := s.FulfillmentActivity.Validate(); err != nil { 9322 invalidParams.AddNested("FulfillmentActivity", err.(request.ErrInvalidParams)) 9323 } 9324 } 9325 if s.RejectionStatement != nil { 9326 if err := s.RejectionStatement.Validate(); err != nil { 9327 invalidParams.AddNested("RejectionStatement", err.(request.ErrInvalidParams)) 9328 } 9329 } 9330 if s.Slots != nil { 9331 for i, v := range s.Slots { 9332 if v == nil { 9333 continue 9334 } 9335 if err := v.Validate(); err != nil { 9336 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Slots", i), err.(request.ErrInvalidParams)) 9337 } 9338 } 9339 } 9340 9341 if invalidParams.Len() > 0 { 9342 return invalidParams 9343 } 9344 return nil 9345} 9346 9347// SetChecksum sets the Checksum field's value. 9348func (s *PutIntentInput) SetChecksum(v string) *PutIntentInput { 9349 s.Checksum = &v 9350 return s 9351} 9352 9353// SetConclusionStatement sets the ConclusionStatement field's value. 9354func (s *PutIntentInput) SetConclusionStatement(v *Statement) *PutIntentInput { 9355 s.ConclusionStatement = v 9356 return s 9357} 9358 9359// SetConfirmationPrompt sets the ConfirmationPrompt field's value. 9360func (s *PutIntentInput) SetConfirmationPrompt(v *Prompt) *PutIntentInput { 9361 s.ConfirmationPrompt = v 9362 return s 9363} 9364 9365// SetDescription sets the Description field's value. 9366func (s *PutIntentInput) SetDescription(v string) *PutIntentInput { 9367 s.Description = &v 9368 return s 9369} 9370 9371// SetDialogCodeHook sets the DialogCodeHook field's value. 9372func (s *PutIntentInput) SetDialogCodeHook(v *CodeHook) *PutIntentInput { 9373 s.DialogCodeHook = v 9374 return s 9375} 9376 9377// SetFollowUpPrompt sets the FollowUpPrompt field's value. 9378func (s *PutIntentInput) SetFollowUpPrompt(v *FollowUpPrompt) *PutIntentInput { 9379 s.FollowUpPrompt = v 9380 return s 9381} 9382 9383// SetFulfillmentActivity sets the FulfillmentActivity field's value. 9384func (s *PutIntentInput) SetFulfillmentActivity(v *FulfillmentActivity) *PutIntentInput { 9385 s.FulfillmentActivity = v 9386 return s 9387} 9388 9389// SetName sets the Name field's value. 9390func (s *PutIntentInput) SetName(v string) *PutIntentInput { 9391 s.Name = &v 9392 return s 9393} 9394 9395// SetParentIntentSignature sets the ParentIntentSignature field's value. 9396func (s *PutIntentInput) SetParentIntentSignature(v string) *PutIntentInput { 9397 s.ParentIntentSignature = &v 9398 return s 9399} 9400 9401// SetRejectionStatement sets the RejectionStatement field's value. 9402func (s *PutIntentInput) SetRejectionStatement(v *Statement) *PutIntentInput { 9403 s.RejectionStatement = v 9404 return s 9405} 9406 9407// SetSampleUtterances sets the SampleUtterances field's value. 9408func (s *PutIntentInput) SetSampleUtterances(v []*string) *PutIntentInput { 9409 s.SampleUtterances = v 9410 return s 9411} 9412 9413// SetSlots sets the Slots field's value. 9414func (s *PutIntentInput) SetSlots(v []*Slot) *PutIntentInput { 9415 s.Slots = v 9416 return s 9417} 9418 9419// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntentResponse 9420type PutIntentOutput struct { 9421 _ struct{} `type:"structure"` 9422 9423 // Checksum of the $LATESTversion of the intent created or updated. 9424 Checksum *string `locationName:"checksum" type:"string"` 9425 9426 // After the Lambda function specified in thefulfillmentActivityintent fulfills 9427 // the intent, Amazon Lex conveys this statement to the user. 9428 ConclusionStatement *Statement `locationName:"conclusionStatement" type:"structure"` 9429 9430 // If defined in the intent, Amazon Lex prompts the user to confirm the intent 9431 // before fulfilling it. 9432 ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` 9433 9434 // The date that the intent was created. 9435 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 9436 9437 // A description of the intent. 9438 Description *string `locationName:"description" type:"string"` 9439 9440 // If defined in the intent, Amazon Lex invokes this Lambda function for each 9441 // user input. 9442 DialogCodeHook *CodeHook `locationName:"dialogCodeHook" type:"structure"` 9443 9444 // If defined in the intent, Amazon Lex uses this prompt to solicit additional 9445 // user activity after the intent is fulfilled. 9446 FollowUpPrompt *FollowUpPrompt `locationName:"followUpPrompt" type:"structure"` 9447 9448 // If defined in the intent, Amazon Lex invokes this Lambda function to fulfill 9449 // the intent after the user provides all of the information required by the 9450 // intent. 9451 FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` 9452 9453 // The date that the intent was updated. When you create a resource, the creation 9454 // date and last update dates are the same. 9455 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 9456 9457 // The name of the intent. 9458 Name *string `locationName:"name" min:"1" type:"string"` 9459 9460 // A unique identifier for the built-in intent that this intent is based on. 9461 ParentIntentSignature *string `locationName:"parentIntentSignature" type:"string"` 9462 9463 // If the user answers "no" to the question defined in confirmationPrompt Amazon 9464 // Lex responds with this statement to acknowledge that the intent was canceled. 9465 RejectionStatement *Statement `locationName:"rejectionStatement" type:"structure"` 9466 9467 // An array of sample utterances that are configured for the intent. 9468 SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` 9469 9470 // An array of intent slots that are configured for the intent. 9471 Slots []*Slot `locationName:"slots" type:"list"` 9472 9473 // The version of the intent. For a new intent, the version is always $LATEST. 9474 Version *string `locationName:"version" min:"1" type:"string"` 9475} 9476 9477// String returns the string representation 9478func (s PutIntentOutput) String() string { 9479 return awsutil.Prettify(s) 9480} 9481 9482// GoString returns the string representation 9483func (s PutIntentOutput) GoString() string { 9484 return s.String() 9485} 9486 9487// SetChecksum sets the Checksum field's value. 9488func (s *PutIntentOutput) SetChecksum(v string) *PutIntentOutput { 9489 s.Checksum = &v 9490 return s 9491} 9492 9493// SetConclusionStatement sets the ConclusionStatement field's value. 9494func (s *PutIntentOutput) SetConclusionStatement(v *Statement) *PutIntentOutput { 9495 s.ConclusionStatement = v 9496 return s 9497} 9498 9499// SetConfirmationPrompt sets the ConfirmationPrompt field's value. 9500func (s *PutIntentOutput) SetConfirmationPrompt(v *Prompt) *PutIntentOutput { 9501 s.ConfirmationPrompt = v 9502 return s 9503} 9504 9505// SetCreatedDate sets the CreatedDate field's value. 9506func (s *PutIntentOutput) SetCreatedDate(v time.Time) *PutIntentOutput { 9507 s.CreatedDate = &v 9508 return s 9509} 9510 9511// SetDescription sets the Description field's value. 9512func (s *PutIntentOutput) SetDescription(v string) *PutIntentOutput { 9513 s.Description = &v 9514 return s 9515} 9516 9517// SetDialogCodeHook sets the DialogCodeHook field's value. 9518func (s *PutIntentOutput) SetDialogCodeHook(v *CodeHook) *PutIntentOutput { 9519 s.DialogCodeHook = v 9520 return s 9521} 9522 9523// SetFollowUpPrompt sets the FollowUpPrompt field's value. 9524func (s *PutIntentOutput) SetFollowUpPrompt(v *FollowUpPrompt) *PutIntentOutput { 9525 s.FollowUpPrompt = v 9526 return s 9527} 9528 9529// SetFulfillmentActivity sets the FulfillmentActivity field's value. 9530func (s *PutIntentOutput) SetFulfillmentActivity(v *FulfillmentActivity) *PutIntentOutput { 9531 s.FulfillmentActivity = v 9532 return s 9533} 9534 9535// SetLastUpdatedDate sets the LastUpdatedDate field's value. 9536func (s *PutIntentOutput) SetLastUpdatedDate(v time.Time) *PutIntentOutput { 9537 s.LastUpdatedDate = &v 9538 return s 9539} 9540 9541// SetName sets the Name field's value. 9542func (s *PutIntentOutput) SetName(v string) *PutIntentOutput { 9543 s.Name = &v 9544 return s 9545} 9546 9547// SetParentIntentSignature sets the ParentIntentSignature field's value. 9548func (s *PutIntentOutput) SetParentIntentSignature(v string) *PutIntentOutput { 9549 s.ParentIntentSignature = &v 9550 return s 9551} 9552 9553// SetRejectionStatement sets the RejectionStatement field's value. 9554func (s *PutIntentOutput) SetRejectionStatement(v *Statement) *PutIntentOutput { 9555 s.RejectionStatement = v 9556 return s 9557} 9558 9559// SetSampleUtterances sets the SampleUtterances field's value. 9560func (s *PutIntentOutput) SetSampleUtterances(v []*string) *PutIntentOutput { 9561 s.SampleUtterances = v 9562 return s 9563} 9564 9565// SetSlots sets the Slots field's value. 9566func (s *PutIntentOutput) SetSlots(v []*Slot) *PutIntentOutput { 9567 s.Slots = v 9568 return s 9569} 9570 9571// SetVersion sets the Version field's value. 9572func (s *PutIntentOutput) SetVersion(v string) *PutIntentOutput { 9573 s.Version = &v 9574 return s 9575} 9576 9577// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotTypeRequest 9578type PutSlotTypeInput struct { 9579 _ struct{} `type:"structure"` 9580 9581 // Identifies a specific revision of the $LATEST version. 9582 // 9583 // When you create a new slot type, leave the checksum field blank. If you specify 9584 // a checksum you get a BadRequestException exception. 9585 // 9586 // When you want to update a slot type, set the checksum field to the checksum 9587 // of the most recent revision of the $LATEST version. If you don't specify 9588 // the checksum field, or if the checksum does not match the $LATEST version, 9589 // you get a PreconditionFailedException exception. 9590 Checksum *string `locationName:"checksum" type:"string"` 9591 9592 // A description of the slot type. 9593 Description *string `locationName:"description" type:"string"` 9594 9595 // A list of EnumerationValue objects that defines the values that the slot 9596 // type can take. Each value can have a list of synonyms, which are additional 9597 // values that help train the machine learning model about the values that it 9598 // resolves for a slot. 9599 // 9600 // When Amazon Lex resolves a slot value, it generates a resolution list that 9601 // contains up to five possible values for the slot. If you are using a Lambda 9602 // function, this resolution list is passed to the function. If you are not 9603 // using a Lambda function you can choose to return the value that the user 9604 // entered or the first value in the resolution list as the slot value. The 9605 // valueSelectionStrategy field indicates the option to use. 9606 EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` 9607 9608 // The name of the slot type. The name is not case sensitive. 9609 // 9610 // The name can't match a built-in slot type name, or a built-in slot type name 9611 // with "AMAZON." removed. For example, because there is a built-in slot type 9612 // called AMAZON.DATE, you can't create a custom slot type called DATE. 9613 // 9614 // For a list of built-in slot types, see Slot Type Reference (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/slot-type-reference) 9615 // in the Alexa Skills Kit. 9616 // 9617 // Name is a required field 9618 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 9619 9620 // Determines the slot resolution strategy that Amazon Lex uses to return slot 9621 // type values. The field can be set to one of the following values: 9622 // 9623 // * ORIGINAL_VALUE - Returns the value entered by the user, if the user 9624 // value is similar to the slot value. 9625 // 9626 // * TOP_RESOLUTION - If there is a resolution list for the slot, return 9627 // the first value in the resolution list as the slot type value. If there 9628 // is no resolution list, null is returned. 9629 // 9630 // If you don't specify the valueSelectionStrategy, the default is ORIGINAL_VALUE. 9631 ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` 9632} 9633 9634// String returns the string representation 9635func (s PutSlotTypeInput) String() string { 9636 return awsutil.Prettify(s) 9637} 9638 9639// GoString returns the string representation 9640func (s PutSlotTypeInput) GoString() string { 9641 return s.String() 9642} 9643 9644// Validate inspects the fields of the type to determine if they are valid. 9645func (s *PutSlotTypeInput) Validate() error { 9646 invalidParams := request.ErrInvalidParams{Context: "PutSlotTypeInput"} 9647 if s.EnumerationValues != nil && len(s.EnumerationValues) < 1 { 9648 invalidParams.Add(request.NewErrParamMinLen("EnumerationValues", 1)) 9649 } 9650 if s.Name == nil { 9651 invalidParams.Add(request.NewErrParamRequired("Name")) 9652 } 9653 if s.Name != nil && len(*s.Name) < 1 { 9654 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 9655 } 9656 if s.EnumerationValues != nil { 9657 for i, v := range s.EnumerationValues { 9658 if v == nil { 9659 continue 9660 } 9661 if err := v.Validate(); err != nil { 9662 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnumerationValues", i), err.(request.ErrInvalidParams)) 9663 } 9664 } 9665 } 9666 9667 if invalidParams.Len() > 0 { 9668 return invalidParams 9669 } 9670 return nil 9671} 9672 9673// SetChecksum sets the Checksum field's value. 9674func (s *PutSlotTypeInput) SetChecksum(v string) *PutSlotTypeInput { 9675 s.Checksum = &v 9676 return s 9677} 9678 9679// SetDescription sets the Description field's value. 9680func (s *PutSlotTypeInput) SetDescription(v string) *PutSlotTypeInput { 9681 s.Description = &v 9682 return s 9683} 9684 9685// SetEnumerationValues sets the EnumerationValues field's value. 9686func (s *PutSlotTypeInput) SetEnumerationValues(v []*EnumerationValue) *PutSlotTypeInput { 9687 s.EnumerationValues = v 9688 return s 9689} 9690 9691// SetName sets the Name field's value. 9692func (s *PutSlotTypeInput) SetName(v string) *PutSlotTypeInput { 9693 s.Name = &v 9694 return s 9695} 9696 9697// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. 9698func (s *PutSlotTypeInput) SetValueSelectionStrategy(v string) *PutSlotTypeInput { 9699 s.ValueSelectionStrategy = &v 9700 return s 9701} 9702 9703// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotTypeResponse 9704type PutSlotTypeOutput struct { 9705 _ struct{} `type:"structure"` 9706 9707 // Checksum of the $LATEST version of the slot type. 9708 Checksum *string `locationName:"checksum" type:"string"` 9709 9710 // The date that the slot type was created. 9711 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 9712 9713 // A description of the slot type. 9714 Description *string `locationName:"description" type:"string"` 9715 9716 // A list of EnumerationValue objects that defines the values that the slot 9717 // type can take. 9718 EnumerationValues []*EnumerationValue `locationName:"enumerationValues" min:"1" type:"list"` 9719 9720 // The date that the slot type was updated. When you create a slot type, the 9721 // creation date and last update date are the same. 9722 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 9723 9724 // The name of the slot type. 9725 Name *string `locationName:"name" min:"1" type:"string"` 9726 9727 // The slot resolution strategy that Amazon Lex uses to determine the value 9728 // of the slot. For more information, see PutSlotType. 9729 ValueSelectionStrategy *string `locationName:"valueSelectionStrategy" type:"string" enum:"SlotValueSelectionStrategy"` 9730 9731 // The version of the slot type. For a new slot type, the version is always 9732 // $LATEST. 9733 Version *string `locationName:"version" min:"1" type:"string"` 9734} 9735 9736// String returns the string representation 9737func (s PutSlotTypeOutput) String() string { 9738 return awsutil.Prettify(s) 9739} 9740 9741// GoString returns the string representation 9742func (s PutSlotTypeOutput) GoString() string { 9743 return s.String() 9744} 9745 9746// SetChecksum sets the Checksum field's value. 9747func (s *PutSlotTypeOutput) SetChecksum(v string) *PutSlotTypeOutput { 9748 s.Checksum = &v 9749 return s 9750} 9751 9752// SetCreatedDate sets the CreatedDate field's value. 9753func (s *PutSlotTypeOutput) SetCreatedDate(v time.Time) *PutSlotTypeOutput { 9754 s.CreatedDate = &v 9755 return s 9756} 9757 9758// SetDescription sets the Description field's value. 9759func (s *PutSlotTypeOutput) SetDescription(v string) *PutSlotTypeOutput { 9760 s.Description = &v 9761 return s 9762} 9763 9764// SetEnumerationValues sets the EnumerationValues field's value. 9765func (s *PutSlotTypeOutput) SetEnumerationValues(v []*EnumerationValue) *PutSlotTypeOutput { 9766 s.EnumerationValues = v 9767 return s 9768} 9769 9770// SetLastUpdatedDate sets the LastUpdatedDate field's value. 9771func (s *PutSlotTypeOutput) SetLastUpdatedDate(v time.Time) *PutSlotTypeOutput { 9772 s.LastUpdatedDate = &v 9773 return s 9774} 9775 9776// SetName sets the Name field's value. 9777func (s *PutSlotTypeOutput) SetName(v string) *PutSlotTypeOutput { 9778 s.Name = &v 9779 return s 9780} 9781 9782// SetValueSelectionStrategy sets the ValueSelectionStrategy field's value. 9783func (s *PutSlotTypeOutput) SetValueSelectionStrategy(v string) *PutSlotTypeOutput { 9784 s.ValueSelectionStrategy = &v 9785 return s 9786} 9787 9788// SetVersion sets the Version field's value. 9789func (s *PutSlotTypeOutput) SetVersion(v string) *PutSlotTypeOutput { 9790 s.Version = &v 9791 return s 9792} 9793 9794// Describes the resource that refers to the resource that you are attempting 9795// to delete. This object is returned as part of the ResourceInUseException 9796// exception. 9797// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/ResourceReference 9798type ResourceReference struct { 9799 _ struct{} `type:"structure"` 9800 9801 // The name of the resource that is using the resource that you are trying to 9802 // delete. 9803 Name *string `locationName:"name" min:"1" type:"string"` 9804 9805 // The version of the resource that is using the resource that you are trying 9806 // to delete. 9807 Version *string `locationName:"version" min:"1" type:"string"` 9808} 9809 9810// String returns the string representation 9811func (s ResourceReference) String() string { 9812 return awsutil.Prettify(s) 9813} 9814 9815// GoString returns the string representation 9816func (s ResourceReference) GoString() string { 9817 return s.String() 9818} 9819 9820// SetName sets the Name field's value. 9821func (s *ResourceReference) SetName(v string) *ResourceReference { 9822 s.Name = &v 9823 return s 9824} 9825 9826// SetVersion sets the Version field's value. 9827func (s *ResourceReference) SetVersion(v string) *ResourceReference { 9828 s.Version = &v 9829 return s 9830} 9831 9832// Identifies the version of a specific slot. 9833// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Slot 9834type Slot struct { 9835 _ struct{} `type:"structure"` 9836 9837 // A description of the slot. 9838 Description *string `locationName:"description" type:"string"` 9839 9840 // The name of the slot. 9841 // 9842 // Name is a required field 9843 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 9844 9845 // Directs Lex the order in which to elicit this slot value from the user. For 9846 // example, if the intent has two slots with priorities 1 and 2, AWS Lex first 9847 // elicits a value for the slot with priority 1. 9848 // 9849 // If multiple slots share the same priority, the order in which Lex elicits 9850 // values is arbitrary. 9851 Priority *int64 `locationName:"priority" type:"integer"` 9852 9853 // A set of possible responses for the slot type used by text-based clients. 9854 // A user chooses an option from the response card, instead of using text to 9855 // reply. 9856 ResponseCard *string `locationName:"responseCard" min:"1" type:"string"` 9857 9858 // If you know a specific pattern with which users might respond to an Amazon 9859 // Lex request for a slot value, you can provide those utterances to improve 9860 // accuracy. This is optional. In most cases, Amazon Lex is capable of understanding 9861 // user utterances. 9862 SampleUtterances []*string `locationName:"sampleUtterances" type:"list"` 9863 9864 // Specifies whether the slot is required or optional. 9865 // 9866 // SlotConstraint is a required field 9867 SlotConstraint *string `locationName:"slotConstraint" type:"string" required:"true" enum:"SlotConstraint"` 9868 9869 // The type of the slot, either a custom slot type that you defined or one of 9870 // the built-in slot types. 9871 SlotType *string `locationName:"slotType" min:"1" type:"string"` 9872 9873 // The version of the slot type. 9874 SlotTypeVersion *string `locationName:"slotTypeVersion" min:"1" type:"string"` 9875 9876 // The prompt that Amazon Lex uses to elicit the slot value from the user. 9877 ValueElicitationPrompt *Prompt `locationName:"valueElicitationPrompt" type:"structure"` 9878} 9879 9880// String returns the string representation 9881func (s Slot) String() string { 9882 return awsutil.Prettify(s) 9883} 9884 9885// GoString returns the string representation 9886func (s Slot) GoString() string { 9887 return s.String() 9888} 9889 9890// Validate inspects the fields of the type to determine if they are valid. 9891func (s *Slot) Validate() error { 9892 invalidParams := request.ErrInvalidParams{Context: "Slot"} 9893 if s.Name == nil { 9894 invalidParams.Add(request.NewErrParamRequired("Name")) 9895 } 9896 if s.Name != nil && len(*s.Name) < 1 { 9897 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 9898 } 9899 if s.ResponseCard != nil && len(*s.ResponseCard) < 1 { 9900 invalidParams.Add(request.NewErrParamMinLen("ResponseCard", 1)) 9901 } 9902 if s.SlotConstraint == nil { 9903 invalidParams.Add(request.NewErrParamRequired("SlotConstraint")) 9904 } 9905 if s.SlotType != nil && len(*s.SlotType) < 1 { 9906 invalidParams.Add(request.NewErrParamMinLen("SlotType", 1)) 9907 } 9908 if s.SlotTypeVersion != nil && len(*s.SlotTypeVersion) < 1 { 9909 invalidParams.Add(request.NewErrParamMinLen("SlotTypeVersion", 1)) 9910 } 9911 if s.ValueElicitationPrompt != nil { 9912 if err := s.ValueElicitationPrompt.Validate(); err != nil { 9913 invalidParams.AddNested("ValueElicitationPrompt", err.(request.ErrInvalidParams)) 9914 } 9915 } 9916 9917 if invalidParams.Len() > 0 { 9918 return invalidParams 9919 } 9920 return nil 9921} 9922 9923// SetDescription sets the Description field's value. 9924func (s *Slot) SetDescription(v string) *Slot { 9925 s.Description = &v 9926 return s 9927} 9928 9929// SetName sets the Name field's value. 9930func (s *Slot) SetName(v string) *Slot { 9931 s.Name = &v 9932 return s 9933} 9934 9935// SetPriority sets the Priority field's value. 9936func (s *Slot) SetPriority(v int64) *Slot { 9937 s.Priority = &v 9938 return s 9939} 9940 9941// SetResponseCard sets the ResponseCard field's value. 9942func (s *Slot) SetResponseCard(v string) *Slot { 9943 s.ResponseCard = &v 9944 return s 9945} 9946 9947// SetSampleUtterances sets the SampleUtterances field's value. 9948func (s *Slot) SetSampleUtterances(v []*string) *Slot { 9949 s.SampleUtterances = v 9950 return s 9951} 9952 9953// SetSlotConstraint sets the SlotConstraint field's value. 9954func (s *Slot) SetSlotConstraint(v string) *Slot { 9955 s.SlotConstraint = &v 9956 return s 9957} 9958 9959// SetSlotType sets the SlotType field's value. 9960func (s *Slot) SetSlotType(v string) *Slot { 9961 s.SlotType = &v 9962 return s 9963} 9964 9965// SetSlotTypeVersion sets the SlotTypeVersion field's value. 9966func (s *Slot) SetSlotTypeVersion(v string) *Slot { 9967 s.SlotTypeVersion = &v 9968 return s 9969} 9970 9971// SetValueElicitationPrompt sets the ValueElicitationPrompt field's value. 9972func (s *Slot) SetValueElicitationPrompt(v *Prompt) *Slot { 9973 s.ValueElicitationPrompt = v 9974 return s 9975} 9976 9977// Provides information about a slot type.. 9978// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/SlotTypeMetadata 9979type SlotTypeMetadata struct { 9980 _ struct{} `type:"structure"` 9981 9982 // The date that the slot type was created. 9983 CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` 9984 9985 // A description of the slot type. 9986 Description *string `locationName:"description" type:"string"` 9987 9988 // The date that the slot type was updated. When you create a resource, the 9989 // creation date and last updated date are the same. 9990 LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` 9991 9992 // The name of the slot type. 9993 Name *string `locationName:"name" min:"1" type:"string"` 9994 9995 // The version of the slot type. 9996 Version *string `locationName:"version" min:"1" type:"string"` 9997} 9998 9999// String returns the string representation 10000func (s SlotTypeMetadata) String() string { 10001 return awsutil.Prettify(s) 10002} 10003 10004// GoString returns the string representation 10005func (s SlotTypeMetadata) GoString() string { 10006 return s.String() 10007} 10008 10009// SetCreatedDate sets the CreatedDate field's value. 10010func (s *SlotTypeMetadata) SetCreatedDate(v time.Time) *SlotTypeMetadata { 10011 s.CreatedDate = &v 10012 return s 10013} 10014 10015// SetDescription sets the Description field's value. 10016func (s *SlotTypeMetadata) SetDescription(v string) *SlotTypeMetadata { 10017 s.Description = &v 10018 return s 10019} 10020 10021// SetLastUpdatedDate sets the LastUpdatedDate field's value. 10022func (s *SlotTypeMetadata) SetLastUpdatedDate(v time.Time) *SlotTypeMetadata { 10023 s.LastUpdatedDate = &v 10024 return s 10025} 10026 10027// SetName sets the Name field's value. 10028func (s *SlotTypeMetadata) SetName(v string) *SlotTypeMetadata { 10029 s.Name = &v 10030 return s 10031} 10032 10033// SetVersion sets the Version field's value. 10034func (s *SlotTypeMetadata) SetVersion(v string) *SlotTypeMetadata { 10035 s.Version = &v 10036 return s 10037} 10038 10039// A collection of messages that convey information to the user. At runtime, 10040// Amazon Lex selects the message to convey. 10041// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Statement 10042type Statement struct { 10043 _ struct{} `type:"structure"` 10044 10045 // A collection of message objects. 10046 // 10047 // Messages is a required field 10048 Messages []*Message `locationName:"messages" min:"1" type:"list" required:"true"` 10049 10050 // At runtime, if the client is using the PostText (http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html) 10051 // API, Amazon Lex includes the response card in the response. It substitutes 10052 // all of the session attributes and slot values for placeholders in the response 10053 // card. 10054 ResponseCard *string `locationName:"responseCard" min:"1" type:"string"` 10055} 10056 10057// String returns the string representation 10058func (s Statement) String() string { 10059 return awsutil.Prettify(s) 10060} 10061 10062// GoString returns the string representation 10063func (s Statement) GoString() string { 10064 return s.String() 10065} 10066 10067// Validate inspects the fields of the type to determine if they are valid. 10068func (s *Statement) Validate() error { 10069 invalidParams := request.ErrInvalidParams{Context: "Statement"} 10070 if s.Messages == nil { 10071 invalidParams.Add(request.NewErrParamRequired("Messages")) 10072 } 10073 if s.Messages != nil && len(s.Messages) < 1 { 10074 invalidParams.Add(request.NewErrParamMinLen("Messages", 1)) 10075 } 10076 if s.ResponseCard != nil && len(*s.ResponseCard) < 1 { 10077 invalidParams.Add(request.NewErrParamMinLen("ResponseCard", 1)) 10078 } 10079 if s.Messages != nil { 10080 for i, v := range s.Messages { 10081 if v == nil { 10082 continue 10083 } 10084 if err := v.Validate(); err != nil { 10085 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Messages", i), err.(request.ErrInvalidParams)) 10086 } 10087 } 10088 } 10089 10090 if invalidParams.Len() > 0 { 10091 return invalidParams 10092 } 10093 return nil 10094} 10095 10096// SetMessages sets the Messages field's value. 10097func (s *Statement) SetMessages(v []*Message) *Statement { 10098 s.Messages = v 10099 return s 10100} 10101 10102// SetResponseCard sets the ResponseCard field's value. 10103func (s *Statement) SetResponseCard(v string) *Statement { 10104 s.ResponseCard = &v 10105 return s 10106} 10107 10108// Provides information about a single utterance that was made to your bot. 10109// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/UtteranceData 10110type UtteranceData struct { 10111 _ struct{} `type:"structure"` 10112 10113 // The number of times that the utterance was processed. 10114 Count *int64 `locationName:"count" type:"integer"` 10115 10116 // The total number of individuals that used the utterance. 10117 DistinctUsers *int64 `locationName:"distinctUsers" type:"integer"` 10118 10119 // The date that the utterance was first recorded. 10120 FirstUtteredDate *time.Time `locationName:"firstUtteredDate" type:"timestamp" timestampFormat:"unix"` 10121 10122 // The date that the utterance was last recorded. 10123 LastUtteredDate *time.Time `locationName:"lastUtteredDate" type:"timestamp" timestampFormat:"unix"` 10124 10125 // The text that was entered by the user or the text representation of an audio 10126 // clip. 10127 UtteranceString *string `locationName:"utteranceString" min:"1" type:"string"` 10128} 10129 10130// String returns the string representation 10131func (s UtteranceData) String() string { 10132 return awsutil.Prettify(s) 10133} 10134 10135// GoString returns the string representation 10136func (s UtteranceData) GoString() string { 10137 return s.String() 10138} 10139 10140// SetCount sets the Count field's value. 10141func (s *UtteranceData) SetCount(v int64) *UtteranceData { 10142 s.Count = &v 10143 return s 10144} 10145 10146// SetDistinctUsers sets the DistinctUsers field's value. 10147func (s *UtteranceData) SetDistinctUsers(v int64) *UtteranceData { 10148 s.DistinctUsers = &v 10149 return s 10150} 10151 10152// SetFirstUtteredDate sets the FirstUtteredDate field's value. 10153func (s *UtteranceData) SetFirstUtteredDate(v time.Time) *UtteranceData { 10154 s.FirstUtteredDate = &v 10155 return s 10156} 10157 10158// SetLastUtteredDate sets the LastUtteredDate field's value. 10159func (s *UtteranceData) SetLastUtteredDate(v time.Time) *UtteranceData { 10160 s.LastUtteredDate = &v 10161 return s 10162} 10163 10164// SetUtteranceString sets the UtteranceString field's value. 10165func (s *UtteranceData) SetUtteranceString(v string) *UtteranceData { 10166 s.UtteranceString = &v 10167 return s 10168} 10169 10170// Provides a list of utterances that have been made to a specific version of 10171// your bot. The list contains a maximum of 100 utterances. 10172// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/UtteranceList 10173type UtteranceList struct { 10174 _ struct{} `type:"structure"` 10175 10176 // The version of the bot that processed the list. 10177 BotVersion *string `locationName:"botVersion" min:"1" type:"string"` 10178 10179 // One or more UtteranceData objects that contain information about the utterances 10180 // that have been made to a bot. The maximum number of object is 100. 10181 Utterances []*UtteranceData `locationName:"utterances" type:"list"` 10182} 10183 10184// String returns the string representation 10185func (s UtteranceList) String() string { 10186 return awsutil.Prettify(s) 10187} 10188 10189// GoString returns the string representation 10190func (s UtteranceList) GoString() string { 10191 return s.String() 10192} 10193 10194// SetBotVersion sets the BotVersion field's value. 10195func (s *UtteranceList) SetBotVersion(v string) *UtteranceList { 10196 s.BotVersion = &v 10197 return s 10198} 10199 10200// SetUtterances sets the Utterances field's value. 10201func (s *UtteranceList) SetUtterances(v []*UtteranceData) *UtteranceList { 10202 s.Utterances = v 10203 return s 10204} 10205 10206const ( 10207 // ChannelStatusInProgress is a ChannelStatus enum value 10208 ChannelStatusInProgress = "IN_PROGRESS" 10209 10210 // ChannelStatusCreated is a ChannelStatus enum value 10211 ChannelStatusCreated = "CREATED" 10212 10213 // ChannelStatusFailed is a ChannelStatus enum value 10214 ChannelStatusFailed = "FAILED" 10215) 10216 10217const ( 10218 // ChannelTypeFacebook is a ChannelType enum value 10219 ChannelTypeFacebook = "Facebook" 10220 10221 // ChannelTypeSlack is a ChannelType enum value 10222 ChannelTypeSlack = "Slack" 10223 10224 // ChannelTypeTwilioSms is a ChannelType enum value 10225 ChannelTypeTwilioSms = "Twilio-Sms" 10226) 10227 10228const ( 10229 // ContentTypePlainText is a ContentType enum value 10230 ContentTypePlainText = "PlainText" 10231 10232 // ContentTypeSsml is a ContentType enum value 10233 ContentTypeSsml = "SSML" 10234) 10235 10236const ( 10237 // ExportStatusInProgress is a ExportStatus enum value 10238 ExportStatusInProgress = "IN_PROGRESS" 10239 10240 // ExportStatusReady is a ExportStatus enum value 10241 ExportStatusReady = "READY" 10242 10243 // ExportStatusFailed is a ExportStatus enum value 10244 ExportStatusFailed = "FAILED" 10245) 10246 10247const ( 10248 // ExportTypeAlexaSkillsKit is a ExportType enum value 10249 ExportTypeAlexaSkillsKit = "ALEXA_SKILLS_KIT" 10250) 10251 10252const ( 10253 // FulfillmentActivityTypeReturnIntent is a FulfillmentActivityType enum value 10254 FulfillmentActivityTypeReturnIntent = "ReturnIntent" 10255 10256 // FulfillmentActivityTypeCodeHook is a FulfillmentActivityType enum value 10257 FulfillmentActivityTypeCodeHook = "CodeHook" 10258) 10259 10260const ( 10261 // LocaleEnUs is a Locale enum value 10262 LocaleEnUs = "en-US" 10263) 10264 10265const ( 10266 // ProcessBehaviorSave is a ProcessBehavior enum value 10267 ProcessBehaviorSave = "SAVE" 10268 10269 // ProcessBehaviorBuild is a ProcessBehavior enum value 10270 ProcessBehaviorBuild = "BUILD" 10271) 10272 10273const ( 10274 // ReferenceTypeIntent is a ReferenceType enum value 10275 ReferenceTypeIntent = "Intent" 10276 10277 // ReferenceTypeBot is a ReferenceType enum value 10278 ReferenceTypeBot = "Bot" 10279 10280 // ReferenceTypeBotAlias is a ReferenceType enum value 10281 ReferenceTypeBotAlias = "BotAlias" 10282 10283 // ReferenceTypeBotChannel is a ReferenceType enum value 10284 ReferenceTypeBotChannel = "BotChannel" 10285) 10286 10287const ( 10288 // ResourceTypeBot is a ResourceType enum value 10289 ResourceTypeBot = "BOT" 10290) 10291 10292const ( 10293 // SlotConstraintRequired is a SlotConstraint enum value 10294 SlotConstraintRequired = "Required" 10295 10296 // SlotConstraintOptional is a SlotConstraint enum value 10297 SlotConstraintOptional = "Optional" 10298) 10299 10300const ( 10301 // SlotValueSelectionStrategyOriginalValue is a SlotValueSelectionStrategy enum value 10302 SlotValueSelectionStrategyOriginalValue = "ORIGINAL_VALUE" 10303 10304 // SlotValueSelectionStrategyTopResolution is a SlotValueSelectionStrategy enum value 10305 SlotValueSelectionStrategyTopResolution = "TOP_RESOLUTION" 10306) 10307 10308const ( 10309 // StatusBuilding is a Status enum value 10310 StatusBuilding = "BUILDING" 10311 10312 // StatusReady is a Status enum value 10313 StatusReady = "READY" 10314 10315 // StatusFailed is a Status enum value 10316 StatusFailed = "FAILED" 10317 10318 // StatusNotBuilt is a Status enum value 10319 StatusNotBuilt = "NOT_BUILT" 10320) 10321 10322const ( 10323 // StatusTypeDetected is a StatusType enum value 10324 StatusTypeDetected = "Detected" 10325 10326 // StatusTypeMissed is a StatusType enum value 10327 StatusTypeMissed = "Missed" 10328) 10329