1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package connectparticipant 4 5import ( 6 "fmt" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11 "github.com/aws/aws-sdk-go/private/protocol" 12 "github.com/aws/aws-sdk-go/private/protocol/restjson" 13) 14 15const opCompleteAttachmentUpload = "CompleteAttachmentUpload" 16 17// CompleteAttachmentUploadRequest generates a "aws/request.Request" representing the 18// client's request for the CompleteAttachmentUpload operation. The "output" return 19// value will be populated with the request's response once the request completes 20// successfully. 21// 22// Use "Send" method on the returned Request to send the API call to the service. 23// the "output" return value is not valid until after Send returns without error. 24// 25// See CompleteAttachmentUpload for more information on using the CompleteAttachmentUpload 26// API call, and error handling. 27// 28// This method is useful when you want to inject custom logic or configuration 29// into the SDK's request lifecycle. Such as custom headers, or retry logic. 30// 31// 32// // Example sending a request using the CompleteAttachmentUploadRequest method. 33// req, resp := client.CompleteAttachmentUploadRequest(params) 34// 35// err := req.Send() 36// if err == nil { // resp is now filled 37// fmt.Println(resp) 38// } 39// 40// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/CompleteAttachmentUpload 41func (c *ConnectParticipant) CompleteAttachmentUploadRequest(input *CompleteAttachmentUploadInput) (req *request.Request, output *CompleteAttachmentUploadOutput) { 42 op := &request.Operation{ 43 Name: opCompleteAttachmentUpload, 44 HTTPMethod: "POST", 45 HTTPPath: "/participant/complete-attachment-upload", 46 } 47 48 if input == nil { 49 input = &CompleteAttachmentUploadInput{} 50 } 51 52 output = &CompleteAttachmentUploadOutput{} 53 req = c.newRequest(op, input, output) 54 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 55 return 56} 57 58// CompleteAttachmentUpload API operation for Amazon Connect Participant Service. 59// 60// Allows you to confirm that the attachment has been uploaded using the pre-signed 61// URL provided in StartAttachmentUpload API. 62// 63// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 64// with awserr.Error's Code and Message methods to get detailed information about 65// the error. 66// 67// See the AWS API reference guide for Amazon Connect Participant Service's 68// API operation CompleteAttachmentUpload for usage and error information. 69// 70// Returned Error Types: 71// * AccessDeniedException 72// You do not have sufficient access to perform this action. 73// 74// * InternalServerException 75// This exception occurs when there is an internal failure in the Amazon Connect 76// service. 77// 78// * ThrottlingException 79// The request was denied due to request throttling. 80// 81// * ValidationException 82// The input fails to satisfy the constraints specified by Amazon Connect. 83// 84// * ServiceQuotaExceededException 85// The number of attachments per contact exceeds the quota. 86// 87// * ConflictException 88// An attachment with that identifier is already being uploaded. 89// 90// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/CompleteAttachmentUpload 91func (c *ConnectParticipant) CompleteAttachmentUpload(input *CompleteAttachmentUploadInput) (*CompleteAttachmentUploadOutput, error) { 92 req, out := c.CompleteAttachmentUploadRequest(input) 93 return out, req.Send() 94} 95 96// CompleteAttachmentUploadWithContext is the same as CompleteAttachmentUpload with the addition of 97// the ability to pass a context and additional request options. 98// 99// See CompleteAttachmentUpload for details on how to use this API operation. 100// 101// The context must be non-nil and will be used for request cancellation. If 102// the context is nil a panic will occur. In the future the SDK may create 103// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 104// for more information on using Contexts. 105func (c *ConnectParticipant) CompleteAttachmentUploadWithContext(ctx aws.Context, input *CompleteAttachmentUploadInput, opts ...request.Option) (*CompleteAttachmentUploadOutput, error) { 106 req, out := c.CompleteAttachmentUploadRequest(input) 107 req.SetContext(ctx) 108 req.ApplyOptions(opts...) 109 return out, req.Send() 110} 111 112const opCreateParticipantConnection = "CreateParticipantConnection" 113 114// CreateParticipantConnectionRequest generates a "aws/request.Request" representing the 115// client's request for the CreateParticipantConnection operation. The "output" return 116// value will be populated with the request's response once the request completes 117// successfully. 118// 119// Use "Send" method on the returned Request to send the API call to the service. 120// the "output" return value is not valid until after Send returns without error. 121// 122// See CreateParticipantConnection for more information on using the CreateParticipantConnection 123// API call, and error handling. 124// 125// This method is useful when you want to inject custom logic or configuration 126// into the SDK's request lifecycle. Such as custom headers, or retry logic. 127// 128// 129// // Example sending a request using the CreateParticipantConnectionRequest method. 130// req, resp := client.CreateParticipantConnectionRequest(params) 131// 132// err := req.Send() 133// if err == nil { // resp is now filled 134// fmt.Println(resp) 135// } 136// 137// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/CreateParticipantConnection 138func (c *ConnectParticipant) CreateParticipantConnectionRequest(input *CreateParticipantConnectionInput) (req *request.Request, output *CreateParticipantConnectionOutput) { 139 op := &request.Operation{ 140 Name: opCreateParticipantConnection, 141 HTTPMethod: "POST", 142 HTTPPath: "/participant/connection", 143 } 144 145 if input == nil { 146 input = &CreateParticipantConnectionInput{} 147 } 148 149 output = &CreateParticipantConnectionOutput{} 150 req = c.newRequest(op, input, output) 151 return 152} 153 154// CreateParticipantConnection API operation for Amazon Connect Participant Service. 155// 156// Creates the participant's connection. Note that ParticipantToken is used 157// for invoking this API instead of ConnectionToken. 158// 159// The participant token is valid for the lifetime of the participant – until 160// they are part of a contact. 161// 162// The response URL for WEBSOCKET Type has a connect expiry timeout of 100s. 163// Clients must manually connect to the returned websocket URL and subscribe 164// to the desired topic. 165// 166// For chat, you need to publish the following on the established websocket 167// connection: 168// 169// {"topic":"aws/subscribe","content":{"topics":["aws/chat"]}} 170// 171// Upon websocket URL expiry, as specified in the response ConnectionExpiry 172// parameter, clients need to call this API again to obtain a new websocket 173// URL and perform the same steps as before. 174// 175// The Amazon Connect Participant Service APIs do not use Signature Version 176// 4 authentication (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). 177// 178// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 179// with awserr.Error's Code and Message methods to get detailed information about 180// the error. 181// 182// See the AWS API reference guide for Amazon Connect Participant Service's 183// API operation CreateParticipantConnection for usage and error information. 184// 185// Returned Error Types: 186// * AccessDeniedException 187// You do not have sufficient access to perform this action. 188// 189// * InternalServerException 190// This exception occurs when there is an internal failure in the Amazon Connect 191// service. 192// 193// * ThrottlingException 194// The request was denied due to request throttling. 195// 196// * ValidationException 197// The input fails to satisfy the constraints specified by Amazon Connect. 198// 199// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/CreateParticipantConnection 200func (c *ConnectParticipant) CreateParticipantConnection(input *CreateParticipantConnectionInput) (*CreateParticipantConnectionOutput, error) { 201 req, out := c.CreateParticipantConnectionRequest(input) 202 return out, req.Send() 203} 204 205// CreateParticipantConnectionWithContext is the same as CreateParticipantConnection with the addition of 206// the ability to pass a context and additional request options. 207// 208// See CreateParticipantConnection for details on how to use this API operation. 209// 210// The context must be non-nil and will be used for request cancellation. If 211// the context is nil a panic will occur. In the future the SDK may create 212// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 213// for more information on using Contexts. 214func (c *ConnectParticipant) CreateParticipantConnectionWithContext(ctx aws.Context, input *CreateParticipantConnectionInput, opts ...request.Option) (*CreateParticipantConnectionOutput, error) { 215 req, out := c.CreateParticipantConnectionRequest(input) 216 req.SetContext(ctx) 217 req.ApplyOptions(opts...) 218 return out, req.Send() 219} 220 221const opDisconnectParticipant = "DisconnectParticipant" 222 223// DisconnectParticipantRequest generates a "aws/request.Request" representing the 224// client's request for the DisconnectParticipant operation. The "output" return 225// value will be populated with the request's response once the request completes 226// successfully. 227// 228// Use "Send" method on the returned Request to send the API call to the service. 229// the "output" return value is not valid until after Send returns without error. 230// 231// See DisconnectParticipant for more information on using the DisconnectParticipant 232// API call, and error handling. 233// 234// This method is useful when you want to inject custom logic or configuration 235// into the SDK's request lifecycle. Such as custom headers, or retry logic. 236// 237// 238// // Example sending a request using the DisconnectParticipantRequest method. 239// req, resp := client.DisconnectParticipantRequest(params) 240// 241// err := req.Send() 242// if err == nil { // resp is now filled 243// fmt.Println(resp) 244// } 245// 246// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/DisconnectParticipant 247func (c *ConnectParticipant) DisconnectParticipantRequest(input *DisconnectParticipantInput) (req *request.Request, output *DisconnectParticipantOutput) { 248 op := &request.Operation{ 249 Name: opDisconnectParticipant, 250 HTTPMethod: "POST", 251 HTTPPath: "/participant/disconnect", 252 } 253 254 if input == nil { 255 input = &DisconnectParticipantInput{} 256 } 257 258 output = &DisconnectParticipantOutput{} 259 req = c.newRequest(op, input, output) 260 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 261 return 262} 263 264// DisconnectParticipant API operation for Amazon Connect Participant Service. 265// 266// Disconnects a participant. Note that ConnectionToken is used for invoking 267// this API instead of ParticipantToken. 268// 269// The Amazon Connect Participant Service APIs do not use Signature Version 270// 4 authentication (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). 271// 272// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 273// with awserr.Error's Code and Message methods to get detailed information about 274// the error. 275// 276// See the AWS API reference guide for Amazon Connect Participant Service's 277// API operation DisconnectParticipant for usage and error information. 278// 279// Returned Error Types: 280// * AccessDeniedException 281// You do not have sufficient access to perform this action. 282// 283// * InternalServerException 284// This exception occurs when there is an internal failure in the Amazon Connect 285// service. 286// 287// * ThrottlingException 288// The request was denied due to request throttling. 289// 290// * ValidationException 291// The input fails to satisfy the constraints specified by Amazon Connect. 292// 293// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/DisconnectParticipant 294func (c *ConnectParticipant) DisconnectParticipant(input *DisconnectParticipantInput) (*DisconnectParticipantOutput, error) { 295 req, out := c.DisconnectParticipantRequest(input) 296 return out, req.Send() 297} 298 299// DisconnectParticipantWithContext is the same as DisconnectParticipant with the addition of 300// the ability to pass a context and additional request options. 301// 302// See DisconnectParticipant for details on how to use this API operation. 303// 304// The context must be non-nil and will be used for request cancellation. If 305// the context is nil a panic will occur. In the future the SDK may create 306// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 307// for more information on using Contexts. 308func (c *ConnectParticipant) DisconnectParticipantWithContext(ctx aws.Context, input *DisconnectParticipantInput, opts ...request.Option) (*DisconnectParticipantOutput, error) { 309 req, out := c.DisconnectParticipantRequest(input) 310 req.SetContext(ctx) 311 req.ApplyOptions(opts...) 312 return out, req.Send() 313} 314 315const opGetAttachment = "GetAttachment" 316 317// GetAttachmentRequest generates a "aws/request.Request" representing the 318// client's request for the GetAttachment operation. The "output" return 319// value will be populated with the request's response once the request completes 320// successfully. 321// 322// Use "Send" method on the returned Request to send the API call to the service. 323// the "output" return value is not valid until after Send returns without error. 324// 325// See GetAttachment for more information on using the GetAttachment 326// API call, and error handling. 327// 328// This method is useful when you want to inject custom logic or configuration 329// into the SDK's request lifecycle. Such as custom headers, or retry logic. 330// 331// 332// // Example sending a request using the GetAttachmentRequest method. 333// req, resp := client.GetAttachmentRequest(params) 334// 335// err := req.Send() 336// if err == nil { // resp is now filled 337// fmt.Println(resp) 338// } 339// 340// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/GetAttachment 341func (c *ConnectParticipant) GetAttachmentRequest(input *GetAttachmentInput) (req *request.Request, output *GetAttachmentOutput) { 342 op := &request.Operation{ 343 Name: opGetAttachment, 344 HTTPMethod: "POST", 345 HTTPPath: "/participant/attachment", 346 } 347 348 if input == nil { 349 input = &GetAttachmentInput{} 350 } 351 352 output = &GetAttachmentOutput{} 353 req = c.newRequest(op, input, output) 354 return 355} 356 357// GetAttachment API operation for Amazon Connect Participant Service. 358// 359// Provides a pre-signed URL for download of a completed attachment. This is 360// an asynchronous API for use with active contacts. 361// 362// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 363// with awserr.Error's Code and Message methods to get detailed information about 364// the error. 365// 366// See the AWS API reference guide for Amazon Connect Participant Service's 367// API operation GetAttachment for usage and error information. 368// 369// Returned Error Types: 370// * AccessDeniedException 371// You do not have sufficient access to perform this action. 372// 373// * InternalServerException 374// This exception occurs when there is an internal failure in the Amazon Connect 375// service. 376// 377// * ThrottlingException 378// The request was denied due to request throttling. 379// 380// * ValidationException 381// The input fails to satisfy the constraints specified by Amazon Connect. 382// 383// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/GetAttachment 384func (c *ConnectParticipant) GetAttachment(input *GetAttachmentInput) (*GetAttachmentOutput, error) { 385 req, out := c.GetAttachmentRequest(input) 386 return out, req.Send() 387} 388 389// GetAttachmentWithContext is the same as GetAttachment with the addition of 390// the ability to pass a context and additional request options. 391// 392// See GetAttachment for details on how to use this API operation. 393// 394// The context must be non-nil and will be used for request cancellation. If 395// the context is nil a panic will occur. In the future the SDK may create 396// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 397// for more information on using Contexts. 398func (c *ConnectParticipant) GetAttachmentWithContext(ctx aws.Context, input *GetAttachmentInput, opts ...request.Option) (*GetAttachmentOutput, error) { 399 req, out := c.GetAttachmentRequest(input) 400 req.SetContext(ctx) 401 req.ApplyOptions(opts...) 402 return out, req.Send() 403} 404 405const opGetTranscript = "GetTranscript" 406 407// GetTranscriptRequest generates a "aws/request.Request" representing the 408// client's request for the GetTranscript operation. The "output" return 409// value will be populated with the request's response once the request completes 410// successfully. 411// 412// Use "Send" method on the returned Request to send the API call to the service. 413// the "output" return value is not valid until after Send returns without error. 414// 415// See GetTranscript for more information on using the GetTranscript 416// API call, and error handling. 417// 418// This method is useful when you want to inject custom logic or configuration 419// into the SDK's request lifecycle. Such as custom headers, or retry logic. 420// 421// 422// // Example sending a request using the GetTranscriptRequest method. 423// req, resp := client.GetTranscriptRequest(params) 424// 425// err := req.Send() 426// if err == nil { // resp is now filled 427// fmt.Println(resp) 428// } 429// 430// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/GetTranscript 431func (c *ConnectParticipant) GetTranscriptRequest(input *GetTranscriptInput) (req *request.Request, output *GetTranscriptOutput) { 432 op := &request.Operation{ 433 Name: opGetTranscript, 434 HTTPMethod: "POST", 435 HTTPPath: "/participant/transcript", 436 Paginator: &request.Paginator{ 437 InputTokens: []string{"NextToken"}, 438 OutputTokens: []string{"NextToken"}, 439 LimitToken: "MaxResults", 440 TruncationToken: "", 441 }, 442 } 443 444 if input == nil { 445 input = &GetTranscriptInput{} 446 } 447 448 output = &GetTranscriptOutput{} 449 req = c.newRequest(op, input, output) 450 return 451} 452 453// GetTranscript API operation for Amazon Connect Participant Service. 454// 455// Retrieves a transcript of the session, including details about any attachments. 456// Note that ConnectionToken is used for invoking this API instead of ParticipantToken. 457// 458// The Amazon Connect Participant Service APIs do not use Signature Version 459// 4 authentication (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). 460// 461// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 462// with awserr.Error's Code and Message methods to get detailed information about 463// the error. 464// 465// See the AWS API reference guide for Amazon Connect Participant Service's 466// API operation GetTranscript for usage and error information. 467// 468// Returned Error Types: 469// * AccessDeniedException 470// You do not have sufficient access to perform this action. 471// 472// * InternalServerException 473// This exception occurs when there is an internal failure in the Amazon Connect 474// service. 475// 476// * ThrottlingException 477// The request was denied due to request throttling. 478// 479// * ValidationException 480// The input fails to satisfy the constraints specified by Amazon Connect. 481// 482// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/GetTranscript 483func (c *ConnectParticipant) GetTranscript(input *GetTranscriptInput) (*GetTranscriptOutput, error) { 484 req, out := c.GetTranscriptRequest(input) 485 return out, req.Send() 486} 487 488// GetTranscriptWithContext is the same as GetTranscript with the addition of 489// the ability to pass a context and additional request options. 490// 491// See GetTranscript for details on how to use this API operation. 492// 493// The context must be non-nil and will be used for request cancellation. If 494// the context is nil a panic will occur. In the future the SDK may create 495// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 496// for more information on using Contexts. 497func (c *ConnectParticipant) GetTranscriptWithContext(ctx aws.Context, input *GetTranscriptInput, opts ...request.Option) (*GetTranscriptOutput, error) { 498 req, out := c.GetTranscriptRequest(input) 499 req.SetContext(ctx) 500 req.ApplyOptions(opts...) 501 return out, req.Send() 502} 503 504// GetTranscriptPages iterates over the pages of a GetTranscript operation, 505// calling the "fn" function with the response data for each page. To stop 506// iterating, return false from the fn function. 507// 508// See GetTranscript method for more information on how to use this operation. 509// 510// Note: This operation can generate multiple requests to a service. 511// 512// // Example iterating over at most 3 pages of a GetTranscript operation. 513// pageNum := 0 514// err := client.GetTranscriptPages(params, 515// func(page *connectparticipant.GetTranscriptOutput, lastPage bool) bool { 516// pageNum++ 517// fmt.Println(page) 518// return pageNum <= 3 519// }) 520// 521func (c *ConnectParticipant) GetTranscriptPages(input *GetTranscriptInput, fn func(*GetTranscriptOutput, bool) bool) error { 522 return c.GetTranscriptPagesWithContext(aws.BackgroundContext(), input, fn) 523} 524 525// GetTranscriptPagesWithContext same as GetTranscriptPages except 526// it takes a Context and allows setting request options on the pages. 527// 528// The context must be non-nil and will be used for request cancellation. If 529// the context is nil a panic will occur. In the future the SDK may create 530// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 531// for more information on using Contexts. 532func (c *ConnectParticipant) GetTranscriptPagesWithContext(ctx aws.Context, input *GetTranscriptInput, fn func(*GetTranscriptOutput, bool) bool, opts ...request.Option) error { 533 p := request.Pagination{ 534 NewRequest: func() (*request.Request, error) { 535 var inCpy *GetTranscriptInput 536 if input != nil { 537 tmp := *input 538 inCpy = &tmp 539 } 540 req, _ := c.GetTranscriptRequest(inCpy) 541 req.SetContext(ctx) 542 req.ApplyOptions(opts...) 543 return req, nil 544 }, 545 } 546 547 for p.Next() { 548 if !fn(p.Page().(*GetTranscriptOutput), !p.HasNextPage()) { 549 break 550 } 551 } 552 553 return p.Err() 554} 555 556const opSendEvent = "SendEvent" 557 558// SendEventRequest generates a "aws/request.Request" representing the 559// client's request for the SendEvent operation. The "output" return 560// value will be populated with the request's response once the request completes 561// successfully. 562// 563// Use "Send" method on the returned Request to send the API call to the service. 564// the "output" return value is not valid until after Send returns without error. 565// 566// See SendEvent for more information on using the SendEvent 567// API call, and error handling. 568// 569// This method is useful when you want to inject custom logic or configuration 570// into the SDK's request lifecycle. Such as custom headers, or retry logic. 571// 572// 573// // Example sending a request using the SendEventRequest method. 574// req, resp := client.SendEventRequest(params) 575// 576// err := req.Send() 577// if err == nil { // resp is now filled 578// fmt.Println(resp) 579// } 580// 581// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/SendEvent 582func (c *ConnectParticipant) SendEventRequest(input *SendEventInput) (req *request.Request, output *SendEventOutput) { 583 op := &request.Operation{ 584 Name: opSendEvent, 585 HTTPMethod: "POST", 586 HTTPPath: "/participant/event", 587 } 588 589 if input == nil { 590 input = &SendEventInput{} 591 } 592 593 output = &SendEventOutput{} 594 req = c.newRequest(op, input, output) 595 return 596} 597 598// SendEvent API operation for Amazon Connect Participant Service. 599// 600// Sends an event. Note that ConnectionToken is used for invoking this API instead 601// of ParticipantToken. 602// 603// The Amazon Connect Participant Service APIs do not use Signature Version 604// 4 authentication (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). 605// 606// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 607// with awserr.Error's Code and Message methods to get detailed information about 608// the error. 609// 610// See the AWS API reference guide for Amazon Connect Participant Service's 611// API operation SendEvent for usage and error information. 612// 613// Returned Error Types: 614// * AccessDeniedException 615// You do not have sufficient access to perform this action. 616// 617// * InternalServerException 618// This exception occurs when there is an internal failure in the Amazon Connect 619// service. 620// 621// * ThrottlingException 622// The request was denied due to request throttling. 623// 624// * ValidationException 625// The input fails to satisfy the constraints specified by Amazon Connect. 626// 627// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/SendEvent 628func (c *ConnectParticipant) SendEvent(input *SendEventInput) (*SendEventOutput, error) { 629 req, out := c.SendEventRequest(input) 630 return out, req.Send() 631} 632 633// SendEventWithContext is the same as SendEvent with the addition of 634// the ability to pass a context and additional request options. 635// 636// See SendEvent for details on how to use this API operation. 637// 638// The context must be non-nil and will be used for request cancellation. If 639// the context is nil a panic will occur. In the future the SDK may create 640// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 641// for more information on using Contexts. 642func (c *ConnectParticipant) SendEventWithContext(ctx aws.Context, input *SendEventInput, opts ...request.Option) (*SendEventOutput, error) { 643 req, out := c.SendEventRequest(input) 644 req.SetContext(ctx) 645 req.ApplyOptions(opts...) 646 return out, req.Send() 647} 648 649const opSendMessage = "SendMessage" 650 651// SendMessageRequest generates a "aws/request.Request" representing the 652// client's request for the SendMessage operation. The "output" return 653// value will be populated with the request's response once the request completes 654// successfully. 655// 656// Use "Send" method on the returned Request to send the API call to the service. 657// the "output" return value is not valid until after Send returns without error. 658// 659// See SendMessage for more information on using the SendMessage 660// API call, and error handling. 661// 662// This method is useful when you want to inject custom logic or configuration 663// into the SDK's request lifecycle. Such as custom headers, or retry logic. 664// 665// 666// // Example sending a request using the SendMessageRequest method. 667// req, resp := client.SendMessageRequest(params) 668// 669// err := req.Send() 670// if err == nil { // resp is now filled 671// fmt.Println(resp) 672// } 673// 674// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/SendMessage 675func (c *ConnectParticipant) SendMessageRequest(input *SendMessageInput) (req *request.Request, output *SendMessageOutput) { 676 op := &request.Operation{ 677 Name: opSendMessage, 678 HTTPMethod: "POST", 679 HTTPPath: "/participant/message", 680 } 681 682 if input == nil { 683 input = &SendMessageInput{} 684 } 685 686 output = &SendMessageOutput{} 687 req = c.newRequest(op, input, output) 688 return 689} 690 691// SendMessage API operation for Amazon Connect Participant Service. 692// 693// Sends a message. Note that ConnectionToken is used for invoking this API 694// instead of ParticipantToken. 695// 696// The Amazon Connect Participant Service APIs do not use Signature Version 697// 4 authentication (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). 698// 699// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 700// with awserr.Error's Code and Message methods to get detailed information about 701// the error. 702// 703// See the AWS API reference guide for Amazon Connect Participant Service's 704// API operation SendMessage for usage and error information. 705// 706// Returned Error Types: 707// * AccessDeniedException 708// You do not have sufficient access to perform this action. 709// 710// * InternalServerException 711// This exception occurs when there is an internal failure in the Amazon Connect 712// service. 713// 714// * ThrottlingException 715// The request was denied due to request throttling. 716// 717// * ValidationException 718// The input fails to satisfy the constraints specified by Amazon Connect. 719// 720// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/SendMessage 721func (c *ConnectParticipant) SendMessage(input *SendMessageInput) (*SendMessageOutput, error) { 722 req, out := c.SendMessageRequest(input) 723 return out, req.Send() 724} 725 726// SendMessageWithContext is the same as SendMessage with the addition of 727// the ability to pass a context and additional request options. 728// 729// See SendMessage for details on how to use this API operation. 730// 731// The context must be non-nil and will be used for request cancellation. If 732// the context is nil a panic will occur. In the future the SDK may create 733// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 734// for more information on using Contexts. 735func (c *ConnectParticipant) SendMessageWithContext(ctx aws.Context, input *SendMessageInput, opts ...request.Option) (*SendMessageOutput, error) { 736 req, out := c.SendMessageRequest(input) 737 req.SetContext(ctx) 738 req.ApplyOptions(opts...) 739 return out, req.Send() 740} 741 742const opStartAttachmentUpload = "StartAttachmentUpload" 743 744// StartAttachmentUploadRequest generates a "aws/request.Request" representing the 745// client's request for the StartAttachmentUpload operation. The "output" return 746// value will be populated with the request's response once the request completes 747// successfully. 748// 749// Use "Send" method on the returned Request to send the API call to the service. 750// the "output" return value is not valid until after Send returns without error. 751// 752// See StartAttachmentUpload for more information on using the StartAttachmentUpload 753// API call, and error handling. 754// 755// This method is useful when you want to inject custom logic or configuration 756// into the SDK's request lifecycle. Such as custom headers, or retry logic. 757// 758// 759// // Example sending a request using the StartAttachmentUploadRequest method. 760// req, resp := client.StartAttachmentUploadRequest(params) 761// 762// err := req.Send() 763// if err == nil { // resp is now filled 764// fmt.Println(resp) 765// } 766// 767// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/StartAttachmentUpload 768func (c *ConnectParticipant) StartAttachmentUploadRequest(input *StartAttachmentUploadInput) (req *request.Request, output *StartAttachmentUploadOutput) { 769 op := &request.Operation{ 770 Name: opStartAttachmentUpload, 771 HTTPMethod: "POST", 772 HTTPPath: "/participant/start-attachment-upload", 773 } 774 775 if input == nil { 776 input = &StartAttachmentUploadInput{} 777 } 778 779 output = &StartAttachmentUploadOutput{} 780 req = c.newRequest(op, input, output) 781 return 782} 783 784// StartAttachmentUpload API operation for Amazon Connect Participant Service. 785// 786// Provides a pre-signed Amazon S3 URL in response for uploading the file directly 787// to S3. 788// 789// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 790// with awserr.Error's Code and Message methods to get detailed information about 791// the error. 792// 793// See the AWS API reference guide for Amazon Connect Participant Service's 794// API operation StartAttachmentUpload for usage and error information. 795// 796// Returned Error Types: 797// * AccessDeniedException 798// You do not have sufficient access to perform this action. 799// 800// * InternalServerException 801// This exception occurs when there is an internal failure in the Amazon Connect 802// service. 803// 804// * ThrottlingException 805// The request was denied due to request throttling. 806// 807// * ValidationException 808// The input fails to satisfy the constraints specified by Amazon Connect. 809// 810// * ServiceQuotaExceededException 811// The number of attachments per contact exceeds the quota. 812// 813// See also, https://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/StartAttachmentUpload 814func (c *ConnectParticipant) StartAttachmentUpload(input *StartAttachmentUploadInput) (*StartAttachmentUploadOutput, error) { 815 req, out := c.StartAttachmentUploadRequest(input) 816 return out, req.Send() 817} 818 819// StartAttachmentUploadWithContext is the same as StartAttachmentUpload with the addition of 820// the ability to pass a context and additional request options. 821// 822// See StartAttachmentUpload for details on how to use this API operation. 823// 824// The context must be non-nil and will be used for request cancellation. If 825// the context is nil a panic will occur. In the future the SDK may create 826// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 827// for more information on using Contexts. 828func (c *ConnectParticipant) StartAttachmentUploadWithContext(ctx aws.Context, input *StartAttachmentUploadInput, opts ...request.Option) (*StartAttachmentUploadOutput, error) { 829 req, out := c.StartAttachmentUploadRequest(input) 830 req.SetContext(ctx) 831 req.ApplyOptions(opts...) 832 return out, req.Send() 833} 834 835// You do not have sufficient access to perform this action. 836type AccessDeniedException struct { 837 _ struct{} `type:"structure"` 838 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 839 840 Message_ *string `locationName:"Message" type:"string"` 841} 842 843// String returns the string representation 844func (s AccessDeniedException) String() string { 845 return awsutil.Prettify(s) 846} 847 848// GoString returns the string representation 849func (s AccessDeniedException) GoString() string { 850 return s.String() 851} 852 853func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 854 return &AccessDeniedException{ 855 RespMetadata: v, 856 } 857} 858 859// Code returns the exception type name. 860func (s *AccessDeniedException) Code() string { 861 return "AccessDeniedException" 862} 863 864// Message returns the exception's message. 865func (s *AccessDeniedException) Message() string { 866 if s.Message_ != nil { 867 return *s.Message_ 868 } 869 return "" 870} 871 872// OrigErr always returns nil, satisfies awserr.Error interface. 873func (s *AccessDeniedException) OrigErr() error { 874 return nil 875} 876 877func (s *AccessDeniedException) Error() string { 878 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 879} 880 881// Status code returns the HTTP status code for the request's response error. 882func (s *AccessDeniedException) StatusCode() int { 883 return s.RespMetadata.StatusCode 884} 885 886// RequestID returns the service's response RequestID for request. 887func (s *AccessDeniedException) RequestID() string { 888 return s.RespMetadata.RequestID 889} 890 891// The case-insensitive input to indicate standard MIME type that describes 892// the format of the file that will be uploaded. 893type AttachmentItem struct { 894 _ struct{} `type:"structure"` 895 896 // A unique identifier for the attachment. 897 AttachmentId *string `min:"1" type:"string"` 898 899 // A case-sensitive name of the attachment being uploaded. 900 AttachmentName *string `min:"1" type:"string"` 901 902 // Describes the MIME file type of the attachment. For a list of supported file 903 // types, see Feature specifications (https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#feature-limits) 904 // in the Amazon Connect Administrator Guide. 905 ContentType *string `min:"1" type:"string"` 906 907 // Status of the attachment. 908 Status *string `type:"string" enum:"ArtifactStatus"` 909} 910 911// String returns the string representation 912func (s AttachmentItem) String() string { 913 return awsutil.Prettify(s) 914} 915 916// GoString returns the string representation 917func (s AttachmentItem) GoString() string { 918 return s.String() 919} 920 921// SetAttachmentId sets the AttachmentId field's value. 922func (s *AttachmentItem) SetAttachmentId(v string) *AttachmentItem { 923 s.AttachmentId = &v 924 return s 925} 926 927// SetAttachmentName sets the AttachmentName field's value. 928func (s *AttachmentItem) SetAttachmentName(v string) *AttachmentItem { 929 s.AttachmentName = &v 930 return s 931} 932 933// SetContentType sets the ContentType field's value. 934func (s *AttachmentItem) SetContentType(v string) *AttachmentItem { 935 s.ContentType = &v 936 return s 937} 938 939// SetStatus sets the Status field's value. 940func (s *AttachmentItem) SetStatus(v string) *AttachmentItem { 941 s.Status = &v 942 return s 943} 944 945type CompleteAttachmentUploadInput struct { 946 _ struct{} `type:"structure"` 947 948 // A list of unique identifiers for the attachments. 949 // 950 // AttachmentIds is a required field 951 AttachmentIds []*string `min:"1" type:"list" required:"true"` 952 953 // A unique, case-sensitive identifier that you provide to ensure the idempotency 954 // of the request. 955 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 956 957 // The authentication token associated with the participant's connection. 958 // 959 // ConnectionToken is a required field 960 ConnectionToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 961} 962 963// String returns the string representation 964func (s CompleteAttachmentUploadInput) String() string { 965 return awsutil.Prettify(s) 966} 967 968// GoString returns the string representation 969func (s CompleteAttachmentUploadInput) GoString() string { 970 return s.String() 971} 972 973// Validate inspects the fields of the type to determine if they are valid. 974func (s *CompleteAttachmentUploadInput) Validate() error { 975 invalidParams := request.ErrInvalidParams{Context: "CompleteAttachmentUploadInput"} 976 if s.AttachmentIds == nil { 977 invalidParams.Add(request.NewErrParamRequired("AttachmentIds")) 978 } 979 if s.AttachmentIds != nil && len(s.AttachmentIds) < 1 { 980 invalidParams.Add(request.NewErrParamMinLen("AttachmentIds", 1)) 981 } 982 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 983 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 984 } 985 if s.ConnectionToken == nil { 986 invalidParams.Add(request.NewErrParamRequired("ConnectionToken")) 987 } 988 if s.ConnectionToken != nil && len(*s.ConnectionToken) < 1 { 989 invalidParams.Add(request.NewErrParamMinLen("ConnectionToken", 1)) 990 } 991 992 if invalidParams.Len() > 0 { 993 return invalidParams 994 } 995 return nil 996} 997 998// SetAttachmentIds sets the AttachmentIds field's value. 999func (s *CompleteAttachmentUploadInput) SetAttachmentIds(v []*string) *CompleteAttachmentUploadInput { 1000 s.AttachmentIds = v 1001 return s 1002} 1003 1004// SetClientToken sets the ClientToken field's value. 1005func (s *CompleteAttachmentUploadInput) SetClientToken(v string) *CompleteAttachmentUploadInput { 1006 s.ClientToken = &v 1007 return s 1008} 1009 1010// SetConnectionToken sets the ConnectionToken field's value. 1011func (s *CompleteAttachmentUploadInput) SetConnectionToken(v string) *CompleteAttachmentUploadInput { 1012 s.ConnectionToken = &v 1013 return s 1014} 1015 1016type CompleteAttachmentUploadOutput struct { 1017 _ struct{} `type:"structure"` 1018} 1019 1020// String returns the string representation 1021func (s CompleteAttachmentUploadOutput) String() string { 1022 return awsutil.Prettify(s) 1023} 1024 1025// GoString returns the string representation 1026func (s CompleteAttachmentUploadOutput) GoString() string { 1027 return s.String() 1028} 1029 1030// An attachment with that identifier is already being uploaded. 1031type ConflictException struct { 1032 _ struct{} `type:"structure"` 1033 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1034 1035 Message_ *string `locationName:"Message" min:"1" type:"string"` 1036} 1037 1038// String returns the string representation 1039func (s ConflictException) String() string { 1040 return awsutil.Prettify(s) 1041} 1042 1043// GoString returns the string representation 1044func (s ConflictException) GoString() string { 1045 return s.String() 1046} 1047 1048func newErrorConflictException(v protocol.ResponseMetadata) error { 1049 return &ConflictException{ 1050 RespMetadata: v, 1051 } 1052} 1053 1054// Code returns the exception type name. 1055func (s *ConflictException) Code() string { 1056 return "ConflictException" 1057} 1058 1059// Message returns the exception's message. 1060func (s *ConflictException) Message() string { 1061 if s.Message_ != nil { 1062 return *s.Message_ 1063 } 1064 return "" 1065} 1066 1067// OrigErr always returns nil, satisfies awserr.Error interface. 1068func (s *ConflictException) OrigErr() error { 1069 return nil 1070} 1071 1072func (s *ConflictException) Error() string { 1073 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1074} 1075 1076// Status code returns the HTTP status code for the request's response error. 1077func (s *ConflictException) StatusCode() int { 1078 return s.RespMetadata.StatusCode 1079} 1080 1081// RequestID returns the service's response RequestID for request. 1082func (s *ConflictException) RequestID() string { 1083 return s.RespMetadata.RequestID 1084} 1085 1086// Connection credentials. 1087type ConnectionCredentials struct { 1088 _ struct{} `type:"structure"` 1089 1090 // The connection token. 1091 ConnectionToken *string `min:"1" type:"string"` 1092 1093 // The expiration of the token. 1094 // 1095 // It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 1096 // 2019-11-08T02:41:28.172Z. 1097 Expiry *string `type:"string"` 1098} 1099 1100// String returns the string representation 1101func (s ConnectionCredentials) String() string { 1102 return awsutil.Prettify(s) 1103} 1104 1105// GoString returns the string representation 1106func (s ConnectionCredentials) GoString() string { 1107 return s.String() 1108} 1109 1110// SetConnectionToken sets the ConnectionToken field's value. 1111func (s *ConnectionCredentials) SetConnectionToken(v string) *ConnectionCredentials { 1112 s.ConnectionToken = &v 1113 return s 1114} 1115 1116// SetExpiry sets the Expiry field's value. 1117func (s *ConnectionCredentials) SetExpiry(v string) *ConnectionCredentials { 1118 s.Expiry = &v 1119 return s 1120} 1121 1122type CreateParticipantConnectionInput struct { 1123 _ struct{} `type:"structure"` 1124 1125 // This is a header parameter. 1126 // 1127 // The Participant Token as obtained from StartChatContact (https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html) 1128 // API response. 1129 // 1130 // ParticipantToken is a required field 1131 ParticipantToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 1132 1133 // Type of connection information required. 1134 // 1135 // Type is a required field 1136 Type []*string `min:"1" type:"list" required:"true"` 1137} 1138 1139// String returns the string representation 1140func (s CreateParticipantConnectionInput) String() string { 1141 return awsutil.Prettify(s) 1142} 1143 1144// GoString returns the string representation 1145func (s CreateParticipantConnectionInput) GoString() string { 1146 return s.String() 1147} 1148 1149// Validate inspects the fields of the type to determine if they are valid. 1150func (s *CreateParticipantConnectionInput) Validate() error { 1151 invalidParams := request.ErrInvalidParams{Context: "CreateParticipantConnectionInput"} 1152 if s.ParticipantToken == nil { 1153 invalidParams.Add(request.NewErrParamRequired("ParticipantToken")) 1154 } 1155 if s.ParticipantToken != nil && len(*s.ParticipantToken) < 1 { 1156 invalidParams.Add(request.NewErrParamMinLen("ParticipantToken", 1)) 1157 } 1158 if s.Type == nil { 1159 invalidParams.Add(request.NewErrParamRequired("Type")) 1160 } 1161 if s.Type != nil && len(s.Type) < 1 { 1162 invalidParams.Add(request.NewErrParamMinLen("Type", 1)) 1163 } 1164 1165 if invalidParams.Len() > 0 { 1166 return invalidParams 1167 } 1168 return nil 1169} 1170 1171// SetParticipantToken sets the ParticipantToken field's value. 1172func (s *CreateParticipantConnectionInput) SetParticipantToken(v string) *CreateParticipantConnectionInput { 1173 s.ParticipantToken = &v 1174 return s 1175} 1176 1177// SetType sets the Type field's value. 1178func (s *CreateParticipantConnectionInput) SetType(v []*string) *CreateParticipantConnectionInput { 1179 s.Type = v 1180 return s 1181} 1182 1183type CreateParticipantConnectionOutput struct { 1184 _ struct{} `type:"structure"` 1185 1186 // Creates the participant's connection credentials. The authentication token 1187 // associated with the participant's connection. 1188 ConnectionCredentials *ConnectionCredentials `type:"structure"` 1189 1190 // Creates the participant's websocket connection. 1191 Websocket *Websocket `type:"structure"` 1192} 1193 1194// String returns the string representation 1195func (s CreateParticipantConnectionOutput) String() string { 1196 return awsutil.Prettify(s) 1197} 1198 1199// GoString returns the string representation 1200func (s CreateParticipantConnectionOutput) GoString() string { 1201 return s.String() 1202} 1203 1204// SetConnectionCredentials sets the ConnectionCredentials field's value. 1205func (s *CreateParticipantConnectionOutput) SetConnectionCredentials(v *ConnectionCredentials) *CreateParticipantConnectionOutput { 1206 s.ConnectionCredentials = v 1207 return s 1208} 1209 1210// SetWebsocket sets the Websocket field's value. 1211func (s *CreateParticipantConnectionOutput) SetWebsocket(v *Websocket) *CreateParticipantConnectionOutput { 1212 s.Websocket = v 1213 return s 1214} 1215 1216type DisconnectParticipantInput struct { 1217 _ struct{} `type:"structure"` 1218 1219 // A unique, case-sensitive identifier that you provide to ensure the idempotency 1220 // of the request. 1221 ClientToken *string `type:"string" idempotencyToken:"true"` 1222 1223 // The authentication token associated with the participant's connection. 1224 // 1225 // ConnectionToken is a required field 1226 ConnectionToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 1227} 1228 1229// String returns the string representation 1230func (s DisconnectParticipantInput) String() string { 1231 return awsutil.Prettify(s) 1232} 1233 1234// GoString returns the string representation 1235func (s DisconnectParticipantInput) GoString() string { 1236 return s.String() 1237} 1238 1239// Validate inspects the fields of the type to determine if they are valid. 1240func (s *DisconnectParticipantInput) Validate() error { 1241 invalidParams := request.ErrInvalidParams{Context: "DisconnectParticipantInput"} 1242 if s.ConnectionToken == nil { 1243 invalidParams.Add(request.NewErrParamRequired("ConnectionToken")) 1244 } 1245 if s.ConnectionToken != nil && len(*s.ConnectionToken) < 1 { 1246 invalidParams.Add(request.NewErrParamMinLen("ConnectionToken", 1)) 1247 } 1248 1249 if invalidParams.Len() > 0 { 1250 return invalidParams 1251 } 1252 return nil 1253} 1254 1255// SetClientToken sets the ClientToken field's value. 1256func (s *DisconnectParticipantInput) SetClientToken(v string) *DisconnectParticipantInput { 1257 s.ClientToken = &v 1258 return s 1259} 1260 1261// SetConnectionToken sets the ConnectionToken field's value. 1262func (s *DisconnectParticipantInput) SetConnectionToken(v string) *DisconnectParticipantInput { 1263 s.ConnectionToken = &v 1264 return s 1265} 1266 1267type DisconnectParticipantOutput struct { 1268 _ struct{} `type:"structure"` 1269} 1270 1271// String returns the string representation 1272func (s DisconnectParticipantOutput) String() string { 1273 return awsutil.Prettify(s) 1274} 1275 1276// GoString returns the string representation 1277func (s DisconnectParticipantOutput) GoString() string { 1278 return s.String() 1279} 1280 1281type GetAttachmentInput struct { 1282 _ struct{} `type:"structure"` 1283 1284 // A unique identifier for the attachment. 1285 // 1286 // AttachmentId is a required field 1287 AttachmentId *string `min:"1" type:"string" required:"true"` 1288 1289 // The authentication token associated with the participant's connection. 1290 // 1291 // ConnectionToken is a required field 1292 ConnectionToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 1293} 1294 1295// String returns the string representation 1296func (s GetAttachmentInput) String() string { 1297 return awsutil.Prettify(s) 1298} 1299 1300// GoString returns the string representation 1301func (s GetAttachmentInput) GoString() string { 1302 return s.String() 1303} 1304 1305// Validate inspects the fields of the type to determine if they are valid. 1306func (s *GetAttachmentInput) Validate() error { 1307 invalidParams := request.ErrInvalidParams{Context: "GetAttachmentInput"} 1308 if s.AttachmentId == nil { 1309 invalidParams.Add(request.NewErrParamRequired("AttachmentId")) 1310 } 1311 if s.AttachmentId != nil && len(*s.AttachmentId) < 1 { 1312 invalidParams.Add(request.NewErrParamMinLen("AttachmentId", 1)) 1313 } 1314 if s.ConnectionToken == nil { 1315 invalidParams.Add(request.NewErrParamRequired("ConnectionToken")) 1316 } 1317 if s.ConnectionToken != nil && len(*s.ConnectionToken) < 1 { 1318 invalidParams.Add(request.NewErrParamMinLen("ConnectionToken", 1)) 1319 } 1320 1321 if invalidParams.Len() > 0 { 1322 return invalidParams 1323 } 1324 return nil 1325} 1326 1327// SetAttachmentId sets the AttachmentId field's value. 1328func (s *GetAttachmentInput) SetAttachmentId(v string) *GetAttachmentInput { 1329 s.AttachmentId = &v 1330 return s 1331} 1332 1333// SetConnectionToken sets the ConnectionToken field's value. 1334func (s *GetAttachmentInput) SetConnectionToken(v string) *GetAttachmentInput { 1335 s.ConnectionToken = &v 1336 return s 1337} 1338 1339type GetAttachmentOutput struct { 1340 _ struct{} `type:"structure"` 1341 1342 // The pre-signed URL using which file would be downloaded from Amazon S3 by 1343 // the API caller. 1344 Url *string `min:"1" type:"string"` 1345 1346 // The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 1347 // format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z. 1348 UrlExpiry *string `type:"string"` 1349} 1350 1351// String returns the string representation 1352func (s GetAttachmentOutput) String() string { 1353 return awsutil.Prettify(s) 1354} 1355 1356// GoString returns the string representation 1357func (s GetAttachmentOutput) GoString() string { 1358 return s.String() 1359} 1360 1361// SetUrl sets the Url field's value. 1362func (s *GetAttachmentOutput) SetUrl(v string) *GetAttachmentOutput { 1363 s.Url = &v 1364 return s 1365} 1366 1367// SetUrlExpiry sets the UrlExpiry field's value. 1368func (s *GetAttachmentOutput) SetUrlExpiry(v string) *GetAttachmentOutput { 1369 s.UrlExpiry = &v 1370 return s 1371} 1372 1373type GetTranscriptInput struct { 1374 _ struct{} `type:"structure"` 1375 1376 // The authentication token associated with the participant's connection. 1377 // 1378 // ConnectionToken is a required field 1379 ConnectionToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 1380 1381 // The contactId from the current contact chain for which transcript is needed. 1382 ContactId *string `min:"1" type:"string"` 1383 1384 // The maximum number of results to return in the page. Default: 10. 1385 MaxResults *int64 `type:"integer"` 1386 1387 // The pagination token. Use the value returned previously in the next subsequent 1388 // request to retrieve the next set of results. 1389 NextToken *string `min:"1" type:"string"` 1390 1391 // The direction from StartPosition from which to retrieve message. Default: 1392 // BACKWARD when no StartPosition is provided, FORWARD with StartPosition. 1393 ScanDirection *string `type:"string" enum:"ScanDirection"` 1394 1395 // The sort order for the records. Default: DESCENDING. 1396 SortOrder *string `type:"string" enum:"SortKey"` 1397 1398 // A filtering option for where to start. 1399 StartPosition *StartPosition `type:"structure"` 1400} 1401 1402// String returns the string representation 1403func (s GetTranscriptInput) String() string { 1404 return awsutil.Prettify(s) 1405} 1406 1407// GoString returns the string representation 1408func (s GetTranscriptInput) GoString() string { 1409 return s.String() 1410} 1411 1412// Validate inspects the fields of the type to determine if they are valid. 1413func (s *GetTranscriptInput) Validate() error { 1414 invalidParams := request.ErrInvalidParams{Context: "GetTranscriptInput"} 1415 if s.ConnectionToken == nil { 1416 invalidParams.Add(request.NewErrParamRequired("ConnectionToken")) 1417 } 1418 if s.ConnectionToken != nil && len(*s.ConnectionToken) < 1 { 1419 invalidParams.Add(request.NewErrParamMinLen("ConnectionToken", 1)) 1420 } 1421 if s.ContactId != nil && len(*s.ContactId) < 1 { 1422 invalidParams.Add(request.NewErrParamMinLen("ContactId", 1)) 1423 } 1424 if s.NextToken != nil && len(*s.NextToken) < 1 { 1425 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 1426 } 1427 if s.StartPosition != nil { 1428 if err := s.StartPosition.Validate(); err != nil { 1429 invalidParams.AddNested("StartPosition", err.(request.ErrInvalidParams)) 1430 } 1431 } 1432 1433 if invalidParams.Len() > 0 { 1434 return invalidParams 1435 } 1436 return nil 1437} 1438 1439// SetConnectionToken sets the ConnectionToken field's value. 1440func (s *GetTranscriptInput) SetConnectionToken(v string) *GetTranscriptInput { 1441 s.ConnectionToken = &v 1442 return s 1443} 1444 1445// SetContactId sets the ContactId field's value. 1446func (s *GetTranscriptInput) SetContactId(v string) *GetTranscriptInput { 1447 s.ContactId = &v 1448 return s 1449} 1450 1451// SetMaxResults sets the MaxResults field's value. 1452func (s *GetTranscriptInput) SetMaxResults(v int64) *GetTranscriptInput { 1453 s.MaxResults = &v 1454 return s 1455} 1456 1457// SetNextToken sets the NextToken field's value. 1458func (s *GetTranscriptInput) SetNextToken(v string) *GetTranscriptInput { 1459 s.NextToken = &v 1460 return s 1461} 1462 1463// SetScanDirection sets the ScanDirection field's value. 1464func (s *GetTranscriptInput) SetScanDirection(v string) *GetTranscriptInput { 1465 s.ScanDirection = &v 1466 return s 1467} 1468 1469// SetSortOrder sets the SortOrder field's value. 1470func (s *GetTranscriptInput) SetSortOrder(v string) *GetTranscriptInput { 1471 s.SortOrder = &v 1472 return s 1473} 1474 1475// SetStartPosition sets the StartPosition field's value. 1476func (s *GetTranscriptInput) SetStartPosition(v *StartPosition) *GetTranscriptInput { 1477 s.StartPosition = v 1478 return s 1479} 1480 1481type GetTranscriptOutput struct { 1482 _ struct{} `type:"structure"` 1483 1484 // The initial contact ID for the contact. 1485 InitialContactId *string `min:"1" type:"string"` 1486 1487 // The pagination token. Use the value returned previously in the next subsequent 1488 // request to retrieve the next set of results. 1489 NextToken *string `min:"1" type:"string"` 1490 1491 // The list of messages in the session. 1492 Transcript []*Item `type:"list"` 1493} 1494 1495// String returns the string representation 1496func (s GetTranscriptOutput) String() string { 1497 return awsutil.Prettify(s) 1498} 1499 1500// GoString returns the string representation 1501func (s GetTranscriptOutput) GoString() string { 1502 return s.String() 1503} 1504 1505// SetInitialContactId sets the InitialContactId field's value. 1506func (s *GetTranscriptOutput) SetInitialContactId(v string) *GetTranscriptOutput { 1507 s.InitialContactId = &v 1508 return s 1509} 1510 1511// SetNextToken sets the NextToken field's value. 1512func (s *GetTranscriptOutput) SetNextToken(v string) *GetTranscriptOutput { 1513 s.NextToken = &v 1514 return s 1515} 1516 1517// SetTranscript sets the Transcript field's value. 1518func (s *GetTranscriptOutput) SetTranscript(v []*Item) *GetTranscriptOutput { 1519 s.Transcript = v 1520 return s 1521} 1522 1523// This exception occurs when there is an internal failure in the Amazon Connect 1524// service. 1525type InternalServerException struct { 1526 _ struct{} `type:"structure"` 1527 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1528 1529 Message_ *string `locationName:"Message" type:"string"` 1530} 1531 1532// String returns the string representation 1533func (s InternalServerException) String() string { 1534 return awsutil.Prettify(s) 1535} 1536 1537// GoString returns the string representation 1538func (s InternalServerException) GoString() string { 1539 return s.String() 1540} 1541 1542func newErrorInternalServerException(v protocol.ResponseMetadata) error { 1543 return &InternalServerException{ 1544 RespMetadata: v, 1545 } 1546} 1547 1548// Code returns the exception type name. 1549func (s *InternalServerException) Code() string { 1550 return "InternalServerException" 1551} 1552 1553// Message returns the exception's message. 1554func (s *InternalServerException) Message() string { 1555 if s.Message_ != nil { 1556 return *s.Message_ 1557 } 1558 return "" 1559} 1560 1561// OrigErr always returns nil, satisfies awserr.Error interface. 1562func (s *InternalServerException) OrigErr() error { 1563 return nil 1564} 1565 1566func (s *InternalServerException) Error() string { 1567 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1568} 1569 1570// Status code returns the HTTP status code for the request's response error. 1571func (s *InternalServerException) StatusCode() int { 1572 return s.RespMetadata.StatusCode 1573} 1574 1575// RequestID returns the service's response RequestID for request. 1576func (s *InternalServerException) RequestID() string { 1577 return s.RespMetadata.RequestID 1578} 1579 1580// An item - message or event - that has been sent. 1581type Item struct { 1582 _ struct{} `type:"structure"` 1583 1584 // The time when the message or event was sent. 1585 // 1586 // It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 1587 // 2019-11-08T02:41:28.172Z. 1588 AbsoluteTime *string `min:"1" type:"string"` 1589 1590 // Provides information about the attachments. 1591 Attachments []*AttachmentItem `type:"list"` 1592 1593 // The content of the message or event. 1594 Content *string `min:"1" type:"string"` 1595 1596 // The type of content of the item. 1597 ContentType *string `min:"1" type:"string"` 1598 1599 // The chat display name of the sender. 1600 DisplayName *string `min:"1" type:"string"` 1601 1602 // The ID of the item. 1603 Id *string `min:"1" type:"string"` 1604 1605 // The ID of the sender in the session. 1606 ParticipantId *string `min:"1" type:"string"` 1607 1608 // The role of the sender. For example, is it a customer, agent, or system. 1609 ParticipantRole *string `type:"string" enum:"ParticipantRole"` 1610 1611 // Type of the item: message or event. 1612 Type *string `type:"string" enum:"ChatItemType"` 1613} 1614 1615// String returns the string representation 1616func (s Item) String() string { 1617 return awsutil.Prettify(s) 1618} 1619 1620// GoString returns the string representation 1621func (s Item) GoString() string { 1622 return s.String() 1623} 1624 1625// SetAbsoluteTime sets the AbsoluteTime field's value. 1626func (s *Item) SetAbsoluteTime(v string) *Item { 1627 s.AbsoluteTime = &v 1628 return s 1629} 1630 1631// SetAttachments sets the Attachments field's value. 1632func (s *Item) SetAttachments(v []*AttachmentItem) *Item { 1633 s.Attachments = v 1634 return s 1635} 1636 1637// SetContent sets the Content field's value. 1638func (s *Item) SetContent(v string) *Item { 1639 s.Content = &v 1640 return s 1641} 1642 1643// SetContentType sets the ContentType field's value. 1644func (s *Item) SetContentType(v string) *Item { 1645 s.ContentType = &v 1646 return s 1647} 1648 1649// SetDisplayName sets the DisplayName field's value. 1650func (s *Item) SetDisplayName(v string) *Item { 1651 s.DisplayName = &v 1652 return s 1653} 1654 1655// SetId sets the Id field's value. 1656func (s *Item) SetId(v string) *Item { 1657 s.Id = &v 1658 return s 1659} 1660 1661// SetParticipantId sets the ParticipantId field's value. 1662func (s *Item) SetParticipantId(v string) *Item { 1663 s.ParticipantId = &v 1664 return s 1665} 1666 1667// SetParticipantRole sets the ParticipantRole field's value. 1668func (s *Item) SetParticipantRole(v string) *Item { 1669 s.ParticipantRole = &v 1670 return s 1671} 1672 1673// SetType sets the Type field's value. 1674func (s *Item) SetType(v string) *Item { 1675 s.Type = &v 1676 return s 1677} 1678 1679type SendEventInput struct { 1680 _ struct{} `type:"structure"` 1681 1682 // A unique, case-sensitive identifier that you provide to ensure the idempotency 1683 // of the request. 1684 ClientToken *string `type:"string" idempotencyToken:"true"` 1685 1686 // The authentication token associated with the participant's connection. 1687 // 1688 // ConnectionToken is a required field 1689 ConnectionToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 1690 1691 // The content of the event to be sent (for example, message text). This is 1692 // not yet supported. 1693 Content *string `min:"1" type:"string"` 1694 1695 // The content type of the request. Supported types are: 1696 // 1697 // * application/vnd.amazonaws.connect.event.typing 1698 // 1699 // * application/vnd.amazonaws.connect.event.connection.acknowledged 1700 // 1701 // ContentType is a required field 1702 ContentType *string `min:"1" type:"string" required:"true"` 1703} 1704 1705// String returns the string representation 1706func (s SendEventInput) String() string { 1707 return awsutil.Prettify(s) 1708} 1709 1710// GoString returns the string representation 1711func (s SendEventInput) GoString() string { 1712 return s.String() 1713} 1714 1715// Validate inspects the fields of the type to determine if they are valid. 1716func (s *SendEventInput) Validate() error { 1717 invalidParams := request.ErrInvalidParams{Context: "SendEventInput"} 1718 if s.ConnectionToken == nil { 1719 invalidParams.Add(request.NewErrParamRequired("ConnectionToken")) 1720 } 1721 if s.ConnectionToken != nil && len(*s.ConnectionToken) < 1 { 1722 invalidParams.Add(request.NewErrParamMinLen("ConnectionToken", 1)) 1723 } 1724 if s.Content != nil && len(*s.Content) < 1 { 1725 invalidParams.Add(request.NewErrParamMinLen("Content", 1)) 1726 } 1727 if s.ContentType == nil { 1728 invalidParams.Add(request.NewErrParamRequired("ContentType")) 1729 } 1730 if s.ContentType != nil && len(*s.ContentType) < 1 { 1731 invalidParams.Add(request.NewErrParamMinLen("ContentType", 1)) 1732 } 1733 1734 if invalidParams.Len() > 0 { 1735 return invalidParams 1736 } 1737 return nil 1738} 1739 1740// SetClientToken sets the ClientToken field's value. 1741func (s *SendEventInput) SetClientToken(v string) *SendEventInput { 1742 s.ClientToken = &v 1743 return s 1744} 1745 1746// SetConnectionToken sets the ConnectionToken field's value. 1747func (s *SendEventInput) SetConnectionToken(v string) *SendEventInput { 1748 s.ConnectionToken = &v 1749 return s 1750} 1751 1752// SetContent sets the Content field's value. 1753func (s *SendEventInput) SetContent(v string) *SendEventInput { 1754 s.Content = &v 1755 return s 1756} 1757 1758// SetContentType sets the ContentType field's value. 1759func (s *SendEventInput) SetContentType(v string) *SendEventInput { 1760 s.ContentType = &v 1761 return s 1762} 1763 1764type SendEventOutput struct { 1765 _ struct{} `type:"structure"` 1766 1767 // The time when the event was sent. 1768 // 1769 // It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 1770 // 2019-11-08T02:41:28.172Z. 1771 AbsoluteTime *string `min:"1" type:"string"` 1772 1773 // The ID of the response. 1774 Id *string `min:"1" type:"string"` 1775} 1776 1777// String returns the string representation 1778func (s SendEventOutput) String() string { 1779 return awsutil.Prettify(s) 1780} 1781 1782// GoString returns the string representation 1783func (s SendEventOutput) GoString() string { 1784 return s.String() 1785} 1786 1787// SetAbsoluteTime sets the AbsoluteTime field's value. 1788func (s *SendEventOutput) SetAbsoluteTime(v string) *SendEventOutput { 1789 s.AbsoluteTime = &v 1790 return s 1791} 1792 1793// SetId sets the Id field's value. 1794func (s *SendEventOutput) SetId(v string) *SendEventOutput { 1795 s.Id = &v 1796 return s 1797} 1798 1799type SendMessageInput struct { 1800 _ struct{} `type:"structure"` 1801 1802 // A unique, case-sensitive identifier that you provide to ensure the idempotency 1803 // of the request. 1804 ClientToken *string `type:"string" idempotencyToken:"true"` 1805 1806 // The authentication token associated with the connection. 1807 // 1808 // ConnectionToken is a required field 1809 ConnectionToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 1810 1811 // The content of the message. 1812 // 1813 // Content is a required field 1814 Content *string `min:"1" type:"string" required:"true"` 1815 1816 // The type of the content. Supported types are text/plain. 1817 // 1818 // ContentType is a required field 1819 ContentType *string `min:"1" type:"string" required:"true"` 1820} 1821 1822// String returns the string representation 1823func (s SendMessageInput) String() string { 1824 return awsutil.Prettify(s) 1825} 1826 1827// GoString returns the string representation 1828func (s SendMessageInput) GoString() string { 1829 return s.String() 1830} 1831 1832// Validate inspects the fields of the type to determine if they are valid. 1833func (s *SendMessageInput) Validate() error { 1834 invalidParams := request.ErrInvalidParams{Context: "SendMessageInput"} 1835 if s.ConnectionToken == nil { 1836 invalidParams.Add(request.NewErrParamRequired("ConnectionToken")) 1837 } 1838 if s.ConnectionToken != nil && len(*s.ConnectionToken) < 1 { 1839 invalidParams.Add(request.NewErrParamMinLen("ConnectionToken", 1)) 1840 } 1841 if s.Content == nil { 1842 invalidParams.Add(request.NewErrParamRequired("Content")) 1843 } 1844 if s.Content != nil && len(*s.Content) < 1 { 1845 invalidParams.Add(request.NewErrParamMinLen("Content", 1)) 1846 } 1847 if s.ContentType == nil { 1848 invalidParams.Add(request.NewErrParamRequired("ContentType")) 1849 } 1850 if s.ContentType != nil && len(*s.ContentType) < 1 { 1851 invalidParams.Add(request.NewErrParamMinLen("ContentType", 1)) 1852 } 1853 1854 if invalidParams.Len() > 0 { 1855 return invalidParams 1856 } 1857 return nil 1858} 1859 1860// SetClientToken sets the ClientToken field's value. 1861func (s *SendMessageInput) SetClientToken(v string) *SendMessageInput { 1862 s.ClientToken = &v 1863 return s 1864} 1865 1866// SetConnectionToken sets the ConnectionToken field's value. 1867func (s *SendMessageInput) SetConnectionToken(v string) *SendMessageInput { 1868 s.ConnectionToken = &v 1869 return s 1870} 1871 1872// SetContent sets the Content field's value. 1873func (s *SendMessageInput) SetContent(v string) *SendMessageInput { 1874 s.Content = &v 1875 return s 1876} 1877 1878// SetContentType sets the ContentType field's value. 1879func (s *SendMessageInput) SetContentType(v string) *SendMessageInput { 1880 s.ContentType = &v 1881 return s 1882} 1883 1884type SendMessageOutput struct { 1885 _ struct{} `type:"structure"` 1886 1887 // The time when the message was sent. 1888 // 1889 // It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 1890 // 2019-11-08T02:41:28.172Z. 1891 AbsoluteTime *string `min:"1" type:"string"` 1892 1893 // The ID of the message. 1894 Id *string `min:"1" type:"string"` 1895} 1896 1897// String returns the string representation 1898func (s SendMessageOutput) String() string { 1899 return awsutil.Prettify(s) 1900} 1901 1902// GoString returns the string representation 1903func (s SendMessageOutput) GoString() string { 1904 return s.String() 1905} 1906 1907// SetAbsoluteTime sets the AbsoluteTime field's value. 1908func (s *SendMessageOutput) SetAbsoluteTime(v string) *SendMessageOutput { 1909 s.AbsoluteTime = &v 1910 return s 1911} 1912 1913// SetId sets the Id field's value. 1914func (s *SendMessageOutput) SetId(v string) *SendMessageOutput { 1915 s.Id = &v 1916 return s 1917} 1918 1919// The number of attachments per contact exceeds the quota. 1920type ServiceQuotaExceededException struct { 1921 _ struct{} `type:"structure"` 1922 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1923 1924 Message_ *string `locationName:"Message" type:"string"` 1925} 1926 1927// String returns the string representation 1928func (s ServiceQuotaExceededException) String() string { 1929 return awsutil.Prettify(s) 1930} 1931 1932// GoString returns the string representation 1933func (s ServiceQuotaExceededException) GoString() string { 1934 return s.String() 1935} 1936 1937func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 1938 return &ServiceQuotaExceededException{ 1939 RespMetadata: v, 1940 } 1941} 1942 1943// Code returns the exception type name. 1944func (s *ServiceQuotaExceededException) Code() string { 1945 return "ServiceQuotaExceededException" 1946} 1947 1948// Message returns the exception's message. 1949func (s *ServiceQuotaExceededException) Message() string { 1950 if s.Message_ != nil { 1951 return *s.Message_ 1952 } 1953 return "" 1954} 1955 1956// OrigErr always returns nil, satisfies awserr.Error interface. 1957func (s *ServiceQuotaExceededException) OrigErr() error { 1958 return nil 1959} 1960 1961func (s *ServiceQuotaExceededException) Error() string { 1962 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1963} 1964 1965// Status code returns the HTTP status code for the request's response error. 1966func (s *ServiceQuotaExceededException) StatusCode() int { 1967 return s.RespMetadata.StatusCode 1968} 1969 1970// RequestID returns the service's response RequestID for request. 1971func (s *ServiceQuotaExceededException) RequestID() string { 1972 return s.RespMetadata.RequestID 1973} 1974 1975type StartAttachmentUploadInput struct { 1976 _ struct{} `type:"structure"` 1977 1978 // A case-sensitive name of the attachment being uploaded. 1979 // 1980 // AttachmentName is a required field 1981 AttachmentName *string `min:"1" type:"string" required:"true"` 1982 1983 // The size of the attachment in bytes. 1984 // 1985 // AttachmentSizeInBytes is a required field 1986 AttachmentSizeInBytes *int64 `min:"1" type:"long" required:"true"` 1987 1988 // A unique case sensitive identifier to support idempotency of request. 1989 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 1990 1991 // The authentication token associated with the participant's connection. 1992 // 1993 // ConnectionToken is a required field 1994 ConnectionToken *string `location:"header" locationName:"X-Amz-Bearer" min:"1" type:"string" required:"true"` 1995 1996 // Describes the MIME file type of the attachment. For a list of supported file 1997 // types, see Feature specifications (https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#feature-limits) 1998 // in the Amazon Connect Administrator Guide. 1999 // 2000 // ContentType is a required field 2001 ContentType *string `min:"1" type:"string" required:"true"` 2002} 2003 2004// String returns the string representation 2005func (s StartAttachmentUploadInput) String() string { 2006 return awsutil.Prettify(s) 2007} 2008 2009// GoString returns the string representation 2010func (s StartAttachmentUploadInput) GoString() string { 2011 return s.String() 2012} 2013 2014// Validate inspects the fields of the type to determine if they are valid. 2015func (s *StartAttachmentUploadInput) Validate() error { 2016 invalidParams := request.ErrInvalidParams{Context: "StartAttachmentUploadInput"} 2017 if s.AttachmentName == nil { 2018 invalidParams.Add(request.NewErrParamRequired("AttachmentName")) 2019 } 2020 if s.AttachmentName != nil && len(*s.AttachmentName) < 1 { 2021 invalidParams.Add(request.NewErrParamMinLen("AttachmentName", 1)) 2022 } 2023 if s.AttachmentSizeInBytes == nil { 2024 invalidParams.Add(request.NewErrParamRequired("AttachmentSizeInBytes")) 2025 } 2026 if s.AttachmentSizeInBytes != nil && *s.AttachmentSizeInBytes < 1 { 2027 invalidParams.Add(request.NewErrParamMinValue("AttachmentSizeInBytes", 1)) 2028 } 2029 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 2030 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 2031 } 2032 if s.ConnectionToken == nil { 2033 invalidParams.Add(request.NewErrParamRequired("ConnectionToken")) 2034 } 2035 if s.ConnectionToken != nil && len(*s.ConnectionToken) < 1 { 2036 invalidParams.Add(request.NewErrParamMinLen("ConnectionToken", 1)) 2037 } 2038 if s.ContentType == nil { 2039 invalidParams.Add(request.NewErrParamRequired("ContentType")) 2040 } 2041 if s.ContentType != nil && len(*s.ContentType) < 1 { 2042 invalidParams.Add(request.NewErrParamMinLen("ContentType", 1)) 2043 } 2044 2045 if invalidParams.Len() > 0 { 2046 return invalidParams 2047 } 2048 return nil 2049} 2050 2051// SetAttachmentName sets the AttachmentName field's value. 2052func (s *StartAttachmentUploadInput) SetAttachmentName(v string) *StartAttachmentUploadInput { 2053 s.AttachmentName = &v 2054 return s 2055} 2056 2057// SetAttachmentSizeInBytes sets the AttachmentSizeInBytes field's value. 2058func (s *StartAttachmentUploadInput) SetAttachmentSizeInBytes(v int64) *StartAttachmentUploadInput { 2059 s.AttachmentSizeInBytes = &v 2060 return s 2061} 2062 2063// SetClientToken sets the ClientToken field's value. 2064func (s *StartAttachmentUploadInput) SetClientToken(v string) *StartAttachmentUploadInput { 2065 s.ClientToken = &v 2066 return s 2067} 2068 2069// SetConnectionToken sets the ConnectionToken field's value. 2070func (s *StartAttachmentUploadInput) SetConnectionToken(v string) *StartAttachmentUploadInput { 2071 s.ConnectionToken = &v 2072 return s 2073} 2074 2075// SetContentType sets the ContentType field's value. 2076func (s *StartAttachmentUploadInput) SetContentType(v string) *StartAttachmentUploadInput { 2077 s.ContentType = &v 2078 return s 2079} 2080 2081type StartAttachmentUploadOutput struct { 2082 _ struct{} `type:"structure"` 2083 2084 // A unique identifier for the attachment. 2085 AttachmentId *string `min:"1" type:"string"` 2086 2087 // Fields to be used while uploading the attachment. 2088 UploadMetadata *UploadMetadata `type:"structure"` 2089} 2090 2091// String returns the string representation 2092func (s StartAttachmentUploadOutput) String() string { 2093 return awsutil.Prettify(s) 2094} 2095 2096// GoString returns the string representation 2097func (s StartAttachmentUploadOutput) GoString() string { 2098 return s.String() 2099} 2100 2101// SetAttachmentId sets the AttachmentId field's value. 2102func (s *StartAttachmentUploadOutput) SetAttachmentId(v string) *StartAttachmentUploadOutput { 2103 s.AttachmentId = &v 2104 return s 2105} 2106 2107// SetUploadMetadata sets the UploadMetadata field's value. 2108func (s *StartAttachmentUploadOutput) SetUploadMetadata(v *UploadMetadata) *StartAttachmentUploadOutput { 2109 s.UploadMetadata = v 2110 return s 2111} 2112 2113// A filtering option for where to start. For example, if you sent 100 messages, 2114// start with message 50. 2115type StartPosition struct { 2116 _ struct{} `type:"structure"` 2117 2118 // The time in ISO format where to start. 2119 // 2120 // It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2121 // 2019-11-08T02:41:28.172Z. 2122 AbsoluteTime *string `min:"1" type:"string"` 2123 2124 // The ID of the message or event where to start. 2125 Id *string `min:"1" type:"string"` 2126 2127 // The start position of the most recent message where you want to start. 2128 MostRecent *int64 `type:"integer"` 2129} 2130 2131// String returns the string representation 2132func (s StartPosition) String() string { 2133 return awsutil.Prettify(s) 2134} 2135 2136// GoString returns the string representation 2137func (s StartPosition) GoString() string { 2138 return s.String() 2139} 2140 2141// Validate inspects the fields of the type to determine if they are valid. 2142func (s *StartPosition) Validate() error { 2143 invalidParams := request.ErrInvalidParams{Context: "StartPosition"} 2144 if s.AbsoluteTime != nil && len(*s.AbsoluteTime) < 1 { 2145 invalidParams.Add(request.NewErrParamMinLen("AbsoluteTime", 1)) 2146 } 2147 if s.Id != nil && len(*s.Id) < 1 { 2148 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 2149 } 2150 2151 if invalidParams.Len() > 0 { 2152 return invalidParams 2153 } 2154 return nil 2155} 2156 2157// SetAbsoluteTime sets the AbsoluteTime field's value. 2158func (s *StartPosition) SetAbsoluteTime(v string) *StartPosition { 2159 s.AbsoluteTime = &v 2160 return s 2161} 2162 2163// SetId sets the Id field's value. 2164func (s *StartPosition) SetId(v string) *StartPosition { 2165 s.Id = &v 2166 return s 2167} 2168 2169// SetMostRecent sets the MostRecent field's value. 2170func (s *StartPosition) SetMostRecent(v int64) *StartPosition { 2171 s.MostRecent = &v 2172 return s 2173} 2174 2175// The request was denied due to request throttling. 2176type ThrottlingException struct { 2177 _ struct{} `type:"structure"` 2178 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2179 2180 Message_ *string `locationName:"Message" type:"string"` 2181} 2182 2183// String returns the string representation 2184func (s ThrottlingException) String() string { 2185 return awsutil.Prettify(s) 2186} 2187 2188// GoString returns the string representation 2189func (s ThrottlingException) GoString() string { 2190 return s.String() 2191} 2192 2193func newErrorThrottlingException(v protocol.ResponseMetadata) error { 2194 return &ThrottlingException{ 2195 RespMetadata: v, 2196 } 2197} 2198 2199// Code returns the exception type name. 2200func (s *ThrottlingException) Code() string { 2201 return "ThrottlingException" 2202} 2203 2204// Message returns the exception's message. 2205func (s *ThrottlingException) Message() string { 2206 if s.Message_ != nil { 2207 return *s.Message_ 2208 } 2209 return "" 2210} 2211 2212// OrigErr always returns nil, satisfies awserr.Error interface. 2213func (s *ThrottlingException) OrigErr() error { 2214 return nil 2215} 2216 2217func (s *ThrottlingException) Error() string { 2218 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2219} 2220 2221// Status code returns the HTTP status code for the request's response error. 2222func (s *ThrottlingException) StatusCode() int { 2223 return s.RespMetadata.StatusCode 2224} 2225 2226// RequestID returns the service's response RequestID for request. 2227func (s *ThrottlingException) RequestID() string { 2228 return s.RespMetadata.RequestID 2229} 2230 2231// Fields to be used while uploading the attachment. 2232type UploadMetadata struct { 2233 _ struct{} `type:"structure"` 2234 2235 // The headers to be provided while uploading the file to the URL. 2236 HeadersToInclude map[string]*string `type:"map"` 2237 2238 // The pre-signed URL using which file would be downloaded from Amazon S3 by 2239 // the API caller. 2240 Url *string `min:"1" type:"string"` 2241 2242 // The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 2243 // format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z. 2244 UrlExpiry *string `type:"string"` 2245} 2246 2247// String returns the string representation 2248func (s UploadMetadata) String() string { 2249 return awsutil.Prettify(s) 2250} 2251 2252// GoString returns the string representation 2253func (s UploadMetadata) GoString() string { 2254 return s.String() 2255} 2256 2257// SetHeadersToInclude sets the HeadersToInclude field's value. 2258func (s *UploadMetadata) SetHeadersToInclude(v map[string]*string) *UploadMetadata { 2259 s.HeadersToInclude = v 2260 return s 2261} 2262 2263// SetUrl sets the Url field's value. 2264func (s *UploadMetadata) SetUrl(v string) *UploadMetadata { 2265 s.Url = &v 2266 return s 2267} 2268 2269// SetUrlExpiry sets the UrlExpiry field's value. 2270func (s *UploadMetadata) SetUrlExpiry(v string) *UploadMetadata { 2271 s.UrlExpiry = &v 2272 return s 2273} 2274 2275// The input fails to satisfy the constraints specified by Amazon Connect. 2276type ValidationException struct { 2277 _ struct{} `type:"structure"` 2278 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2279 2280 Message_ *string `locationName:"Message" min:"1" type:"string"` 2281} 2282 2283// String returns the string representation 2284func (s ValidationException) String() string { 2285 return awsutil.Prettify(s) 2286} 2287 2288// GoString returns the string representation 2289func (s ValidationException) GoString() string { 2290 return s.String() 2291} 2292 2293func newErrorValidationException(v protocol.ResponseMetadata) error { 2294 return &ValidationException{ 2295 RespMetadata: v, 2296 } 2297} 2298 2299// Code returns the exception type name. 2300func (s *ValidationException) Code() string { 2301 return "ValidationException" 2302} 2303 2304// Message returns the exception's message. 2305func (s *ValidationException) Message() string { 2306 if s.Message_ != nil { 2307 return *s.Message_ 2308 } 2309 return "" 2310} 2311 2312// OrigErr always returns nil, satisfies awserr.Error interface. 2313func (s *ValidationException) OrigErr() error { 2314 return nil 2315} 2316 2317func (s *ValidationException) Error() string { 2318 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2319} 2320 2321// Status code returns the HTTP status code for the request's response error. 2322func (s *ValidationException) StatusCode() int { 2323 return s.RespMetadata.StatusCode 2324} 2325 2326// RequestID returns the service's response RequestID for request. 2327func (s *ValidationException) RequestID() string { 2328 return s.RespMetadata.RequestID 2329} 2330 2331// The websocket for the participant's connection. 2332type Websocket struct { 2333 _ struct{} `type:"structure"` 2334 2335 // The URL expiration timestamp in ISO date format. 2336 // 2337 // It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2338 // 2019-11-08T02:41:28.172Z. 2339 ConnectionExpiry *string `type:"string"` 2340 2341 // The URL of the websocket. 2342 Url *string `min:"1" type:"string"` 2343} 2344 2345// String returns the string representation 2346func (s Websocket) String() string { 2347 return awsutil.Prettify(s) 2348} 2349 2350// GoString returns the string representation 2351func (s Websocket) GoString() string { 2352 return s.String() 2353} 2354 2355// SetConnectionExpiry sets the ConnectionExpiry field's value. 2356func (s *Websocket) SetConnectionExpiry(v string) *Websocket { 2357 s.ConnectionExpiry = &v 2358 return s 2359} 2360 2361// SetUrl sets the Url field's value. 2362func (s *Websocket) SetUrl(v string) *Websocket { 2363 s.Url = &v 2364 return s 2365} 2366 2367const ( 2368 // ArtifactStatusApproved is a ArtifactStatus enum value 2369 ArtifactStatusApproved = "APPROVED" 2370 2371 // ArtifactStatusRejected is a ArtifactStatus enum value 2372 ArtifactStatusRejected = "REJECTED" 2373 2374 // ArtifactStatusInProgress is a ArtifactStatus enum value 2375 ArtifactStatusInProgress = "IN_PROGRESS" 2376) 2377 2378// ArtifactStatus_Values returns all elements of the ArtifactStatus enum 2379func ArtifactStatus_Values() []string { 2380 return []string{ 2381 ArtifactStatusApproved, 2382 ArtifactStatusRejected, 2383 ArtifactStatusInProgress, 2384 } 2385} 2386 2387const ( 2388 // ChatItemTypeTyping is a ChatItemType enum value 2389 ChatItemTypeTyping = "TYPING" 2390 2391 // ChatItemTypeParticipantJoined is a ChatItemType enum value 2392 ChatItemTypeParticipantJoined = "PARTICIPANT_JOINED" 2393 2394 // ChatItemTypeParticipantLeft is a ChatItemType enum value 2395 ChatItemTypeParticipantLeft = "PARTICIPANT_LEFT" 2396 2397 // ChatItemTypeChatEnded is a ChatItemType enum value 2398 ChatItemTypeChatEnded = "CHAT_ENDED" 2399 2400 // ChatItemTypeTransferSucceeded is a ChatItemType enum value 2401 ChatItemTypeTransferSucceeded = "TRANSFER_SUCCEEDED" 2402 2403 // ChatItemTypeTransferFailed is a ChatItemType enum value 2404 ChatItemTypeTransferFailed = "TRANSFER_FAILED" 2405 2406 // ChatItemTypeMessage is a ChatItemType enum value 2407 ChatItemTypeMessage = "MESSAGE" 2408 2409 // ChatItemTypeEvent is a ChatItemType enum value 2410 ChatItemTypeEvent = "EVENT" 2411 2412 // ChatItemTypeAttachment is a ChatItemType enum value 2413 ChatItemTypeAttachment = "ATTACHMENT" 2414 2415 // ChatItemTypeConnectionAck is a ChatItemType enum value 2416 ChatItemTypeConnectionAck = "CONNECTION_ACK" 2417) 2418 2419// ChatItemType_Values returns all elements of the ChatItemType enum 2420func ChatItemType_Values() []string { 2421 return []string{ 2422 ChatItemTypeTyping, 2423 ChatItemTypeParticipantJoined, 2424 ChatItemTypeParticipantLeft, 2425 ChatItemTypeChatEnded, 2426 ChatItemTypeTransferSucceeded, 2427 ChatItemTypeTransferFailed, 2428 ChatItemTypeMessage, 2429 ChatItemTypeEvent, 2430 ChatItemTypeAttachment, 2431 ChatItemTypeConnectionAck, 2432 } 2433} 2434 2435const ( 2436 // ConnectionTypeWebsocket is a ConnectionType enum value 2437 ConnectionTypeWebsocket = "WEBSOCKET" 2438 2439 // ConnectionTypeConnectionCredentials is a ConnectionType enum value 2440 ConnectionTypeConnectionCredentials = "CONNECTION_CREDENTIALS" 2441) 2442 2443// ConnectionType_Values returns all elements of the ConnectionType enum 2444func ConnectionType_Values() []string { 2445 return []string{ 2446 ConnectionTypeWebsocket, 2447 ConnectionTypeConnectionCredentials, 2448 } 2449} 2450 2451const ( 2452 // ParticipantRoleAgent is a ParticipantRole enum value 2453 ParticipantRoleAgent = "AGENT" 2454 2455 // ParticipantRoleCustomer is a ParticipantRole enum value 2456 ParticipantRoleCustomer = "CUSTOMER" 2457 2458 // ParticipantRoleSystem is a ParticipantRole enum value 2459 ParticipantRoleSystem = "SYSTEM" 2460) 2461 2462// ParticipantRole_Values returns all elements of the ParticipantRole enum 2463func ParticipantRole_Values() []string { 2464 return []string{ 2465 ParticipantRoleAgent, 2466 ParticipantRoleCustomer, 2467 ParticipantRoleSystem, 2468 } 2469} 2470 2471const ( 2472 // ScanDirectionForward is a ScanDirection enum value 2473 ScanDirectionForward = "FORWARD" 2474 2475 // ScanDirectionBackward is a ScanDirection enum value 2476 ScanDirectionBackward = "BACKWARD" 2477) 2478 2479// ScanDirection_Values returns all elements of the ScanDirection enum 2480func ScanDirection_Values() []string { 2481 return []string{ 2482 ScanDirectionForward, 2483 ScanDirectionBackward, 2484 } 2485} 2486 2487const ( 2488 // SortKeyDescending is a SortKey enum value 2489 SortKeyDescending = "DESCENDING" 2490 2491 // SortKeyAscending is a SortKey enum value 2492 SortKeyAscending = "ASCENDING" 2493) 2494 2495// SortKey_Values returns all elements of the SortKey enum 2496func SortKey_Values() []string { 2497 return []string{ 2498 SortKeyDescending, 2499 SortKeyAscending, 2500 } 2501} 2502