github.com/aavshr/aws-sdk-go@v1.41.3/service/polly/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package polly 4 5 import ( 6 "fmt" 7 "io" 8 "time" 9 10 "github.com/aavshr/aws-sdk-go/aws" 11 "github.com/aavshr/aws-sdk-go/aws/awsutil" 12 "github.com/aavshr/aws-sdk-go/aws/request" 13 "github.com/aavshr/aws-sdk-go/private/protocol" 14 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 15 ) 16 17 const opDeleteLexicon = "DeleteLexicon" 18 19 // DeleteLexiconRequest generates a "aws/request.Request" representing the 20 // client's request for the DeleteLexicon operation. The "output" return 21 // value will be populated with the request's response once the request completes 22 // successfully. 23 // 24 // Use "Send" method on the returned Request to send the API call to the service. 25 // the "output" return value is not valid until after Send returns without error. 26 // 27 // See DeleteLexicon for more information on using the DeleteLexicon 28 // API call, and error handling. 29 // 30 // This method is useful when you want to inject custom logic or configuration 31 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 32 // 33 // 34 // // Example sending a request using the DeleteLexiconRequest method. 35 // req, resp := client.DeleteLexiconRequest(params) 36 // 37 // err := req.Send() 38 // if err == nil { // resp is now filled 39 // fmt.Println(resp) 40 // } 41 // 42 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DeleteLexicon 43 func (c *Polly) DeleteLexiconRequest(input *DeleteLexiconInput) (req *request.Request, output *DeleteLexiconOutput) { 44 op := &request.Operation{ 45 Name: opDeleteLexicon, 46 HTTPMethod: "DELETE", 47 HTTPPath: "/v1/lexicons/{LexiconName}", 48 } 49 50 if input == nil { 51 input = &DeleteLexiconInput{} 52 } 53 54 output = &DeleteLexiconOutput{} 55 req = c.newRequest(op, input, output) 56 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 57 return 58 } 59 60 // DeleteLexicon API operation for Amazon Polly. 61 // 62 // Deletes the specified pronunciation lexicon stored in an Amazon Web Services 63 // Region. A lexicon which has been deleted is not available for speech synthesis, 64 // nor is it possible to retrieve it using either the GetLexicon or ListLexicon 65 // APIs. 66 // 67 // For more information, see Managing Lexicons (https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). 68 // 69 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 70 // with awserr.Error's Code and Message methods to get detailed information about 71 // the error. 72 // 73 // See the AWS API reference guide for Amazon Polly's 74 // API operation DeleteLexicon for usage and error information. 75 // 76 // Returned Error Types: 77 // * LexiconNotFoundException 78 // Amazon Polly can't find the specified lexicon. This could be caused by a 79 // lexicon that is missing, its name is misspelled or specifying a lexicon that 80 // is in a different region. 81 // 82 // Verify that the lexicon exists, is in the region (see ListLexicons) and that 83 // you spelled its name is spelled correctly. Then try again. 84 // 85 // * ServiceFailureException 86 // An unknown condition has caused a service failure. 87 // 88 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DeleteLexicon 89 func (c *Polly) DeleteLexicon(input *DeleteLexiconInput) (*DeleteLexiconOutput, error) { 90 req, out := c.DeleteLexiconRequest(input) 91 return out, req.Send() 92 } 93 94 // DeleteLexiconWithContext is the same as DeleteLexicon with the addition of 95 // the ability to pass a context and additional request options. 96 // 97 // See DeleteLexicon 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 *Polly) DeleteLexiconWithContext(ctx aws.Context, input *DeleteLexiconInput, opts ...request.Option) (*DeleteLexiconOutput, error) { 104 req, out := c.DeleteLexiconRequest(input) 105 req.SetContext(ctx) 106 req.ApplyOptions(opts...) 107 return out, req.Send() 108 } 109 110 const opDescribeVoices = "DescribeVoices" 111 112 // DescribeVoicesRequest generates a "aws/request.Request" representing the 113 // client's request for the DescribeVoices 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 DescribeVoices for more information on using the DescribeVoices 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 DescribeVoicesRequest method. 128 // req, resp := client.DescribeVoicesRequest(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/polly-2016-06-10/DescribeVoices 136 func (c *Polly) DescribeVoicesRequest(input *DescribeVoicesInput) (req *request.Request, output *DescribeVoicesOutput) { 137 op := &request.Operation{ 138 Name: opDescribeVoices, 139 HTTPMethod: "GET", 140 HTTPPath: "/v1/voices", 141 } 142 143 if input == nil { 144 input = &DescribeVoicesInput{} 145 } 146 147 output = &DescribeVoicesOutput{} 148 req = c.newRequest(op, input, output) 149 return 150 } 151 152 // DescribeVoices API operation for Amazon Polly. 153 // 154 // Returns the list of voices that are available for use when requesting speech 155 // synthesis. Each voice speaks a specified language, is either male or female, 156 // and is identified by an ID, which is the ASCII version of the voice name. 157 // 158 // When synthesizing speech ( SynthesizeSpeech ), you provide the voice ID for 159 // the voice you want from the list of voices returned by DescribeVoices. 160 // 161 // For example, you want your news reader application to read news in a specific 162 // language, but giving a user the option to choose the voice. Using the DescribeVoices 163 // operation you can provide the user with a list of available voices to select 164 // from. 165 // 166 // You can optionally specify a language code to filter the available voices. 167 // For example, if you specify en-US, the operation returns a list of all available 168 // US English voices. 169 // 170 // This operation requires permissions to perform the polly:DescribeVoices action. 171 // 172 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 173 // with awserr.Error's Code and Message methods to get detailed information about 174 // the error. 175 // 176 // See the AWS API reference guide for Amazon Polly's 177 // API operation DescribeVoices for usage and error information. 178 // 179 // Returned Error Types: 180 // * InvalidNextTokenException 181 // The NextToken is invalid. Verify that it's spelled correctly, and then try 182 // again. 183 // 184 // * ServiceFailureException 185 // An unknown condition has caused a service failure. 186 // 187 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DescribeVoices 188 func (c *Polly) DescribeVoices(input *DescribeVoicesInput) (*DescribeVoicesOutput, error) { 189 req, out := c.DescribeVoicesRequest(input) 190 return out, req.Send() 191 } 192 193 // DescribeVoicesWithContext is the same as DescribeVoices with the addition of 194 // the ability to pass a context and additional request options. 195 // 196 // See DescribeVoices for details on how to use this API operation. 197 // 198 // The context must be non-nil and will be used for request cancellation. If 199 // the context is nil a panic will occur. In the future the SDK may create 200 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 201 // for more information on using Contexts. 202 func (c *Polly) DescribeVoicesWithContext(ctx aws.Context, input *DescribeVoicesInput, opts ...request.Option) (*DescribeVoicesOutput, error) { 203 req, out := c.DescribeVoicesRequest(input) 204 req.SetContext(ctx) 205 req.ApplyOptions(opts...) 206 return out, req.Send() 207 } 208 209 const opGetLexicon = "GetLexicon" 210 211 // GetLexiconRequest generates a "aws/request.Request" representing the 212 // client's request for the GetLexicon operation. The "output" return 213 // value will be populated with the request's response once the request completes 214 // successfully. 215 // 216 // Use "Send" method on the returned Request to send the API call to the service. 217 // the "output" return value is not valid until after Send returns without error. 218 // 219 // See GetLexicon for more information on using the GetLexicon 220 // API call, and error handling. 221 // 222 // This method is useful when you want to inject custom logic or configuration 223 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 224 // 225 // 226 // // Example sending a request using the GetLexiconRequest method. 227 // req, resp := client.GetLexiconRequest(params) 228 // 229 // err := req.Send() 230 // if err == nil { // resp is now filled 231 // fmt.Println(resp) 232 // } 233 // 234 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexicon 235 func (c *Polly) GetLexiconRequest(input *GetLexiconInput) (req *request.Request, output *GetLexiconOutput) { 236 op := &request.Operation{ 237 Name: opGetLexicon, 238 HTTPMethod: "GET", 239 HTTPPath: "/v1/lexicons/{LexiconName}", 240 } 241 242 if input == nil { 243 input = &GetLexiconInput{} 244 } 245 246 output = &GetLexiconOutput{} 247 req = c.newRequest(op, input, output) 248 return 249 } 250 251 // GetLexicon API operation for Amazon Polly. 252 // 253 // Returns the content of the specified pronunciation lexicon stored in an Amazon 254 // Web Services Region. For more information, see Managing Lexicons (https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). 255 // 256 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 257 // with awserr.Error's Code and Message methods to get detailed information about 258 // the error. 259 // 260 // See the AWS API reference guide for Amazon Polly's 261 // API operation GetLexicon for usage and error information. 262 // 263 // Returned Error Types: 264 // * LexiconNotFoundException 265 // Amazon Polly can't find the specified lexicon. This could be caused by a 266 // lexicon that is missing, its name is misspelled or specifying a lexicon that 267 // is in a different region. 268 // 269 // Verify that the lexicon exists, is in the region (see ListLexicons) and that 270 // you spelled its name is spelled correctly. Then try again. 271 // 272 // * ServiceFailureException 273 // An unknown condition has caused a service failure. 274 // 275 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexicon 276 func (c *Polly) GetLexicon(input *GetLexiconInput) (*GetLexiconOutput, error) { 277 req, out := c.GetLexiconRequest(input) 278 return out, req.Send() 279 } 280 281 // GetLexiconWithContext is the same as GetLexicon with the addition of 282 // the ability to pass a context and additional request options. 283 // 284 // See GetLexicon for details on how to use this API operation. 285 // 286 // The context must be non-nil and will be used for request cancellation. If 287 // the context is nil a panic will occur. In the future the SDK may create 288 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 289 // for more information on using Contexts. 290 func (c *Polly) GetLexiconWithContext(ctx aws.Context, input *GetLexiconInput, opts ...request.Option) (*GetLexiconOutput, error) { 291 req, out := c.GetLexiconRequest(input) 292 req.SetContext(ctx) 293 req.ApplyOptions(opts...) 294 return out, req.Send() 295 } 296 297 const opGetSpeechSynthesisTask = "GetSpeechSynthesisTask" 298 299 // GetSpeechSynthesisTaskRequest generates a "aws/request.Request" representing the 300 // client's request for the GetSpeechSynthesisTask operation. The "output" return 301 // value will be populated with the request's response once the request completes 302 // successfully. 303 // 304 // Use "Send" method on the returned Request to send the API call to the service. 305 // the "output" return value is not valid until after Send returns without error. 306 // 307 // See GetSpeechSynthesisTask for more information on using the GetSpeechSynthesisTask 308 // API call, and error handling. 309 // 310 // This method is useful when you want to inject custom logic or configuration 311 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 312 // 313 // 314 // // Example sending a request using the GetSpeechSynthesisTaskRequest method. 315 // req, resp := client.GetSpeechSynthesisTaskRequest(params) 316 // 317 // err := req.Send() 318 // if err == nil { // resp is now filled 319 // fmt.Println(resp) 320 // } 321 // 322 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetSpeechSynthesisTask 323 func (c *Polly) GetSpeechSynthesisTaskRequest(input *GetSpeechSynthesisTaskInput) (req *request.Request, output *GetSpeechSynthesisTaskOutput) { 324 op := &request.Operation{ 325 Name: opGetSpeechSynthesisTask, 326 HTTPMethod: "GET", 327 HTTPPath: "/v1/synthesisTasks/{TaskId}", 328 } 329 330 if input == nil { 331 input = &GetSpeechSynthesisTaskInput{} 332 } 333 334 output = &GetSpeechSynthesisTaskOutput{} 335 req = c.newRequest(op, input, output) 336 return 337 } 338 339 // GetSpeechSynthesisTask API operation for Amazon Polly. 340 // 341 // Retrieves a specific SpeechSynthesisTask object based on its TaskID. This 342 // object contains information about the given speech synthesis task, including 343 // the status of the task, and a link to the S3 bucket containing the output 344 // of the task. 345 // 346 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 347 // with awserr.Error's Code and Message methods to get detailed information about 348 // the error. 349 // 350 // See the AWS API reference guide for Amazon Polly's 351 // API operation GetSpeechSynthesisTask for usage and error information. 352 // 353 // Returned Error Types: 354 // * InvalidTaskIdException 355 // The provided Task ID is not valid. Please provide a valid Task ID and try 356 // again. 357 // 358 // * ServiceFailureException 359 // An unknown condition has caused a service failure. 360 // 361 // * SynthesisTaskNotFoundException 362 // The Speech Synthesis task with requested Task ID cannot be found. 363 // 364 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetSpeechSynthesisTask 365 func (c *Polly) GetSpeechSynthesisTask(input *GetSpeechSynthesisTaskInput) (*GetSpeechSynthesisTaskOutput, error) { 366 req, out := c.GetSpeechSynthesisTaskRequest(input) 367 return out, req.Send() 368 } 369 370 // GetSpeechSynthesisTaskWithContext is the same as GetSpeechSynthesisTask with the addition of 371 // the ability to pass a context and additional request options. 372 // 373 // See GetSpeechSynthesisTask for details on how to use this API operation. 374 // 375 // The context must be non-nil and will be used for request cancellation. If 376 // the context is nil a panic will occur. In the future the SDK may create 377 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 378 // for more information on using Contexts. 379 func (c *Polly) GetSpeechSynthesisTaskWithContext(ctx aws.Context, input *GetSpeechSynthesisTaskInput, opts ...request.Option) (*GetSpeechSynthesisTaskOutput, error) { 380 req, out := c.GetSpeechSynthesisTaskRequest(input) 381 req.SetContext(ctx) 382 req.ApplyOptions(opts...) 383 return out, req.Send() 384 } 385 386 const opListLexicons = "ListLexicons" 387 388 // ListLexiconsRequest generates a "aws/request.Request" representing the 389 // client's request for the ListLexicons operation. The "output" return 390 // value will be populated with the request's response once the request completes 391 // successfully. 392 // 393 // Use "Send" method on the returned Request to send the API call to the service. 394 // the "output" return value is not valid until after Send returns without error. 395 // 396 // See ListLexicons for more information on using the ListLexicons 397 // API call, and error handling. 398 // 399 // This method is useful when you want to inject custom logic or configuration 400 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 401 // 402 // 403 // // Example sending a request using the ListLexiconsRequest method. 404 // req, resp := client.ListLexiconsRequest(params) 405 // 406 // err := req.Send() 407 // if err == nil { // resp is now filled 408 // fmt.Println(resp) 409 // } 410 // 411 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexicons 412 func (c *Polly) ListLexiconsRequest(input *ListLexiconsInput) (req *request.Request, output *ListLexiconsOutput) { 413 op := &request.Operation{ 414 Name: opListLexicons, 415 HTTPMethod: "GET", 416 HTTPPath: "/v1/lexicons", 417 } 418 419 if input == nil { 420 input = &ListLexiconsInput{} 421 } 422 423 output = &ListLexiconsOutput{} 424 req = c.newRequest(op, input, output) 425 return 426 } 427 428 // ListLexicons API operation for Amazon Polly. 429 // 430 // Returns a list of pronunciation lexicons stored in an Amazon Web Services 431 // Region. For more information, see Managing Lexicons (https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). 432 // 433 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 434 // with awserr.Error's Code and Message methods to get detailed information about 435 // the error. 436 // 437 // See the AWS API reference guide for Amazon Polly's 438 // API operation ListLexicons for usage and error information. 439 // 440 // Returned Error Types: 441 // * InvalidNextTokenException 442 // The NextToken is invalid. Verify that it's spelled correctly, and then try 443 // again. 444 // 445 // * ServiceFailureException 446 // An unknown condition has caused a service failure. 447 // 448 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexicons 449 func (c *Polly) ListLexicons(input *ListLexiconsInput) (*ListLexiconsOutput, error) { 450 req, out := c.ListLexiconsRequest(input) 451 return out, req.Send() 452 } 453 454 // ListLexiconsWithContext is the same as ListLexicons with the addition of 455 // the ability to pass a context and additional request options. 456 // 457 // See ListLexicons for details on how to use this API operation. 458 // 459 // The context must be non-nil and will be used for request cancellation. If 460 // the context is nil a panic will occur. In the future the SDK may create 461 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 462 // for more information on using Contexts. 463 func (c *Polly) ListLexiconsWithContext(ctx aws.Context, input *ListLexiconsInput, opts ...request.Option) (*ListLexiconsOutput, error) { 464 req, out := c.ListLexiconsRequest(input) 465 req.SetContext(ctx) 466 req.ApplyOptions(opts...) 467 return out, req.Send() 468 } 469 470 const opListSpeechSynthesisTasks = "ListSpeechSynthesisTasks" 471 472 // ListSpeechSynthesisTasksRequest generates a "aws/request.Request" representing the 473 // client's request for the ListSpeechSynthesisTasks operation. The "output" return 474 // value will be populated with the request's response once the request completes 475 // successfully. 476 // 477 // Use "Send" method on the returned Request to send the API call to the service. 478 // the "output" return value is not valid until after Send returns without error. 479 // 480 // See ListSpeechSynthesisTasks for more information on using the ListSpeechSynthesisTasks 481 // API call, and error handling. 482 // 483 // This method is useful when you want to inject custom logic or configuration 484 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 485 // 486 // 487 // // Example sending a request using the ListSpeechSynthesisTasksRequest method. 488 // req, resp := client.ListSpeechSynthesisTasksRequest(params) 489 // 490 // err := req.Send() 491 // if err == nil { // resp is now filled 492 // fmt.Println(resp) 493 // } 494 // 495 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListSpeechSynthesisTasks 496 func (c *Polly) ListSpeechSynthesisTasksRequest(input *ListSpeechSynthesisTasksInput) (req *request.Request, output *ListSpeechSynthesisTasksOutput) { 497 op := &request.Operation{ 498 Name: opListSpeechSynthesisTasks, 499 HTTPMethod: "GET", 500 HTTPPath: "/v1/synthesisTasks", 501 Paginator: &request.Paginator{ 502 InputTokens: []string{"NextToken"}, 503 OutputTokens: []string{"NextToken"}, 504 LimitToken: "MaxResults", 505 TruncationToken: "", 506 }, 507 } 508 509 if input == nil { 510 input = &ListSpeechSynthesisTasksInput{} 511 } 512 513 output = &ListSpeechSynthesisTasksOutput{} 514 req = c.newRequest(op, input, output) 515 return 516 } 517 518 // ListSpeechSynthesisTasks API operation for Amazon Polly. 519 // 520 // Returns a list of SpeechSynthesisTask objects ordered by their creation date. 521 // This operation can filter the tasks by their status, for example, allowing 522 // users to list only tasks that are completed. 523 // 524 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 525 // with awserr.Error's Code and Message methods to get detailed information about 526 // the error. 527 // 528 // See the AWS API reference guide for Amazon Polly's 529 // API operation ListSpeechSynthesisTasks for usage and error information. 530 // 531 // Returned Error Types: 532 // * InvalidNextTokenException 533 // The NextToken is invalid. Verify that it's spelled correctly, and then try 534 // again. 535 // 536 // * ServiceFailureException 537 // An unknown condition has caused a service failure. 538 // 539 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListSpeechSynthesisTasks 540 func (c *Polly) ListSpeechSynthesisTasks(input *ListSpeechSynthesisTasksInput) (*ListSpeechSynthesisTasksOutput, error) { 541 req, out := c.ListSpeechSynthesisTasksRequest(input) 542 return out, req.Send() 543 } 544 545 // ListSpeechSynthesisTasksWithContext is the same as ListSpeechSynthesisTasks with the addition of 546 // the ability to pass a context and additional request options. 547 // 548 // See ListSpeechSynthesisTasks for details on how to use this API operation. 549 // 550 // The context must be non-nil and will be used for request cancellation. If 551 // the context is nil a panic will occur. In the future the SDK may create 552 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 553 // for more information on using Contexts. 554 func (c *Polly) ListSpeechSynthesisTasksWithContext(ctx aws.Context, input *ListSpeechSynthesisTasksInput, opts ...request.Option) (*ListSpeechSynthesisTasksOutput, error) { 555 req, out := c.ListSpeechSynthesisTasksRequest(input) 556 req.SetContext(ctx) 557 req.ApplyOptions(opts...) 558 return out, req.Send() 559 } 560 561 // ListSpeechSynthesisTasksPages iterates over the pages of a ListSpeechSynthesisTasks operation, 562 // calling the "fn" function with the response data for each page. To stop 563 // iterating, return false from the fn function. 564 // 565 // See ListSpeechSynthesisTasks method for more information on how to use this operation. 566 // 567 // Note: This operation can generate multiple requests to a service. 568 // 569 // // Example iterating over at most 3 pages of a ListSpeechSynthesisTasks operation. 570 // pageNum := 0 571 // err := client.ListSpeechSynthesisTasksPages(params, 572 // func(page *polly.ListSpeechSynthesisTasksOutput, lastPage bool) bool { 573 // pageNum++ 574 // fmt.Println(page) 575 // return pageNum <= 3 576 // }) 577 // 578 func (c *Polly) ListSpeechSynthesisTasksPages(input *ListSpeechSynthesisTasksInput, fn func(*ListSpeechSynthesisTasksOutput, bool) bool) error { 579 return c.ListSpeechSynthesisTasksPagesWithContext(aws.BackgroundContext(), input, fn) 580 } 581 582 // ListSpeechSynthesisTasksPagesWithContext same as ListSpeechSynthesisTasksPages except 583 // it takes a Context and allows setting request options on the pages. 584 // 585 // The context must be non-nil and will be used for request cancellation. If 586 // the context is nil a panic will occur. In the future the SDK may create 587 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 588 // for more information on using Contexts. 589 func (c *Polly) ListSpeechSynthesisTasksPagesWithContext(ctx aws.Context, input *ListSpeechSynthesisTasksInput, fn func(*ListSpeechSynthesisTasksOutput, bool) bool, opts ...request.Option) error { 590 p := request.Pagination{ 591 NewRequest: func() (*request.Request, error) { 592 var inCpy *ListSpeechSynthesisTasksInput 593 if input != nil { 594 tmp := *input 595 inCpy = &tmp 596 } 597 req, _ := c.ListSpeechSynthesisTasksRequest(inCpy) 598 req.SetContext(ctx) 599 req.ApplyOptions(opts...) 600 return req, nil 601 }, 602 } 603 604 for p.Next() { 605 if !fn(p.Page().(*ListSpeechSynthesisTasksOutput), !p.HasNextPage()) { 606 break 607 } 608 } 609 610 return p.Err() 611 } 612 613 const opPutLexicon = "PutLexicon" 614 615 // PutLexiconRequest generates a "aws/request.Request" representing the 616 // client's request for the PutLexicon operation. The "output" return 617 // value will be populated with the request's response once the request completes 618 // successfully. 619 // 620 // Use "Send" method on the returned Request to send the API call to the service. 621 // the "output" return value is not valid until after Send returns without error. 622 // 623 // See PutLexicon for more information on using the PutLexicon 624 // API call, and error handling. 625 // 626 // This method is useful when you want to inject custom logic or configuration 627 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 628 // 629 // 630 // // Example sending a request using the PutLexiconRequest method. 631 // req, resp := client.PutLexiconRequest(params) 632 // 633 // err := req.Send() 634 // if err == nil { // resp is now filled 635 // fmt.Println(resp) 636 // } 637 // 638 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexicon 639 func (c *Polly) PutLexiconRequest(input *PutLexiconInput) (req *request.Request, output *PutLexiconOutput) { 640 op := &request.Operation{ 641 Name: opPutLexicon, 642 HTTPMethod: "PUT", 643 HTTPPath: "/v1/lexicons/{LexiconName}", 644 } 645 646 if input == nil { 647 input = &PutLexiconInput{} 648 } 649 650 output = &PutLexiconOutput{} 651 req = c.newRequest(op, input, output) 652 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 653 return 654 } 655 656 // PutLexicon API operation for Amazon Polly. 657 // 658 // Stores a pronunciation lexicon in an Amazon Web Services Region. If a lexicon 659 // with the same name already exists in the region, it is overwritten by the 660 // new lexicon. Lexicon operations have eventual consistency, therefore, it 661 // might take some time before the lexicon is available to the SynthesizeSpeech 662 // operation. 663 // 664 // For more information, see Managing Lexicons (https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). 665 // 666 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 667 // with awserr.Error's Code and Message methods to get detailed information about 668 // the error. 669 // 670 // See the AWS API reference guide for Amazon Polly's 671 // API operation PutLexicon for usage and error information. 672 // 673 // Returned Error Types: 674 // * InvalidLexiconException 675 // Amazon Polly can't find the specified lexicon. Verify that the lexicon's 676 // name is spelled correctly, and then try again. 677 // 678 // * UnsupportedPlsAlphabetException 679 // The alphabet specified by the lexicon is not a supported alphabet. Valid 680 // values are x-sampa and ipa. 681 // 682 // * UnsupportedPlsLanguageException 683 // The language specified in the lexicon is unsupported. For a list of supported 684 // languages, see Lexicon Attributes (https://docs.aws.amazon.com/polly/latest/dg/API_LexiconAttributes.html). 685 // 686 // * LexiconSizeExceededException 687 // The maximum size of the specified lexicon would be exceeded by this operation. 688 // 689 // * MaxLexemeLengthExceededException 690 // The maximum size of the lexeme would be exceeded by this operation. 691 // 692 // * MaxLexiconsNumberExceededException 693 // The maximum number of lexicons would be exceeded by this operation. 694 // 695 // * ServiceFailureException 696 // An unknown condition has caused a service failure. 697 // 698 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexicon 699 func (c *Polly) PutLexicon(input *PutLexiconInput) (*PutLexiconOutput, error) { 700 req, out := c.PutLexiconRequest(input) 701 return out, req.Send() 702 } 703 704 // PutLexiconWithContext is the same as PutLexicon with the addition of 705 // the ability to pass a context and additional request options. 706 // 707 // See PutLexicon for details on how to use this API operation. 708 // 709 // The context must be non-nil and will be used for request cancellation. If 710 // the context is nil a panic will occur. In the future the SDK may create 711 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 712 // for more information on using Contexts. 713 func (c *Polly) PutLexiconWithContext(ctx aws.Context, input *PutLexiconInput, opts ...request.Option) (*PutLexiconOutput, error) { 714 req, out := c.PutLexiconRequest(input) 715 req.SetContext(ctx) 716 req.ApplyOptions(opts...) 717 return out, req.Send() 718 } 719 720 const opStartSpeechSynthesisTask = "StartSpeechSynthesisTask" 721 722 // StartSpeechSynthesisTaskRequest generates a "aws/request.Request" representing the 723 // client's request for the StartSpeechSynthesisTask operation. The "output" return 724 // value will be populated with the request's response once the request completes 725 // successfully. 726 // 727 // Use "Send" method on the returned Request to send the API call to the service. 728 // the "output" return value is not valid until after Send returns without error. 729 // 730 // See StartSpeechSynthesisTask for more information on using the StartSpeechSynthesisTask 731 // API call, and error handling. 732 // 733 // This method is useful when you want to inject custom logic or configuration 734 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 735 // 736 // 737 // // Example sending a request using the StartSpeechSynthesisTaskRequest method. 738 // req, resp := client.StartSpeechSynthesisTaskRequest(params) 739 // 740 // err := req.Send() 741 // if err == nil { // resp is now filled 742 // fmt.Println(resp) 743 // } 744 // 745 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/StartSpeechSynthesisTask 746 func (c *Polly) StartSpeechSynthesisTaskRequest(input *StartSpeechSynthesisTaskInput) (req *request.Request, output *StartSpeechSynthesisTaskOutput) { 747 op := &request.Operation{ 748 Name: opStartSpeechSynthesisTask, 749 HTTPMethod: "POST", 750 HTTPPath: "/v1/synthesisTasks", 751 } 752 753 if input == nil { 754 input = &StartSpeechSynthesisTaskInput{} 755 } 756 757 output = &StartSpeechSynthesisTaskOutput{} 758 req = c.newRequest(op, input, output) 759 return 760 } 761 762 // StartSpeechSynthesisTask API operation for Amazon Polly. 763 // 764 // Allows the creation of an asynchronous synthesis task, by starting a new 765 // SpeechSynthesisTask. This operation requires all the standard information 766 // needed for speech synthesis, plus the name of an Amazon S3 bucket for the 767 // service to store the output of the synthesis task and two optional parameters 768 // (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, 769 // this operation will return a SpeechSynthesisTask object, which will include 770 // an identifier of this task as well as the current status. The SpeechSynthesisTask 771 // object is available for 72 hours after starting the asynchronous synthesis 772 // task. 773 // 774 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 775 // with awserr.Error's Code and Message methods to get detailed information about 776 // the error. 777 // 778 // See the AWS API reference guide for Amazon Polly's 779 // API operation StartSpeechSynthesisTask for usage and error information. 780 // 781 // Returned Error Types: 782 // * TextLengthExceededException 783 // The value of the "Text" parameter is longer than the accepted limits. For 784 // the SynthesizeSpeech API, the limit for input text is a maximum of 6000 characters 785 // total, of which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask 786 // API, the maximum is 200,000 characters, of which no more than 100,000 can 787 // be billed characters. SSML tags are not counted as billed characters. 788 // 789 // * InvalidS3BucketException 790 // The provided Amazon S3 bucket name is invalid. Please check your input with 791 // S3 bucket naming requirements and try again. 792 // 793 // * InvalidS3KeyException 794 // The provided Amazon S3 key prefix is invalid. Please provide a valid S3 object 795 // key name. 796 // 797 // * InvalidSampleRateException 798 // The specified sample rate is not valid. 799 // 800 // * InvalidSnsTopicArnException 801 // The provided SNS topic ARN is invalid. Please provide a valid SNS topic ARN 802 // and try again. 803 // 804 // * InvalidSsmlException 805 // The SSML you provided is invalid. Verify the SSML syntax, spelling of tags 806 // and values, and then try again. 807 // 808 // * EngineNotSupportedException 809 // This engine is not compatible with the voice that you have designated. Choose 810 // a new voice that is compatible with the engine or change the engine and restart 811 // the operation. 812 // 813 // * LexiconNotFoundException 814 // Amazon Polly can't find the specified lexicon. This could be caused by a 815 // lexicon that is missing, its name is misspelled or specifying a lexicon that 816 // is in a different region. 817 // 818 // Verify that the lexicon exists, is in the region (see ListLexicons) and that 819 // you spelled its name is spelled correctly. Then try again. 820 // 821 // * ServiceFailureException 822 // An unknown condition has caused a service failure. 823 // 824 // * MarksNotSupportedForFormatException 825 // Speech marks are not supported for the OutputFormat selected. Speech marks 826 // are only available for content in json format. 827 // 828 // * SsmlMarksNotSupportedForTextTypeException 829 // SSML speech marks are not supported for plain text-type input. 830 // 831 // * LanguageNotSupportedException 832 // The language specified is not currently supported by Amazon Polly in this 833 // capacity. 834 // 835 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/StartSpeechSynthesisTask 836 func (c *Polly) StartSpeechSynthesisTask(input *StartSpeechSynthesisTaskInput) (*StartSpeechSynthesisTaskOutput, error) { 837 req, out := c.StartSpeechSynthesisTaskRequest(input) 838 return out, req.Send() 839 } 840 841 // StartSpeechSynthesisTaskWithContext is the same as StartSpeechSynthesisTask with the addition of 842 // the ability to pass a context and additional request options. 843 // 844 // See StartSpeechSynthesisTask for details on how to use this API operation. 845 // 846 // The context must be non-nil and will be used for request cancellation. If 847 // the context is nil a panic will occur. In the future the SDK may create 848 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 849 // for more information on using Contexts. 850 func (c *Polly) StartSpeechSynthesisTaskWithContext(ctx aws.Context, input *StartSpeechSynthesisTaskInput, opts ...request.Option) (*StartSpeechSynthesisTaskOutput, error) { 851 req, out := c.StartSpeechSynthesisTaskRequest(input) 852 req.SetContext(ctx) 853 req.ApplyOptions(opts...) 854 return out, req.Send() 855 } 856 857 const opSynthesizeSpeech = "SynthesizeSpeech" 858 859 // SynthesizeSpeechRequest generates a "aws/request.Request" representing the 860 // client's request for the SynthesizeSpeech operation. The "output" return 861 // value will be populated with the request's response once the request completes 862 // successfully. 863 // 864 // Use "Send" method on the returned Request to send the API call to the service. 865 // the "output" return value is not valid until after Send returns without error. 866 // 867 // See SynthesizeSpeech for more information on using the SynthesizeSpeech 868 // API call, and error handling. 869 // 870 // This method is useful when you want to inject custom logic or configuration 871 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 872 // 873 // 874 // // Example sending a request using the SynthesizeSpeechRequest method. 875 // req, resp := client.SynthesizeSpeechRequest(params) 876 // 877 // err := req.Send() 878 // if err == nil { // resp is now filled 879 // fmt.Println(resp) 880 // } 881 // 882 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeech 883 func (c *Polly) SynthesizeSpeechRequest(input *SynthesizeSpeechInput) (req *request.Request, output *SynthesizeSpeechOutput) { 884 op := &request.Operation{ 885 Name: opSynthesizeSpeech, 886 HTTPMethod: "POST", 887 HTTPPath: "/v1/speech", 888 } 889 890 if input == nil { 891 input = &SynthesizeSpeechInput{} 892 } 893 894 output = &SynthesizeSpeechOutput{} 895 req = c.newRequest(op, input, output) 896 return 897 } 898 899 // SynthesizeSpeech API operation for Amazon Polly. 900 // 901 // Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input 902 // must be valid, well-formed SSML. Some alphabets might not be available with 903 // all the voices (for example, Cyrillic might not be read at all by English 904 // voices) unless phoneme mapping is used. For more information, see How it 905 // Works (https://docs.aws.amazon.com/polly/latest/dg/how-text-to-speech-works.html). 906 // 907 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 908 // with awserr.Error's Code and Message methods to get detailed information about 909 // the error. 910 // 911 // See the AWS API reference guide for Amazon Polly's 912 // API operation SynthesizeSpeech for usage and error information. 913 // 914 // Returned Error Types: 915 // * TextLengthExceededException 916 // The value of the "Text" parameter is longer than the accepted limits. For 917 // the SynthesizeSpeech API, the limit for input text is a maximum of 6000 characters 918 // total, of which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask 919 // API, the maximum is 200,000 characters, of which no more than 100,000 can 920 // be billed characters. SSML tags are not counted as billed characters. 921 // 922 // * InvalidSampleRateException 923 // The specified sample rate is not valid. 924 // 925 // * InvalidSsmlException 926 // The SSML you provided is invalid. Verify the SSML syntax, spelling of tags 927 // and values, and then try again. 928 // 929 // * LexiconNotFoundException 930 // Amazon Polly can't find the specified lexicon. This could be caused by a 931 // lexicon that is missing, its name is misspelled or specifying a lexicon that 932 // is in a different region. 933 // 934 // Verify that the lexicon exists, is in the region (see ListLexicons) and that 935 // you spelled its name is spelled correctly. Then try again. 936 // 937 // * ServiceFailureException 938 // An unknown condition has caused a service failure. 939 // 940 // * MarksNotSupportedForFormatException 941 // Speech marks are not supported for the OutputFormat selected. Speech marks 942 // are only available for content in json format. 943 // 944 // * SsmlMarksNotSupportedForTextTypeException 945 // SSML speech marks are not supported for plain text-type input. 946 // 947 // * LanguageNotSupportedException 948 // The language specified is not currently supported by Amazon Polly in this 949 // capacity. 950 // 951 // * EngineNotSupportedException 952 // This engine is not compatible with the voice that you have designated. Choose 953 // a new voice that is compatible with the engine or change the engine and restart 954 // the operation. 955 // 956 // See also, https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeech 957 func (c *Polly) SynthesizeSpeech(input *SynthesizeSpeechInput) (*SynthesizeSpeechOutput, error) { 958 req, out := c.SynthesizeSpeechRequest(input) 959 return out, req.Send() 960 } 961 962 // SynthesizeSpeechWithContext is the same as SynthesizeSpeech with the addition of 963 // the ability to pass a context and additional request options. 964 // 965 // See SynthesizeSpeech for details on how to use this API operation. 966 // 967 // The context must be non-nil and will be used for request cancellation. If 968 // the context is nil a panic will occur. In the future the SDK may create 969 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 970 // for more information on using Contexts. 971 func (c *Polly) SynthesizeSpeechWithContext(ctx aws.Context, input *SynthesizeSpeechInput, opts ...request.Option) (*SynthesizeSpeechOutput, error) { 972 req, out := c.SynthesizeSpeechRequest(input) 973 req.SetContext(ctx) 974 req.ApplyOptions(opts...) 975 return out, req.Send() 976 } 977 978 type DeleteLexiconInput struct { 979 _ struct{} `type:"structure" nopayload:"true"` 980 981 // The name of the lexicon to delete. Must be an existing lexicon in the region. 982 // 983 // Name is a required field 984 Name *string `location:"uri" locationName:"LexiconName" type:"string" required:"true"` 985 } 986 987 // String returns the string representation. 988 // 989 // API parameter values that are decorated as "sensitive" in the API will not 990 // be included in the string output. The member name will be present, but the 991 // value will be replaced with "sensitive". 992 func (s DeleteLexiconInput) String() string { 993 return awsutil.Prettify(s) 994 } 995 996 // GoString returns the string representation. 997 // 998 // API parameter values that are decorated as "sensitive" in the API will not 999 // be included in the string output. The member name will be present, but the 1000 // value will be replaced with "sensitive". 1001 func (s DeleteLexiconInput) GoString() string { 1002 return s.String() 1003 } 1004 1005 // Validate inspects the fields of the type to determine if they are valid. 1006 func (s *DeleteLexiconInput) Validate() error { 1007 invalidParams := request.ErrInvalidParams{Context: "DeleteLexiconInput"} 1008 if s.Name == nil { 1009 invalidParams.Add(request.NewErrParamRequired("Name")) 1010 } 1011 if s.Name != nil && len(*s.Name) < 1 { 1012 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1013 } 1014 1015 if invalidParams.Len() > 0 { 1016 return invalidParams 1017 } 1018 return nil 1019 } 1020 1021 // SetName sets the Name field's value. 1022 func (s *DeleteLexiconInput) SetName(v string) *DeleteLexiconInput { 1023 s.Name = &v 1024 return s 1025 } 1026 1027 type DeleteLexiconOutput struct { 1028 _ struct{} `type:"structure" nopayload:"true"` 1029 } 1030 1031 // String returns the string representation. 1032 // 1033 // API parameter values that are decorated as "sensitive" in the API will not 1034 // be included in the string output. The member name will be present, but the 1035 // value will be replaced with "sensitive". 1036 func (s DeleteLexiconOutput) String() string { 1037 return awsutil.Prettify(s) 1038 } 1039 1040 // GoString returns the string representation. 1041 // 1042 // API parameter values that are decorated as "sensitive" in the API will not 1043 // be included in the string output. The member name will be present, but the 1044 // value will be replaced with "sensitive". 1045 func (s DeleteLexiconOutput) GoString() string { 1046 return s.String() 1047 } 1048 1049 type DescribeVoicesInput struct { 1050 _ struct{} `type:"structure" nopayload:"true"` 1051 1052 // Specifies the engine (standard or neural) used by Amazon Polly when processing 1053 // input text for speech synthesis. 1054 Engine *string `location:"querystring" locationName:"Engine" type:"string" enum:"Engine"` 1055 1056 // Boolean value indicating whether to return any bilingual voices that use 1057 // the specified language as an additional language. For instance, if you request 1058 // all languages that use US English (es-US), and there is an Italian voice 1059 // that speaks both Italian (it-IT) and US English, that voice will be included 1060 // if you specify yes but not if you specify no. 1061 IncludeAdditionalLanguageCodes *bool `location:"querystring" locationName:"IncludeAdditionalLanguageCodes" type:"boolean"` 1062 1063 // The language identification tag (ISO 639 code for the language name-ISO 3166 1064 // country code) for filtering the list of voices returned. If you don't specify 1065 // this optional parameter, all available voices are returned. 1066 LanguageCode *string `location:"querystring" locationName:"LanguageCode" type:"string" enum:"LanguageCode"` 1067 1068 // An opaque pagination token returned from the previous DescribeVoices operation. 1069 // If present, this indicates where to continue the listing. 1070 NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` 1071 } 1072 1073 // String returns the string representation. 1074 // 1075 // API parameter values that are decorated as "sensitive" in the API will not 1076 // be included in the string output. The member name will be present, but the 1077 // value will be replaced with "sensitive". 1078 func (s DescribeVoicesInput) String() string { 1079 return awsutil.Prettify(s) 1080 } 1081 1082 // GoString returns the string representation. 1083 // 1084 // API parameter values that are decorated as "sensitive" in the API will not 1085 // be included in the string output. The member name will be present, but the 1086 // value will be replaced with "sensitive". 1087 func (s DescribeVoicesInput) GoString() string { 1088 return s.String() 1089 } 1090 1091 // SetEngine sets the Engine field's value. 1092 func (s *DescribeVoicesInput) SetEngine(v string) *DescribeVoicesInput { 1093 s.Engine = &v 1094 return s 1095 } 1096 1097 // SetIncludeAdditionalLanguageCodes sets the IncludeAdditionalLanguageCodes field's value. 1098 func (s *DescribeVoicesInput) SetIncludeAdditionalLanguageCodes(v bool) *DescribeVoicesInput { 1099 s.IncludeAdditionalLanguageCodes = &v 1100 return s 1101 } 1102 1103 // SetLanguageCode sets the LanguageCode field's value. 1104 func (s *DescribeVoicesInput) SetLanguageCode(v string) *DescribeVoicesInput { 1105 s.LanguageCode = &v 1106 return s 1107 } 1108 1109 // SetNextToken sets the NextToken field's value. 1110 func (s *DescribeVoicesInput) SetNextToken(v string) *DescribeVoicesInput { 1111 s.NextToken = &v 1112 return s 1113 } 1114 1115 type DescribeVoicesOutput struct { 1116 _ struct{} `type:"structure"` 1117 1118 // The pagination token to use in the next request to continue the listing of 1119 // voices. NextToken is returned only if the response is truncated. 1120 NextToken *string `type:"string"` 1121 1122 // A list of voices with their properties. 1123 Voices []*Voice `type:"list"` 1124 } 1125 1126 // String returns the string representation. 1127 // 1128 // API parameter values that are decorated as "sensitive" in the API will not 1129 // be included in the string output. The member name will be present, but the 1130 // value will be replaced with "sensitive". 1131 func (s DescribeVoicesOutput) String() string { 1132 return awsutil.Prettify(s) 1133 } 1134 1135 // GoString returns the string representation. 1136 // 1137 // API parameter values that are decorated as "sensitive" in the API will not 1138 // be included in the string output. The member name will be present, but the 1139 // value will be replaced with "sensitive". 1140 func (s DescribeVoicesOutput) GoString() string { 1141 return s.String() 1142 } 1143 1144 // SetNextToken sets the NextToken field's value. 1145 func (s *DescribeVoicesOutput) SetNextToken(v string) *DescribeVoicesOutput { 1146 s.NextToken = &v 1147 return s 1148 } 1149 1150 // SetVoices sets the Voices field's value. 1151 func (s *DescribeVoicesOutput) SetVoices(v []*Voice) *DescribeVoicesOutput { 1152 s.Voices = v 1153 return s 1154 } 1155 1156 // This engine is not compatible with the voice that you have designated. Choose 1157 // a new voice that is compatible with the engine or change the engine and restart 1158 // the operation. 1159 type EngineNotSupportedException struct { 1160 _ struct{} `type:"structure"` 1161 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1162 1163 Message_ *string `locationName:"message" type:"string"` 1164 } 1165 1166 // String returns the string representation. 1167 // 1168 // API parameter values that are decorated as "sensitive" in the API will not 1169 // be included in the string output. The member name will be present, but the 1170 // value will be replaced with "sensitive". 1171 func (s EngineNotSupportedException) String() string { 1172 return awsutil.Prettify(s) 1173 } 1174 1175 // GoString returns the string representation. 1176 // 1177 // API parameter values that are decorated as "sensitive" in the API will not 1178 // be included in the string output. The member name will be present, but the 1179 // value will be replaced with "sensitive". 1180 func (s EngineNotSupportedException) GoString() string { 1181 return s.String() 1182 } 1183 1184 func newErrorEngineNotSupportedException(v protocol.ResponseMetadata) error { 1185 return &EngineNotSupportedException{ 1186 RespMetadata: v, 1187 } 1188 } 1189 1190 // Code returns the exception type name. 1191 func (s *EngineNotSupportedException) Code() string { 1192 return "EngineNotSupportedException" 1193 } 1194 1195 // Message returns the exception's message. 1196 func (s *EngineNotSupportedException) Message() string { 1197 if s.Message_ != nil { 1198 return *s.Message_ 1199 } 1200 return "" 1201 } 1202 1203 // OrigErr always returns nil, satisfies awserr.Error interface. 1204 func (s *EngineNotSupportedException) OrigErr() error { 1205 return nil 1206 } 1207 1208 func (s *EngineNotSupportedException) Error() string { 1209 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1210 } 1211 1212 // Status code returns the HTTP status code for the request's response error. 1213 func (s *EngineNotSupportedException) StatusCode() int { 1214 return s.RespMetadata.StatusCode 1215 } 1216 1217 // RequestID returns the service's response RequestID for request. 1218 func (s *EngineNotSupportedException) RequestID() string { 1219 return s.RespMetadata.RequestID 1220 } 1221 1222 type GetLexiconInput struct { 1223 _ struct{} `type:"structure" nopayload:"true"` 1224 1225 // Name of the lexicon. 1226 // 1227 // Name is a required field 1228 Name *string `location:"uri" locationName:"LexiconName" type:"string" required:"true"` 1229 } 1230 1231 // String returns the string representation. 1232 // 1233 // API parameter values that are decorated as "sensitive" in the API will not 1234 // be included in the string output. The member name will be present, but the 1235 // value will be replaced with "sensitive". 1236 func (s GetLexiconInput) String() string { 1237 return awsutil.Prettify(s) 1238 } 1239 1240 // GoString returns the string representation. 1241 // 1242 // API parameter values that are decorated as "sensitive" in the API will not 1243 // be included in the string output. The member name will be present, but the 1244 // value will be replaced with "sensitive". 1245 func (s GetLexiconInput) GoString() string { 1246 return s.String() 1247 } 1248 1249 // Validate inspects the fields of the type to determine if they are valid. 1250 func (s *GetLexiconInput) Validate() error { 1251 invalidParams := request.ErrInvalidParams{Context: "GetLexiconInput"} 1252 if s.Name == nil { 1253 invalidParams.Add(request.NewErrParamRequired("Name")) 1254 } 1255 if s.Name != nil && len(*s.Name) < 1 { 1256 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1257 } 1258 1259 if invalidParams.Len() > 0 { 1260 return invalidParams 1261 } 1262 return nil 1263 } 1264 1265 // SetName sets the Name field's value. 1266 func (s *GetLexiconInput) SetName(v string) *GetLexiconInput { 1267 s.Name = &v 1268 return s 1269 } 1270 1271 type GetLexiconOutput struct { 1272 _ struct{} `type:"structure"` 1273 1274 // Lexicon object that provides name and the string content of the lexicon. 1275 Lexicon *Lexicon `type:"structure"` 1276 1277 // Metadata of the lexicon, including phonetic alphabetic used, language code, 1278 // lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon 1279 // in bytes. 1280 LexiconAttributes *LexiconAttributes `type:"structure"` 1281 } 1282 1283 // String returns the string representation. 1284 // 1285 // API parameter values that are decorated as "sensitive" in the API will not 1286 // be included in the string output. The member name will be present, but the 1287 // value will be replaced with "sensitive". 1288 func (s GetLexiconOutput) String() string { 1289 return awsutil.Prettify(s) 1290 } 1291 1292 // GoString returns the string representation. 1293 // 1294 // API parameter values that are decorated as "sensitive" in the API will not 1295 // be included in the string output. The member name will be present, but the 1296 // value will be replaced with "sensitive". 1297 func (s GetLexiconOutput) GoString() string { 1298 return s.String() 1299 } 1300 1301 // SetLexicon sets the Lexicon field's value. 1302 func (s *GetLexiconOutput) SetLexicon(v *Lexicon) *GetLexiconOutput { 1303 s.Lexicon = v 1304 return s 1305 } 1306 1307 // SetLexiconAttributes sets the LexiconAttributes field's value. 1308 func (s *GetLexiconOutput) SetLexiconAttributes(v *LexiconAttributes) *GetLexiconOutput { 1309 s.LexiconAttributes = v 1310 return s 1311 } 1312 1313 type GetSpeechSynthesisTaskInput struct { 1314 _ struct{} `type:"structure" nopayload:"true"` 1315 1316 // The Amazon Polly generated identifier for a speech synthesis task. 1317 // 1318 // TaskId is a required field 1319 TaskId *string `location:"uri" locationName:"TaskId" type:"string" required:"true"` 1320 } 1321 1322 // String returns the string representation. 1323 // 1324 // API parameter values that are decorated as "sensitive" in the API will not 1325 // be included in the string output. The member name will be present, but the 1326 // value will be replaced with "sensitive". 1327 func (s GetSpeechSynthesisTaskInput) String() string { 1328 return awsutil.Prettify(s) 1329 } 1330 1331 // GoString returns the string representation. 1332 // 1333 // API parameter values that are decorated as "sensitive" in the API will not 1334 // be included in the string output. The member name will be present, but the 1335 // value will be replaced with "sensitive". 1336 func (s GetSpeechSynthesisTaskInput) GoString() string { 1337 return s.String() 1338 } 1339 1340 // Validate inspects the fields of the type to determine if they are valid. 1341 func (s *GetSpeechSynthesisTaskInput) Validate() error { 1342 invalidParams := request.ErrInvalidParams{Context: "GetSpeechSynthesisTaskInput"} 1343 if s.TaskId == nil { 1344 invalidParams.Add(request.NewErrParamRequired("TaskId")) 1345 } 1346 if s.TaskId != nil && len(*s.TaskId) < 1 { 1347 invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) 1348 } 1349 1350 if invalidParams.Len() > 0 { 1351 return invalidParams 1352 } 1353 return nil 1354 } 1355 1356 // SetTaskId sets the TaskId field's value. 1357 func (s *GetSpeechSynthesisTaskInput) SetTaskId(v string) *GetSpeechSynthesisTaskInput { 1358 s.TaskId = &v 1359 return s 1360 } 1361 1362 type GetSpeechSynthesisTaskOutput struct { 1363 _ struct{} `type:"structure"` 1364 1365 // SynthesisTask object that provides information from the requested task, including 1366 // output format, creation time, task status, and so on. 1367 SynthesisTask *SynthesisTask `type:"structure"` 1368 } 1369 1370 // String returns the string representation. 1371 // 1372 // API parameter values that are decorated as "sensitive" in the API will not 1373 // be included in the string output. The member name will be present, but the 1374 // value will be replaced with "sensitive". 1375 func (s GetSpeechSynthesisTaskOutput) String() string { 1376 return awsutil.Prettify(s) 1377 } 1378 1379 // GoString returns the string representation. 1380 // 1381 // API parameter values that are decorated as "sensitive" in the API will not 1382 // be included in the string output. The member name will be present, but the 1383 // value will be replaced with "sensitive". 1384 func (s GetSpeechSynthesisTaskOutput) GoString() string { 1385 return s.String() 1386 } 1387 1388 // SetSynthesisTask sets the SynthesisTask field's value. 1389 func (s *GetSpeechSynthesisTaskOutput) SetSynthesisTask(v *SynthesisTask) *GetSpeechSynthesisTaskOutput { 1390 s.SynthesisTask = v 1391 return s 1392 } 1393 1394 // Amazon Polly can't find the specified lexicon. Verify that the lexicon's 1395 // name is spelled correctly, and then try again. 1396 type InvalidLexiconException struct { 1397 _ struct{} `type:"structure"` 1398 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1399 1400 Message_ *string `locationName:"message" type:"string"` 1401 } 1402 1403 // String returns the string representation. 1404 // 1405 // API parameter values that are decorated as "sensitive" in the API will not 1406 // be included in the string output. The member name will be present, but the 1407 // value will be replaced with "sensitive". 1408 func (s InvalidLexiconException) String() string { 1409 return awsutil.Prettify(s) 1410 } 1411 1412 // GoString returns the string representation. 1413 // 1414 // API parameter values that are decorated as "sensitive" in the API will not 1415 // be included in the string output. The member name will be present, but the 1416 // value will be replaced with "sensitive". 1417 func (s InvalidLexiconException) GoString() string { 1418 return s.String() 1419 } 1420 1421 func newErrorInvalidLexiconException(v protocol.ResponseMetadata) error { 1422 return &InvalidLexiconException{ 1423 RespMetadata: v, 1424 } 1425 } 1426 1427 // Code returns the exception type name. 1428 func (s *InvalidLexiconException) Code() string { 1429 return "InvalidLexiconException" 1430 } 1431 1432 // Message returns the exception's message. 1433 func (s *InvalidLexiconException) Message() string { 1434 if s.Message_ != nil { 1435 return *s.Message_ 1436 } 1437 return "" 1438 } 1439 1440 // OrigErr always returns nil, satisfies awserr.Error interface. 1441 func (s *InvalidLexiconException) OrigErr() error { 1442 return nil 1443 } 1444 1445 func (s *InvalidLexiconException) Error() string { 1446 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1447 } 1448 1449 // Status code returns the HTTP status code for the request's response error. 1450 func (s *InvalidLexiconException) StatusCode() int { 1451 return s.RespMetadata.StatusCode 1452 } 1453 1454 // RequestID returns the service's response RequestID for request. 1455 func (s *InvalidLexiconException) RequestID() string { 1456 return s.RespMetadata.RequestID 1457 } 1458 1459 // The NextToken is invalid. Verify that it's spelled correctly, and then try 1460 // again. 1461 type InvalidNextTokenException struct { 1462 _ struct{} `type:"structure"` 1463 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1464 1465 Message_ *string `locationName:"message" type:"string"` 1466 } 1467 1468 // String returns the string representation. 1469 // 1470 // API parameter values that are decorated as "sensitive" in the API will not 1471 // be included in the string output. The member name will be present, but the 1472 // value will be replaced with "sensitive". 1473 func (s InvalidNextTokenException) String() string { 1474 return awsutil.Prettify(s) 1475 } 1476 1477 // GoString returns the string representation. 1478 // 1479 // API parameter values that are decorated as "sensitive" in the API will not 1480 // be included in the string output. The member name will be present, but the 1481 // value will be replaced with "sensitive". 1482 func (s InvalidNextTokenException) GoString() string { 1483 return s.String() 1484 } 1485 1486 func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { 1487 return &InvalidNextTokenException{ 1488 RespMetadata: v, 1489 } 1490 } 1491 1492 // Code returns the exception type name. 1493 func (s *InvalidNextTokenException) Code() string { 1494 return "InvalidNextTokenException" 1495 } 1496 1497 // Message returns the exception's message. 1498 func (s *InvalidNextTokenException) Message() string { 1499 if s.Message_ != nil { 1500 return *s.Message_ 1501 } 1502 return "" 1503 } 1504 1505 // OrigErr always returns nil, satisfies awserr.Error interface. 1506 func (s *InvalidNextTokenException) OrigErr() error { 1507 return nil 1508 } 1509 1510 func (s *InvalidNextTokenException) Error() string { 1511 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1512 } 1513 1514 // Status code returns the HTTP status code for the request's response error. 1515 func (s *InvalidNextTokenException) StatusCode() int { 1516 return s.RespMetadata.StatusCode 1517 } 1518 1519 // RequestID returns the service's response RequestID for request. 1520 func (s *InvalidNextTokenException) RequestID() string { 1521 return s.RespMetadata.RequestID 1522 } 1523 1524 // The provided Amazon S3 bucket name is invalid. Please check your input with 1525 // S3 bucket naming requirements and try again. 1526 type InvalidS3BucketException struct { 1527 _ struct{} `type:"structure"` 1528 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1529 1530 Message_ *string `locationName:"message" type:"string"` 1531 } 1532 1533 // String returns the string representation. 1534 // 1535 // API parameter values that are decorated as "sensitive" in the API will not 1536 // be included in the string output. The member name will be present, but the 1537 // value will be replaced with "sensitive". 1538 func (s InvalidS3BucketException) String() string { 1539 return awsutil.Prettify(s) 1540 } 1541 1542 // GoString returns the string representation. 1543 // 1544 // API parameter values that are decorated as "sensitive" in the API will not 1545 // be included in the string output. The member name will be present, but the 1546 // value will be replaced with "sensitive". 1547 func (s InvalidS3BucketException) GoString() string { 1548 return s.String() 1549 } 1550 1551 func newErrorInvalidS3BucketException(v protocol.ResponseMetadata) error { 1552 return &InvalidS3BucketException{ 1553 RespMetadata: v, 1554 } 1555 } 1556 1557 // Code returns the exception type name. 1558 func (s *InvalidS3BucketException) Code() string { 1559 return "InvalidS3BucketException" 1560 } 1561 1562 // Message returns the exception's message. 1563 func (s *InvalidS3BucketException) Message() string { 1564 if s.Message_ != nil { 1565 return *s.Message_ 1566 } 1567 return "" 1568 } 1569 1570 // OrigErr always returns nil, satisfies awserr.Error interface. 1571 func (s *InvalidS3BucketException) OrigErr() error { 1572 return nil 1573 } 1574 1575 func (s *InvalidS3BucketException) Error() string { 1576 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1577 } 1578 1579 // Status code returns the HTTP status code for the request's response error. 1580 func (s *InvalidS3BucketException) StatusCode() int { 1581 return s.RespMetadata.StatusCode 1582 } 1583 1584 // RequestID returns the service's response RequestID for request. 1585 func (s *InvalidS3BucketException) RequestID() string { 1586 return s.RespMetadata.RequestID 1587 } 1588 1589 // The provided Amazon S3 key prefix is invalid. Please provide a valid S3 object 1590 // key name. 1591 type InvalidS3KeyException struct { 1592 _ struct{} `type:"structure"` 1593 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1594 1595 Message_ *string `locationName:"message" type:"string"` 1596 } 1597 1598 // String returns the string representation. 1599 // 1600 // API parameter values that are decorated as "sensitive" in the API will not 1601 // be included in the string output. The member name will be present, but the 1602 // value will be replaced with "sensitive". 1603 func (s InvalidS3KeyException) String() string { 1604 return awsutil.Prettify(s) 1605 } 1606 1607 // GoString returns the string representation. 1608 // 1609 // API parameter values that are decorated as "sensitive" in the API will not 1610 // be included in the string output. The member name will be present, but the 1611 // value will be replaced with "sensitive". 1612 func (s InvalidS3KeyException) GoString() string { 1613 return s.String() 1614 } 1615 1616 func newErrorInvalidS3KeyException(v protocol.ResponseMetadata) error { 1617 return &InvalidS3KeyException{ 1618 RespMetadata: v, 1619 } 1620 } 1621 1622 // Code returns the exception type name. 1623 func (s *InvalidS3KeyException) Code() string { 1624 return "InvalidS3KeyException" 1625 } 1626 1627 // Message returns the exception's message. 1628 func (s *InvalidS3KeyException) Message() string { 1629 if s.Message_ != nil { 1630 return *s.Message_ 1631 } 1632 return "" 1633 } 1634 1635 // OrigErr always returns nil, satisfies awserr.Error interface. 1636 func (s *InvalidS3KeyException) OrigErr() error { 1637 return nil 1638 } 1639 1640 func (s *InvalidS3KeyException) Error() string { 1641 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1642 } 1643 1644 // Status code returns the HTTP status code for the request's response error. 1645 func (s *InvalidS3KeyException) StatusCode() int { 1646 return s.RespMetadata.StatusCode 1647 } 1648 1649 // RequestID returns the service's response RequestID for request. 1650 func (s *InvalidS3KeyException) RequestID() string { 1651 return s.RespMetadata.RequestID 1652 } 1653 1654 // The specified sample rate is not valid. 1655 type InvalidSampleRateException struct { 1656 _ struct{} `type:"structure"` 1657 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1658 1659 Message_ *string `locationName:"message" type:"string"` 1660 } 1661 1662 // String returns the string representation. 1663 // 1664 // API parameter values that are decorated as "sensitive" in the API will not 1665 // be included in the string output. The member name will be present, but the 1666 // value will be replaced with "sensitive". 1667 func (s InvalidSampleRateException) String() string { 1668 return awsutil.Prettify(s) 1669 } 1670 1671 // GoString returns the string representation. 1672 // 1673 // API parameter values that are decorated as "sensitive" in the API will not 1674 // be included in the string output. The member name will be present, but the 1675 // value will be replaced with "sensitive". 1676 func (s InvalidSampleRateException) GoString() string { 1677 return s.String() 1678 } 1679 1680 func newErrorInvalidSampleRateException(v protocol.ResponseMetadata) error { 1681 return &InvalidSampleRateException{ 1682 RespMetadata: v, 1683 } 1684 } 1685 1686 // Code returns the exception type name. 1687 func (s *InvalidSampleRateException) Code() string { 1688 return "InvalidSampleRateException" 1689 } 1690 1691 // Message returns the exception's message. 1692 func (s *InvalidSampleRateException) Message() string { 1693 if s.Message_ != nil { 1694 return *s.Message_ 1695 } 1696 return "" 1697 } 1698 1699 // OrigErr always returns nil, satisfies awserr.Error interface. 1700 func (s *InvalidSampleRateException) OrigErr() error { 1701 return nil 1702 } 1703 1704 func (s *InvalidSampleRateException) Error() string { 1705 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1706 } 1707 1708 // Status code returns the HTTP status code for the request's response error. 1709 func (s *InvalidSampleRateException) StatusCode() int { 1710 return s.RespMetadata.StatusCode 1711 } 1712 1713 // RequestID returns the service's response RequestID for request. 1714 func (s *InvalidSampleRateException) RequestID() string { 1715 return s.RespMetadata.RequestID 1716 } 1717 1718 // The provided SNS topic ARN is invalid. Please provide a valid SNS topic ARN 1719 // and try again. 1720 type InvalidSnsTopicArnException struct { 1721 _ struct{} `type:"structure"` 1722 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1723 1724 Message_ *string `locationName:"message" type:"string"` 1725 } 1726 1727 // String 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 InvalidSnsTopicArnException) String() string { 1733 return awsutil.Prettify(s) 1734 } 1735 1736 // GoString returns the string representation. 1737 // 1738 // API parameter values that are decorated as "sensitive" in the API will not 1739 // be included in the string output. The member name will be present, but the 1740 // value will be replaced with "sensitive". 1741 func (s InvalidSnsTopicArnException) GoString() string { 1742 return s.String() 1743 } 1744 1745 func newErrorInvalidSnsTopicArnException(v protocol.ResponseMetadata) error { 1746 return &InvalidSnsTopicArnException{ 1747 RespMetadata: v, 1748 } 1749 } 1750 1751 // Code returns the exception type name. 1752 func (s *InvalidSnsTopicArnException) Code() string { 1753 return "InvalidSnsTopicArnException" 1754 } 1755 1756 // Message returns the exception's message. 1757 func (s *InvalidSnsTopicArnException) Message() string { 1758 if s.Message_ != nil { 1759 return *s.Message_ 1760 } 1761 return "" 1762 } 1763 1764 // OrigErr always returns nil, satisfies awserr.Error interface. 1765 func (s *InvalidSnsTopicArnException) OrigErr() error { 1766 return nil 1767 } 1768 1769 func (s *InvalidSnsTopicArnException) Error() string { 1770 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1771 } 1772 1773 // Status code returns the HTTP status code for the request's response error. 1774 func (s *InvalidSnsTopicArnException) StatusCode() int { 1775 return s.RespMetadata.StatusCode 1776 } 1777 1778 // RequestID returns the service's response RequestID for request. 1779 func (s *InvalidSnsTopicArnException) RequestID() string { 1780 return s.RespMetadata.RequestID 1781 } 1782 1783 // The SSML you provided is invalid. Verify the SSML syntax, spelling of tags 1784 // and values, and then try again. 1785 type InvalidSsmlException struct { 1786 _ struct{} `type:"structure"` 1787 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1788 1789 Message_ *string `locationName:"message" type:"string"` 1790 } 1791 1792 // String returns the string representation. 1793 // 1794 // API parameter values that are decorated as "sensitive" in the API will not 1795 // be included in the string output. The member name will be present, but the 1796 // value will be replaced with "sensitive". 1797 func (s InvalidSsmlException) String() string { 1798 return awsutil.Prettify(s) 1799 } 1800 1801 // GoString returns the string representation. 1802 // 1803 // API parameter values that are decorated as "sensitive" in the API will not 1804 // be included in the string output. The member name will be present, but the 1805 // value will be replaced with "sensitive". 1806 func (s InvalidSsmlException) GoString() string { 1807 return s.String() 1808 } 1809 1810 func newErrorInvalidSsmlException(v protocol.ResponseMetadata) error { 1811 return &InvalidSsmlException{ 1812 RespMetadata: v, 1813 } 1814 } 1815 1816 // Code returns the exception type name. 1817 func (s *InvalidSsmlException) Code() string { 1818 return "InvalidSsmlException" 1819 } 1820 1821 // Message returns the exception's message. 1822 func (s *InvalidSsmlException) Message() string { 1823 if s.Message_ != nil { 1824 return *s.Message_ 1825 } 1826 return "" 1827 } 1828 1829 // OrigErr always returns nil, satisfies awserr.Error interface. 1830 func (s *InvalidSsmlException) OrigErr() error { 1831 return nil 1832 } 1833 1834 func (s *InvalidSsmlException) Error() string { 1835 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1836 } 1837 1838 // Status code returns the HTTP status code for the request's response error. 1839 func (s *InvalidSsmlException) StatusCode() int { 1840 return s.RespMetadata.StatusCode 1841 } 1842 1843 // RequestID returns the service's response RequestID for request. 1844 func (s *InvalidSsmlException) RequestID() string { 1845 return s.RespMetadata.RequestID 1846 } 1847 1848 // The provided Task ID is not valid. Please provide a valid Task ID and try 1849 // again. 1850 type InvalidTaskIdException struct { 1851 _ struct{} `type:"structure"` 1852 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1853 1854 Message_ *string `locationName:"message" type:"string"` 1855 } 1856 1857 // String returns the string representation. 1858 // 1859 // API parameter values that are decorated as "sensitive" in the API will not 1860 // be included in the string output. The member name will be present, but the 1861 // value will be replaced with "sensitive". 1862 func (s InvalidTaskIdException) String() string { 1863 return awsutil.Prettify(s) 1864 } 1865 1866 // GoString returns the string representation. 1867 // 1868 // API parameter values that are decorated as "sensitive" in the API will not 1869 // be included in the string output. The member name will be present, but the 1870 // value will be replaced with "sensitive". 1871 func (s InvalidTaskIdException) GoString() string { 1872 return s.String() 1873 } 1874 1875 func newErrorInvalidTaskIdException(v protocol.ResponseMetadata) error { 1876 return &InvalidTaskIdException{ 1877 RespMetadata: v, 1878 } 1879 } 1880 1881 // Code returns the exception type name. 1882 func (s *InvalidTaskIdException) Code() string { 1883 return "InvalidTaskIdException" 1884 } 1885 1886 // Message returns the exception's message. 1887 func (s *InvalidTaskIdException) Message() string { 1888 if s.Message_ != nil { 1889 return *s.Message_ 1890 } 1891 return "" 1892 } 1893 1894 // OrigErr always returns nil, satisfies awserr.Error interface. 1895 func (s *InvalidTaskIdException) OrigErr() error { 1896 return nil 1897 } 1898 1899 func (s *InvalidTaskIdException) Error() string { 1900 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1901 } 1902 1903 // Status code returns the HTTP status code for the request's response error. 1904 func (s *InvalidTaskIdException) StatusCode() int { 1905 return s.RespMetadata.StatusCode 1906 } 1907 1908 // RequestID returns the service's response RequestID for request. 1909 func (s *InvalidTaskIdException) RequestID() string { 1910 return s.RespMetadata.RequestID 1911 } 1912 1913 // The language specified is not currently supported by Amazon Polly in this 1914 // capacity. 1915 type LanguageNotSupportedException struct { 1916 _ struct{} `type:"structure"` 1917 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1918 1919 Message_ *string `locationName:"message" type:"string"` 1920 } 1921 1922 // String returns the string representation. 1923 // 1924 // API parameter values that are decorated as "sensitive" in the API will not 1925 // be included in the string output. The member name will be present, but the 1926 // value will be replaced with "sensitive". 1927 func (s LanguageNotSupportedException) String() string { 1928 return awsutil.Prettify(s) 1929 } 1930 1931 // GoString returns the string representation. 1932 // 1933 // API parameter values that are decorated as "sensitive" in the API will not 1934 // be included in the string output. The member name will be present, but the 1935 // value will be replaced with "sensitive". 1936 func (s LanguageNotSupportedException) GoString() string { 1937 return s.String() 1938 } 1939 1940 func newErrorLanguageNotSupportedException(v protocol.ResponseMetadata) error { 1941 return &LanguageNotSupportedException{ 1942 RespMetadata: v, 1943 } 1944 } 1945 1946 // Code returns the exception type name. 1947 func (s *LanguageNotSupportedException) Code() string { 1948 return "LanguageNotSupportedException" 1949 } 1950 1951 // Message returns the exception's message. 1952 func (s *LanguageNotSupportedException) Message() string { 1953 if s.Message_ != nil { 1954 return *s.Message_ 1955 } 1956 return "" 1957 } 1958 1959 // OrigErr always returns nil, satisfies awserr.Error interface. 1960 func (s *LanguageNotSupportedException) OrigErr() error { 1961 return nil 1962 } 1963 1964 func (s *LanguageNotSupportedException) Error() string { 1965 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1966 } 1967 1968 // Status code returns the HTTP status code for the request's response error. 1969 func (s *LanguageNotSupportedException) StatusCode() int { 1970 return s.RespMetadata.StatusCode 1971 } 1972 1973 // RequestID returns the service's response RequestID for request. 1974 func (s *LanguageNotSupportedException) RequestID() string { 1975 return s.RespMetadata.RequestID 1976 } 1977 1978 // Provides lexicon name and lexicon content in string format. For more information, 1979 // see Pronunciation Lexicon Specification (PLS) Version 1.0 (https://www.w3.org/TR/pronunciation-lexicon/). 1980 type Lexicon struct { 1981 _ struct{} `type:"structure"` 1982 1983 // Lexicon content in string format. The content of a lexicon must be in PLS 1984 // format. 1985 // 1986 // Content is a sensitive parameter and its value will be 1987 // replaced with "sensitive" in string returned by Lexicon's 1988 // String and GoString methods. 1989 Content *string `type:"string" sensitive:"true"` 1990 1991 // Name of the lexicon. 1992 Name *string `type:"string"` 1993 } 1994 1995 // String returns the string representation. 1996 // 1997 // API parameter values that are decorated as "sensitive" in the API will not 1998 // be included in the string output. The member name will be present, but the 1999 // value will be replaced with "sensitive". 2000 func (s Lexicon) String() string { 2001 return awsutil.Prettify(s) 2002 } 2003 2004 // GoString returns the string representation. 2005 // 2006 // API parameter values that are decorated as "sensitive" in the API will not 2007 // be included in the string output. The member name will be present, but the 2008 // value will be replaced with "sensitive". 2009 func (s Lexicon) GoString() string { 2010 return s.String() 2011 } 2012 2013 // SetContent sets the Content field's value. 2014 func (s *Lexicon) SetContent(v string) *Lexicon { 2015 s.Content = &v 2016 return s 2017 } 2018 2019 // SetName sets the Name field's value. 2020 func (s *Lexicon) SetName(v string) *Lexicon { 2021 s.Name = &v 2022 return s 2023 } 2024 2025 // Contains metadata describing the lexicon such as the number of lexemes, language 2026 // code, and so on. For more information, see Managing Lexicons (https://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). 2027 type LexiconAttributes struct { 2028 _ struct{} `type:"structure"` 2029 2030 // Phonetic alphabet used in the lexicon. Valid values are ipa and x-sampa. 2031 Alphabet *string `type:"string"` 2032 2033 // Language code that the lexicon applies to. A lexicon with a language code 2034 // such as "en" would be applied to all English languages (en-GB, en-US, en-AUS, 2035 // en-WLS, and so on. 2036 LanguageCode *string `type:"string" enum:"LanguageCode"` 2037 2038 // Date lexicon was last modified (a timestamp value). 2039 LastModified *time.Time `type:"timestamp"` 2040 2041 // Number of lexemes in the lexicon. 2042 LexemesCount *int64 `type:"integer"` 2043 2044 // Amazon Resource Name (ARN) of the lexicon. 2045 LexiconArn *string `type:"string"` 2046 2047 // Total size of the lexicon, in characters. 2048 Size *int64 `type:"integer"` 2049 } 2050 2051 // String returns the string representation. 2052 // 2053 // API parameter values that are decorated as "sensitive" in the API will not 2054 // be included in the string output. The member name will be present, but the 2055 // value will be replaced with "sensitive". 2056 func (s LexiconAttributes) String() string { 2057 return awsutil.Prettify(s) 2058 } 2059 2060 // GoString returns the string representation. 2061 // 2062 // API parameter values that are decorated as "sensitive" in the API will not 2063 // be included in the string output. The member name will be present, but the 2064 // value will be replaced with "sensitive". 2065 func (s LexiconAttributes) GoString() string { 2066 return s.String() 2067 } 2068 2069 // SetAlphabet sets the Alphabet field's value. 2070 func (s *LexiconAttributes) SetAlphabet(v string) *LexiconAttributes { 2071 s.Alphabet = &v 2072 return s 2073 } 2074 2075 // SetLanguageCode sets the LanguageCode field's value. 2076 func (s *LexiconAttributes) SetLanguageCode(v string) *LexiconAttributes { 2077 s.LanguageCode = &v 2078 return s 2079 } 2080 2081 // SetLastModified sets the LastModified field's value. 2082 func (s *LexiconAttributes) SetLastModified(v time.Time) *LexiconAttributes { 2083 s.LastModified = &v 2084 return s 2085 } 2086 2087 // SetLexemesCount sets the LexemesCount field's value. 2088 func (s *LexiconAttributes) SetLexemesCount(v int64) *LexiconAttributes { 2089 s.LexemesCount = &v 2090 return s 2091 } 2092 2093 // SetLexiconArn sets the LexiconArn field's value. 2094 func (s *LexiconAttributes) SetLexiconArn(v string) *LexiconAttributes { 2095 s.LexiconArn = &v 2096 return s 2097 } 2098 2099 // SetSize sets the Size field's value. 2100 func (s *LexiconAttributes) SetSize(v int64) *LexiconAttributes { 2101 s.Size = &v 2102 return s 2103 } 2104 2105 // Describes the content of the lexicon. 2106 type LexiconDescription struct { 2107 _ struct{} `type:"structure"` 2108 2109 // Provides lexicon metadata. 2110 Attributes *LexiconAttributes `type:"structure"` 2111 2112 // Name of the lexicon. 2113 Name *string `type:"string"` 2114 } 2115 2116 // String returns the string representation. 2117 // 2118 // API parameter values that are decorated as "sensitive" in the API will not 2119 // be included in the string output. The member name will be present, but the 2120 // value will be replaced with "sensitive". 2121 func (s LexiconDescription) String() string { 2122 return awsutil.Prettify(s) 2123 } 2124 2125 // GoString returns the string representation. 2126 // 2127 // API parameter values that are decorated as "sensitive" in the API will not 2128 // be included in the string output. The member name will be present, but the 2129 // value will be replaced with "sensitive". 2130 func (s LexiconDescription) GoString() string { 2131 return s.String() 2132 } 2133 2134 // SetAttributes sets the Attributes field's value. 2135 func (s *LexiconDescription) SetAttributes(v *LexiconAttributes) *LexiconDescription { 2136 s.Attributes = v 2137 return s 2138 } 2139 2140 // SetName sets the Name field's value. 2141 func (s *LexiconDescription) SetName(v string) *LexiconDescription { 2142 s.Name = &v 2143 return s 2144 } 2145 2146 // Amazon Polly can't find the specified lexicon. This could be caused by a 2147 // lexicon that is missing, its name is misspelled or specifying a lexicon that 2148 // is in a different region. 2149 // 2150 // Verify that the lexicon exists, is in the region (see ListLexicons) and that 2151 // you spelled its name is spelled correctly. Then try again. 2152 type LexiconNotFoundException struct { 2153 _ struct{} `type:"structure"` 2154 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2155 2156 Message_ *string `locationName:"message" type:"string"` 2157 } 2158 2159 // String returns the string representation. 2160 // 2161 // API parameter values that are decorated as "sensitive" in the API will not 2162 // be included in the string output. The member name will be present, but the 2163 // value will be replaced with "sensitive". 2164 func (s LexiconNotFoundException) String() string { 2165 return awsutil.Prettify(s) 2166 } 2167 2168 // GoString returns the string representation. 2169 // 2170 // API parameter values that are decorated as "sensitive" in the API will not 2171 // be included in the string output. The member name will be present, but the 2172 // value will be replaced with "sensitive". 2173 func (s LexiconNotFoundException) GoString() string { 2174 return s.String() 2175 } 2176 2177 func newErrorLexiconNotFoundException(v protocol.ResponseMetadata) error { 2178 return &LexiconNotFoundException{ 2179 RespMetadata: v, 2180 } 2181 } 2182 2183 // Code returns the exception type name. 2184 func (s *LexiconNotFoundException) Code() string { 2185 return "LexiconNotFoundException" 2186 } 2187 2188 // Message returns the exception's message. 2189 func (s *LexiconNotFoundException) Message() string { 2190 if s.Message_ != nil { 2191 return *s.Message_ 2192 } 2193 return "" 2194 } 2195 2196 // OrigErr always returns nil, satisfies awserr.Error interface. 2197 func (s *LexiconNotFoundException) OrigErr() error { 2198 return nil 2199 } 2200 2201 func (s *LexiconNotFoundException) Error() string { 2202 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2203 } 2204 2205 // Status code returns the HTTP status code for the request's response error. 2206 func (s *LexiconNotFoundException) StatusCode() int { 2207 return s.RespMetadata.StatusCode 2208 } 2209 2210 // RequestID returns the service's response RequestID for request. 2211 func (s *LexiconNotFoundException) RequestID() string { 2212 return s.RespMetadata.RequestID 2213 } 2214 2215 // The maximum size of the specified lexicon would be exceeded by this operation. 2216 type LexiconSizeExceededException struct { 2217 _ struct{} `type:"structure"` 2218 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2219 2220 Message_ *string `locationName:"message" type:"string"` 2221 } 2222 2223 // String returns the string representation. 2224 // 2225 // API parameter values that are decorated as "sensitive" in the API will not 2226 // be included in the string output. The member name will be present, but the 2227 // value will be replaced with "sensitive". 2228 func (s LexiconSizeExceededException) String() string { 2229 return awsutil.Prettify(s) 2230 } 2231 2232 // GoString 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 LexiconSizeExceededException) GoString() string { 2238 return s.String() 2239 } 2240 2241 func newErrorLexiconSizeExceededException(v protocol.ResponseMetadata) error { 2242 return &LexiconSizeExceededException{ 2243 RespMetadata: v, 2244 } 2245 } 2246 2247 // Code returns the exception type name. 2248 func (s *LexiconSizeExceededException) Code() string { 2249 return "LexiconSizeExceededException" 2250 } 2251 2252 // Message returns the exception's message. 2253 func (s *LexiconSizeExceededException) Message() string { 2254 if s.Message_ != nil { 2255 return *s.Message_ 2256 } 2257 return "" 2258 } 2259 2260 // OrigErr always returns nil, satisfies awserr.Error interface. 2261 func (s *LexiconSizeExceededException) OrigErr() error { 2262 return nil 2263 } 2264 2265 func (s *LexiconSizeExceededException) Error() string { 2266 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2267 } 2268 2269 // Status code returns the HTTP status code for the request's response error. 2270 func (s *LexiconSizeExceededException) StatusCode() int { 2271 return s.RespMetadata.StatusCode 2272 } 2273 2274 // RequestID returns the service's response RequestID for request. 2275 func (s *LexiconSizeExceededException) RequestID() string { 2276 return s.RespMetadata.RequestID 2277 } 2278 2279 type ListLexiconsInput struct { 2280 _ struct{} `type:"structure" nopayload:"true"` 2281 2282 // An opaque pagination token returned from previous ListLexicons operation. 2283 // If present, indicates where to continue the list of lexicons. 2284 NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` 2285 } 2286 2287 // String returns the string representation. 2288 // 2289 // API parameter values that are decorated as "sensitive" in the API will not 2290 // be included in the string output. The member name will be present, but the 2291 // value will be replaced with "sensitive". 2292 func (s ListLexiconsInput) String() string { 2293 return awsutil.Prettify(s) 2294 } 2295 2296 // GoString returns the string representation. 2297 // 2298 // API parameter values that are decorated as "sensitive" in the API will not 2299 // be included in the string output. The member name will be present, but the 2300 // value will be replaced with "sensitive". 2301 func (s ListLexiconsInput) GoString() string { 2302 return s.String() 2303 } 2304 2305 // SetNextToken sets the NextToken field's value. 2306 func (s *ListLexiconsInput) SetNextToken(v string) *ListLexiconsInput { 2307 s.NextToken = &v 2308 return s 2309 } 2310 2311 type ListLexiconsOutput struct { 2312 _ struct{} `type:"structure"` 2313 2314 // A list of lexicon names and attributes. 2315 Lexicons []*LexiconDescription `type:"list"` 2316 2317 // The pagination token to use in the next request to continue the listing of 2318 // lexicons. NextToken is returned only if the response is truncated. 2319 NextToken *string `type:"string"` 2320 } 2321 2322 // String returns the string representation. 2323 // 2324 // API parameter values that are decorated as "sensitive" in the API will not 2325 // be included in the string output. The member name will be present, but the 2326 // value will be replaced with "sensitive". 2327 func (s ListLexiconsOutput) String() string { 2328 return awsutil.Prettify(s) 2329 } 2330 2331 // GoString returns the string representation. 2332 // 2333 // API parameter values that are decorated as "sensitive" in the API will not 2334 // be included in the string output. The member name will be present, but the 2335 // value will be replaced with "sensitive". 2336 func (s ListLexiconsOutput) GoString() string { 2337 return s.String() 2338 } 2339 2340 // SetLexicons sets the Lexicons field's value. 2341 func (s *ListLexiconsOutput) SetLexicons(v []*LexiconDescription) *ListLexiconsOutput { 2342 s.Lexicons = v 2343 return s 2344 } 2345 2346 // SetNextToken sets the NextToken field's value. 2347 func (s *ListLexiconsOutput) SetNextToken(v string) *ListLexiconsOutput { 2348 s.NextToken = &v 2349 return s 2350 } 2351 2352 type ListSpeechSynthesisTasksInput struct { 2353 _ struct{} `type:"structure" nopayload:"true"` 2354 2355 // Maximum number of speech synthesis tasks returned in a List operation. 2356 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 2357 2358 // The pagination token to use in the next request to continue the listing of 2359 // speech synthesis tasks. 2360 NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` 2361 2362 // Status of the speech synthesis tasks returned in a List operation 2363 Status *string `location:"querystring" locationName:"Status" type:"string" enum:"TaskStatus"` 2364 } 2365 2366 // String returns the string representation. 2367 // 2368 // API parameter values that are decorated as "sensitive" in the API will not 2369 // be included in the string output. The member name will be present, but the 2370 // value will be replaced with "sensitive". 2371 func (s ListSpeechSynthesisTasksInput) String() string { 2372 return awsutil.Prettify(s) 2373 } 2374 2375 // GoString returns the string representation. 2376 // 2377 // API parameter values that are decorated as "sensitive" in the API will not 2378 // be included in the string output. The member name will be present, but the 2379 // value will be replaced with "sensitive". 2380 func (s ListSpeechSynthesisTasksInput) GoString() string { 2381 return s.String() 2382 } 2383 2384 // Validate inspects the fields of the type to determine if they are valid. 2385 func (s *ListSpeechSynthesisTasksInput) Validate() error { 2386 invalidParams := request.ErrInvalidParams{Context: "ListSpeechSynthesisTasksInput"} 2387 if s.MaxResults != nil && *s.MaxResults < 1 { 2388 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2389 } 2390 2391 if invalidParams.Len() > 0 { 2392 return invalidParams 2393 } 2394 return nil 2395 } 2396 2397 // SetMaxResults sets the MaxResults field's value. 2398 func (s *ListSpeechSynthesisTasksInput) SetMaxResults(v int64) *ListSpeechSynthesisTasksInput { 2399 s.MaxResults = &v 2400 return s 2401 } 2402 2403 // SetNextToken sets the NextToken field's value. 2404 func (s *ListSpeechSynthesisTasksInput) SetNextToken(v string) *ListSpeechSynthesisTasksInput { 2405 s.NextToken = &v 2406 return s 2407 } 2408 2409 // SetStatus sets the Status field's value. 2410 func (s *ListSpeechSynthesisTasksInput) SetStatus(v string) *ListSpeechSynthesisTasksInput { 2411 s.Status = &v 2412 return s 2413 } 2414 2415 type ListSpeechSynthesisTasksOutput struct { 2416 _ struct{} `type:"structure"` 2417 2418 // An opaque pagination token returned from the previous List operation in this 2419 // request. If present, this indicates where to continue the listing. 2420 NextToken *string `type:"string"` 2421 2422 // List of SynthesisTask objects that provides information from the specified 2423 // task in the list request, including output format, creation time, task status, 2424 // and so on. 2425 SynthesisTasks []*SynthesisTask `type:"list"` 2426 } 2427 2428 // String returns the string representation. 2429 // 2430 // API parameter values that are decorated as "sensitive" in the API will not 2431 // be included in the string output. The member name will be present, but the 2432 // value will be replaced with "sensitive". 2433 func (s ListSpeechSynthesisTasksOutput) String() string { 2434 return awsutil.Prettify(s) 2435 } 2436 2437 // GoString returns the string representation. 2438 // 2439 // API parameter values that are decorated as "sensitive" in the API will not 2440 // be included in the string output. The member name will be present, but the 2441 // value will be replaced with "sensitive". 2442 func (s ListSpeechSynthesisTasksOutput) GoString() string { 2443 return s.String() 2444 } 2445 2446 // SetNextToken sets the NextToken field's value. 2447 func (s *ListSpeechSynthesisTasksOutput) SetNextToken(v string) *ListSpeechSynthesisTasksOutput { 2448 s.NextToken = &v 2449 return s 2450 } 2451 2452 // SetSynthesisTasks sets the SynthesisTasks field's value. 2453 func (s *ListSpeechSynthesisTasksOutput) SetSynthesisTasks(v []*SynthesisTask) *ListSpeechSynthesisTasksOutput { 2454 s.SynthesisTasks = v 2455 return s 2456 } 2457 2458 // Speech marks are not supported for the OutputFormat selected. Speech marks 2459 // are only available for content in json format. 2460 type MarksNotSupportedForFormatException struct { 2461 _ struct{} `type:"structure"` 2462 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2463 2464 Message_ *string `locationName:"message" type:"string"` 2465 } 2466 2467 // String returns the string representation. 2468 // 2469 // API parameter values that are decorated as "sensitive" in the API will not 2470 // be included in the string output. The member name will be present, but the 2471 // value will be replaced with "sensitive". 2472 func (s MarksNotSupportedForFormatException) String() string { 2473 return awsutil.Prettify(s) 2474 } 2475 2476 // GoString returns the string representation. 2477 // 2478 // API parameter values that are decorated as "sensitive" in the API will not 2479 // be included in the string output. The member name will be present, but the 2480 // value will be replaced with "sensitive". 2481 func (s MarksNotSupportedForFormatException) GoString() string { 2482 return s.String() 2483 } 2484 2485 func newErrorMarksNotSupportedForFormatException(v protocol.ResponseMetadata) error { 2486 return &MarksNotSupportedForFormatException{ 2487 RespMetadata: v, 2488 } 2489 } 2490 2491 // Code returns the exception type name. 2492 func (s *MarksNotSupportedForFormatException) Code() string { 2493 return "MarksNotSupportedForFormatException" 2494 } 2495 2496 // Message returns the exception's message. 2497 func (s *MarksNotSupportedForFormatException) Message() string { 2498 if s.Message_ != nil { 2499 return *s.Message_ 2500 } 2501 return "" 2502 } 2503 2504 // OrigErr always returns nil, satisfies awserr.Error interface. 2505 func (s *MarksNotSupportedForFormatException) OrigErr() error { 2506 return nil 2507 } 2508 2509 func (s *MarksNotSupportedForFormatException) Error() string { 2510 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2511 } 2512 2513 // Status code returns the HTTP status code for the request's response error. 2514 func (s *MarksNotSupportedForFormatException) StatusCode() int { 2515 return s.RespMetadata.StatusCode 2516 } 2517 2518 // RequestID returns the service's response RequestID for request. 2519 func (s *MarksNotSupportedForFormatException) RequestID() string { 2520 return s.RespMetadata.RequestID 2521 } 2522 2523 // The maximum size of the lexeme would be exceeded by this operation. 2524 type MaxLexemeLengthExceededException struct { 2525 _ struct{} `type:"structure"` 2526 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2527 2528 Message_ *string `locationName:"message" type:"string"` 2529 } 2530 2531 // String returns the string representation. 2532 // 2533 // API parameter values that are decorated as "sensitive" in the API will not 2534 // be included in the string output. The member name will be present, but the 2535 // value will be replaced with "sensitive". 2536 func (s MaxLexemeLengthExceededException) String() string { 2537 return awsutil.Prettify(s) 2538 } 2539 2540 // GoString returns the string representation. 2541 // 2542 // API parameter values that are decorated as "sensitive" in the API will not 2543 // be included in the string output. The member name will be present, but the 2544 // value will be replaced with "sensitive". 2545 func (s MaxLexemeLengthExceededException) GoString() string { 2546 return s.String() 2547 } 2548 2549 func newErrorMaxLexemeLengthExceededException(v protocol.ResponseMetadata) error { 2550 return &MaxLexemeLengthExceededException{ 2551 RespMetadata: v, 2552 } 2553 } 2554 2555 // Code returns the exception type name. 2556 func (s *MaxLexemeLengthExceededException) Code() string { 2557 return "MaxLexemeLengthExceededException" 2558 } 2559 2560 // Message returns the exception's message. 2561 func (s *MaxLexemeLengthExceededException) Message() string { 2562 if s.Message_ != nil { 2563 return *s.Message_ 2564 } 2565 return "" 2566 } 2567 2568 // OrigErr always returns nil, satisfies awserr.Error interface. 2569 func (s *MaxLexemeLengthExceededException) OrigErr() error { 2570 return nil 2571 } 2572 2573 func (s *MaxLexemeLengthExceededException) Error() string { 2574 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2575 } 2576 2577 // Status code returns the HTTP status code for the request's response error. 2578 func (s *MaxLexemeLengthExceededException) StatusCode() int { 2579 return s.RespMetadata.StatusCode 2580 } 2581 2582 // RequestID returns the service's response RequestID for request. 2583 func (s *MaxLexemeLengthExceededException) RequestID() string { 2584 return s.RespMetadata.RequestID 2585 } 2586 2587 // The maximum number of lexicons would be exceeded by this operation. 2588 type MaxLexiconsNumberExceededException struct { 2589 _ struct{} `type:"structure"` 2590 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2591 2592 Message_ *string `locationName:"message" type:"string"` 2593 } 2594 2595 // String returns the string representation. 2596 // 2597 // API parameter values that are decorated as "sensitive" in the API will not 2598 // be included in the string output. The member name will be present, but the 2599 // value will be replaced with "sensitive". 2600 func (s MaxLexiconsNumberExceededException) String() string { 2601 return awsutil.Prettify(s) 2602 } 2603 2604 // GoString returns the string representation. 2605 // 2606 // API parameter values that are decorated as "sensitive" in the API will not 2607 // be included in the string output. The member name will be present, but the 2608 // value will be replaced with "sensitive". 2609 func (s MaxLexiconsNumberExceededException) GoString() string { 2610 return s.String() 2611 } 2612 2613 func newErrorMaxLexiconsNumberExceededException(v protocol.ResponseMetadata) error { 2614 return &MaxLexiconsNumberExceededException{ 2615 RespMetadata: v, 2616 } 2617 } 2618 2619 // Code returns the exception type name. 2620 func (s *MaxLexiconsNumberExceededException) Code() string { 2621 return "MaxLexiconsNumberExceededException" 2622 } 2623 2624 // Message returns the exception's message. 2625 func (s *MaxLexiconsNumberExceededException) Message() string { 2626 if s.Message_ != nil { 2627 return *s.Message_ 2628 } 2629 return "" 2630 } 2631 2632 // OrigErr always returns nil, satisfies awserr.Error interface. 2633 func (s *MaxLexiconsNumberExceededException) OrigErr() error { 2634 return nil 2635 } 2636 2637 func (s *MaxLexiconsNumberExceededException) Error() string { 2638 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2639 } 2640 2641 // Status code returns the HTTP status code for the request's response error. 2642 func (s *MaxLexiconsNumberExceededException) StatusCode() int { 2643 return s.RespMetadata.StatusCode 2644 } 2645 2646 // RequestID returns the service's response RequestID for request. 2647 func (s *MaxLexiconsNumberExceededException) RequestID() string { 2648 return s.RespMetadata.RequestID 2649 } 2650 2651 type PutLexiconInput struct { 2652 _ struct{} `type:"structure"` 2653 2654 // Content of the PLS lexicon as string data. 2655 // 2656 // Content is a sensitive parameter and its value will be 2657 // replaced with "sensitive" in string returned by PutLexiconInput's 2658 // String and GoString methods. 2659 // 2660 // Content is a required field 2661 Content *string `type:"string" required:"true" sensitive:"true"` 2662 2663 // Name of the lexicon. The name must follow the regular express format [0-9A-Za-z]{1,20}. 2664 // That is, the name is a case-sensitive alphanumeric string up to 20 characters 2665 // long. 2666 // 2667 // Name is a required field 2668 Name *string `location:"uri" locationName:"LexiconName" type:"string" required:"true"` 2669 } 2670 2671 // String returns the string representation. 2672 // 2673 // API parameter values that are decorated as "sensitive" in the API will not 2674 // be included in the string output. The member name will be present, but the 2675 // value will be replaced with "sensitive". 2676 func (s PutLexiconInput) String() string { 2677 return awsutil.Prettify(s) 2678 } 2679 2680 // GoString returns the string representation. 2681 // 2682 // API parameter values that are decorated as "sensitive" in the API will not 2683 // be included in the string output. The member name will be present, but the 2684 // value will be replaced with "sensitive". 2685 func (s PutLexiconInput) GoString() string { 2686 return s.String() 2687 } 2688 2689 // Validate inspects the fields of the type to determine if they are valid. 2690 func (s *PutLexiconInput) Validate() error { 2691 invalidParams := request.ErrInvalidParams{Context: "PutLexiconInput"} 2692 if s.Content == nil { 2693 invalidParams.Add(request.NewErrParamRequired("Content")) 2694 } 2695 if s.Name == nil { 2696 invalidParams.Add(request.NewErrParamRequired("Name")) 2697 } 2698 if s.Name != nil && len(*s.Name) < 1 { 2699 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2700 } 2701 2702 if invalidParams.Len() > 0 { 2703 return invalidParams 2704 } 2705 return nil 2706 } 2707 2708 // SetContent sets the Content field's value. 2709 func (s *PutLexiconInput) SetContent(v string) *PutLexiconInput { 2710 s.Content = &v 2711 return s 2712 } 2713 2714 // SetName sets the Name field's value. 2715 func (s *PutLexiconInput) SetName(v string) *PutLexiconInput { 2716 s.Name = &v 2717 return s 2718 } 2719 2720 type PutLexiconOutput struct { 2721 _ struct{} `type:"structure" nopayload:"true"` 2722 } 2723 2724 // String returns the string representation. 2725 // 2726 // API parameter values that are decorated as "sensitive" in the API will not 2727 // be included in the string output. The member name will be present, but the 2728 // value will be replaced with "sensitive". 2729 func (s PutLexiconOutput) String() string { 2730 return awsutil.Prettify(s) 2731 } 2732 2733 // GoString returns the string representation. 2734 // 2735 // API parameter values that are decorated as "sensitive" in the API will not 2736 // be included in the string output. The member name will be present, but the 2737 // value will be replaced with "sensitive". 2738 func (s PutLexiconOutput) GoString() string { 2739 return s.String() 2740 } 2741 2742 // An unknown condition has caused a service failure. 2743 type ServiceFailureException struct { 2744 _ struct{} `type:"structure"` 2745 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2746 2747 Message_ *string `locationName:"message" type:"string"` 2748 } 2749 2750 // String returns the string representation. 2751 // 2752 // API parameter values that are decorated as "sensitive" in the API will not 2753 // be included in the string output. The member name will be present, but the 2754 // value will be replaced with "sensitive". 2755 func (s ServiceFailureException) String() string { 2756 return awsutil.Prettify(s) 2757 } 2758 2759 // GoString returns the string representation. 2760 // 2761 // API parameter values that are decorated as "sensitive" in the API will not 2762 // be included in the string output. The member name will be present, but the 2763 // value will be replaced with "sensitive". 2764 func (s ServiceFailureException) GoString() string { 2765 return s.String() 2766 } 2767 2768 func newErrorServiceFailureException(v protocol.ResponseMetadata) error { 2769 return &ServiceFailureException{ 2770 RespMetadata: v, 2771 } 2772 } 2773 2774 // Code returns the exception type name. 2775 func (s *ServiceFailureException) Code() string { 2776 return "ServiceFailureException" 2777 } 2778 2779 // Message returns the exception's message. 2780 func (s *ServiceFailureException) Message() string { 2781 if s.Message_ != nil { 2782 return *s.Message_ 2783 } 2784 return "" 2785 } 2786 2787 // OrigErr always returns nil, satisfies awserr.Error interface. 2788 func (s *ServiceFailureException) OrigErr() error { 2789 return nil 2790 } 2791 2792 func (s *ServiceFailureException) Error() string { 2793 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2794 } 2795 2796 // Status code returns the HTTP status code for the request's response error. 2797 func (s *ServiceFailureException) StatusCode() int { 2798 return s.RespMetadata.StatusCode 2799 } 2800 2801 // RequestID returns the service's response RequestID for request. 2802 func (s *ServiceFailureException) RequestID() string { 2803 return s.RespMetadata.RequestID 2804 } 2805 2806 // SSML speech marks are not supported for plain text-type input. 2807 type SsmlMarksNotSupportedForTextTypeException struct { 2808 _ struct{} `type:"structure"` 2809 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2810 2811 Message_ *string `locationName:"message" type:"string"` 2812 } 2813 2814 // String returns the string representation. 2815 // 2816 // API parameter values that are decorated as "sensitive" in the API will not 2817 // be included in the string output. The member name will be present, but the 2818 // value will be replaced with "sensitive". 2819 func (s SsmlMarksNotSupportedForTextTypeException) String() string { 2820 return awsutil.Prettify(s) 2821 } 2822 2823 // GoString returns the string representation. 2824 // 2825 // API parameter values that are decorated as "sensitive" in the API will not 2826 // be included in the string output. The member name will be present, but the 2827 // value will be replaced with "sensitive". 2828 func (s SsmlMarksNotSupportedForTextTypeException) GoString() string { 2829 return s.String() 2830 } 2831 2832 func newErrorSsmlMarksNotSupportedForTextTypeException(v protocol.ResponseMetadata) error { 2833 return &SsmlMarksNotSupportedForTextTypeException{ 2834 RespMetadata: v, 2835 } 2836 } 2837 2838 // Code returns the exception type name. 2839 func (s *SsmlMarksNotSupportedForTextTypeException) Code() string { 2840 return "SsmlMarksNotSupportedForTextTypeException" 2841 } 2842 2843 // Message returns the exception's message. 2844 func (s *SsmlMarksNotSupportedForTextTypeException) Message() string { 2845 if s.Message_ != nil { 2846 return *s.Message_ 2847 } 2848 return "" 2849 } 2850 2851 // OrigErr always returns nil, satisfies awserr.Error interface. 2852 func (s *SsmlMarksNotSupportedForTextTypeException) OrigErr() error { 2853 return nil 2854 } 2855 2856 func (s *SsmlMarksNotSupportedForTextTypeException) Error() string { 2857 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2858 } 2859 2860 // Status code returns the HTTP status code for the request's response error. 2861 func (s *SsmlMarksNotSupportedForTextTypeException) StatusCode() int { 2862 return s.RespMetadata.StatusCode 2863 } 2864 2865 // RequestID returns the service's response RequestID for request. 2866 func (s *SsmlMarksNotSupportedForTextTypeException) RequestID() string { 2867 return s.RespMetadata.RequestID 2868 } 2869 2870 type StartSpeechSynthesisTaskInput struct { 2871 _ struct{} `type:"structure"` 2872 2873 // Specifies the engine (standard or neural) for Amazon Polly to use when processing 2874 // input text for speech synthesis. Using a voice that is not supported for 2875 // the engine selected will result in an error. 2876 Engine *string `type:"string" enum:"Engine"` 2877 2878 // Optional language code for the Speech Synthesis request. This is only necessary 2879 // if using a bilingual voice, such as Aditi, which can be used for either Indian 2880 // English (en-IN) or Hindi (hi-IN). 2881 // 2882 // If a bilingual voice is used and no language code is specified, Amazon Polly 2883 // uses the default language of the bilingual voice. The default language for 2884 // any voice is the one returned by the DescribeVoices (https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) 2885 // operation for the LanguageCode parameter. For example, if no language code 2886 // is specified, Aditi will use Indian English rather than Hindi. 2887 LanguageCode *string `type:"string" enum:"LanguageCode"` 2888 2889 // List of one or more pronunciation lexicon names you want the service to apply 2890 // during synthesis. Lexicons are applied only if the language of the lexicon 2891 // is the same as the language of the voice. 2892 LexiconNames []*string `type:"list"` 2893 2894 // The format in which the returned output will be encoded. For audio stream, 2895 // this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. 2896 // 2897 // OutputFormat is a required field 2898 OutputFormat *string `type:"string" required:"true" enum:"OutputFormat"` 2899 2900 // Amazon S3 bucket name to which the output file will be saved. 2901 // 2902 // OutputS3BucketName is a required field 2903 OutputS3BucketName *string `type:"string" required:"true"` 2904 2905 // The Amazon S3 key prefix for the output speech file. 2906 OutputS3KeyPrefix *string `type:"string"` 2907 2908 // The audio frequency specified in Hz. 2909 // 2910 // The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and 2911 // "24000". The default value for standard voices is "22050". The default value 2912 // for neural voices is "24000". 2913 // 2914 // Valid values for pcm are "8000" and "16000" The default value is "16000". 2915 SampleRate *string `type:"string"` 2916 2917 // ARN for the SNS topic optionally used for providing status notification for 2918 // a speech synthesis task. 2919 SnsTopicArn *string `type:"string"` 2920 2921 // The type of speech marks returned for the input text. 2922 SpeechMarkTypes []*string `type:"list"` 2923 2924 // The input text to synthesize. If you specify ssml as the TextType, follow 2925 // the SSML format for the input text. 2926 // 2927 // Text is a required field 2928 Text *string `type:"string" required:"true"` 2929 2930 // Specifies whether the input text is plain text or SSML. The default value 2931 // is plain text. 2932 TextType *string `type:"string" enum:"TextType"` 2933 2934 // Voice ID to use for the synthesis. 2935 // 2936 // VoiceId is a required field 2937 VoiceId *string `type:"string" required:"true" enum:"VoiceId"` 2938 } 2939 2940 // String returns the string representation. 2941 // 2942 // API parameter values that are decorated as "sensitive" in the API will not 2943 // be included in the string output. The member name will be present, but the 2944 // value will be replaced with "sensitive". 2945 func (s StartSpeechSynthesisTaskInput) String() string { 2946 return awsutil.Prettify(s) 2947 } 2948 2949 // GoString returns the string representation. 2950 // 2951 // API parameter values that are decorated as "sensitive" in the API will not 2952 // be included in the string output. The member name will be present, but the 2953 // value will be replaced with "sensitive". 2954 func (s StartSpeechSynthesisTaskInput) GoString() string { 2955 return s.String() 2956 } 2957 2958 // Validate inspects the fields of the type to determine if they are valid. 2959 func (s *StartSpeechSynthesisTaskInput) Validate() error { 2960 invalidParams := request.ErrInvalidParams{Context: "StartSpeechSynthesisTaskInput"} 2961 if s.OutputFormat == nil { 2962 invalidParams.Add(request.NewErrParamRequired("OutputFormat")) 2963 } 2964 if s.OutputS3BucketName == nil { 2965 invalidParams.Add(request.NewErrParamRequired("OutputS3BucketName")) 2966 } 2967 if s.Text == nil { 2968 invalidParams.Add(request.NewErrParamRequired("Text")) 2969 } 2970 if s.VoiceId == nil { 2971 invalidParams.Add(request.NewErrParamRequired("VoiceId")) 2972 } 2973 2974 if invalidParams.Len() > 0 { 2975 return invalidParams 2976 } 2977 return nil 2978 } 2979 2980 // SetEngine sets the Engine field's value. 2981 func (s *StartSpeechSynthesisTaskInput) SetEngine(v string) *StartSpeechSynthesisTaskInput { 2982 s.Engine = &v 2983 return s 2984 } 2985 2986 // SetLanguageCode sets the LanguageCode field's value. 2987 func (s *StartSpeechSynthesisTaskInput) SetLanguageCode(v string) *StartSpeechSynthesisTaskInput { 2988 s.LanguageCode = &v 2989 return s 2990 } 2991 2992 // SetLexiconNames sets the LexiconNames field's value. 2993 func (s *StartSpeechSynthesisTaskInput) SetLexiconNames(v []*string) *StartSpeechSynthesisTaskInput { 2994 s.LexiconNames = v 2995 return s 2996 } 2997 2998 // SetOutputFormat sets the OutputFormat field's value. 2999 func (s *StartSpeechSynthesisTaskInput) SetOutputFormat(v string) *StartSpeechSynthesisTaskInput { 3000 s.OutputFormat = &v 3001 return s 3002 } 3003 3004 // SetOutputS3BucketName sets the OutputS3BucketName field's value. 3005 func (s *StartSpeechSynthesisTaskInput) SetOutputS3BucketName(v string) *StartSpeechSynthesisTaskInput { 3006 s.OutputS3BucketName = &v 3007 return s 3008 } 3009 3010 // SetOutputS3KeyPrefix sets the OutputS3KeyPrefix field's value. 3011 func (s *StartSpeechSynthesisTaskInput) SetOutputS3KeyPrefix(v string) *StartSpeechSynthesisTaskInput { 3012 s.OutputS3KeyPrefix = &v 3013 return s 3014 } 3015 3016 // SetSampleRate sets the SampleRate field's value. 3017 func (s *StartSpeechSynthesisTaskInput) SetSampleRate(v string) *StartSpeechSynthesisTaskInput { 3018 s.SampleRate = &v 3019 return s 3020 } 3021 3022 // SetSnsTopicArn sets the SnsTopicArn field's value. 3023 func (s *StartSpeechSynthesisTaskInput) SetSnsTopicArn(v string) *StartSpeechSynthesisTaskInput { 3024 s.SnsTopicArn = &v 3025 return s 3026 } 3027 3028 // SetSpeechMarkTypes sets the SpeechMarkTypes field's value. 3029 func (s *StartSpeechSynthesisTaskInput) SetSpeechMarkTypes(v []*string) *StartSpeechSynthesisTaskInput { 3030 s.SpeechMarkTypes = v 3031 return s 3032 } 3033 3034 // SetText sets the Text field's value. 3035 func (s *StartSpeechSynthesisTaskInput) SetText(v string) *StartSpeechSynthesisTaskInput { 3036 s.Text = &v 3037 return s 3038 } 3039 3040 // SetTextType sets the TextType field's value. 3041 func (s *StartSpeechSynthesisTaskInput) SetTextType(v string) *StartSpeechSynthesisTaskInput { 3042 s.TextType = &v 3043 return s 3044 } 3045 3046 // SetVoiceId sets the VoiceId field's value. 3047 func (s *StartSpeechSynthesisTaskInput) SetVoiceId(v string) *StartSpeechSynthesisTaskInput { 3048 s.VoiceId = &v 3049 return s 3050 } 3051 3052 type StartSpeechSynthesisTaskOutput struct { 3053 _ struct{} `type:"structure"` 3054 3055 // SynthesisTask object that provides information and attributes about a newly 3056 // submitted speech synthesis task. 3057 SynthesisTask *SynthesisTask `type:"structure"` 3058 } 3059 3060 // String returns the string representation. 3061 // 3062 // API parameter values that are decorated as "sensitive" in the API will not 3063 // be included in the string output. The member name will be present, but the 3064 // value will be replaced with "sensitive". 3065 func (s StartSpeechSynthesisTaskOutput) String() string { 3066 return awsutil.Prettify(s) 3067 } 3068 3069 // GoString returns the string representation. 3070 // 3071 // API parameter values that are decorated as "sensitive" in the API will not 3072 // be included in the string output. The member name will be present, but the 3073 // value will be replaced with "sensitive". 3074 func (s StartSpeechSynthesisTaskOutput) GoString() string { 3075 return s.String() 3076 } 3077 3078 // SetSynthesisTask sets the SynthesisTask field's value. 3079 func (s *StartSpeechSynthesisTaskOutput) SetSynthesisTask(v *SynthesisTask) *StartSpeechSynthesisTaskOutput { 3080 s.SynthesisTask = v 3081 return s 3082 } 3083 3084 // SynthesisTask object that provides information about a speech synthesis task. 3085 type SynthesisTask struct { 3086 _ struct{} `type:"structure"` 3087 3088 // Timestamp for the time the synthesis task was started. 3089 CreationTime *time.Time `type:"timestamp"` 3090 3091 // Specifies the engine (standard or neural) for Amazon Polly to use when processing 3092 // input text for speech synthesis. Using a voice that is not supported for 3093 // the engine selected will result in an error. 3094 Engine *string `type:"string" enum:"Engine"` 3095 3096 // Optional language code for a synthesis task. This is only necessary if using 3097 // a bilingual voice, such as Aditi, which can be used for either Indian English 3098 // (en-IN) or Hindi (hi-IN). 3099 // 3100 // If a bilingual voice is used and no language code is specified, Amazon Polly 3101 // uses the default language of the bilingual voice. The default language for 3102 // any voice is the one returned by the DescribeVoices (https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) 3103 // operation for the LanguageCode parameter. For example, if no language code 3104 // is specified, Aditi will use Indian English rather than Hindi. 3105 LanguageCode *string `type:"string" enum:"LanguageCode"` 3106 3107 // List of one or more pronunciation lexicon names you want the service to apply 3108 // during synthesis. Lexicons are applied only if the language of the lexicon 3109 // is the same as the language of the voice. 3110 LexiconNames []*string `type:"list"` 3111 3112 // The format in which the returned output will be encoded. For audio stream, 3113 // this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. 3114 OutputFormat *string `type:"string" enum:"OutputFormat"` 3115 3116 // Pathway for the output speech file. 3117 OutputUri *string `type:"string"` 3118 3119 // Number of billable characters synthesized. 3120 RequestCharacters *int64 `type:"integer"` 3121 3122 // The audio frequency specified in Hz. 3123 // 3124 // The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and 3125 // "24000". The default value for standard voices is "22050". The default value 3126 // for neural voices is "24000". 3127 // 3128 // Valid values for pcm are "8000" and "16000" The default value is "16000". 3129 SampleRate *string `type:"string"` 3130 3131 // ARN for the SNS topic optionally used for providing status notification for 3132 // a speech synthesis task. 3133 SnsTopicArn *string `type:"string"` 3134 3135 // The type of speech marks returned for the input text. 3136 SpeechMarkTypes []*string `type:"list"` 3137 3138 // The Amazon Polly generated identifier for a speech synthesis task. 3139 TaskId *string `type:"string"` 3140 3141 // Current status of the individual speech synthesis task. 3142 TaskStatus *string `type:"string" enum:"TaskStatus"` 3143 3144 // Reason for the current status of a specific speech synthesis task, including 3145 // errors if the task has failed. 3146 TaskStatusReason *string `type:"string"` 3147 3148 // Specifies whether the input text is plain text or SSML. The default value 3149 // is plain text. 3150 TextType *string `type:"string" enum:"TextType"` 3151 3152 // Voice ID to use for the synthesis. 3153 VoiceId *string `type:"string" enum:"VoiceId"` 3154 } 3155 3156 // String returns the string representation. 3157 // 3158 // API parameter values that are decorated as "sensitive" in the API will not 3159 // be included in the string output. The member name will be present, but the 3160 // value will be replaced with "sensitive". 3161 func (s SynthesisTask) String() string { 3162 return awsutil.Prettify(s) 3163 } 3164 3165 // GoString returns the string representation. 3166 // 3167 // API parameter values that are decorated as "sensitive" in the API will not 3168 // be included in the string output. The member name will be present, but the 3169 // value will be replaced with "sensitive". 3170 func (s SynthesisTask) GoString() string { 3171 return s.String() 3172 } 3173 3174 // SetCreationTime sets the CreationTime field's value. 3175 func (s *SynthesisTask) SetCreationTime(v time.Time) *SynthesisTask { 3176 s.CreationTime = &v 3177 return s 3178 } 3179 3180 // SetEngine sets the Engine field's value. 3181 func (s *SynthesisTask) SetEngine(v string) *SynthesisTask { 3182 s.Engine = &v 3183 return s 3184 } 3185 3186 // SetLanguageCode sets the LanguageCode field's value. 3187 func (s *SynthesisTask) SetLanguageCode(v string) *SynthesisTask { 3188 s.LanguageCode = &v 3189 return s 3190 } 3191 3192 // SetLexiconNames sets the LexiconNames field's value. 3193 func (s *SynthesisTask) SetLexiconNames(v []*string) *SynthesisTask { 3194 s.LexiconNames = v 3195 return s 3196 } 3197 3198 // SetOutputFormat sets the OutputFormat field's value. 3199 func (s *SynthesisTask) SetOutputFormat(v string) *SynthesisTask { 3200 s.OutputFormat = &v 3201 return s 3202 } 3203 3204 // SetOutputUri sets the OutputUri field's value. 3205 func (s *SynthesisTask) SetOutputUri(v string) *SynthesisTask { 3206 s.OutputUri = &v 3207 return s 3208 } 3209 3210 // SetRequestCharacters sets the RequestCharacters field's value. 3211 func (s *SynthesisTask) SetRequestCharacters(v int64) *SynthesisTask { 3212 s.RequestCharacters = &v 3213 return s 3214 } 3215 3216 // SetSampleRate sets the SampleRate field's value. 3217 func (s *SynthesisTask) SetSampleRate(v string) *SynthesisTask { 3218 s.SampleRate = &v 3219 return s 3220 } 3221 3222 // SetSnsTopicArn sets the SnsTopicArn field's value. 3223 func (s *SynthesisTask) SetSnsTopicArn(v string) *SynthesisTask { 3224 s.SnsTopicArn = &v 3225 return s 3226 } 3227 3228 // SetSpeechMarkTypes sets the SpeechMarkTypes field's value. 3229 func (s *SynthesisTask) SetSpeechMarkTypes(v []*string) *SynthesisTask { 3230 s.SpeechMarkTypes = v 3231 return s 3232 } 3233 3234 // SetTaskId sets the TaskId field's value. 3235 func (s *SynthesisTask) SetTaskId(v string) *SynthesisTask { 3236 s.TaskId = &v 3237 return s 3238 } 3239 3240 // SetTaskStatus sets the TaskStatus field's value. 3241 func (s *SynthesisTask) SetTaskStatus(v string) *SynthesisTask { 3242 s.TaskStatus = &v 3243 return s 3244 } 3245 3246 // SetTaskStatusReason sets the TaskStatusReason field's value. 3247 func (s *SynthesisTask) SetTaskStatusReason(v string) *SynthesisTask { 3248 s.TaskStatusReason = &v 3249 return s 3250 } 3251 3252 // SetTextType sets the TextType field's value. 3253 func (s *SynthesisTask) SetTextType(v string) *SynthesisTask { 3254 s.TextType = &v 3255 return s 3256 } 3257 3258 // SetVoiceId sets the VoiceId field's value. 3259 func (s *SynthesisTask) SetVoiceId(v string) *SynthesisTask { 3260 s.VoiceId = &v 3261 return s 3262 } 3263 3264 // The Speech Synthesis task with requested Task ID cannot be found. 3265 type SynthesisTaskNotFoundException struct { 3266 _ struct{} `type:"structure"` 3267 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3268 3269 Message_ *string `locationName:"message" type:"string"` 3270 } 3271 3272 // String returns the string representation. 3273 // 3274 // API parameter values that are decorated as "sensitive" in the API will not 3275 // be included in the string output. The member name will be present, but the 3276 // value will be replaced with "sensitive". 3277 func (s SynthesisTaskNotFoundException) String() string { 3278 return awsutil.Prettify(s) 3279 } 3280 3281 // GoString returns the string representation. 3282 // 3283 // API parameter values that are decorated as "sensitive" in the API will not 3284 // be included in the string output. The member name will be present, but the 3285 // value will be replaced with "sensitive". 3286 func (s SynthesisTaskNotFoundException) GoString() string { 3287 return s.String() 3288 } 3289 3290 func newErrorSynthesisTaskNotFoundException(v protocol.ResponseMetadata) error { 3291 return &SynthesisTaskNotFoundException{ 3292 RespMetadata: v, 3293 } 3294 } 3295 3296 // Code returns the exception type name. 3297 func (s *SynthesisTaskNotFoundException) Code() string { 3298 return "SynthesisTaskNotFoundException" 3299 } 3300 3301 // Message returns the exception's message. 3302 func (s *SynthesisTaskNotFoundException) Message() string { 3303 if s.Message_ != nil { 3304 return *s.Message_ 3305 } 3306 return "" 3307 } 3308 3309 // OrigErr always returns nil, satisfies awserr.Error interface. 3310 func (s *SynthesisTaskNotFoundException) OrigErr() error { 3311 return nil 3312 } 3313 3314 func (s *SynthesisTaskNotFoundException) Error() string { 3315 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3316 } 3317 3318 // Status code returns the HTTP status code for the request's response error. 3319 func (s *SynthesisTaskNotFoundException) StatusCode() int { 3320 return s.RespMetadata.StatusCode 3321 } 3322 3323 // RequestID returns the service's response RequestID for request. 3324 func (s *SynthesisTaskNotFoundException) RequestID() string { 3325 return s.RespMetadata.RequestID 3326 } 3327 3328 type SynthesizeSpeechInput struct { 3329 _ struct{} `type:"structure"` 3330 3331 // Specifies the engine (standard or neural) for Amazon Polly to use when processing 3332 // input text for speech synthesis. For information on Amazon Polly voices and 3333 // which voices are available in standard-only, NTTS-only, and both standard 3334 // and NTTS formats, see Available Voices (https://docs.aws.amazon.com/polly/latest/dg/voicelist.html). 3335 // 3336 // NTTS-only voices 3337 // 3338 // When using NTTS-only voices such as Kevin (en-US), this parameter is required 3339 // and must be set to neural. If the engine is not specified, or is set to standard, 3340 // this will result in an error. 3341 // 3342 // Type: String 3343 // 3344 // Valid Values: standard | neural 3345 // 3346 // Required: Yes 3347 // 3348 // Standard voices 3349 // 3350 // For standard voices, this is not required; the engine parameter defaults 3351 // to standard. If the engine is not specified, or is set to standard and an 3352 // NTTS-only voice is selected, this will result in an error. 3353 Engine *string `type:"string" enum:"Engine"` 3354 3355 // Optional language code for the Synthesize Speech request. This is only necessary 3356 // if using a bilingual voice, such as Aditi, which can be used for either Indian 3357 // English (en-IN) or Hindi (hi-IN). 3358 // 3359 // If a bilingual voice is used and no language code is specified, Amazon Polly 3360 // uses the default language of the bilingual voice. The default language for 3361 // any voice is the one returned by the DescribeVoices (https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) 3362 // operation for the LanguageCode parameter. For example, if no language code 3363 // is specified, Aditi will use Indian English rather than Hindi. 3364 LanguageCode *string `type:"string" enum:"LanguageCode"` 3365 3366 // List of one or more pronunciation lexicon names you want the service to apply 3367 // during synthesis. Lexicons are applied only if the language of the lexicon 3368 // is the same as the language of the voice. For information about storing lexicons, 3369 // see PutLexicon (https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html). 3370 LexiconNames []*string `type:"list"` 3371 3372 // The format in which the returned output will be encoded. For audio stream, 3373 // this will be mp3, ogg_vorbis, or pcm. For speech marks, this will be json. 3374 // 3375 // When pcm is used, the content returned is audio/pcm in a signed 16-bit, 1 3376 // channel (mono), little-endian format. 3377 // 3378 // OutputFormat is a required field 3379 OutputFormat *string `type:"string" required:"true" enum:"OutputFormat"` 3380 3381 // The audio frequency specified in Hz. 3382 // 3383 // The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and 3384 // "24000". The default value for standard voices is "22050". The default value 3385 // for neural voices is "24000". 3386 // 3387 // Valid values for pcm are "8000" and "16000" The default value is "16000". 3388 SampleRate *string `type:"string"` 3389 3390 // The type of speech marks returned for the input text. 3391 SpeechMarkTypes []*string `type:"list"` 3392 3393 // Input text to synthesize. If you specify ssml as the TextType, follow the 3394 // SSML format for the input text. 3395 // 3396 // Text is a required field 3397 Text *string `type:"string" required:"true"` 3398 3399 // Specifies whether the input text is plain text or SSML. The default value 3400 // is plain text. For more information, see Using SSML (https://docs.aws.amazon.com/polly/latest/dg/ssml.html). 3401 TextType *string `type:"string" enum:"TextType"` 3402 3403 // Voice ID to use for the synthesis. You can get a list of available voice 3404 // IDs by calling the DescribeVoices (https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html) 3405 // operation. 3406 // 3407 // VoiceId is a required field 3408 VoiceId *string `type:"string" required:"true" enum:"VoiceId"` 3409 } 3410 3411 // String returns the string representation. 3412 // 3413 // API parameter values that are decorated as "sensitive" in the API will not 3414 // be included in the string output. The member name will be present, but the 3415 // value will be replaced with "sensitive". 3416 func (s SynthesizeSpeechInput) String() string { 3417 return awsutil.Prettify(s) 3418 } 3419 3420 // GoString returns the string representation. 3421 // 3422 // API parameter values that are decorated as "sensitive" in the API will not 3423 // be included in the string output. The member name will be present, but the 3424 // value will be replaced with "sensitive". 3425 func (s SynthesizeSpeechInput) GoString() string { 3426 return s.String() 3427 } 3428 3429 // Validate inspects the fields of the type to determine if they are valid. 3430 func (s *SynthesizeSpeechInput) Validate() error { 3431 invalidParams := request.ErrInvalidParams{Context: "SynthesizeSpeechInput"} 3432 if s.OutputFormat == nil { 3433 invalidParams.Add(request.NewErrParamRequired("OutputFormat")) 3434 } 3435 if s.Text == nil { 3436 invalidParams.Add(request.NewErrParamRequired("Text")) 3437 } 3438 if s.VoiceId == nil { 3439 invalidParams.Add(request.NewErrParamRequired("VoiceId")) 3440 } 3441 3442 if invalidParams.Len() > 0 { 3443 return invalidParams 3444 } 3445 return nil 3446 } 3447 3448 // SetEngine sets the Engine field's value. 3449 func (s *SynthesizeSpeechInput) SetEngine(v string) *SynthesizeSpeechInput { 3450 s.Engine = &v 3451 return s 3452 } 3453 3454 // SetLanguageCode sets the LanguageCode field's value. 3455 func (s *SynthesizeSpeechInput) SetLanguageCode(v string) *SynthesizeSpeechInput { 3456 s.LanguageCode = &v 3457 return s 3458 } 3459 3460 // SetLexiconNames sets the LexiconNames field's value. 3461 func (s *SynthesizeSpeechInput) SetLexiconNames(v []*string) *SynthesizeSpeechInput { 3462 s.LexiconNames = v 3463 return s 3464 } 3465 3466 // SetOutputFormat sets the OutputFormat field's value. 3467 func (s *SynthesizeSpeechInput) SetOutputFormat(v string) *SynthesizeSpeechInput { 3468 s.OutputFormat = &v 3469 return s 3470 } 3471 3472 // SetSampleRate sets the SampleRate field's value. 3473 func (s *SynthesizeSpeechInput) SetSampleRate(v string) *SynthesizeSpeechInput { 3474 s.SampleRate = &v 3475 return s 3476 } 3477 3478 // SetSpeechMarkTypes sets the SpeechMarkTypes field's value. 3479 func (s *SynthesizeSpeechInput) SetSpeechMarkTypes(v []*string) *SynthesizeSpeechInput { 3480 s.SpeechMarkTypes = v 3481 return s 3482 } 3483 3484 // SetText sets the Text field's value. 3485 func (s *SynthesizeSpeechInput) SetText(v string) *SynthesizeSpeechInput { 3486 s.Text = &v 3487 return s 3488 } 3489 3490 // SetTextType sets the TextType field's value. 3491 func (s *SynthesizeSpeechInput) SetTextType(v string) *SynthesizeSpeechInput { 3492 s.TextType = &v 3493 return s 3494 } 3495 3496 // SetVoiceId sets the VoiceId field's value. 3497 func (s *SynthesizeSpeechInput) SetVoiceId(v string) *SynthesizeSpeechInput { 3498 s.VoiceId = &v 3499 return s 3500 } 3501 3502 type SynthesizeSpeechOutput struct { 3503 _ struct{} `type:"structure" payload:"AudioStream"` 3504 3505 // Stream containing the synthesized speech. 3506 AudioStream io.ReadCloser `type:"blob"` 3507 3508 // Specifies the type audio stream. This should reflect the OutputFormat parameter 3509 // in your request. 3510 // 3511 // * If you request mp3 as the OutputFormat, the ContentType returned is 3512 // audio/mpeg. 3513 // 3514 // * If you request ogg_vorbis as the OutputFormat, the ContentType returned 3515 // is audio/ogg. 3516 // 3517 // * If you request pcm as the OutputFormat, the ContentType returned is 3518 // audio/pcm in a signed 16-bit, 1 channel (mono), little-endian format. 3519 // 3520 // * If you request json as the OutputFormat, the ContentType returned is 3521 // audio/json. 3522 ContentType *string `location:"header" locationName:"Content-Type" type:"string"` 3523 3524 // Number of characters synthesized. 3525 RequestCharacters *int64 `location:"header" locationName:"x-amzn-RequestCharacters" type:"integer"` 3526 } 3527 3528 // String returns the string representation. 3529 // 3530 // API parameter values that are decorated as "sensitive" in the API will not 3531 // be included in the string output. The member name will be present, but the 3532 // value will be replaced with "sensitive". 3533 func (s SynthesizeSpeechOutput) String() string { 3534 return awsutil.Prettify(s) 3535 } 3536 3537 // GoString returns the string representation. 3538 // 3539 // API parameter values that are decorated as "sensitive" in the API will not 3540 // be included in the string output. The member name will be present, but the 3541 // value will be replaced with "sensitive". 3542 func (s SynthesizeSpeechOutput) GoString() string { 3543 return s.String() 3544 } 3545 3546 // SetAudioStream sets the AudioStream field's value. 3547 func (s *SynthesizeSpeechOutput) SetAudioStream(v io.ReadCloser) *SynthesizeSpeechOutput { 3548 s.AudioStream = v 3549 return s 3550 } 3551 3552 // SetContentType sets the ContentType field's value. 3553 func (s *SynthesizeSpeechOutput) SetContentType(v string) *SynthesizeSpeechOutput { 3554 s.ContentType = &v 3555 return s 3556 } 3557 3558 // SetRequestCharacters sets the RequestCharacters field's value. 3559 func (s *SynthesizeSpeechOutput) SetRequestCharacters(v int64) *SynthesizeSpeechOutput { 3560 s.RequestCharacters = &v 3561 return s 3562 } 3563 3564 // The value of the "Text" parameter is longer than the accepted limits. For 3565 // the SynthesizeSpeech API, the limit for input text is a maximum of 6000 characters 3566 // total, of which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask 3567 // API, the maximum is 200,000 characters, of which no more than 100,000 can 3568 // be billed characters. SSML tags are not counted as billed characters. 3569 type TextLengthExceededException struct { 3570 _ struct{} `type:"structure"` 3571 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3572 3573 Message_ *string `locationName:"message" type:"string"` 3574 } 3575 3576 // String returns the string representation. 3577 // 3578 // API parameter values that are decorated as "sensitive" in the API will not 3579 // be included in the string output. The member name will be present, but the 3580 // value will be replaced with "sensitive". 3581 func (s TextLengthExceededException) String() string { 3582 return awsutil.Prettify(s) 3583 } 3584 3585 // GoString returns the string representation. 3586 // 3587 // API parameter values that are decorated as "sensitive" in the API will not 3588 // be included in the string output. The member name will be present, but the 3589 // value will be replaced with "sensitive". 3590 func (s TextLengthExceededException) GoString() string { 3591 return s.String() 3592 } 3593 3594 func newErrorTextLengthExceededException(v protocol.ResponseMetadata) error { 3595 return &TextLengthExceededException{ 3596 RespMetadata: v, 3597 } 3598 } 3599 3600 // Code returns the exception type name. 3601 func (s *TextLengthExceededException) Code() string { 3602 return "TextLengthExceededException" 3603 } 3604 3605 // Message returns the exception's message. 3606 func (s *TextLengthExceededException) Message() string { 3607 if s.Message_ != nil { 3608 return *s.Message_ 3609 } 3610 return "" 3611 } 3612 3613 // OrigErr always returns nil, satisfies awserr.Error interface. 3614 func (s *TextLengthExceededException) OrigErr() error { 3615 return nil 3616 } 3617 3618 func (s *TextLengthExceededException) Error() string { 3619 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3620 } 3621 3622 // Status code returns the HTTP status code for the request's response error. 3623 func (s *TextLengthExceededException) StatusCode() int { 3624 return s.RespMetadata.StatusCode 3625 } 3626 3627 // RequestID returns the service's response RequestID for request. 3628 func (s *TextLengthExceededException) RequestID() string { 3629 return s.RespMetadata.RequestID 3630 } 3631 3632 // The alphabet specified by the lexicon is not a supported alphabet. Valid 3633 // values are x-sampa and ipa. 3634 type UnsupportedPlsAlphabetException struct { 3635 _ struct{} `type:"structure"` 3636 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3637 3638 Message_ *string `locationName:"message" type:"string"` 3639 } 3640 3641 // String returns the string representation. 3642 // 3643 // API parameter values that are decorated as "sensitive" in the API will not 3644 // be included in the string output. The member name will be present, but the 3645 // value will be replaced with "sensitive". 3646 func (s UnsupportedPlsAlphabetException) String() string { 3647 return awsutil.Prettify(s) 3648 } 3649 3650 // GoString returns the string representation. 3651 // 3652 // API parameter values that are decorated as "sensitive" in the API will not 3653 // be included in the string output. The member name will be present, but the 3654 // value will be replaced with "sensitive". 3655 func (s UnsupportedPlsAlphabetException) GoString() string { 3656 return s.String() 3657 } 3658 3659 func newErrorUnsupportedPlsAlphabetException(v protocol.ResponseMetadata) error { 3660 return &UnsupportedPlsAlphabetException{ 3661 RespMetadata: v, 3662 } 3663 } 3664 3665 // Code returns the exception type name. 3666 func (s *UnsupportedPlsAlphabetException) Code() string { 3667 return "UnsupportedPlsAlphabetException" 3668 } 3669 3670 // Message returns the exception's message. 3671 func (s *UnsupportedPlsAlphabetException) Message() string { 3672 if s.Message_ != nil { 3673 return *s.Message_ 3674 } 3675 return "" 3676 } 3677 3678 // OrigErr always returns nil, satisfies awserr.Error interface. 3679 func (s *UnsupportedPlsAlphabetException) OrigErr() error { 3680 return nil 3681 } 3682 3683 func (s *UnsupportedPlsAlphabetException) Error() string { 3684 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3685 } 3686 3687 // Status code returns the HTTP status code for the request's response error. 3688 func (s *UnsupportedPlsAlphabetException) StatusCode() int { 3689 return s.RespMetadata.StatusCode 3690 } 3691 3692 // RequestID returns the service's response RequestID for request. 3693 func (s *UnsupportedPlsAlphabetException) RequestID() string { 3694 return s.RespMetadata.RequestID 3695 } 3696 3697 // The language specified in the lexicon is unsupported. For a list of supported 3698 // languages, see Lexicon Attributes (https://docs.aws.amazon.com/polly/latest/dg/API_LexiconAttributes.html). 3699 type UnsupportedPlsLanguageException struct { 3700 _ struct{} `type:"structure"` 3701 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3702 3703 Message_ *string `locationName:"message" type:"string"` 3704 } 3705 3706 // String returns the string representation. 3707 // 3708 // API parameter values that are decorated as "sensitive" in the API will not 3709 // be included in the string output. The member name will be present, but the 3710 // value will be replaced with "sensitive". 3711 func (s UnsupportedPlsLanguageException) String() string { 3712 return awsutil.Prettify(s) 3713 } 3714 3715 // GoString returns the string representation. 3716 // 3717 // API parameter values that are decorated as "sensitive" in the API will not 3718 // be included in the string output. The member name will be present, but the 3719 // value will be replaced with "sensitive". 3720 func (s UnsupportedPlsLanguageException) GoString() string { 3721 return s.String() 3722 } 3723 3724 func newErrorUnsupportedPlsLanguageException(v protocol.ResponseMetadata) error { 3725 return &UnsupportedPlsLanguageException{ 3726 RespMetadata: v, 3727 } 3728 } 3729 3730 // Code returns the exception type name. 3731 func (s *UnsupportedPlsLanguageException) Code() string { 3732 return "UnsupportedPlsLanguageException" 3733 } 3734 3735 // Message returns the exception's message. 3736 func (s *UnsupportedPlsLanguageException) Message() string { 3737 if s.Message_ != nil { 3738 return *s.Message_ 3739 } 3740 return "" 3741 } 3742 3743 // OrigErr always returns nil, satisfies awserr.Error interface. 3744 func (s *UnsupportedPlsLanguageException) OrigErr() error { 3745 return nil 3746 } 3747 3748 func (s *UnsupportedPlsLanguageException) Error() string { 3749 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3750 } 3751 3752 // Status code returns the HTTP status code for the request's response error. 3753 func (s *UnsupportedPlsLanguageException) StatusCode() int { 3754 return s.RespMetadata.StatusCode 3755 } 3756 3757 // RequestID returns the service's response RequestID for request. 3758 func (s *UnsupportedPlsLanguageException) RequestID() string { 3759 return s.RespMetadata.RequestID 3760 } 3761 3762 // Description of the voice. 3763 type Voice struct { 3764 _ struct{} `type:"structure"` 3765 3766 // Additional codes for languages available for the specified voice in addition 3767 // to its default language. 3768 // 3769 // For example, the default language for Aditi is Indian English (en-IN) because 3770 // it was first used for that language. Since Aditi is bilingual and fluent 3771 // in both Indian English and Hindi, this parameter would show the code hi-IN. 3772 AdditionalLanguageCodes []*string `type:"list"` 3773 3774 // Gender of the voice. 3775 Gender *string `type:"string" enum:"Gender"` 3776 3777 // Amazon Polly assigned voice ID. This is the ID that you specify when calling 3778 // the SynthesizeSpeech operation. 3779 Id *string `type:"string" enum:"VoiceId"` 3780 3781 // Language code of the voice. 3782 LanguageCode *string `type:"string" enum:"LanguageCode"` 3783 3784 // Human readable name of the language in English. 3785 LanguageName *string `type:"string"` 3786 3787 // Name of the voice (for example, Salli, Kendra, etc.). This provides a human 3788 // readable voice name that you might display in your application. 3789 Name *string `type:"string"` 3790 3791 // Specifies which engines (standard or neural) that are supported by a given 3792 // voice. 3793 SupportedEngines []*string `type:"list"` 3794 } 3795 3796 // String returns the string representation. 3797 // 3798 // API parameter values that are decorated as "sensitive" in the API will not 3799 // be included in the string output. The member name will be present, but the 3800 // value will be replaced with "sensitive". 3801 func (s Voice) String() string { 3802 return awsutil.Prettify(s) 3803 } 3804 3805 // GoString returns the string representation. 3806 // 3807 // API parameter values that are decorated as "sensitive" in the API will not 3808 // be included in the string output. The member name will be present, but the 3809 // value will be replaced with "sensitive". 3810 func (s Voice) GoString() string { 3811 return s.String() 3812 } 3813 3814 // SetAdditionalLanguageCodes sets the AdditionalLanguageCodes field's value. 3815 func (s *Voice) SetAdditionalLanguageCodes(v []*string) *Voice { 3816 s.AdditionalLanguageCodes = v 3817 return s 3818 } 3819 3820 // SetGender sets the Gender field's value. 3821 func (s *Voice) SetGender(v string) *Voice { 3822 s.Gender = &v 3823 return s 3824 } 3825 3826 // SetId sets the Id field's value. 3827 func (s *Voice) SetId(v string) *Voice { 3828 s.Id = &v 3829 return s 3830 } 3831 3832 // SetLanguageCode sets the LanguageCode field's value. 3833 func (s *Voice) SetLanguageCode(v string) *Voice { 3834 s.LanguageCode = &v 3835 return s 3836 } 3837 3838 // SetLanguageName sets the LanguageName field's value. 3839 func (s *Voice) SetLanguageName(v string) *Voice { 3840 s.LanguageName = &v 3841 return s 3842 } 3843 3844 // SetName sets the Name field's value. 3845 func (s *Voice) SetName(v string) *Voice { 3846 s.Name = &v 3847 return s 3848 } 3849 3850 // SetSupportedEngines sets the SupportedEngines field's value. 3851 func (s *Voice) SetSupportedEngines(v []*string) *Voice { 3852 s.SupportedEngines = v 3853 return s 3854 } 3855 3856 const ( 3857 // EngineStandard is a Engine enum value 3858 EngineStandard = "standard" 3859 3860 // EngineNeural is a Engine enum value 3861 EngineNeural = "neural" 3862 ) 3863 3864 // Engine_Values returns all elements of the Engine enum 3865 func Engine_Values() []string { 3866 return []string{ 3867 EngineStandard, 3868 EngineNeural, 3869 } 3870 } 3871 3872 const ( 3873 // GenderFemale is a Gender enum value 3874 GenderFemale = "Female" 3875 3876 // GenderMale is a Gender enum value 3877 GenderMale = "Male" 3878 ) 3879 3880 // Gender_Values returns all elements of the Gender enum 3881 func Gender_Values() []string { 3882 return []string{ 3883 GenderFemale, 3884 GenderMale, 3885 } 3886 } 3887 3888 const ( 3889 // LanguageCodeArb is a LanguageCode enum value 3890 LanguageCodeArb = "arb" 3891 3892 // LanguageCodeCmnCn is a LanguageCode enum value 3893 LanguageCodeCmnCn = "cmn-CN" 3894 3895 // LanguageCodeCyGb is a LanguageCode enum value 3896 LanguageCodeCyGb = "cy-GB" 3897 3898 // LanguageCodeDaDk is a LanguageCode enum value 3899 LanguageCodeDaDk = "da-DK" 3900 3901 // LanguageCodeDeDe is a LanguageCode enum value 3902 LanguageCodeDeDe = "de-DE" 3903 3904 // LanguageCodeEnAu is a LanguageCode enum value 3905 LanguageCodeEnAu = "en-AU" 3906 3907 // LanguageCodeEnGb is a LanguageCode enum value 3908 LanguageCodeEnGb = "en-GB" 3909 3910 // LanguageCodeEnGbWls is a LanguageCode enum value 3911 LanguageCodeEnGbWls = "en-GB-WLS" 3912 3913 // LanguageCodeEnIn is a LanguageCode enum value 3914 LanguageCodeEnIn = "en-IN" 3915 3916 // LanguageCodeEnUs is a LanguageCode enum value 3917 LanguageCodeEnUs = "en-US" 3918 3919 // LanguageCodeEsEs is a LanguageCode enum value 3920 LanguageCodeEsEs = "es-ES" 3921 3922 // LanguageCodeEsMx is a LanguageCode enum value 3923 LanguageCodeEsMx = "es-MX" 3924 3925 // LanguageCodeEsUs is a LanguageCode enum value 3926 LanguageCodeEsUs = "es-US" 3927 3928 // LanguageCodeFrCa is a LanguageCode enum value 3929 LanguageCodeFrCa = "fr-CA" 3930 3931 // LanguageCodeFrFr is a LanguageCode enum value 3932 LanguageCodeFrFr = "fr-FR" 3933 3934 // LanguageCodeIsIs is a LanguageCode enum value 3935 LanguageCodeIsIs = "is-IS" 3936 3937 // LanguageCodeItIt is a LanguageCode enum value 3938 LanguageCodeItIt = "it-IT" 3939 3940 // LanguageCodeJaJp is a LanguageCode enum value 3941 LanguageCodeJaJp = "ja-JP" 3942 3943 // LanguageCodeHiIn is a LanguageCode enum value 3944 LanguageCodeHiIn = "hi-IN" 3945 3946 // LanguageCodeKoKr is a LanguageCode enum value 3947 LanguageCodeKoKr = "ko-KR" 3948 3949 // LanguageCodeNbNo is a LanguageCode enum value 3950 LanguageCodeNbNo = "nb-NO" 3951 3952 // LanguageCodeNlNl is a LanguageCode enum value 3953 LanguageCodeNlNl = "nl-NL" 3954 3955 // LanguageCodePlPl is a LanguageCode enum value 3956 LanguageCodePlPl = "pl-PL" 3957 3958 // LanguageCodePtBr is a LanguageCode enum value 3959 LanguageCodePtBr = "pt-BR" 3960 3961 // LanguageCodePtPt is a LanguageCode enum value 3962 LanguageCodePtPt = "pt-PT" 3963 3964 // LanguageCodeRoRo is a LanguageCode enum value 3965 LanguageCodeRoRo = "ro-RO" 3966 3967 // LanguageCodeRuRu is a LanguageCode enum value 3968 LanguageCodeRuRu = "ru-RU" 3969 3970 // LanguageCodeSvSe is a LanguageCode enum value 3971 LanguageCodeSvSe = "sv-SE" 3972 3973 // LanguageCodeTrTr is a LanguageCode enum value 3974 LanguageCodeTrTr = "tr-TR" 3975 3976 // LanguageCodeEnNz is a LanguageCode enum value 3977 LanguageCodeEnNz = "en-NZ" 3978 3979 // LanguageCodeEnZa is a LanguageCode enum value 3980 LanguageCodeEnZa = "en-ZA" 3981 ) 3982 3983 // LanguageCode_Values returns all elements of the LanguageCode enum 3984 func LanguageCode_Values() []string { 3985 return []string{ 3986 LanguageCodeArb, 3987 LanguageCodeCmnCn, 3988 LanguageCodeCyGb, 3989 LanguageCodeDaDk, 3990 LanguageCodeDeDe, 3991 LanguageCodeEnAu, 3992 LanguageCodeEnGb, 3993 LanguageCodeEnGbWls, 3994 LanguageCodeEnIn, 3995 LanguageCodeEnUs, 3996 LanguageCodeEsEs, 3997 LanguageCodeEsMx, 3998 LanguageCodeEsUs, 3999 LanguageCodeFrCa, 4000 LanguageCodeFrFr, 4001 LanguageCodeIsIs, 4002 LanguageCodeItIt, 4003 LanguageCodeJaJp, 4004 LanguageCodeHiIn, 4005 LanguageCodeKoKr, 4006 LanguageCodeNbNo, 4007 LanguageCodeNlNl, 4008 LanguageCodePlPl, 4009 LanguageCodePtBr, 4010 LanguageCodePtPt, 4011 LanguageCodeRoRo, 4012 LanguageCodeRuRu, 4013 LanguageCodeSvSe, 4014 LanguageCodeTrTr, 4015 LanguageCodeEnNz, 4016 LanguageCodeEnZa, 4017 } 4018 } 4019 4020 const ( 4021 // OutputFormatJson is a OutputFormat enum value 4022 OutputFormatJson = "json" 4023 4024 // OutputFormatMp3 is a OutputFormat enum value 4025 OutputFormatMp3 = "mp3" 4026 4027 // OutputFormatOggVorbis is a OutputFormat enum value 4028 OutputFormatOggVorbis = "ogg_vorbis" 4029 4030 // OutputFormatPcm is a OutputFormat enum value 4031 OutputFormatPcm = "pcm" 4032 ) 4033 4034 // OutputFormat_Values returns all elements of the OutputFormat enum 4035 func OutputFormat_Values() []string { 4036 return []string{ 4037 OutputFormatJson, 4038 OutputFormatMp3, 4039 OutputFormatOggVorbis, 4040 OutputFormatPcm, 4041 } 4042 } 4043 4044 const ( 4045 // SpeechMarkTypeSentence is a SpeechMarkType enum value 4046 SpeechMarkTypeSentence = "sentence" 4047 4048 // SpeechMarkTypeSsml is a SpeechMarkType enum value 4049 SpeechMarkTypeSsml = "ssml" 4050 4051 // SpeechMarkTypeViseme is a SpeechMarkType enum value 4052 SpeechMarkTypeViseme = "viseme" 4053 4054 // SpeechMarkTypeWord is a SpeechMarkType enum value 4055 SpeechMarkTypeWord = "word" 4056 ) 4057 4058 // SpeechMarkType_Values returns all elements of the SpeechMarkType enum 4059 func SpeechMarkType_Values() []string { 4060 return []string{ 4061 SpeechMarkTypeSentence, 4062 SpeechMarkTypeSsml, 4063 SpeechMarkTypeViseme, 4064 SpeechMarkTypeWord, 4065 } 4066 } 4067 4068 const ( 4069 // TaskStatusScheduled is a TaskStatus enum value 4070 TaskStatusScheduled = "scheduled" 4071 4072 // TaskStatusInProgress is a TaskStatus enum value 4073 TaskStatusInProgress = "inProgress" 4074 4075 // TaskStatusCompleted is a TaskStatus enum value 4076 TaskStatusCompleted = "completed" 4077 4078 // TaskStatusFailed is a TaskStatus enum value 4079 TaskStatusFailed = "failed" 4080 ) 4081 4082 // TaskStatus_Values returns all elements of the TaskStatus enum 4083 func TaskStatus_Values() []string { 4084 return []string{ 4085 TaskStatusScheduled, 4086 TaskStatusInProgress, 4087 TaskStatusCompleted, 4088 TaskStatusFailed, 4089 } 4090 } 4091 4092 const ( 4093 // TextTypeSsml is a TextType enum value 4094 TextTypeSsml = "ssml" 4095 4096 // TextTypeText is a TextType enum value 4097 TextTypeText = "text" 4098 ) 4099 4100 // TextType_Values returns all elements of the TextType enum 4101 func TextType_Values() []string { 4102 return []string{ 4103 TextTypeSsml, 4104 TextTypeText, 4105 } 4106 } 4107 4108 const ( 4109 // VoiceIdAditi is a VoiceId enum value 4110 VoiceIdAditi = "Aditi" 4111 4112 // VoiceIdAmy is a VoiceId enum value 4113 VoiceIdAmy = "Amy" 4114 4115 // VoiceIdAstrid is a VoiceId enum value 4116 VoiceIdAstrid = "Astrid" 4117 4118 // VoiceIdBianca is a VoiceId enum value 4119 VoiceIdBianca = "Bianca" 4120 4121 // VoiceIdBrian is a VoiceId enum value 4122 VoiceIdBrian = "Brian" 4123 4124 // VoiceIdCamila is a VoiceId enum value 4125 VoiceIdCamila = "Camila" 4126 4127 // VoiceIdCarla is a VoiceId enum value 4128 VoiceIdCarla = "Carla" 4129 4130 // VoiceIdCarmen is a VoiceId enum value 4131 VoiceIdCarmen = "Carmen" 4132 4133 // VoiceIdCeline is a VoiceId enum value 4134 VoiceIdCeline = "Celine" 4135 4136 // VoiceIdChantal is a VoiceId enum value 4137 VoiceIdChantal = "Chantal" 4138 4139 // VoiceIdConchita is a VoiceId enum value 4140 VoiceIdConchita = "Conchita" 4141 4142 // VoiceIdCristiano is a VoiceId enum value 4143 VoiceIdCristiano = "Cristiano" 4144 4145 // VoiceIdDora is a VoiceId enum value 4146 VoiceIdDora = "Dora" 4147 4148 // VoiceIdEmma is a VoiceId enum value 4149 VoiceIdEmma = "Emma" 4150 4151 // VoiceIdEnrique is a VoiceId enum value 4152 VoiceIdEnrique = "Enrique" 4153 4154 // VoiceIdEwa is a VoiceId enum value 4155 VoiceIdEwa = "Ewa" 4156 4157 // VoiceIdFiliz is a VoiceId enum value 4158 VoiceIdFiliz = "Filiz" 4159 4160 // VoiceIdGabrielle is a VoiceId enum value 4161 VoiceIdGabrielle = "Gabrielle" 4162 4163 // VoiceIdGeraint is a VoiceId enum value 4164 VoiceIdGeraint = "Geraint" 4165 4166 // VoiceIdGiorgio is a VoiceId enum value 4167 VoiceIdGiorgio = "Giorgio" 4168 4169 // VoiceIdGwyneth is a VoiceId enum value 4170 VoiceIdGwyneth = "Gwyneth" 4171 4172 // VoiceIdHans is a VoiceId enum value 4173 VoiceIdHans = "Hans" 4174 4175 // VoiceIdInes is a VoiceId enum value 4176 VoiceIdInes = "Ines" 4177 4178 // VoiceIdIvy is a VoiceId enum value 4179 VoiceIdIvy = "Ivy" 4180 4181 // VoiceIdJacek is a VoiceId enum value 4182 VoiceIdJacek = "Jacek" 4183 4184 // VoiceIdJan is a VoiceId enum value 4185 VoiceIdJan = "Jan" 4186 4187 // VoiceIdJoanna is a VoiceId enum value 4188 VoiceIdJoanna = "Joanna" 4189 4190 // VoiceIdJoey is a VoiceId enum value 4191 VoiceIdJoey = "Joey" 4192 4193 // VoiceIdJustin is a VoiceId enum value 4194 VoiceIdJustin = "Justin" 4195 4196 // VoiceIdKarl is a VoiceId enum value 4197 VoiceIdKarl = "Karl" 4198 4199 // VoiceIdKendra is a VoiceId enum value 4200 VoiceIdKendra = "Kendra" 4201 4202 // VoiceIdKevin is a VoiceId enum value 4203 VoiceIdKevin = "Kevin" 4204 4205 // VoiceIdKimberly is a VoiceId enum value 4206 VoiceIdKimberly = "Kimberly" 4207 4208 // VoiceIdLea is a VoiceId enum value 4209 VoiceIdLea = "Lea" 4210 4211 // VoiceIdLiv is a VoiceId enum value 4212 VoiceIdLiv = "Liv" 4213 4214 // VoiceIdLotte is a VoiceId enum value 4215 VoiceIdLotte = "Lotte" 4216 4217 // VoiceIdLucia is a VoiceId enum value 4218 VoiceIdLucia = "Lucia" 4219 4220 // VoiceIdLupe is a VoiceId enum value 4221 VoiceIdLupe = "Lupe" 4222 4223 // VoiceIdMads is a VoiceId enum value 4224 VoiceIdMads = "Mads" 4225 4226 // VoiceIdMaja is a VoiceId enum value 4227 VoiceIdMaja = "Maja" 4228 4229 // VoiceIdMarlene is a VoiceId enum value 4230 VoiceIdMarlene = "Marlene" 4231 4232 // VoiceIdMathieu is a VoiceId enum value 4233 VoiceIdMathieu = "Mathieu" 4234 4235 // VoiceIdMatthew is a VoiceId enum value 4236 VoiceIdMatthew = "Matthew" 4237 4238 // VoiceIdMaxim is a VoiceId enum value 4239 VoiceIdMaxim = "Maxim" 4240 4241 // VoiceIdMia is a VoiceId enum value 4242 VoiceIdMia = "Mia" 4243 4244 // VoiceIdMiguel is a VoiceId enum value 4245 VoiceIdMiguel = "Miguel" 4246 4247 // VoiceIdMizuki is a VoiceId enum value 4248 VoiceIdMizuki = "Mizuki" 4249 4250 // VoiceIdNaja is a VoiceId enum value 4251 VoiceIdNaja = "Naja" 4252 4253 // VoiceIdNicole is a VoiceId enum value 4254 VoiceIdNicole = "Nicole" 4255 4256 // VoiceIdOlivia is a VoiceId enum value 4257 VoiceIdOlivia = "Olivia" 4258 4259 // VoiceIdPenelope is a VoiceId enum value 4260 VoiceIdPenelope = "Penelope" 4261 4262 // VoiceIdRaveena is a VoiceId enum value 4263 VoiceIdRaveena = "Raveena" 4264 4265 // VoiceIdRicardo is a VoiceId enum value 4266 VoiceIdRicardo = "Ricardo" 4267 4268 // VoiceIdRuben is a VoiceId enum value 4269 VoiceIdRuben = "Ruben" 4270 4271 // VoiceIdRussell is a VoiceId enum value 4272 VoiceIdRussell = "Russell" 4273 4274 // VoiceIdSalli is a VoiceId enum value 4275 VoiceIdSalli = "Salli" 4276 4277 // VoiceIdSeoyeon is a VoiceId enum value 4278 VoiceIdSeoyeon = "Seoyeon" 4279 4280 // VoiceIdTakumi is a VoiceId enum value 4281 VoiceIdTakumi = "Takumi" 4282 4283 // VoiceIdTatyana is a VoiceId enum value 4284 VoiceIdTatyana = "Tatyana" 4285 4286 // VoiceIdVicki is a VoiceId enum value 4287 VoiceIdVicki = "Vicki" 4288 4289 // VoiceIdVitoria is a VoiceId enum value 4290 VoiceIdVitoria = "Vitoria" 4291 4292 // VoiceIdZeina is a VoiceId enum value 4293 VoiceIdZeina = "Zeina" 4294 4295 // VoiceIdZhiyu is a VoiceId enum value 4296 VoiceIdZhiyu = "Zhiyu" 4297 4298 // VoiceIdAria is a VoiceId enum value 4299 VoiceIdAria = "Aria" 4300 4301 // VoiceIdAyanda is a VoiceId enum value 4302 VoiceIdAyanda = "Ayanda" 4303 ) 4304 4305 // VoiceId_Values returns all elements of the VoiceId enum 4306 func VoiceId_Values() []string { 4307 return []string{ 4308 VoiceIdAditi, 4309 VoiceIdAmy, 4310 VoiceIdAstrid, 4311 VoiceIdBianca, 4312 VoiceIdBrian, 4313 VoiceIdCamila, 4314 VoiceIdCarla, 4315 VoiceIdCarmen, 4316 VoiceIdCeline, 4317 VoiceIdChantal, 4318 VoiceIdConchita, 4319 VoiceIdCristiano, 4320 VoiceIdDora, 4321 VoiceIdEmma, 4322 VoiceIdEnrique, 4323 VoiceIdEwa, 4324 VoiceIdFiliz, 4325 VoiceIdGabrielle, 4326 VoiceIdGeraint, 4327 VoiceIdGiorgio, 4328 VoiceIdGwyneth, 4329 VoiceIdHans, 4330 VoiceIdInes, 4331 VoiceIdIvy, 4332 VoiceIdJacek, 4333 VoiceIdJan, 4334 VoiceIdJoanna, 4335 VoiceIdJoey, 4336 VoiceIdJustin, 4337 VoiceIdKarl, 4338 VoiceIdKendra, 4339 VoiceIdKevin, 4340 VoiceIdKimberly, 4341 VoiceIdLea, 4342 VoiceIdLiv, 4343 VoiceIdLotte, 4344 VoiceIdLucia, 4345 VoiceIdLupe, 4346 VoiceIdMads, 4347 VoiceIdMaja, 4348 VoiceIdMarlene, 4349 VoiceIdMathieu, 4350 VoiceIdMatthew, 4351 VoiceIdMaxim, 4352 VoiceIdMia, 4353 VoiceIdMiguel, 4354 VoiceIdMizuki, 4355 VoiceIdNaja, 4356 VoiceIdNicole, 4357 VoiceIdOlivia, 4358 VoiceIdPenelope, 4359 VoiceIdRaveena, 4360 VoiceIdRicardo, 4361 VoiceIdRuben, 4362 VoiceIdRussell, 4363 VoiceIdSalli, 4364 VoiceIdSeoyeon, 4365 VoiceIdTakumi, 4366 VoiceIdTatyana, 4367 VoiceIdVicki, 4368 VoiceIdVitoria, 4369 VoiceIdZeina, 4370 VoiceIdZhiyu, 4371 VoiceIdAria, 4372 VoiceIdAyanda, 4373 } 4374 }