forked from aws/aws-sdk-go-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
1477 lines (1201 loc) · 45.6 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package transcribeservice
import (
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
"github.com/aws/aws-sdk-go-v2/private/protocol/jsonrpc"
)
const opCreateVocabulary = "CreateVocabulary"
// CreateVocabularyRequest is a API request type for the CreateVocabulary API operation.
type CreateVocabularyRequest struct {
*aws.Request
Input *CreateVocabularyInput
Copy func(*CreateVocabularyInput) CreateVocabularyRequest
}
// Send marshals and sends the CreateVocabulary API request.
func (r CreateVocabularyRequest) Send() (*CreateVocabularyOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateVocabularyOutput), nil
}
// CreateVocabularyRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Creates a new custom vocabulary that you can use to change the way Amazon
// Transcribe handles transcription of an audio file.
//
// // Example sending a request using the CreateVocabularyRequest method.
// req := client.CreateVocabularyRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateVocabulary
func (c *TranscribeService) CreateVocabularyRequest(input *CreateVocabularyInput) CreateVocabularyRequest {
op := &aws.Operation{
Name: opCreateVocabulary,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateVocabularyInput{}
}
output := &CreateVocabularyOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateVocabularyRequest{Request: req, Input: input, Copy: c.CreateVocabularyRequest}
}
const opDeleteVocabulary = "DeleteVocabulary"
// DeleteVocabularyRequest is a API request type for the DeleteVocabulary API operation.
type DeleteVocabularyRequest struct {
*aws.Request
Input *DeleteVocabularyInput
Copy func(*DeleteVocabularyInput) DeleteVocabularyRequest
}
// Send marshals and sends the DeleteVocabulary API request.
func (r DeleteVocabularyRequest) Send() (*DeleteVocabularyOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteVocabularyOutput), nil
}
// DeleteVocabularyRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Deletes a vocabulary from Amazon Transcribe.
//
// // Example sending a request using the DeleteVocabularyRequest method.
// req := client.DeleteVocabularyRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteVocabulary
func (c *TranscribeService) DeleteVocabularyRequest(input *DeleteVocabularyInput) DeleteVocabularyRequest {
op := &aws.Operation{
Name: opDeleteVocabulary,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteVocabularyInput{}
}
output := &DeleteVocabularyOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteVocabularyRequest{Request: req, Input: input, Copy: c.DeleteVocabularyRequest}
}
const opGetTranscriptionJob = "GetTranscriptionJob"
// GetTranscriptionJobRequest is a API request type for the GetTranscriptionJob API operation.
type GetTranscriptionJobRequest struct {
*aws.Request
Input *GetTranscriptionJobInput
Copy func(*GetTranscriptionJobInput) GetTranscriptionJobRequest
}
// Send marshals and sends the GetTranscriptionJob API request.
func (r GetTranscriptionJobRequest) Send() (*GetTranscriptionJobOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetTranscriptionJobOutput), nil
}
// GetTranscriptionJobRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Returns information about a transcription job. To see the status of the job,
// check the TranscriptionJobStatus field. If the status is COMPLETED, the job
// is finished and you can find the results at the location specified in the
// TranscriptionFileUri field.
//
// // Example sending a request using the GetTranscriptionJobRequest method.
// req := client.GetTranscriptionJobRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJob
func (c *TranscribeService) GetTranscriptionJobRequest(input *GetTranscriptionJobInput) GetTranscriptionJobRequest {
op := &aws.Operation{
Name: opGetTranscriptionJob,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetTranscriptionJobInput{}
}
output := &GetTranscriptionJobOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetTranscriptionJobRequest{Request: req, Input: input, Copy: c.GetTranscriptionJobRequest}
}
const opGetVocabulary = "GetVocabulary"
// GetVocabularyRequest is a API request type for the GetVocabulary API operation.
type GetVocabularyRequest struct {
*aws.Request
Input *GetVocabularyInput
Copy func(*GetVocabularyInput) GetVocabularyRequest
}
// Send marshals and sends the GetVocabulary API request.
func (r GetVocabularyRequest) Send() (*GetVocabularyOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetVocabularyOutput), nil
}
// GetVocabularyRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Gets information about a vocabulary.
//
// // Example sending a request using the GetVocabularyRequest method.
// req := client.GetVocabularyRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetVocabulary
func (c *TranscribeService) GetVocabularyRequest(input *GetVocabularyInput) GetVocabularyRequest {
op := &aws.Operation{
Name: opGetVocabulary,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetVocabularyInput{}
}
output := &GetVocabularyOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetVocabularyRequest{Request: req, Input: input, Copy: c.GetVocabularyRequest}
}
const opListTranscriptionJobs = "ListTranscriptionJobs"
// ListTranscriptionJobsRequest is a API request type for the ListTranscriptionJobs API operation.
type ListTranscriptionJobsRequest struct {
*aws.Request
Input *ListTranscriptionJobsInput
Copy func(*ListTranscriptionJobsInput) ListTranscriptionJobsRequest
}
// Send marshals and sends the ListTranscriptionJobs API request.
func (r ListTranscriptionJobsRequest) Send() (*ListTranscriptionJobsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListTranscriptionJobsOutput), nil
}
// ListTranscriptionJobsRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Lists transcription jobs with the specified status.
//
// // Example sending a request using the ListTranscriptionJobsRequest method.
// req := client.ListTranscriptionJobsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs
func (c *TranscribeService) ListTranscriptionJobsRequest(input *ListTranscriptionJobsInput) ListTranscriptionJobsRequest {
op := &aws.Operation{
Name: opListTranscriptionJobs,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListTranscriptionJobsInput{}
}
output := &ListTranscriptionJobsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListTranscriptionJobsRequest{Request: req, Input: input, Copy: c.ListTranscriptionJobsRequest}
}
// Paginate pages iterates over the pages of a ListTranscriptionJobsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListTranscriptionJobs operation.
// req := client.ListTranscriptionJobsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *ListTranscriptionJobsRequest) Paginate(opts ...aws.Option) ListTranscriptionJobsPager {
return ListTranscriptionJobsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *ListTranscriptionJobsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// ListTranscriptionJobsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type ListTranscriptionJobsPager struct {
aws.Pager
}
func (p *ListTranscriptionJobsPager) CurrentPage() *ListTranscriptionJobsOutput {
return p.Pager.CurrentPage().(*ListTranscriptionJobsOutput)
}
const opListVocabularies = "ListVocabularies"
// ListVocabulariesRequest is a API request type for the ListVocabularies API operation.
type ListVocabulariesRequest struct {
*aws.Request
Input *ListVocabulariesInput
Copy func(*ListVocabulariesInput) ListVocabulariesRequest
}
// Send marshals and sends the ListVocabularies API request.
func (r ListVocabulariesRequest) Send() (*ListVocabulariesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListVocabulariesOutput), nil
}
// ListVocabulariesRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Returns a list of vocabularies that match the specified criteria. If no criteria
// are specified, returns the entire list of vocabularies.
//
// // Example sending a request using the ListVocabulariesRequest method.
// req := client.ListVocabulariesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListVocabularies
func (c *TranscribeService) ListVocabulariesRequest(input *ListVocabulariesInput) ListVocabulariesRequest {
op := &aws.Operation{
Name: opListVocabularies,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListVocabulariesInput{}
}
output := &ListVocabulariesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListVocabulariesRequest{Request: req, Input: input, Copy: c.ListVocabulariesRequest}
}
// Paginate pages iterates over the pages of a ListVocabulariesRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListVocabularies operation.
// req := client.ListVocabulariesRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *ListVocabulariesRequest) Paginate(opts ...aws.Option) ListVocabulariesPager {
return ListVocabulariesPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *ListVocabulariesInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// ListVocabulariesPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type ListVocabulariesPager struct {
aws.Pager
}
func (p *ListVocabulariesPager) CurrentPage() *ListVocabulariesOutput {
return p.Pager.CurrentPage().(*ListVocabulariesOutput)
}
const opStartTranscriptionJob = "StartTranscriptionJob"
// StartTranscriptionJobRequest is a API request type for the StartTranscriptionJob API operation.
type StartTranscriptionJobRequest struct {
*aws.Request
Input *StartTranscriptionJobInput
Copy func(*StartTranscriptionJobInput) StartTranscriptionJobRequest
}
// Send marshals and sends the StartTranscriptionJob API request.
func (r StartTranscriptionJobRequest) Send() (*StartTranscriptionJobOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*StartTranscriptionJobOutput), nil
}
// StartTranscriptionJobRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Starts an asynchronous job to transcribe speech to text.
//
// // Example sending a request using the StartTranscriptionJobRequest method.
// req := client.StartTranscriptionJobRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob
func (c *TranscribeService) StartTranscriptionJobRequest(input *StartTranscriptionJobInput) StartTranscriptionJobRequest {
op := &aws.Operation{
Name: opStartTranscriptionJob,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &StartTranscriptionJobInput{}
}
output := &StartTranscriptionJobOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return StartTranscriptionJobRequest{Request: req, Input: input, Copy: c.StartTranscriptionJobRequest}
}
const opUpdateVocabulary = "UpdateVocabulary"
// UpdateVocabularyRequest is a API request type for the UpdateVocabulary API operation.
type UpdateVocabularyRequest struct {
*aws.Request
Input *UpdateVocabularyInput
Copy func(*UpdateVocabularyInput) UpdateVocabularyRequest
}
// Send marshals and sends the UpdateVocabulary API request.
func (r UpdateVocabularyRequest) Send() (*UpdateVocabularyOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateVocabularyOutput), nil
}
// UpdateVocabularyRequest returns a request value for making API operation for
// Amazon Transcribe Service.
//
// Updates an existing vocabulary with new values.
//
// // Example sending a request using the UpdateVocabularyRequest method.
// req := client.UpdateVocabularyRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/UpdateVocabulary
func (c *TranscribeService) UpdateVocabularyRequest(input *UpdateVocabularyInput) UpdateVocabularyRequest {
op := &aws.Operation{
Name: opUpdateVocabulary,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateVocabularyInput{}
}
output := &UpdateVocabularyOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateVocabularyRequest{Request: req, Input: input, Copy: c.UpdateVocabularyRequest}
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateVocabularyRequest
type CreateVocabularyInput struct {
_ struct{} `type:"structure"`
// The language code of the vocabulary entries.
//
// LanguageCode is a required field
LanguageCode LanguageCode `type:"string" required:"true" enum:"true"`
// An array of strings that contains the vocabulary entries.
//
// Phrases is a required field
Phrases []string `type:"list" required:"true"`
// The name of the vocabulary. The name must be unique within an AWS account.
// The name is case-sensitive.
//
// VocabularyName is a required field
VocabularyName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateVocabularyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateVocabularyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateVocabularyInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateVocabularyInput"}
if len(s.LanguageCode) == 0 {
invalidParams.Add(aws.NewErrParamRequired("LanguageCode"))
}
if s.Phrases == nil {
invalidParams.Add(aws.NewErrParamRequired("Phrases"))
}
if s.VocabularyName == nil {
invalidParams.Add(aws.NewErrParamRequired("VocabularyName"))
}
if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("VocabularyName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateVocabularyResponse
type CreateVocabularyOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// If the VocabularyState field is FAILED, this field contains information about
// why the job failed.
FailureReason *string `type:"string"`
// The language code of the vocabulary entries.
LanguageCode LanguageCode `type:"string" enum:"true"`
// The date and time that the vocabulary was created.
LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The name of the vocabulary.
VocabularyName *string `min:"1" type:"string"`
// The processing state of the vocabulary. When the VocabularyState field contains
// READY the vocabulary is ready to be used in a StartTranscriptionJob request.
VocabularyState VocabularyState `type:"string" enum:"true"`
}
// String returns the string representation
func (s CreateVocabularyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateVocabularyOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s CreateVocabularyOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteVocabularyRequest
type DeleteVocabularyInput struct {
_ struct{} `type:"structure"`
// The name of the vocabulary to delete.
//
// VocabularyName is a required field
VocabularyName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteVocabularyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteVocabularyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteVocabularyInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DeleteVocabularyInput"}
if s.VocabularyName == nil {
invalidParams.Add(aws.NewErrParamRequired("VocabularyName"))
}
if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("VocabularyName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteVocabularyOutput
type DeleteVocabularyOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s DeleteVocabularyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteVocabularyOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DeleteVocabularyOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJobRequest
type GetTranscriptionJobInput struct {
_ struct{} `type:"structure"`
// The name of the job.
//
// TranscriptionJobName is a required field
TranscriptionJobName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetTranscriptionJobInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetTranscriptionJobInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetTranscriptionJobInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "GetTranscriptionJobInput"}
if s.TranscriptionJobName == nil {
invalidParams.Add(aws.NewErrParamRequired("TranscriptionJobName"))
}
if s.TranscriptionJobName != nil && len(*s.TranscriptionJobName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("TranscriptionJobName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJobResponse
type GetTranscriptionJobOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// An object that contains the results of the transcription job.
TranscriptionJob *TranscriptionJob `type:"structure"`
}
// String returns the string representation
func (s GetTranscriptionJobOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetTranscriptionJobOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s GetTranscriptionJobOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetVocabularyRequest
type GetVocabularyInput struct {
_ struct{} `type:"structure"`
// The name of the vocabulary to return information about. The name is case-sensitive.
//
// VocabularyName is a required field
VocabularyName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetVocabularyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetVocabularyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetVocabularyInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "GetVocabularyInput"}
if s.VocabularyName == nil {
invalidParams.Add(aws.NewErrParamRequired("VocabularyName"))
}
if s.VocabularyName != nil && len(*s.VocabularyName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("VocabularyName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetVocabularyResponse
type GetVocabularyOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// The S3 location where the vocabulary is stored. Use this URI to get the contents
// of the vocabulary. The URI is available for a limited time.
DownloadUri *string `min:"1" type:"string"`
// If the VocabularyState field is FAILED, this field contains information about
// why the job failed.
FailureReason *string `type:"string"`
// The language code of the vocabulary entries.
LanguageCode LanguageCode `type:"string" enum:"true"`
// The date and time that the vocabulary was last modified.
LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The name of the vocabulary to return.
VocabularyName *string `min:"1" type:"string"`
// The processing state of the vocabulary.
VocabularyState VocabularyState `type:"string" enum:"true"`
}
// String returns the string representation
func (s GetVocabularyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetVocabularyOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s GetVocabularyOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobsRequest
type ListTranscriptionJobsInput struct {
_ struct{} `type:"structure"`
// When specified, the jobs returned in the list are limited to jobs whose name
// contains the specified string.
JobNameContains *string `min:"1" type:"string"`
// The maximum number of jobs to return in the response. If there are fewer
// results in the list, this response contains only the actual results.
MaxResults *int64 `min:"1" type:"integer"`
// If the result of the previous request to ListTranscriptionJobs was truncated,
// include the NextToken to fetch the next set of jobs.
NextToken *string `type:"string"`
// When specified, returns only transcription jobs with the specified status.
Status TranscriptionJobStatus `type:"string" enum:"true"`
}
// String returns the string representation
func (s ListTranscriptionJobsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTranscriptionJobsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListTranscriptionJobsInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ListTranscriptionJobsInput"}
if s.JobNameContains != nil && len(*s.JobNameContains) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("JobNameContains", 1))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(aws.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobsResponse
type ListTranscriptionJobsOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// The ListTranscriptionJobs operation returns a page of jobs at a time. The
// maximum size of the page is set by the MaxResults parameter. If there are
// more jobs in the list than the page size, Amazon Transcribe returns the NextPage
// token. Include the token in the next request to the ListTranscriptionJobs
// operation to return in the next page of jobs.
NextToken *string `type:"string"`
// The requested status of the jobs returned.
Status TranscriptionJobStatus `type:"string" enum:"true"`
// A list of objects containing summary information for a transcription job.
TranscriptionJobSummaries []TranscriptionJobSummary `type:"list"`
}
// String returns the string representation
func (s ListTranscriptionJobsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTranscriptionJobsOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s ListTranscriptionJobsOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListVocabulariesRequest
type ListVocabulariesInput struct {
_ struct{} `type:"structure"`
// The maximum number of vocabularies to return in the response. If there are
// fewer results in the list, this response contains only the actual results.
MaxResults *int64 `min:"1" type:"integer"`
// When specified, the vocabularies returned in the list are limited to vocabularies
// whose name contains the specified string. The search is case-insensitive,
// ListVocabularies will return both "vocabularyname" and "VocabularyName" in
// the response list.
NameContains *string `min:"1" type:"string"`
// If the result of the previous request to ListVocabularies was truncated,
// include the NextToken to fetch the next set of jobs.
NextToken *string `type:"string"`
// When specified, only returns vocabularies with the VocabularyState field
// equal to the specified state.
StateEquals VocabularyState `type:"string" enum:"true"`
}
// String returns the string representation
func (s ListVocabulariesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListVocabulariesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListVocabulariesInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ListVocabulariesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(aws.NewErrParamMinValue("MaxResults", 1))
}
if s.NameContains != nil && len(*s.NameContains) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("NameContains", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListVocabulariesResponse
type ListVocabulariesOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// The ListVocabularies operation returns a page of vocabularies at a time.
// The maximum size of the page is set by the MaxResults parameter. If there
// are more jobs in the list than the page size, Amazon Transcribe returns the
// NextPage token. Include the token in the next request to the ListVocabularies
// operation to return in the next page of jobs.
NextToken *string `type:"string"`
// The requested vocabulary state.
Status TranscriptionJobStatus `type:"string" enum:"true"`
// A list of objects that describe the vocabularies that match the search criteria
// in the request.
Vocabularies []VocabularyInfo `type:"list"`
}
// String returns the string representation
func (s ListVocabulariesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListVocabulariesOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s ListVocabulariesOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Describes the input media file in a transcription request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/Media
type Media struct {
_ struct{} `type:"structure"`
// The S3 location of the input media file. The URI must be in the same region
// as the API endpoint that you are calling. The general form is:
//
// https://<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey>
//
// For example:
//
// https://s3-us-east-1.amazonaws.com/examplebucket/example.mp4
//
// https://s3-us-east-1.amazonaws.com/examplebucket/mediadocs/example.mp4
//