github.com/aavshr/aws-sdk-go@v1.41.3/service/pinpointsmsvoice/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package pinpointsmsvoice 4 5 import ( 6 "fmt" 7 8 "github.com/aavshr/aws-sdk-go/aws" 9 "github.com/aavshr/aws-sdk-go/aws/awsutil" 10 "github.com/aavshr/aws-sdk-go/aws/request" 11 "github.com/aavshr/aws-sdk-go/private/protocol" 12 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 13 ) 14 15 const opCreateConfigurationSet = "CreateConfigurationSet" 16 17 // CreateConfigurationSetRequest generates a "aws/request.Request" representing the 18 // client's request for the CreateConfigurationSet 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 CreateConfigurationSet for more information on using the CreateConfigurationSet 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 CreateConfigurationSetRequest method. 33 // req, resp := client.CreateConfigurationSetRequest(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/pinpoint-sms-voice-2018-09-05/CreateConfigurationSet 41 func (c *PinpointSMSVoice) CreateConfigurationSetRequest(input *CreateConfigurationSetInput) (req *request.Request, output *CreateConfigurationSetOutput) { 42 op := &request.Operation{ 43 Name: opCreateConfigurationSet, 44 HTTPMethod: "POST", 45 HTTPPath: "/v1/sms-voice/configuration-sets", 46 } 47 48 if input == nil { 49 input = &CreateConfigurationSetInput{} 50 } 51 52 output = &CreateConfigurationSetOutput{} 53 req = c.newRequest(op, input, output) 54 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 55 return 56 } 57 58 // CreateConfigurationSet API operation for Amazon Pinpoint SMS and Voice Service. 59 // 60 // Create a new configuration set. After you create the configuration set, you 61 // can add one or more event destinations to it. 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 Pinpoint SMS and Voice Service's 68 // API operation CreateConfigurationSet for usage and error information. 69 // 70 // Returned Error Types: 71 // * TooManyRequestsException 72 // You've issued too many requests to the resource. Wait a few minutes, and 73 // then try again. 74 // 75 // * BadRequestException 76 // The input you provided is invalid. 77 // 78 // * LimitExceededException 79 // There are too many instances of the specified resource type. 80 // 81 // * InternalServiceErrorException 82 // The API encountered an unexpected error and couldn't complete the request. 83 // You might be able to successfully issue the request again in the future. 84 // 85 // * AlreadyExistsException 86 // The resource specified in your request already exists. 87 // 88 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/CreateConfigurationSet 89 func (c *PinpointSMSVoice) CreateConfigurationSet(input *CreateConfigurationSetInput) (*CreateConfigurationSetOutput, error) { 90 req, out := c.CreateConfigurationSetRequest(input) 91 return out, req.Send() 92 } 93 94 // CreateConfigurationSetWithContext is the same as CreateConfigurationSet with the addition of 95 // the ability to pass a context and additional request options. 96 // 97 // See CreateConfigurationSet for details on how to use this API operation. 98 // 99 // The context must be non-nil and will be used for request cancellation. If 100 // the context is nil a panic will occur. In the future the SDK may create 101 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 102 // for more information on using Contexts. 103 func (c *PinpointSMSVoice) CreateConfigurationSetWithContext(ctx aws.Context, input *CreateConfigurationSetInput, opts ...request.Option) (*CreateConfigurationSetOutput, error) { 104 req, out := c.CreateConfigurationSetRequest(input) 105 req.SetContext(ctx) 106 req.ApplyOptions(opts...) 107 return out, req.Send() 108 } 109 110 const opCreateConfigurationSetEventDestination = "CreateConfigurationSetEventDestination" 111 112 // CreateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the 113 // client's request for the CreateConfigurationSetEventDestination operation. The "output" return 114 // value will be populated with the request's response once the request completes 115 // successfully. 116 // 117 // Use "Send" method on the returned Request to send the API call to the service. 118 // the "output" return value is not valid until after Send returns without error. 119 // 120 // See CreateConfigurationSetEventDestination for more information on using the CreateConfigurationSetEventDestination 121 // API call, and error handling. 122 // 123 // This method is useful when you want to inject custom logic or configuration 124 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 125 // 126 // 127 // // Example sending a request using the CreateConfigurationSetEventDestinationRequest method. 128 // req, resp := client.CreateConfigurationSetEventDestinationRequest(params) 129 // 130 // err := req.Send() 131 // if err == nil { // resp is now filled 132 // fmt.Println(resp) 133 // } 134 // 135 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/CreateConfigurationSetEventDestination 136 func (c *PinpointSMSVoice) CreateConfigurationSetEventDestinationRequest(input *CreateConfigurationSetEventDestinationInput) (req *request.Request, output *CreateConfigurationSetEventDestinationOutput) { 137 op := &request.Operation{ 138 Name: opCreateConfigurationSetEventDestination, 139 HTTPMethod: "POST", 140 HTTPPath: "/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations", 141 } 142 143 if input == nil { 144 input = &CreateConfigurationSetEventDestinationInput{} 145 } 146 147 output = &CreateConfigurationSetEventDestinationOutput{} 148 req = c.newRequest(op, input, output) 149 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 150 return 151 } 152 153 // CreateConfigurationSetEventDestination API operation for Amazon Pinpoint SMS and Voice Service. 154 // 155 // Create a new event destination in a configuration set. 156 // 157 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 158 // with awserr.Error's Code and Message methods to get detailed information about 159 // the error. 160 // 161 // See the AWS API reference guide for Amazon Pinpoint SMS and Voice Service's 162 // API operation CreateConfigurationSetEventDestination for usage and error information. 163 // 164 // Returned Error Types: 165 // * BadRequestException 166 // The input you provided is invalid. 167 // 168 // * LimitExceededException 169 // There are too many instances of the specified resource type. 170 // 171 // * InternalServiceErrorException 172 // The API encountered an unexpected error and couldn't complete the request. 173 // You might be able to successfully issue the request again in the future. 174 // 175 // * NotFoundException 176 // The resource you attempted to access doesn't exist. 177 // 178 // * TooManyRequestsException 179 // You've issued too many requests to the resource. Wait a few minutes, and 180 // then try again. 181 // 182 // * AlreadyExistsException 183 // The resource specified in your request already exists. 184 // 185 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/CreateConfigurationSetEventDestination 186 func (c *PinpointSMSVoice) CreateConfigurationSetEventDestination(input *CreateConfigurationSetEventDestinationInput) (*CreateConfigurationSetEventDestinationOutput, error) { 187 req, out := c.CreateConfigurationSetEventDestinationRequest(input) 188 return out, req.Send() 189 } 190 191 // CreateConfigurationSetEventDestinationWithContext is the same as CreateConfigurationSetEventDestination with the addition of 192 // the ability to pass a context and additional request options. 193 // 194 // See CreateConfigurationSetEventDestination for details on how to use this API operation. 195 // 196 // The context must be non-nil and will be used for request cancellation. If 197 // the context is nil a panic will occur. In the future the SDK may create 198 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 199 // for more information on using Contexts. 200 func (c *PinpointSMSVoice) CreateConfigurationSetEventDestinationWithContext(ctx aws.Context, input *CreateConfigurationSetEventDestinationInput, opts ...request.Option) (*CreateConfigurationSetEventDestinationOutput, error) { 201 req, out := c.CreateConfigurationSetEventDestinationRequest(input) 202 req.SetContext(ctx) 203 req.ApplyOptions(opts...) 204 return out, req.Send() 205 } 206 207 const opDeleteConfigurationSet = "DeleteConfigurationSet" 208 209 // DeleteConfigurationSetRequest generates a "aws/request.Request" representing the 210 // client's request for the DeleteConfigurationSet operation. The "output" return 211 // value will be populated with the request's response once the request completes 212 // successfully. 213 // 214 // Use "Send" method on the returned Request to send the API call to the service. 215 // the "output" return value is not valid until after Send returns without error. 216 // 217 // See DeleteConfigurationSet for more information on using the DeleteConfigurationSet 218 // API call, and error handling. 219 // 220 // This method is useful when you want to inject custom logic or configuration 221 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 222 // 223 // 224 // // Example sending a request using the DeleteConfigurationSetRequest method. 225 // req, resp := client.DeleteConfigurationSetRequest(params) 226 // 227 // err := req.Send() 228 // if err == nil { // resp is now filled 229 // fmt.Println(resp) 230 // } 231 // 232 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/DeleteConfigurationSet 233 func (c *PinpointSMSVoice) DeleteConfigurationSetRequest(input *DeleteConfigurationSetInput) (req *request.Request, output *DeleteConfigurationSetOutput) { 234 op := &request.Operation{ 235 Name: opDeleteConfigurationSet, 236 HTTPMethod: "DELETE", 237 HTTPPath: "/v1/sms-voice/configuration-sets/{ConfigurationSetName}", 238 } 239 240 if input == nil { 241 input = &DeleteConfigurationSetInput{} 242 } 243 244 output = &DeleteConfigurationSetOutput{} 245 req = c.newRequest(op, input, output) 246 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 247 return 248 } 249 250 // DeleteConfigurationSet API operation for Amazon Pinpoint SMS and Voice Service. 251 // 252 // Deletes an existing configuration set. 253 // 254 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 255 // with awserr.Error's Code and Message methods to get detailed information about 256 // the error. 257 // 258 // See the AWS API reference guide for Amazon Pinpoint SMS and Voice Service's 259 // API operation DeleteConfigurationSet for usage and error information. 260 // 261 // Returned Error Types: 262 // * NotFoundException 263 // The resource you attempted to access doesn't exist. 264 // 265 // * TooManyRequestsException 266 // You've issued too many requests to the resource. Wait a few minutes, and 267 // then try again. 268 // 269 // * BadRequestException 270 // The input you provided is invalid. 271 // 272 // * InternalServiceErrorException 273 // The API encountered an unexpected error and couldn't complete the request. 274 // You might be able to successfully issue the request again in the future. 275 // 276 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/DeleteConfigurationSet 277 func (c *PinpointSMSVoice) DeleteConfigurationSet(input *DeleteConfigurationSetInput) (*DeleteConfigurationSetOutput, error) { 278 req, out := c.DeleteConfigurationSetRequest(input) 279 return out, req.Send() 280 } 281 282 // DeleteConfigurationSetWithContext is the same as DeleteConfigurationSet with the addition of 283 // the ability to pass a context and additional request options. 284 // 285 // See DeleteConfigurationSet for details on how to use this API operation. 286 // 287 // The context must be non-nil and will be used for request cancellation. If 288 // the context is nil a panic will occur. In the future the SDK may create 289 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 290 // for more information on using Contexts. 291 func (c *PinpointSMSVoice) DeleteConfigurationSetWithContext(ctx aws.Context, input *DeleteConfigurationSetInput, opts ...request.Option) (*DeleteConfigurationSetOutput, error) { 292 req, out := c.DeleteConfigurationSetRequest(input) 293 req.SetContext(ctx) 294 req.ApplyOptions(opts...) 295 return out, req.Send() 296 } 297 298 const opDeleteConfigurationSetEventDestination = "DeleteConfigurationSetEventDestination" 299 300 // DeleteConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the 301 // client's request for the DeleteConfigurationSetEventDestination operation. The "output" return 302 // value will be populated with the request's response once the request completes 303 // successfully. 304 // 305 // Use "Send" method on the returned Request to send the API call to the service. 306 // the "output" return value is not valid until after Send returns without error. 307 // 308 // See DeleteConfigurationSetEventDestination for more information on using the DeleteConfigurationSetEventDestination 309 // API call, and error handling. 310 // 311 // This method is useful when you want to inject custom logic or configuration 312 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 313 // 314 // 315 // // Example sending a request using the DeleteConfigurationSetEventDestinationRequest method. 316 // req, resp := client.DeleteConfigurationSetEventDestinationRequest(params) 317 // 318 // err := req.Send() 319 // if err == nil { // resp is now filled 320 // fmt.Println(resp) 321 // } 322 // 323 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/DeleteConfigurationSetEventDestination 324 func (c *PinpointSMSVoice) DeleteConfigurationSetEventDestinationRequest(input *DeleteConfigurationSetEventDestinationInput) (req *request.Request, output *DeleteConfigurationSetEventDestinationOutput) { 325 op := &request.Operation{ 326 Name: opDeleteConfigurationSetEventDestination, 327 HTTPMethod: "DELETE", 328 HTTPPath: "/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}", 329 } 330 331 if input == nil { 332 input = &DeleteConfigurationSetEventDestinationInput{} 333 } 334 335 output = &DeleteConfigurationSetEventDestinationOutput{} 336 req = c.newRequest(op, input, output) 337 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 338 return 339 } 340 341 // DeleteConfigurationSetEventDestination API operation for Amazon Pinpoint SMS and Voice Service. 342 // 343 // Deletes an event destination in a configuration set. 344 // 345 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 346 // with awserr.Error's Code and Message methods to get detailed information about 347 // the error. 348 // 349 // See the AWS API reference guide for Amazon Pinpoint SMS and Voice Service's 350 // API operation DeleteConfigurationSetEventDestination for usage and error information. 351 // 352 // Returned Error Types: 353 // * NotFoundException 354 // The resource you attempted to access doesn't exist. 355 // 356 // * TooManyRequestsException 357 // You've issued too many requests to the resource. Wait a few minutes, and 358 // then try again. 359 // 360 // * BadRequestException 361 // The input you provided is invalid. 362 // 363 // * InternalServiceErrorException 364 // The API encountered an unexpected error and couldn't complete the request. 365 // You might be able to successfully issue the request again in the future. 366 // 367 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/DeleteConfigurationSetEventDestination 368 func (c *PinpointSMSVoice) DeleteConfigurationSetEventDestination(input *DeleteConfigurationSetEventDestinationInput) (*DeleteConfigurationSetEventDestinationOutput, error) { 369 req, out := c.DeleteConfigurationSetEventDestinationRequest(input) 370 return out, req.Send() 371 } 372 373 // DeleteConfigurationSetEventDestinationWithContext is the same as DeleteConfigurationSetEventDestination with the addition of 374 // the ability to pass a context and additional request options. 375 // 376 // See DeleteConfigurationSetEventDestination for details on how to use this API operation. 377 // 378 // The context must be non-nil and will be used for request cancellation. If 379 // the context is nil a panic will occur. In the future the SDK may create 380 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 381 // for more information on using Contexts. 382 func (c *PinpointSMSVoice) DeleteConfigurationSetEventDestinationWithContext(ctx aws.Context, input *DeleteConfigurationSetEventDestinationInput, opts ...request.Option) (*DeleteConfigurationSetEventDestinationOutput, error) { 383 req, out := c.DeleteConfigurationSetEventDestinationRequest(input) 384 req.SetContext(ctx) 385 req.ApplyOptions(opts...) 386 return out, req.Send() 387 } 388 389 const opGetConfigurationSetEventDestinations = "GetConfigurationSetEventDestinations" 390 391 // GetConfigurationSetEventDestinationsRequest generates a "aws/request.Request" representing the 392 // client's request for the GetConfigurationSetEventDestinations operation. The "output" return 393 // value will be populated with the request's response once the request completes 394 // successfully. 395 // 396 // Use "Send" method on the returned Request to send the API call to the service. 397 // the "output" return value is not valid until after Send returns without error. 398 // 399 // See GetConfigurationSetEventDestinations for more information on using the GetConfigurationSetEventDestinations 400 // API call, and error handling. 401 // 402 // This method is useful when you want to inject custom logic or configuration 403 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 404 // 405 // 406 // // Example sending a request using the GetConfigurationSetEventDestinationsRequest method. 407 // req, resp := client.GetConfigurationSetEventDestinationsRequest(params) 408 // 409 // err := req.Send() 410 // if err == nil { // resp is now filled 411 // fmt.Println(resp) 412 // } 413 // 414 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/GetConfigurationSetEventDestinations 415 func (c *PinpointSMSVoice) GetConfigurationSetEventDestinationsRequest(input *GetConfigurationSetEventDestinationsInput) (req *request.Request, output *GetConfigurationSetEventDestinationsOutput) { 416 op := &request.Operation{ 417 Name: opGetConfigurationSetEventDestinations, 418 HTTPMethod: "GET", 419 HTTPPath: "/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations", 420 } 421 422 if input == nil { 423 input = &GetConfigurationSetEventDestinationsInput{} 424 } 425 426 output = &GetConfigurationSetEventDestinationsOutput{} 427 req = c.newRequest(op, input, output) 428 return 429 } 430 431 // GetConfigurationSetEventDestinations API operation for Amazon Pinpoint SMS and Voice Service. 432 // 433 // Obtain information about an event destination, including the types of events 434 // it reports, the Amazon Resource Name (ARN) of the destination, and the name 435 // of the event destination. 436 // 437 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 438 // with awserr.Error's Code and Message methods to get detailed information about 439 // the error. 440 // 441 // See the AWS API reference guide for Amazon Pinpoint SMS and Voice Service's 442 // API operation GetConfigurationSetEventDestinations for usage and error information. 443 // 444 // Returned Error Types: 445 // * NotFoundException 446 // The resource you attempted to access doesn't exist. 447 // 448 // * TooManyRequestsException 449 // You've issued too many requests to the resource. Wait a few minutes, and 450 // then try again. 451 // 452 // * BadRequestException 453 // The input you provided is invalid. 454 // 455 // * InternalServiceErrorException 456 // The API encountered an unexpected error and couldn't complete the request. 457 // You might be able to successfully issue the request again in the future. 458 // 459 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/GetConfigurationSetEventDestinations 460 func (c *PinpointSMSVoice) GetConfigurationSetEventDestinations(input *GetConfigurationSetEventDestinationsInput) (*GetConfigurationSetEventDestinationsOutput, error) { 461 req, out := c.GetConfigurationSetEventDestinationsRequest(input) 462 return out, req.Send() 463 } 464 465 // GetConfigurationSetEventDestinationsWithContext is the same as GetConfigurationSetEventDestinations with the addition of 466 // the ability to pass a context and additional request options. 467 // 468 // See GetConfigurationSetEventDestinations for details on how to use this API operation. 469 // 470 // The context must be non-nil and will be used for request cancellation. If 471 // the context is nil a panic will occur. In the future the SDK may create 472 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 473 // for more information on using Contexts. 474 func (c *PinpointSMSVoice) GetConfigurationSetEventDestinationsWithContext(ctx aws.Context, input *GetConfigurationSetEventDestinationsInput, opts ...request.Option) (*GetConfigurationSetEventDestinationsOutput, error) { 475 req, out := c.GetConfigurationSetEventDestinationsRequest(input) 476 req.SetContext(ctx) 477 req.ApplyOptions(opts...) 478 return out, req.Send() 479 } 480 481 const opListConfigurationSets = "ListConfigurationSets" 482 483 // ListConfigurationSetsRequest generates a "aws/request.Request" representing the 484 // client's request for the ListConfigurationSets operation. The "output" return 485 // value will be populated with the request's response once the request completes 486 // successfully. 487 // 488 // Use "Send" method on the returned Request to send the API call to the service. 489 // the "output" return value is not valid until after Send returns without error. 490 // 491 // See ListConfigurationSets for more information on using the ListConfigurationSets 492 // API call, and error handling. 493 // 494 // This method is useful when you want to inject custom logic or configuration 495 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 496 // 497 // 498 // // Example sending a request using the ListConfigurationSetsRequest method. 499 // req, resp := client.ListConfigurationSetsRequest(params) 500 // 501 // err := req.Send() 502 // if err == nil { // resp is now filled 503 // fmt.Println(resp) 504 // } 505 // 506 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/ListConfigurationSets 507 func (c *PinpointSMSVoice) ListConfigurationSetsRequest(input *ListConfigurationSetsInput) (req *request.Request, output *ListConfigurationSetsOutput) { 508 op := &request.Operation{ 509 Name: opListConfigurationSets, 510 HTTPMethod: "GET", 511 HTTPPath: "/v1/sms-voice/configuration-sets", 512 } 513 514 if input == nil { 515 input = &ListConfigurationSetsInput{} 516 } 517 518 output = &ListConfigurationSetsOutput{} 519 req = c.newRequest(op, input, output) 520 return 521 } 522 523 // ListConfigurationSets API operation for Amazon Pinpoint SMS and Voice Service. 524 // 525 // List all of the configuration sets associated with your Amazon Pinpoint account 526 // in the current region. 527 // 528 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 529 // with awserr.Error's Code and Message methods to get detailed information about 530 // the error. 531 // 532 // See the AWS API reference guide for Amazon Pinpoint SMS and Voice Service's 533 // API operation ListConfigurationSets for usage and error information. 534 // 535 // Returned Error Types: 536 // * TooManyRequestsException 537 // You've issued too many requests to the resource. Wait a few minutes, and 538 // then try again. 539 // 540 // * BadRequestException 541 // The input you provided is invalid. 542 // 543 // * InternalServiceErrorException 544 // The API encountered an unexpected error and couldn't complete the request. 545 // You might be able to successfully issue the request again in the future. 546 // 547 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/ListConfigurationSets 548 func (c *PinpointSMSVoice) ListConfigurationSets(input *ListConfigurationSetsInput) (*ListConfigurationSetsOutput, error) { 549 req, out := c.ListConfigurationSetsRequest(input) 550 return out, req.Send() 551 } 552 553 // ListConfigurationSetsWithContext is the same as ListConfigurationSets with the addition of 554 // the ability to pass a context and additional request options. 555 // 556 // See ListConfigurationSets for details on how to use this API operation. 557 // 558 // The context must be non-nil and will be used for request cancellation. If 559 // the context is nil a panic will occur. In the future the SDK may create 560 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 561 // for more information on using Contexts. 562 func (c *PinpointSMSVoice) ListConfigurationSetsWithContext(ctx aws.Context, input *ListConfigurationSetsInput, opts ...request.Option) (*ListConfigurationSetsOutput, error) { 563 req, out := c.ListConfigurationSetsRequest(input) 564 req.SetContext(ctx) 565 req.ApplyOptions(opts...) 566 return out, req.Send() 567 } 568 569 const opSendVoiceMessage = "SendVoiceMessage" 570 571 // SendVoiceMessageRequest generates a "aws/request.Request" representing the 572 // client's request for the SendVoiceMessage operation. The "output" return 573 // value will be populated with the request's response once the request completes 574 // successfully. 575 // 576 // Use "Send" method on the returned Request to send the API call to the service. 577 // the "output" return value is not valid until after Send returns without error. 578 // 579 // See SendVoiceMessage for more information on using the SendVoiceMessage 580 // API call, and error handling. 581 // 582 // This method is useful when you want to inject custom logic or configuration 583 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 584 // 585 // 586 // // Example sending a request using the SendVoiceMessageRequest method. 587 // req, resp := client.SendVoiceMessageRequest(params) 588 // 589 // err := req.Send() 590 // if err == nil { // resp is now filled 591 // fmt.Println(resp) 592 // } 593 // 594 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/SendVoiceMessage 595 func (c *PinpointSMSVoice) SendVoiceMessageRequest(input *SendVoiceMessageInput) (req *request.Request, output *SendVoiceMessageOutput) { 596 op := &request.Operation{ 597 Name: opSendVoiceMessage, 598 HTTPMethod: "POST", 599 HTTPPath: "/v1/sms-voice/voice/message", 600 } 601 602 if input == nil { 603 input = &SendVoiceMessageInput{} 604 } 605 606 output = &SendVoiceMessageOutput{} 607 req = c.newRequest(op, input, output) 608 return 609 } 610 611 // SendVoiceMessage API operation for Amazon Pinpoint SMS and Voice Service. 612 // 613 // Create a new voice message and send it to a recipient's phone number. 614 // 615 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 616 // with awserr.Error's Code and Message methods to get detailed information about 617 // the error. 618 // 619 // See the AWS API reference guide for Amazon Pinpoint SMS and Voice Service's 620 // API operation SendVoiceMessage for usage and error information. 621 // 622 // Returned Error Types: 623 // * TooManyRequestsException 624 // You've issued too many requests to the resource. Wait a few minutes, and 625 // then try again. 626 // 627 // * BadRequestException 628 // The input you provided is invalid. 629 // 630 // * InternalServiceErrorException 631 // The API encountered an unexpected error and couldn't complete the request. 632 // You might be able to successfully issue the request again in the future. 633 // 634 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/SendVoiceMessage 635 func (c *PinpointSMSVoice) SendVoiceMessage(input *SendVoiceMessageInput) (*SendVoiceMessageOutput, error) { 636 req, out := c.SendVoiceMessageRequest(input) 637 return out, req.Send() 638 } 639 640 // SendVoiceMessageWithContext is the same as SendVoiceMessage with the addition of 641 // the ability to pass a context and additional request options. 642 // 643 // See SendVoiceMessage for details on how to use this API operation. 644 // 645 // The context must be non-nil and will be used for request cancellation. If 646 // the context is nil a panic will occur. In the future the SDK may create 647 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 648 // for more information on using Contexts. 649 func (c *PinpointSMSVoice) SendVoiceMessageWithContext(ctx aws.Context, input *SendVoiceMessageInput, opts ...request.Option) (*SendVoiceMessageOutput, error) { 650 req, out := c.SendVoiceMessageRequest(input) 651 req.SetContext(ctx) 652 req.ApplyOptions(opts...) 653 return out, req.Send() 654 } 655 656 const opUpdateConfigurationSetEventDestination = "UpdateConfigurationSetEventDestination" 657 658 // UpdateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the 659 // client's request for the UpdateConfigurationSetEventDestination operation. The "output" return 660 // value will be populated with the request's response once the request completes 661 // successfully. 662 // 663 // Use "Send" method on the returned Request to send the API call to the service. 664 // the "output" return value is not valid until after Send returns without error. 665 // 666 // See UpdateConfigurationSetEventDestination for more information on using the UpdateConfigurationSetEventDestination 667 // API call, and error handling. 668 // 669 // This method is useful when you want to inject custom logic or configuration 670 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 671 // 672 // 673 // // Example sending a request using the UpdateConfigurationSetEventDestinationRequest method. 674 // req, resp := client.UpdateConfigurationSetEventDestinationRequest(params) 675 // 676 // err := req.Send() 677 // if err == nil { // resp is now filled 678 // fmt.Println(resp) 679 // } 680 // 681 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/UpdateConfigurationSetEventDestination 682 func (c *PinpointSMSVoice) UpdateConfigurationSetEventDestinationRequest(input *UpdateConfigurationSetEventDestinationInput) (req *request.Request, output *UpdateConfigurationSetEventDestinationOutput) { 683 op := &request.Operation{ 684 Name: opUpdateConfigurationSetEventDestination, 685 HTTPMethod: "PUT", 686 HTTPPath: "/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}", 687 } 688 689 if input == nil { 690 input = &UpdateConfigurationSetEventDestinationInput{} 691 } 692 693 output = &UpdateConfigurationSetEventDestinationOutput{} 694 req = c.newRequest(op, input, output) 695 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 696 return 697 } 698 699 // UpdateConfigurationSetEventDestination API operation for Amazon Pinpoint SMS and Voice Service. 700 // 701 // Update an event destination in a configuration set. An event destination 702 // is a location that you publish information about your voice calls to. For 703 // example, you can log an event to an Amazon CloudWatch destination when a 704 // call fails. 705 // 706 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 707 // with awserr.Error's Code and Message methods to get detailed information about 708 // the error. 709 // 710 // See the AWS API reference guide for Amazon Pinpoint SMS and Voice Service's 711 // API operation UpdateConfigurationSetEventDestination for usage and error information. 712 // 713 // Returned Error Types: 714 // * NotFoundException 715 // The resource you attempted to access doesn't exist. 716 // 717 // * TooManyRequestsException 718 // You've issued too many requests to the resource. Wait a few minutes, and 719 // then try again. 720 // 721 // * BadRequestException 722 // The input you provided is invalid. 723 // 724 // * InternalServiceErrorException 725 // The API encountered an unexpected error and couldn't complete the request. 726 // You might be able to successfully issue the request again in the future. 727 // 728 // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-2018-09-05/UpdateConfigurationSetEventDestination 729 func (c *PinpointSMSVoice) UpdateConfigurationSetEventDestination(input *UpdateConfigurationSetEventDestinationInput) (*UpdateConfigurationSetEventDestinationOutput, error) { 730 req, out := c.UpdateConfigurationSetEventDestinationRequest(input) 731 return out, req.Send() 732 } 733 734 // UpdateConfigurationSetEventDestinationWithContext is the same as UpdateConfigurationSetEventDestination with the addition of 735 // the ability to pass a context and additional request options. 736 // 737 // See UpdateConfigurationSetEventDestination for details on how to use this API operation. 738 // 739 // The context must be non-nil and will be used for request cancellation. If 740 // the context is nil a panic will occur. In the future the SDK may create 741 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 742 // for more information on using Contexts. 743 func (c *PinpointSMSVoice) UpdateConfigurationSetEventDestinationWithContext(ctx aws.Context, input *UpdateConfigurationSetEventDestinationInput, opts ...request.Option) (*UpdateConfigurationSetEventDestinationOutput, error) { 744 req, out := c.UpdateConfigurationSetEventDestinationRequest(input) 745 req.SetContext(ctx) 746 req.ApplyOptions(opts...) 747 return out, req.Send() 748 } 749 750 // The resource specified in your request already exists. 751 type AlreadyExistsException struct { 752 _ struct{} `type:"structure"` 753 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 754 755 Message_ *string `locationName:"Message" type:"string"` 756 } 757 758 // String returns the string representation. 759 // 760 // API parameter values that are decorated as "sensitive" in the API will not 761 // be included in the string output. The member name will be present, but the 762 // value will be replaced with "sensitive". 763 func (s AlreadyExistsException) String() string { 764 return awsutil.Prettify(s) 765 } 766 767 // GoString returns the string representation. 768 // 769 // API parameter values that are decorated as "sensitive" in the API will not 770 // be included in the string output. The member name will be present, but the 771 // value will be replaced with "sensitive". 772 func (s AlreadyExistsException) GoString() string { 773 return s.String() 774 } 775 776 func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error { 777 return &AlreadyExistsException{ 778 RespMetadata: v, 779 } 780 } 781 782 // Code returns the exception type name. 783 func (s *AlreadyExistsException) Code() string { 784 return "AlreadyExistsException" 785 } 786 787 // Message returns the exception's message. 788 func (s *AlreadyExistsException) Message() string { 789 if s.Message_ != nil { 790 return *s.Message_ 791 } 792 return "" 793 } 794 795 // OrigErr always returns nil, satisfies awserr.Error interface. 796 func (s *AlreadyExistsException) OrigErr() error { 797 return nil 798 } 799 800 func (s *AlreadyExistsException) Error() string { 801 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 802 } 803 804 // Status code returns the HTTP status code for the request's response error. 805 func (s *AlreadyExistsException) StatusCode() int { 806 return s.RespMetadata.StatusCode 807 } 808 809 // RequestID returns the service's response RequestID for request. 810 func (s *AlreadyExistsException) RequestID() string { 811 return s.RespMetadata.RequestID 812 } 813 814 // The input you provided is invalid. 815 type BadRequestException struct { 816 _ struct{} `type:"structure"` 817 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 818 819 Message_ *string `locationName:"Message" type:"string"` 820 } 821 822 // String returns the string representation. 823 // 824 // API parameter values that are decorated as "sensitive" in the API will not 825 // be included in the string output. The member name will be present, but the 826 // value will be replaced with "sensitive". 827 func (s BadRequestException) String() string { 828 return awsutil.Prettify(s) 829 } 830 831 // GoString returns the string representation. 832 // 833 // API parameter values that are decorated as "sensitive" in the API will not 834 // be included in the string output. The member name will be present, but the 835 // value will be replaced with "sensitive". 836 func (s BadRequestException) GoString() string { 837 return s.String() 838 } 839 840 func newErrorBadRequestException(v protocol.ResponseMetadata) error { 841 return &BadRequestException{ 842 RespMetadata: v, 843 } 844 } 845 846 // Code returns the exception type name. 847 func (s *BadRequestException) Code() string { 848 return "BadRequestException" 849 } 850 851 // Message returns the exception's message. 852 func (s *BadRequestException) Message() string { 853 if s.Message_ != nil { 854 return *s.Message_ 855 } 856 return "" 857 } 858 859 // OrigErr always returns nil, satisfies awserr.Error interface. 860 func (s *BadRequestException) OrigErr() error { 861 return nil 862 } 863 864 func (s *BadRequestException) Error() string { 865 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 866 } 867 868 // Status code returns the HTTP status code for the request's response error. 869 func (s *BadRequestException) StatusCode() int { 870 return s.RespMetadata.StatusCode 871 } 872 873 // RequestID returns the service's response RequestID for request. 874 func (s *BadRequestException) RequestID() string { 875 return s.RespMetadata.RequestID 876 } 877 878 // An object that defines a message that contains text formatted using Amazon 879 // Pinpoint Voice Instructions markup. 880 type CallInstructionsMessageType struct { 881 _ struct{} `type:"structure"` 882 883 // The language to use when delivering the message. For a complete list of supported 884 // languages, see the Amazon Polly Developer Guide. 885 Text *string `type:"string"` 886 } 887 888 // String returns the string representation. 889 // 890 // API parameter values that are decorated as "sensitive" in the API will not 891 // be included in the string output. The member name will be present, but the 892 // value will be replaced with "sensitive". 893 func (s CallInstructionsMessageType) String() string { 894 return awsutil.Prettify(s) 895 } 896 897 // GoString returns the string representation. 898 // 899 // API parameter values that are decorated as "sensitive" in the API will not 900 // be included in the string output. The member name will be present, but the 901 // value will be replaced with "sensitive". 902 func (s CallInstructionsMessageType) GoString() string { 903 return s.String() 904 } 905 906 // SetText sets the Text field's value. 907 func (s *CallInstructionsMessageType) SetText(v string) *CallInstructionsMessageType { 908 s.Text = &v 909 return s 910 } 911 912 // An object that contains information about an event destination that sends 913 // data to Amazon CloudWatch Logs. 914 type CloudWatchLogsDestination struct { 915 _ struct{} `type:"structure"` 916 917 // The Amazon Resource Name (ARN) of an Amazon Identity and Access Management 918 // (IAM) role that is able to write event data to an Amazon CloudWatch destination. 919 IamRoleArn *string `type:"string"` 920 921 // The name of the Amazon CloudWatch Log Group that you want to record events 922 // in. 923 LogGroupArn *string `type:"string"` 924 } 925 926 // String returns the string representation. 927 // 928 // API parameter values that are decorated as "sensitive" in the API will not 929 // be included in the string output. The member name will be present, but the 930 // value will be replaced with "sensitive". 931 func (s CloudWatchLogsDestination) String() string { 932 return awsutil.Prettify(s) 933 } 934 935 // GoString returns the string representation. 936 // 937 // API parameter values that are decorated as "sensitive" in the API will not 938 // be included in the string output. The member name will be present, but the 939 // value will be replaced with "sensitive". 940 func (s CloudWatchLogsDestination) GoString() string { 941 return s.String() 942 } 943 944 // SetIamRoleArn sets the IamRoleArn field's value. 945 func (s *CloudWatchLogsDestination) SetIamRoleArn(v string) *CloudWatchLogsDestination { 946 s.IamRoleArn = &v 947 return s 948 } 949 950 // SetLogGroupArn sets the LogGroupArn field's value. 951 func (s *CloudWatchLogsDestination) SetLogGroupArn(v string) *CloudWatchLogsDestination { 952 s.LogGroupArn = &v 953 return s 954 } 955 956 // Create a new event destination in a configuration set. 957 type CreateConfigurationSetEventDestinationInput struct { 958 _ struct{} `type:"structure"` 959 960 // ConfigurationSetName is a required field 961 ConfigurationSetName *string `location:"uri" locationName:"ConfigurationSetName" type:"string" required:"true"` 962 963 // An object that defines a single event destination. 964 EventDestination *EventDestinationDefinition `type:"structure"` 965 966 // A name that identifies the event destination. 967 EventDestinationName *string `type:"string"` 968 } 969 970 // String returns the string representation. 971 // 972 // API parameter values that are decorated as "sensitive" in the API will not 973 // be included in the string output. The member name will be present, but the 974 // value will be replaced with "sensitive". 975 func (s CreateConfigurationSetEventDestinationInput) String() string { 976 return awsutil.Prettify(s) 977 } 978 979 // GoString returns the string representation. 980 // 981 // API parameter values that are decorated as "sensitive" in the API will not 982 // be included in the string output. The member name will be present, but the 983 // value will be replaced with "sensitive". 984 func (s CreateConfigurationSetEventDestinationInput) GoString() string { 985 return s.String() 986 } 987 988 // Validate inspects the fields of the type to determine if they are valid. 989 func (s *CreateConfigurationSetEventDestinationInput) Validate() error { 990 invalidParams := request.ErrInvalidParams{Context: "CreateConfigurationSetEventDestinationInput"} 991 if s.ConfigurationSetName == nil { 992 invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) 993 } 994 if s.ConfigurationSetName != nil && len(*s.ConfigurationSetName) < 1 { 995 invalidParams.Add(request.NewErrParamMinLen("ConfigurationSetName", 1)) 996 } 997 998 if invalidParams.Len() > 0 { 999 return invalidParams 1000 } 1001 return nil 1002 } 1003 1004 // SetConfigurationSetName sets the ConfigurationSetName field's value. 1005 func (s *CreateConfigurationSetEventDestinationInput) SetConfigurationSetName(v string) *CreateConfigurationSetEventDestinationInput { 1006 s.ConfigurationSetName = &v 1007 return s 1008 } 1009 1010 // SetEventDestination sets the EventDestination field's value. 1011 func (s *CreateConfigurationSetEventDestinationInput) SetEventDestination(v *EventDestinationDefinition) *CreateConfigurationSetEventDestinationInput { 1012 s.EventDestination = v 1013 return s 1014 } 1015 1016 // SetEventDestinationName sets the EventDestinationName field's value. 1017 func (s *CreateConfigurationSetEventDestinationInput) SetEventDestinationName(v string) *CreateConfigurationSetEventDestinationInput { 1018 s.EventDestinationName = &v 1019 return s 1020 } 1021 1022 // An empty object that indicates that the event destination was created successfully. 1023 type CreateConfigurationSetEventDestinationOutput struct { 1024 _ struct{} `type:"structure" nopayload:"true"` 1025 } 1026 1027 // String returns the string representation. 1028 // 1029 // API parameter values that are decorated as "sensitive" in the API will not 1030 // be included in the string output. The member name will be present, but the 1031 // value will be replaced with "sensitive". 1032 func (s CreateConfigurationSetEventDestinationOutput) String() string { 1033 return awsutil.Prettify(s) 1034 } 1035 1036 // GoString returns the string representation. 1037 // 1038 // API parameter values that are decorated as "sensitive" in the API will not 1039 // be included in the string output. The member name will be present, but the 1040 // value will be replaced with "sensitive". 1041 func (s CreateConfigurationSetEventDestinationOutput) GoString() string { 1042 return s.String() 1043 } 1044 1045 // A request to create a new configuration set. 1046 type CreateConfigurationSetInput struct { 1047 _ struct{} `type:"structure"` 1048 1049 // The name that you want to give the configuration set. 1050 ConfigurationSetName *string `type:"string"` 1051 } 1052 1053 // String returns the string representation. 1054 // 1055 // API parameter values that are decorated as "sensitive" in the API will not 1056 // be included in the string output. The member name will be present, but the 1057 // value will be replaced with "sensitive". 1058 func (s CreateConfigurationSetInput) String() string { 1059 return awsutil.Prettify(s) 1060 } 1061 1062 // GoString returns the string representation. 1063 // 1064 // API parameter values that are decorated as "sensitive" in the API will not 1065 // be included in the string output. The member name will be present, but the 1066 // value will be replaced with "sensitive". 1067 func (s CreateConfigurationSetInput) GoString() string { 1068 return s.String() 1069 } 1070 1071 // SetConfigurationSetName sets the ConfigurationSetName field's value. 1072 func (s *CreateConfigurationSetInput) SetConfigurationSetName(v string) *CreateConfigurationSetInput { 1073 s.ConfigurationSetName = &v 1074 return s 1075 } 1076 1077 // An empty object that indicates that the configuration set was successfully 1078 // created. 1079 type CreateConfigurationSetOutput struct { 1080 _ struct{} `type:"structure" nopayload:"true"` 1081 } 1082 1083 // String returns the string representation. 1084 // 1085 // API parameter values that are decorated as "sensitive" in the API will not 1086 // be included in the string output. The member name will be present, but the 1087 // value will be replaced with "sensitive". 1088 func (s CreateConfigurationSetOutput) String() string { 1089 return awsutil.Prettify(s) 1090 } 1091 1092 // GoString returns the string representation. 1093 // 1094 // API parameter values that are decorated as "sensitive" in the API will not 1095 // be included in the string output. The member name will be present, but the 1096 // value will be replaced with "sensitive". 1097 func (s CreateConfigurationSetOutput) GoString() string { 1098 return s.String() 1099 } 1100 1101 type DeleteConfigurationSetEventDestinationInput struct { 1102 _ struct{} `type:"structure" nopayload:"true"` 1103 1104 // ConfigurationSetName is a required field 1105 ConfigurationSetName *string `location:"uri" locationName:"ConfigurationSetName" type:"string" required:"true"` 1106 1107 // EventDestinationName is a required field 1108 EventDestinationName *string `location:"uri" locationName:"EventDestinationName" type:"string" required:"true"` 1109 } 1110 1111 // String returns the string representation. 1112 // 1113 // API parameter values that are decorated as "sensitive" in the API will not 1114 // be included in the string output. The member name will be present, but the 1115 // value will be replaced with "sensitive". 1116 func (s DeleteConfigurationSetEventDestinationInput) String() string { 1117 return awsutil.Prettify(s) 1118 } 1119 1120 // GoString returns the string representation. 1121 // 1122 // API parameter values that are decorated as "sensitive" in the API will not 1123 // be included in the string output. The member name will be present, but the 1124 // value will be replaced with "sensitive". 1125 func (s DeleteConfigurationSetEventDestinationInput) GoString() string { 1126 return s.String() 1127 } 1128 1129 // Validate inspects the fields of the type to determine if they are valid. 1130 func (s *DeleteConfigurationSetEventDestinationInput) Validate() error { 1131 invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationSetEventDestinationInput"} 1132 if s.ConfigurationSetName == nil { 1133 invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) 1134 } 1135 if s.ConfigurationSetName != nil && len(*s.ConfigurationSetName) < 1 { 1136 invalidParams.Add(request.NewErrParamMinLen("ConfigurationSetName", 1)) 1137 } 1138 if s.EventDestinationName == nil { 1139 invalidParams.Add(request.NewErrParamRequired("EventDestinationName")) 1140 } 1141 if s.EventDestinationName != nil && len(*s.EventDestinationName) < 1 { 1142 invalidParams.Add(request.NewErrParamMinLen("EventDestinationName", 1)) 1143 } 1144 1145 if invalidParams.Len() > 0 { 1146 return invalidParams 1147 } 1148 return nil 1149 } 1150 1151 // SetConfigurationSetName sets the ConfigurationSetName field's value. 1152 func (s *DeleteConfigurationSetEventDestinationInput) SetConfigurationSetName(v string) *DeleteConfigurationSetEventDestinationInput { 1153 s.ConfigurationSetName = &v 1154 return s 1155 } 1156 1157 // SetEventDestinationName sets the EventDestinationName field's value. 1158 func (s *DeleteConfigurationSetEventDestinationInput) SetEventDestinationName(v string) *DeleteConfigurationSetEventDestinationInput { 1159 s.EventDestinationName = &v 1160 return s 1161 } 1162 1163 // An empty object that indicates that the event destination was deleted successfully. 1164 type DeleteConfigurationSetEventDestinationOutput struct { 1165 _ struct{} `type:"structure" nopayload:"true"` 1166 } 1167 1168 // String returns the string representation. 1169 // 1170 // API parameter values that are decorated as "sensitive" in the API will not 1171 // be included in the string output. The member name will be present, but the 1172 // value will be replaced with "sensitive". 1173 func (s DeleteConfigurationSetEventDestinationOutput) String() string { 1174 return awsutil.Prettify(s) 1175 } 1176 1177 // GoString returns the string representation. 1178 // 1179 // API parameter values that are decorated as "sensitive" in the API will not 1180 // be included in the string output. The member name will be present, but the 1181 // value will be replaced with "sensitive". 1182 func (s DeleteConfigurationSetEventDestinationOutput) GoString() string { 1183 return s.String() 1184 } 1185 1186 type DeleteConfigurationSetInput struct { 1187 _ struct{} `type:"structure" nopayload:"true"` 1188 1189 // ConfigurationSetName is a required field 1190 ConfigurationSetName *string `location:"uri" locationName:"ConfigurationSetName" type:"string" required:"true"` 1191 } 1192 1193 // String returns the string representation. 1194 // 1195 // API parameter values that are decorated as "sensitive" in the API will not 1196 // be included in the string output. The member name will be present, but the 1197 // value will be replaced with "sensitive". 1198 func (s DeleteConfigurationSetInput) String() string { 1199 return awsutil.Prettify(s) 1200 } 1201 1202 // GoString returns the string representation. 1203 // 1204 // API parameter values that are decorated as "sensitive" in the API will not 1205 // be included in the string output. The member name will be present, but the 1206 // value will be replaced with "sensitive". 1207 func (s DeleteConfigurationSetInput) GoString() string { 1208 return s.String() 1209 } 1210 1211 // Validate inspects the fields of the type to determine if they are valid. 1212 func (s *DeleteConfigurationSetInput) Validate() error { 1213 invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationSetInput"} 1214 if s.ConfigurationSetName == nil { 1215 invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) 1216 } 1217 if s.ConfigurationSetName != nil && len(*s.ConfigurationSetName) < 1 { 1218 invalidParams.Add(request.NewErrParamMinLen("ConfigurationSetName", 1)) 1219 } 1220 1221 if invalidParams.Len() > 0 { 1222 return invalidParams 1223 } 1224 return nil 1225 } 1226 1227 // SetConfigurationSetName sets the ConfigurationSetName field's value. 1228 func (s *DeleteConfigurationSetInput) SetConfigurationSetName(v string) *DeleteConfigurationSetInput { 1229 s.ConfigurationSetName = &v 1230 return s 1231 } 1232 1233 // An empty object that indicates that the configuration set was deleted successfully. 1234 type DeleteConfigurationSetOutput struct { 1235 _ struct{} `type:"structure" nopayload:"true"` 1236 } 1237 1238 // String returns the string representation. 1239 // 1240 // API parameter values that are decorated as "sensitive" in the API will not 1241 // be included in the string output. The member name will be present, but the 1242 // value will be replaced with "sensitive". 1243 func (s DeleteConfigurationSetOutput) String() string { 1244 return awsutil.Prettify(s) 1245 } 1246 1247 // GoString returns the string representation. 1248 // 1249 // API parameter values that are decorated as "sensitive" in the API will not 1250 // be included in the string output. The member name will be present, but the 1251 // value will be replaced with "sensitive". 1252 func (s DeleteConfigurationSetOutput) GoString() string { 1253 return s.String() 1254 } 1255 1256 // An object that defines an event destination. 1257 type EventDestination struct { 1258 _ struct{} `type:"structure"` 1259 1260 // An object that contains information about an event destination that sends 1261 // data to Amazon CloudWatch Logs. 1262 CloudWatchLogsDestination *CloudWatchLogsDestination `type:"structure"` 1263 1264 // Indicates whether or not the event destination is enabled. If the event destination 1265 // is enabled, then Amazon Pinpoint sends response data to the specified event 1266 // destination. 1267 Enabled *bool `type:"boolean"` 1268 1269 // An object that contains information about an event destination that sends 1270 // data to Amazon Kinesis Data Firehose. 1271 KinesisFirehoseDestination *KinesisFirehoseDestination `type:"structure"` 1272 1273 // An array of EventDestination objects. Each EventDestination object includes 1274 // ARNs and other information that define an event destination. 1275 MatchingEventTypes []*string `type:"list"` 1276 1277 // A name that identifies the event destination configuration. 1278 Name *string `type:"string"` 1279 1280 // An object that contains information about an event destination that sends 1281 // data to Amazon SNS. 1282 SnsDestination *SnsDestination `type:"structure"` 1283 } 1284 1285 // String returns the string representation. 1286 // 1287 // API parameter values that are decorated as "sensitive" in the API will not 1288 // be included in the string output. The member name will be present, but the 1289 // value will be replaced with "sensitive". 1290 func (s EventDestination) String() string { 1291 return awsutil.Prettify(s) 1292 } 1293 1294 // GoString returns the string representation. 1295 // 1296 // API parameter values that are decorated as "sensitive" in the API will not 1297 // be included in the string output. The member name will be present, but the 1298 // value will be replaced with "sensitive". 1299 func (s EventDestination) GoString() string { 1300 return s.String() 1301 } 1302 1303 // SetCloudWatchLogsDestination sets the CloudWatchLogsDestination field's value. 1304 func (s *EventDestination) SetCloudWatchLogsDestination(v *CloudWatchLogsDestination) *EventDestination { 1305 s.CloudWatchLogsDestination = v 1306 return s 1307 } 1308 1309 // SetEnabled sets the Enabled field's value. 1310 func (s *EventDestination) SetEnabled(v bool) *EventDestination { 1311 s.Enabled = &v 1312 return s 1313 } 1314 1315 // SetKinesisFirehoseDestination sets the KinesisFirehoseDestination field's value. 1316 func (s *EventDestination) SetKinesisFirehoseDestination(v *KinesisFirehoseDestination) *EventDestination { 1317 s.KinesisFirehoseDestination = v 1318 return s 1319 } 1320 1321 // SetMatchingEventTypes sets the MatchingEventTypes field's value. 1322 func (s *EventDestination) SetMatchingEventTypes(v []*string) *EventDestination { 1323 s.MatchingEventTypes = v 1324 return s 1325 } 1326 1327 // SetName sets the Name field's value. 1328 func (s *EventDestination) SetName(v string) *EventDestination { 1329 s.Name = &v 1330 return s 1331 } 1332 1333 // SetSnsDestination sets the SnsDestination field's value. 1334 func (s *EventDestination) SetSnsDestination(v *SnsDestination) *EventDestination { 1335 s.SnsDestination = v 1336 return s 1337 } 1338 1339 // An object that defines a single event destination. 1340 type EventDestinationDefinition struct { 1341 _ struct{} `type:"structure"` 1342 1343 // An object that contains information about an event destination that sends 1344 // data to Amazon CloudWatch Logs. 1345 CloudWatchLogsDestination *CloudWatchLogsDestination `type:"structure"` 1346 1347 // Indicates whether or not the event destination is enabled. If the event destination 1348 // is enabled, then Amazon Pinpoint sends response data to the specified event 1349 // destination. 1350 Enabled *bool `type:"boolean"` 1351 1352 // An object that contains information about an event destination that sends 1353 // data to Amazon Kinesis Data Firehose. 1354 KinesisFirehoseDestination *KinesisFirehoseDestination `type:"structure"` 1355 1356 // An array of EventDestination objects. Each EventDestination object includes 1357 // ARNs and other information that define an event destination. 1358 MatchingEventTypes []*string `type:"list"` 1359 1360 // An object that contains information about an event destination that sends 1361 // data to Amazon SNS. 1362 SnsDestination *SnsDestination `type:"structure"` 1363 } 1364 1365 // String returns the string representation. 1366 // 1367 // API parameter values that are decorated as "sensitive" in the API will not 1368 // be included in the string output. The member name will be present, but the 1369 // value will be replaced with "sensitive". 1370 func (s EventDestinationDefinition) String() string { 1371 return awsutil.Prettify(s) 1372 } 1373 1374 // GoString returns the string representation. 1375 // 1376 // API parameter values that are decorated as "sensitive" in the API will not 1377 // be included in the string output. The member name will be present, but the 1378 // value will be replaced with "sensitive". 1379 func (s EventDestinationDefinition) GoString() string { 1380 return s.String() 1381 } 1382 1383 // SetCloudWatchLogsDestination sets the CloudWatchLogsDestination field's value. 1384 func (s *EventDestinationDefinition) SetCloudWatchLogsDestination(v *CloudWatchLogsDestination) *EventDestinationDefinition { 1385 s.CloudWatchLogsDestination = v 1386 return s 1387 } 1388 1389 // SetEnabled sets the Enabled field's value. 1390 func (s *EventDestinationDefinition) SetEnabled(v bool) *EventDestinationDefinition { 1391 s.Enabled = &v 1392 return s 1393 } 1394 1395 // SetKinesisFirehoseDestination sets the KinesisFirehoseDestination field's value. 1396 func (s *EventDestinationDefinition) SetKinesisFirehoseDestination(v *KinesisFirehoseDestination) *EventDestinationDefinition { 1397 s.KinesisFirehoseDestination = v 1398 return s 1399 } 1400 1401 // SetMatchingEventTypes sets the MatchingEventTypes field's value. 1402 func (s *EventDestinationDefinition) SetMatchingEventTypes(v []*string) *EventDestinationDefinition { 1403 s.MatchingEventTypes = v 1404 return s 1405 } 1406 1407 // SetSnsDestination sets the SnsDestination field's value. 1408 func (s *EventDestinationDefinition) SetSnsDestination(v *SnsDestination) *EventDestinationDefinition { 1409 s.SnsDestination = v 1410 return s 1411 } 1412 1413 type GetConfigurationSetEventDestinationsInput struct { 1414 _ struct{} `type:"structure" nopayload:"true"` 1415 1416 // ConfigurationSetName is a required field 1417 ConfigurationSetName *string `location:"uri" locationName:"ConfigurationSetName" type:"string" required:"true"` 1418 } 1419 1420 // String returns the string representation. 1421 // 1422 // API parameter values that are decorated as "sensitive" in the API will not 1423 // be included in the string output. The member name will be present, but the 1424 // value will be replaced with "sensitive". 1425 func (s GetConfigurationSetEventDestinationsInput) String() string { 1426 return awsutil.Prettify(s) 1427 } 1428 1429 // GoString returns the string representation. 1430 // 1431 // API parameter values that are decorated as "sensitive" in the API will not 1432 // be included in the string output. The member name will be present, but the 1433 // value will be replaced with "sensitive". 1434 func (s GetConfigurationSetEventDestinationsInput) GoString() string { 1435 return s.String() 1436 } 1437 1438 // Validate inspects the fields of the type to determine if they are valid. 1439 func (s *GetConfigurationSetEventDestinationsInput) Validate() error { 1440 invalidParams := request.ErrInvalidParams{Context: "GetConfigurationSetEventDestinationsInput"} 1441 if s.ConfigurationSetName == nil { 1442 invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) 1443 } 1444 if s.ConfigurationSetName != nil && len(*s.ConfigurationSetName) < 1 { 1445 invalidParams.Add(request.NewErrParamMinLen("ConfigurationSetName", 1)) 1446 } 1447 1448 if invalidParams.Len() > 0 { 1449 return invalidParams 1450 } 1451 return nil 1452 } 1453 1454 // SetConfigurationSetName sets the ConfigurationSetName field's value. 1455 func (s *GetConfigurationSetEventDestinationsInput) SetConfigurationSetName(v string) *GetConfigurationSetEventDestinationsInput { 1456 s.ConfigurationSetName = &v 1457 return s 1458 } 1459 1460 // An object that contains information about an event destination. 1461 type GetConfigurationSetEventDestinationsOutput struct { 1462 _ struct{} `type:"structure"` 1463 1464 // An array of EventDestination objects. Each EventDestination object includes 1465 // ARNs and other information that define an event destination. 1466 EventDestinations []*EventDestination `type:"list"` 1467 } 1468 1469 // String returns the string representation. 1470 // 1471 // API parameter values that are decorated as "sensitive" in the API will not 1472 // be included in the string output. The member name will be present, but the 1473 // value will be replaced with "sensitive". 1474 func (s GetConfigurationSetEventDestinationsOutput) String() string { 1475 return awsutil.Prettify(s) 1476 } 1477 1478 // GoString returns the string representation. 1479 // 1480 // API parameter values that are decorated as "sensitive" in the API will not 1481 // be included in the string output. The member name will be present, but the 1482 // value will be replaced with "sensitive". 1483 func (s GetConfigurationSetEventDestinationsOutput) GoString() string { 1484 return s.String() 1485 } 1486 1487 // SetEventDestinations sets the EventDestinations field's value. 1488 func (s *GetConfigurationSetEventDestinationsOutput) SetEventDestinations(v []*EventDestination) *GetConfigurationSetEventDestinationsOutput { 1489 s.EventDestinations = v 1490 return s 1491 } 1492 1493 // The API encountered an unexpected error and couldn't complete the request. 1494 // You might be able to successfully issue the request again in the future. 1495 type InternalServiceErrorException struct { 1496 _ struct{} `type:"structure"` 1497 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1498 1499 Message_ *string `locationName:"Message" type:"string"` 1500 } 1501 1502 // String returns the string representation. 1503 // 1504 // API parameter values that are decorated as "sensitive" in the API will not 1505 // be included in the string output. The member name will be present, but the 1506 // value will be replaced with "sensitive". 1507 func (s InternalServiceErrorException) String() string { 1508 return awsutil.Prettify(s) 1509 } 1510 1511 // GoString returns the string representation. 1512 // 1513 // API parameter values that are decorated as "sensitive" in the API will not 1514 // be included in the string output. The member name will be present, but the 1515 // value will be replaced with "sensitive". 1516 func (s InternalServiceErrorException) GoString() string { 1517 return s.String() 1518 } 1519 1520 func newErrorInternalServiceErrorException(v protocol.ResponseMetadata) error { 1521 return &InternalServiceErrorException{ 1522 RespMetadata: v, 1523 } 1524 } 1525 1526 // Code returns the exception type name. 1527 func (s *InternalServiceErrorException) Code() string { 1528 return "InternalServiceErrorException" 1529 } 1530 1531 // Message returns the exception's message. 1532 func (s *InternalServiceErrorException) Message() string { 1533 if s.Message_ != nil { 1534 return *s.Message_ 1535 } 1536 return "" 1537 } 1538 1539 // OrigErr always returns nil, satisfies awserr.Error interface. 1540 func (s *InternalServiceErrorException) OrigErr() error { 1541 return nil 1542 } 1543 1544 func (s *InternalServiceErrorException) Error() string { 1545 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1546 } 1547 1548 // Status code returns the HTTP status code for the request's response error. 1549 func (s *InternalServiceErrorException) StatusCode() int { 1550 return s.RespMetadata.StatusCode 1551 } 1552 1553 // RequestID returns the service's response RequestID for request. 1554 func (s *InternalServiceErrorException) RequestID() string { 1555 return s.RespMetadata.RequestID 1556 } 1557 1558 // An object that contains information about an event destination that sends 1559 // data to Amazon Kinesis Data Firehose. 1560 type KinesisFirehoseDestination struct { 1561 _ struct{} `type:"structure"` 1562 1563 // The Amazon Resource Name (ARN) of an IAM role that can write data to an Amazon 1564 // Kinesis Data Firehose stream. 1565 DeliveryStreamArn *string `type:"string"` 1566 1567 // The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose destination 1568 // that you want to use in the event destination. 1569 IamRoleArn *string `type:"string"` 1570 } 1571 1572 // String returns the string representation. 1573 // 1574 // API parameter values that are decorated as "sensitive" in the API will not 1575 // be included in the string output. The member name will be present, but the 1576 // value will be replaced with "sensitive". 1577 func (s KinesisFirehoseDestination) String() string { 1578 return awsutil.Prettify(s) 1579 } 1580 1581 // GoString returns the string representation. 1582 // 1583 // API parameter values that are decorated as "sensitive" in the API will not 1584 // be included in the string output. The member name will be present, but the 1585 // value will be replaced with "sensitive". 1586 func (s KinesisFirehoseDestination) GoString() string { 1587 return s.String() 1588 } 1589 1590 // SetDeliveryStreamArn sets the DeliveryStreamArn field's value. 1591 func (s *KinesisFirehoseDestination) SetDeliveryStreamArn(v string) *KinesisFirehoseDestination { 1592 s.DeliveryStreamArn = &v 1593 return s 1594 } 1595 1596 // SetIamRoleArn sets the IamRoleArn field's value. 1597 func (s *KinesisFirehoseDestination) SetIamRoleArn(v string) *KinesisFirehoseDestination { 1598 s.IamRoleArn = &v 1599 return s 1600 } 1601 1602 // There are too many instances of the specified resource type. 1603 type LimitExceededException struct { 1604 _ struct{} `type:"structure"` 1605 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1606 1607 Message_ *string `locationName:"Message" type:"string"` 1608 } 1609 1610 // String returns the string representation. 1611 // 1612 // API parameter values that are decorated as "sensitive" in the API will not 1613 // be included in the string output. The member name will be present, but the 1614 // value will be replaced with "sensitive". 1615 func (s LimitExceededException) String() string { 1616 return awsutil.Prettify(s) 1617 } 1618 1619 // GoString returns the string representation. 1620 // 1621 // API parameter values that are decorated as "sensitive" in the API will not 1622 // be included in the string output. The member name will be present, but the 1623 // value will be replaced with "sensitive". 1624 func (s LimitExceededException) GoString() string { 1625 return s.String() 1626 } 1627 1628 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 1629 return &LimitExceededException{ 1630 RespMetadata: v, 1631 } 1632 } 1633 1634 // Code returns the exception type name. 1635 func (s *LimitExceededException) Code() string { 1636 return "LimitExceededException" 1637 } 1638 1639 // Message returns the exception's message. 1640 func (s *LimitExceededException) Message() string { 1641 if s.Message_ != nil { 1642 return *s.Message_ 1643 } 1644 return "" 1645 } 1646 1647 // OrigErr always returns nil, satisfies awserr.Error interface. 1648 func (s *LimitExceededException) OrigErr() error { 1649 return nil 1650 } 1651 1652 func (s *LimitExceededException) Error() string { 1653 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1654 } 1655 1656 // Status code returns the HTTP status code for the request's response error. 1657 func (s *LimitExceededException) StatusCode() int { 1658 return s.RespMetadata.StatusCode 1659 } 1660 1661 // RequestID returns the service's response RequestID for request. 1662 func (s *LimitExceededException) RequestID() string { 1663 return s.RespMetadata.RequestID 1664 } 1665 1666 type ListConfigurationSetsInput struct { 1667 _ struct{} `type:"structure" nopayload:"true"` 1668 1669 NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` 1670 1671 PageSize *string `location:"querystring" locationName:"PageSize" type:"string"` 1672 } 1673 1674 // String returns the string representation. 1675 // 1676 // API parameter values that are decorated as "sensitive" in the API will not 1677 // be included in the string output. The member name will be present, but the 1678 // value will be replaced with "sensitive". 1679 func (s ListConfigurationSetsInput) String() string { 1680 return awsutil.Prettify(s) 1681 } 1682 1683 // GoString returns the string representation. 1684 // 1685 // API parameter values that are decorated as "sensitive" in the API will not 1686 // be included in the string output. The member name will be present, but the 1687 // value will be replaced with "sensitive". 1688 func (s ListConfigurationSetsInput) GoString() string { 1689 return s.String() 1690 } 1691 1692 // SetNextToken sets the NextToken field's value. 1693 func (s *ListConfigurationSetsInput) SetNextToken(v string) *ListConfigurationSetsInput { 1694 s.NextToken = &v 1695 return s 1696 } 1697 1698 // SetPageSize sets the PageSize field's value. 1699 func (s *ListConfigurationSetsInput) SetPageSize(v string) *ListConfigurationSetsInput { 1700 s.PageSize = &v 1701 return s 1702 } 1703 1704 // An object that contains information about the configuration sets for your 1705 // account in the current region. 1706 type ListConfigurationSetsOutput struct { 1707 _ struct{} `type:"structure"` 1708 1709 // An object that contains a list of configuration sets for your account in 1710 // the current region. 1711 ConfigurationSets []*string `type:"list"` 1712 1713 // A token returned from a previous call to ListConfigurationSets to indicate 1714 // the position in the list of configuration sets. 1715 NextToken *string `type:"string"` 1716 } 1717 1718 // String returns the string representation. 1719 // 1720 // API parameter values that are decorated as "sensitive" in the API will not 1721 // be included in the string output. The member name will be present, but the 1722 // value will be replaced with "sensitive". 1723 func (s ListConfigurationSetsOutput) String() string { 1724 return awsutil.Prettify(s) 1725 } 1726 1727 // GoString returns the string representation. 1728 // 1729 // API parameter values that are decorated as "sensitive" in the API will not 1730 // be included in the string output. The member name will be present, but the 1731 // value will be replaced with "sensitive". 1732 func (s ListConfigurationSetsOutput) GoString() string { 1733 return s.String() 1734 } 1735 1736 // SetConfigurationSets sets the ConfigurationSets field's value. 1737 func (s *ListConfigurationSetsOutput) SetConfigurationSets(v []*string) *ListConfigurationSetsOutput { 1738 s.ConfigurationSets = v 1739 return s 1740 } 1741 1742 // SetNextToken sets the NextToken field's value. 1743 func (s *ListConfigurationSetsOutput) SetNextToken(v string) *ListConfigurationSetsOutput { 1744 s.NextToken = &v 1745 return s 1746 } 1747 1748 // The resource you attempted to access doesn't exist. 1749 type NotFoundException struct { 1750 _ struct{} `type:"structure"` 1751 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1752 1753 Message_ *string `locationName:"Message" type:"string"` 1754 } 1755 1756 // String returns the string representation. 1757 // 1758 // API parameter values that are decorated as "sensitive" in the API will not 1759 // be included in the string output. The member name will be present, but the 1760 // value will be replaced with "sensitive". 1761 func (s NotFoundException) String() string { 1762 return awsutil.Prettify(s) 1763 } 1764 1765 // GoString returns the string representation. 1766 // 1767 // API parameter values that are decorated as "sensitive" in the API will not 1768 // be included in the string output. The member name will be present, but the 1769 // value will be replaced with "sensitive". 1770 func (s NotFoundException) GoString() string { 1771 return s.String() 1772 } 1773 1774 func newErrorNotFoundException(v protocol.ResponseMetadata) error { 1775 return &NotFoundException{ 1776 RespMetadata: v, 1777 } 1778 } 1779 1780 // Code returns the exception type name. 1781 func (s *NotFoundException) Code() string { 1782 return "NotFoundException" 1783 } 1784 1785 // Message returns the exception's message. 1786 func (s *NotFoundException) Message() string { 1787 if s.Message_ != nil { 1788 return *s.Message_ 1789 } 1790 return "" 1791 } 1792 1793 // OrigErr always returns nil, satisfies awserr.Error interface. 1794 func (s *NotFoundException) OrigErr() error { 1795 return nil 1796 } 1797 1798 func (s *NotFoundException) Error() string { 1799 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1800 } 1801 1802 // Status code returns the HTTP status code for the request's response error. 1803 func (s *NotFoundException) StatusCode() int { 1804 return s.RespMetadata.StatusCode 1805 } 1806 1807 // RequestID returns the service's response RequestID for request. 1808 func (s *NotFoundException) RequestID() string { 1809 return s.RespMetadata.RequestID 1810 } 1811 1812 // An object that defines a message that contains unformatted text. 1813 type PlainTextMessageType struct { 1814 _ struct{} `type:"structure"` 1815 1816 // The language to use when delivering the message. For a complete list of supported 1817 // languages, see the Amazon Polly Developer Guide. 1818 LanguageCode *string `type:"string"` 1819 1820 // The plain (not SSML-formatted) text to deliver to the recipient. 1821 Text *string `type:"string"` 1822 1823 // The name of the voice that you want to use to deliver the message. For a 1824 // complete list of supported voices, see the Amazon Polly Developer Guide. 1825 VoiceId *string `type:"string"` 1826 } 1827 1828 // String returns the string representation. 1829 // 1830 // API parameter values that are decorated as "sensitive" in the API will not 1831 // be included in the string output. The member name will be present, but the 1832 // value will be replaced with "sensitive". 1833 func (s PlainTextMessageType) String() string { 1834 return awsutil.Prettify(s) 1835 } 1836 1837 // GoString returns the string representation. 1838 // 1839 // API parameter values that are decorated as "sensitive" in the API will not 1840 // be included in the string output. The member name will be present, but the 1841 // value will be replaced with "sensitive". 1842 func (s PlainTextMessageType) GoString() string { 1843 return s.String() 1844 } 1845 1846 // SetLanguageCode sets the LanguageCode field's value. 1847 func (s *PlainTextMessageType) SetLanguageCode(v string) *PlainTextMessageType { 1848 s.LanguageCode = &v 1849 return s 1850 } 1851 1852 // SetText sets the Text field's value. 1853 func (s *PlainTextMessageType) SetText(v string) *PlainTextMessageType { 1854 s.Text = &v 1855 return s 1856 } 1857 1858 // SetVoiceId sets the VoiceId field's value. 1859 func (s *PlainTextMessageType) SetVoiceId(v string) *PlainTextMessageType { 1860 s.VoiceId = &v 1861 return s 1862 } 1863 1864 // An object that defines a message that contains SSML-formatted text. 1865 type SSMLMessageType struct { 1866 _ struct{} `type:"structure"` 1867 1868 // The language to use when delivering the message. For a complete list of supported 1869 // languages, see the Amazon Polly Developer Guide. 1870 LanguageCode *string `type:"string"` 1871 1872 // The SSML-formatted text to deliver to the recipient. 1873 Text *string `type:"string"` 1874 1875 // The name of the voice that you want to use to deliver the message. For a 1876 // complete list of supported voices, see the Amazon Polly Developer Guide. 1877 VoiceId *string `type:"string"` 1878 } 1879 1880 // String returns the string representation. 1881 // 1882 // API parameter values that are decorated as "sensitive" in the API will not 1883 // be included in the string output. The member name will be present, but the 1884 // value will be replaced with "sensitive". 1885 func (s SSMLMessageType) String() string { 1886 return awsutil.Prettify(s) 1887 } 1888 1889 // GoString returns the string representation. 1890 // 1891 // API parameter values that are decorated as "sensitive" in the API will not 1892 // be included in the string output. The member name will be present, but the 1893 // value will be replaced with "sensitive". 1894 func (s SSMLMessageType) GoString() string { 1895 return s.String() 1896 } 1897 1898 // SetLanguageCode sets the LanguageCode field's value. 1899 func (s *SSMLMessageType) SetLanguageCode(v string) *SSMLMessageType { 1900 s.LanguageCode = &v 1901 return s 1902 } 1903 1904 // SetText sets the Text field's value. 1905 func (s *SSMLMessageType) SetText(v string) *SSMLMessageType { 1906 s.Text = &v 1907 return s 1908 } 1909 1910 // SetVoiceId sets the VoiceId field's value. 1911 func (s *SSMLMessageType) SetVoiceId(v string) *SSMLMessageType { 1912 s.VoiceId = &v 1913 return s 1914 } 1915 1916 // A request to create and send a new voice message. 1917 type SendVoiceMessageInput struct { 1918 _ struct{} `type:"structure"` 1919 1920 // The phone number that appears on recipients' devices when they receive the 1921 // message. 1922 CallerId *string `type:"string"` 1923 1924 // The name of the configuration set that you want to use to send the message. 1925 ConfigurationSetName *string `type:"string"` 1926 1927 // An object that contains a voice message and information about the recipient 1928 // that you want to send it to. 1929 Content *VoiceMessageContent `type:"structure"` 1930 1931 // The phone number that you want to send the voice message to. 1932 DestinationPhoneNumber *string `type:"string"` 1933 1934 // The phone number that Amazon Pinpoint should use to send the voice message. 1935 // This isn't necessarily the phone number that appears on recipients' devices 1936 // when they receive the message, because you can specify a CallerId parameter 1937 // in the request. 1938 OriginationPhoneNumber *string `type:"string"` 1939 } 1940 1941 // String returns the string representation. 1942 // 1943 // API parameter values that are decorated as "sensitive" in the API will not 1944 // be included in the string output. The member name will be present, but the 1945 // value will be replaced with "sensitive". 1946 func (s SendVoiceMessageInput) String() string { 1947 return awsutil.Prettify(s) 1948 } 1949 1950 // GoString returns the string representation. 1951 // 1952 // API parameter values that are decorated as "sensitive" in the API will not 1953 // be included in the string output. The member name will be present, but the 1954 // value will be replaced with "sensitive". 1955 func (s SendVoiceMessageInput) GoString() string { 1956 return s.String() 1957 } 1958 1959 // SetCallerId sets the CallerId field's value. 1960 func (s *SendVoiceMessageInput) SetCallerId(v string) *SendVoiceMessageInput { 1961 s.CallerId = &v 1962 return s 1963 } 1964 1965 // SetConfigurationSetName sets the ConfigurationSetName field's value. 1966 func (s *SendVoiceMessageInput) SetConfigurationSetName(v string) *SendVoiceMessageInput { 1967 s.ConfigurationSetName = &v 1968 return s 1969 } 1970 1971 // SetContent sets the Content field's value. 1972 func (s *SendVoiceMessageInput) SetContent(v *VoiceMessageContent) *SendVoiceMessageInput { 1973 s.Content = v 1974 return s 1975 } 1976 1977 // SetDestinationPhoneNumber sets the DestinationPhoneNumber field's value. 1978 func (s *SendVoiceMessageInput) SetDestinationPhoneNumber(v string) *SendVoiceMessageInput { 1979 s.DestinationPhoneNumber = &v 1980 return s 1981 } 1982 1983 // SetOriginationPhoneNumber sets the OriginationPhoneNumber field's value. 1984 func (s *SendVoiceMessageInput) SetOriginationPhoneNumber(v string) *SendVoiceMessageInput { 1985 s.OriginationPhoneNumber = &v 1986 return s 1987 } 1988 1989 // An object that that contains the Message ID of a Voice message that was sent 1990 // successfully. 1991 type SendVoiceMessageOutput struct { 1992 _ struct{} `type:"structure"` 1993 1994 // A unique identifier for the voice message. 1995 MessageId *string `type:"string"` 1996 } 1997 1998 // String returns the string representation. 1999 // 2000 // API parameter values that are decorated as "sensitive" in the API will not 2001 // be included in the string output. The member name will be present, but the 2002 // value will be replaced with "sensitive". 2003 func (s SendVoiceMessageOutput) String() string { 2004 return awsutil.Prettify(s) 2005 } 2006 2007 // GoString returns the string representation. 2008 // 2009 // API parameter values that are decorated as "sensitive" in the API will not 2010 // be included in the string output. The member name will be present, but the 2011 // value will be replaced with "sensitive". 2012 func (s SendVoiceMessageOutput) GoString() string { 2013 return s.String() 2014 } 2015 2016 // SetMessageId sets the MessageId field's value. 2017 func (s *SendVoiceMessageOutput) SetMessageId(v string) *SendVoiceMessageOutput { 2018 s.MessageId = &v 2019 return s 2020 } 2021 2022 // An object that contains information about an event destination that sends 2023 // data to Amazon SNS. 2024 type SnsDestination struct { 2025 _ struct{} `type:"structure"` 2026 2027 // The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish 2028 // events to. 2029 TopicArn *string `type:"string"` 2030 } 2031 2032 // String returns the string representation. 2033 // 2034 // API parameter values that are decorated as "sensitive" in the API will not 2035 // be included in the string output. The member name will be present, but the 2036 // value will be replaced with "sensitive". 2037 func (s SnsDestination) String() string { 2038 return awsutil.Prettify(s) 2039 } 2040 2041 // GoString returns the string representation. 2042 // 2043 // API parameter values that are decorated as "sensitive" in the API will not 2044 // be included in the string output. The member name will be present, but the 2045 // value will be replaced with "sensitive". 2046 func (s SnsDestination) GoString() string { 2047 return s.String() 2048 } 2049 2050 // SetTopicArn sets the TopicArn field's value. 2051 func (s *SnsDestination) SetTopicArn(v string) *SnsDestination { 2052 s.TopicArn = &v 2053 return s 2054 } 2055 2056 // You've issued too many requests to the resource. Wait a few minutes, and 2057 // then try again. 2058 type TooManyRequestsException struct { 2059 _ struct{} `type:"structure"` 2060 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2061 2062 Message_ *string `locationName:"Message" type:"string"` 2063 } 2064 2065 // String returns the string representation. 2066 // 2067 // API parameter values that are decorated as "sensitive" in the API will not 2068 // be included in the string output. The member name will be present, but the 2069 // value will be replaced with "sensitive". 2070 func (s TooManyRequestsException) String() string { 2071 return awsutil.Prettify(s) 2072 } 2073 2074 // GoString returns the string representation. 2075 // 2076 // API parameter values that are decorated as "sensitive" in the API will not 2077 // be included in the string output. The member name will be present, but the 2078 // value will be replaced with "sensitive". 2079 func (s TooManyRequestsException) GoString() string { 2080 return s.String() 2081 } 2082 2083 func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { 2084 return &TooManyRequestsException{ 2085 RespMetadata: v, 2086 } 2087 } 2088 2089 // Code returns the exception type name. 2090 func (s *TooManyRequestsException) Code() string { 2091 return "TooManyRequestsException" 2092 } 2093 2094 // Message returns the exception's message. 2095 func (s *TooManyRequestsException) Message() string { 2096 if s.Message_ != nil { 2097 return *s.Message_ 2098 } 2099 return "" 2100 } 2101 2102 // OrigErr always returns nil, satisfies awserr.Error interface. 2103 func (s *TooManyRequestsException) OrigErr() error { 2104 return nil 2105 } 2106 2107 func (s *TooManyRequestsException) Error() string { 2108 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2109 } 2110 2111 // Status code returns the HTTP status code for the request's response error. 2112 func (s *TooManyRequestsException) StatusCode() int { 2113 return s.RespMetadata.StatusCode 2114 } 2115 2116 // RequestID returns the service's response RequestID for request. 2117 func (s *TooManyRequestsException) RequestID() string { 2118 return s.RespMetadata.RequestID 2119 } 2120 2121 // An object that defines a request to update an existing event destination. 2122 type UpdateConfigurationSetEventDestinationInput struct { 2123 _ struct{} `type:"structure"` 2124 2125 // ConfigurationSetName is a required field 2126 ConfigurationSetName *string `location:"uri" locationName:"ConfigurationSetName" type:"string" required:"true"` 2127 2128 // An object that defines a single event destination. 2129 EventDestination *EventDestinationDefinition `type:"structure"` 2130 2131 // EventDestinationName is a required field 2132 EventDestinationName *string `location:"uri" locationName:"EventDestinationName" type:"string" required:"true"` 2133 } 2134 2135 // String returns the string representation. 2136 // 2137 // API parameter values that are decorated as "sensitive" in the API will not 2138 // be included in the string output. The member name will be present, but the 2139 // value will be replaced with "sensitive". 2140 func (s UpdateConfigurationSetEventDestinationInput) String() string { 2141 return awsutil.Prettify(s) 2142 } 2143 2144 // GoString returns the string representation. 2145 // 2146 // API parameter values that are decorated as "sensitive" in the API will not 2147 // be included in the string output. The member name will be present, but the 2148 // value will be replaced with "sensitive". 2149 func (s UpdateConfigurationSetEventDestinationInput) GoString() string { 2150 return s.String() 2151 } 2152 2153 // Validate inspects the fields of the type to determine if they are valid. 2154 func (s *UpdateConfigurationSetEventDestinationInput) Validate() error { 2155 invalidParams := request.ErrInvalidParams{Context: "UpdateConfigurationSetEventDestinationInput"} 2156 if s.ConfigurationSetName == nil { 2157 invalidParams.Add(request.NewErrParamRequired("ConfigurationSetName")) 2158 } 2159 if s.ConfigurationSetName != nil && len(*s.ConfigurationSetName) < 1 { 2160 invalidParams.Add(request.NewErrParamMinLen("ConfigurationSetName", 1)) 2161 } 2162 if s.EventDestinationName == nil { 2163 invalidParams.Add(request.NewErrParamRequired("EventDestinationName")) 2164 } 2165 if s.EventDestinationName != nil && len(*s.EventDestinationName) < 1 { 2166 invalidParams.Add(request.NewErrParamMinLen("EventDestinationName", 1)) 2167 } 2168 2169 if invalidParams.Len() > 0 { 2170 return invalidParams 2171 } 2172 return nil 2173 } 2174 2175 // SetConfigurationSetName sets the ConfigurationSetName field's value. 2176 func (s *UpdateConfigurationSetEventDestinationInput) SetConfigurationSetName(v string) *UpdateConfigurationSetEventDestinationInput { 2177 s.ConfigurationSetName = &v 2178 return s 2179 } 2180 2181 // SetEventDestination sets the EventDestination field's value. 2182 func (s *UpdateConfigurationSetEventDestinationInput) SetEventDestination(v *EventDestinationDefinition) *UpdateConfigurationSetEventDestinationInput { 2183 s.EventDestination = v 2184 return s 2185 } 2186 2187 // SetEventDestinationName sets the EventDestinationName field's value. 2188 func (s *UpdateConfigurationSetEventDestinationInput) SetEventDestinationName(v string) *UpdateConfigurationSetEventDestinationInput { 2189 s.EventDestinationName = &v 2190 return s 2191 } 2192 2193 // An empty object that indicates that the event destination was updated successfully. 2194 type UpdateConfigurationSetEventDestinationOutput struct { 2195 _ struct{} `type:"structure" nopayload:"true"` 2196 } 2197 2198 // String returns the string representation. 2199 // 2200 // API parameter values that are decorated as "sensitive" in the API will not 2201 // be included in the string output. The member name will be present, but the 2202 // value will be replaced with "sensitive". 2203 func (s UpdateConfigurationSetEventDestinationOutput) String() string { 2204 return awsutil.Prettify(s) 2205 } 2206 2207 // GoString returns the string representation. 2208 // 2209 // API parameter values that are decorated as "sensitive" in the API will not 2210 // be included in the string output. The member name will be present, but the 2211 // value will be replaced with "sensitive". 2212 func (s UpdateConfigurationSetEventDestinationOutput) GoString() string { 2213 return s.String() 2214 } 2215 2216 // An object that contains a voice message and information about the recipient 2217 // that you want to send it to. 2218 type VoiceMessageContent struct { 2219 _ struct{} `type:"structure"` 2220 2221 // An object that defines a message that contains text formatted using Amazon 2222 // Pinpoint Voice Instructions markup. 2223 CallInstructionsMessage *CallInstructionsMessageType `type:"structure"` 2224 2225 // An object that defines a message that contains unformatted text. 2226 PlainTextMessage *PlainTextMessageType `type:"structure"` 2227 2228 // An object that defines a message that contains SSML-formatted text. 2229 SSMLMessage *SSMLMessageType `type:"structure"` 2230 } 2231 2232 // String returns the string representation. 2233 // 2234 // API parameter values that are decorated as "sensitive" in the API will not 2235 // be included in the string output. The member name will be present, but the 2236 // value will be replaced with "sensitive". 2237 func (s VoiceMessageContent) String() string { 2238 return awsutil.Prettify(s) 2239 } 2240 2241 // GoString returns the string representation. 2242 // 2243 // API parameter values that are decorated as "sensitive" in the API will not 2244 // be included in the string output. The member name will be present, but the 2245 // value will be replaced with "sensitive". 2246 func (s VoiceMessageContent) GoString() string { 2247 return s.String() 2248 } 2249 2250 // SetCallInstructionsMessage sets the CallInstructionsMessage field's value. 2251 func (s *VoiceMessageContent) SetCallInstructionsMessage(v *CallInstructionsMessageType) *VoiceMessageContent { 2252 s.CallInstructionsMessage = v 2253 return s 2254 } 2255 2256 // SetPlainTextMessage sets the PlainTextMessage field's value. 2257 func (s *VoiceMessageContent) SetPlainTextMessage(v *PlainTextMessageType) *VoiceMessageContent { 2258 s.PlainTextMessage = v 2259 return s 2260 } 2261 2262 // SetSSMLMessage sets the SSMLMessage field's value. 2263 func (s *VoiceMessageContent) SetSSMLMessage(v *SSMLMessageType) *VoiceMessageContent { 2264 s.SSMLMessage = v 2265 return s 2266 } 2267 2268 // The types of events that are sent to the event destination. 2269 const ( 2270 // EventTypeInitiatedCall is a EventType enum value 2271 EventTypeInitiatedCall = "INITIATED_CALL" 2272 2273 // EventTypeRinging is a EventType enum value 2274 EventTypeRinging = "RINGING" 2275 2276 // EventTypeAnswered is a EventType enum value 2277 EventTypeAnswered = "ANSWERED" 2278 2279 // EventTypeCompletedCall is a EventType enum value 2280 EventTypeCompletedCall = "COMPLETED_CALL" 2281 2282 // EventTypeBusy is a EventType enum value 2283 EventTypeBusy = "BUSY" 2284 2285 // EventTypeFailed is a EventType enum value 2286 EventTypeFailed = "FAILED" 2287 2288 // EventTypeNoAnswer is a EventType enum value 2289 EventTypeNoAnswer = "NO_ANSWER" 2290 ) 2291 2292 // EventType_Values returns all elements of the EventType enum 2293 func EventType_Values() []string { 2294 return []string{ 2295 EventTypeInitiatedCall, 2296 EventTypeRinging, 2297 EventTypeAnswered, 2298 EventTypeCompletedCall, 2299 EventTypeBusy, 2300 EventTypeFailed, 2301 EventTypeNoAnswer, 2302 } 2303 }