-
Notifications
You must be signed in to change notification settings - Fork 623
/
api_types.go
11634 lines (9481 loc) · 397 KB
/
api_types.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 medialive
import (
"fmt"
"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"
)
var _ aws.Config
var _ = awsutil.Prettify
// Aac Settings
type AacSettings struct {
_ struct{} `type:"structure"`
// Average bitrate in bits/second. Valid values depend on rate control mode
// and profile.
Bitrate *float64 `locationName:"bitrate" type:"double"`
// Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control
// mode and profile. The adReceiverMix setting receives a stereo description
// plus control track and emits a mono AAC encode of the description track,
// with control data emitted in the PES header as per ETSI TS 101 154 Annex
// E.
CodingMode AacCodingMode `locationName:"codingMode" type:"string" enum:"true"`
// Set to "broadcasterMixedAd" when input contains pre-mixed main audio + AD
// (narration) as a stereo pair. The Audio Type field (audioType) will be set
// to 3, which signals to downstream systems that this stream contains "broadcaster
// mixed AD". Note that the input received by the encoder must contain pre-mixed
// audio; the encoder does not perform the mixing. The values in audioTypeControl
// and audioType (in AudioDescription) are ignored when set to broadcasterMixedAd.Leave
// set to "normal" when input does not contain pre-mixed audio + AD.
InputType AacInputType `locationName:"inputType" type:"string" enum:"true"`
// AAC Profile.
Profile AacProfile `locationName:"profile" type:"string" enum:"true"`
// Rate Control Mode.
RateControlMode AacRateControlMode `locationName:"rateControlMode" type:"string" enum:"true"`
// Sets LATM / LOAS AAC output for raw containers.
RawFormat AacRawFormat `locationName:"rawFormat" type:"string" enum:"true"`
// Sample rate in Hz. Valid values depend on rate control mode and profile.
SampleRate *float64 `locationName:"sampleRate" type:"double"`
// Use MPEG-2 AAC audio instead of MPEG-4 AAC audio for raw or MPEG-2 Transport
// Stream containers.
Spec AacSpec `locationName:"spec" type:"string" enum:"true"`
// VBR Quality Level - Only used if rateControlMode is VBR.
VbrQuality AacVbrQuality `locationName:"vbrQuality" type:"string" enum:"true"`
}
// String returns the string representation
func (s AacSettings) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AacSettings) MarshalFields(e protocol.FieldEncoder) error {
if s.Bitrate != nil {
v := *s.Bitrate
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "bitrate", protocol.Float64Value(v), metadata)
}
if len(s.CodingMode) > 0 {
v := s.CodingMode
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "codingMode", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.InputType) > 0 {
v := s.InputType
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "inputType", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.Profile) > 0 {
v := s.Profile
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "profile", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.RateControlMode) > 0 {
v := s.RateControlMode
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "rateControlMode", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.RawFormat) > 0 {
v := s.RawFormat
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "rawFormat", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.SampleRate != nil {
v := *s.SampleRate
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Float64Value(v), metadata)
}
if len(s.Spec) > 0 {
v := s.Spec
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "spec", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.VbrQuality) > 0 {
v := s.VbrQuality
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "vbrQuality", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
return nil
}
// Ac3 Settings
type Ac3Settings struct {
_ struct{} `type:"structure"`
// Average bitrate in bits/second. Valid bitrates depend on the coding mode.
Bitrate *float64 `locationName:"bitrate" type:"double"`
// Specifies the bitstream mode (bsmod) for the emitted AC-3 stream. See ATSC
// A/52-2012 for background on these values.
BitstreamMode Ac3BitstreamMode `locationName:"bitstreamMode" type:"string" enum:"true"`
// Dolby Digital coding mode. Determines number of channels.
CodingMode Ac3CodingMode `locationName:"codingMode" type:"string" enum:"true"`
// Sets the dialnorm for the output. If excluded and input audio is Dolby Digital,
// dialnorm will be passed through.
Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"`
// If set to filmStandard, adds dynamic range compression signaling to the output
// bitstream as defined in the Dolby Digital specification.
DrcProfile Ac3DrcProfile `locationName:"drcProfile" type:"string" enum:"true"`
// When set to enabled, applies a 120Hz lowpass filter to the LFE channel prior
// to encoding. Only valid in codingMode32Lfe mode.
LfeFilter Ac3LfeFilter `locationName:"lfeFilter" type:"string" enum:"true"`
// When set to "followInput", encoder metadata will be sourced from the DD,
// DD+, or DolbyE decoder that supplied this audio data. If audio was not supplied
// from one of these streams, then the static metadata settings will be used.
MetadataControl Ac3MetadataControl `locationName:"metadataControl" type:"string" enum:"true"`
}
// String returns the string representation
func (s Ac3Settings) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Ac3Settings) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "Ac3Settings"}
if s.Dialnorm != nil && *s.Dialnorm < 1 {
invalidParams.Add(aws.NewErrParamMinValue("Dialnorm", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s Ac3Settings) MarshalFields(e protocol.FieldEncoder) error {
if s.Bitrate != nil {
v := *s.Bitrate
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "bitrate", protocol.Float64Value(v), metadata)
}
if len(s.BitstreamMode) > 0 {
v := s.BitstreamMode
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "bitstreamMode", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.CodingMode) > 0 {
v := s.CodingMode
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "codingMode", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.Dialnorm != nil {
v := *s.Dialnorm
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "dialnorm", protocol.Int64Value(v), metadata)
}
if len(s.DrcProfile) > 0 {
v := s.DrcProfile
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "drcProfile", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.LfeFilter) > 0 {
v := s.LfeFilter
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "lfeFilter", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.MetadataControl) > 0 {
v := s.MetadataControl
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "metadataControl", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
return nil
}
// Archive Container Settings
type ArchiveContainerSettings struct {
_ struct{} `type:"structure"`
// M2ts Settings
M2tsSettings *M2tsSettings `locationName:"m2tsSettings" type:"structure"`
}
// String returns the string representation
func (s ArchiveContainerSettings) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ArchiveContainerSettings) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ArchiveContainerSettings"}
if s.M2tsSettings != nil {
if err := s.M2tsSettings.Validate(); err != nil {
invalidParams.AddNested("M2tsSettings", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s ArchiveContainerSettings) MarshalFields(e protocol.FieldEncoder) error {
if s.M2tsSettings != nil {
v := s.M2tsSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "m2tsSettings", v, metadata)
}
return nil
}
// Archive Group Settings
type ArchiveGroupSettings struct {
_ struct{} `type:"structure"`
// A directory and base filename where archive files should be written.
//
// Destination is a required field
Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"`
// Number of seconds to write to archive file before closing and starting a
// new one.
RolloverInterval *int64 `locationName:"rolloverInterval" min:"1" type:"integer"`
}
// String returns the string representation
func (s ArchiveGroupSettings) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ArchiveGroupSettings) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ArchiveGroupSettings"}
if s.Destination == nil {
invalidParams.Add(aws.NewErrParamRequired("Destination"))
}
if s.RolloverInterval != nil && *s.RolloverInterval < 1 {
invalidParams.Add(aws.NewErrParamMinValue("RolloverInterval", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s ArchiveGroupSettings) MarshalFields(e protocol.FieldEncoder) error {
if s.Destination != nil {
v := s.Destination
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "destination", v, metadata)
}
if s.RolloverInterval != nil {
v := *s.RolloverInterval
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "rolloverInterval", protocol.Int64Value(v), metadata)
}
return nil
}
// Archive Output Settings
type ArchiveOutputSettings struct {
_ struct{} `type:"structure"`
// Settings specific to the container type of the file.
//
// ContainerSettings is a required field
ContainerSettings *ArchiveContainerSettings `locationName:"containerSettings" type:"structure" required:"true"`
// Output file extension. If excluded, this will be auto-selected from the container
// type.
Extension *string `locationName:"extension" type:"string"`
// String concatenated to the end of the destination filename. Required for
// multiple outputs of the same type.
NameModifier *string `locationName:"nameModifier" type:"string"`
}
// String returns the string representation
func (s ArchiveOutputSettings) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ArchiveOutputSettings) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ArchiveOutputSettings"}
if s.ContainerSettings == nil {
invalidParams.Add(aws.NewErrParamRequired("ContainerSettings"))
}
if s.ContainerSettings != nil {
if err := s.ContainerSettings.Validate(); err != nil {
invalidParams.AddNested("ContainerSettings", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s ArchiveOutputSettings) MarshalFields(e protocol.FieldEncoder) error {
if s.ContainerSettings != nil {
v := s.ContainerSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "containerSettings", v, metadata)
}
if s.Extension != nil {
v := *s.Extension
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "extension", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.NameModifier != nil {
v := *s.NameModifier
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "nameModifier", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
return nil
}
// Arib Destination Settings
type AribDestinationSettings struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s AribDestinationSettings) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AribDestinationSettings) MarshalFields(e protocol.FieldEncoder) error {
return nil
}
// Arib Source Settings
type AribSourceSettings struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s AribSourceSettings) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AribSourceSettings) MarshalFields(e protocol.FieldEncoder) error {
return nil
}
// Audio Channel Mapping
type AudioChannelMapping struct {
_ struct{} `type:"structure"`
// Indices and gain values for each input channel that should be remixed into
// this output channel.
//
// InputChannelLevels is a required field
InputChannelLevels []InputChannelLevel `locationName:"inputChannelLevels" type:"list" required:"true"`
// The index of the output channel being produced.
//
// OutputChannel is a required field
OutputChannel *int64 `locationName:"outputChannel" type:"integer" required:"true"`
}
// String returns the string representation
func (s AudioChannelMapping) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioChannelMapping) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioChannelMapping"}
if s.InputChannelLevels == nil {
invalidParams.Add(aws.NewErrParamRequired("InputChannelLevels"))
}
if s.OutputChannel == nil {
invalidParams.Add(aws.NewErrParamRequired("OutputChannel"))
}
if s.InputChannelLevels != nil {
for i, v := range s.InputChannelLevels {
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputChannelLevels", i), err.(aws.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioChannelMapping) MarshalFields(e protocol.FieldEncoder) error {
if s.InputChannelLevels != nil {
v := s.InputChannelLevels
metadata := protocol.Metadata{}
ls0 := e.List(protocol.BodyTarget, "inputChannelLevels", metadata)
ls0.Start()
for _, v1 := range v {
ls0.ListAddFields(v1)
}
ls0.End()
}
if s.OutputChannel != nil {
v := *s.OutputChannel
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "outputChannel", protocol.Int64Value(v), metadata)
}
return nil
}
// Audio Codec Settings
type AudioCodecSettings struct {
_ struct{} `type:"structure"`
// Aac Settings
AacSettings *AacSettings `locationName:"aacSettings" type:"structure"`
// Ac3 Settings
Ac3Settings *Ac3Settings `locationName:"ac3Settings" type:"structure"`
// Eac3 Settings
Eac3Settings *Eac3Settings `locationName:"eac3Settings" type:"structure"`
// Mp2 Settings
Mp2Settings *Mp2Settings `locationName:"mp2Settings" type:"structure"`
// Pass Through Settings
PassThroughSettings *PassThroughSettings `locationName:"passThroughSettings" type:"structure"`
}
// String returns the string representation
func (s AudioCodecSettings) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioCodecSettings) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioCodecSettings"}
if s.Ac3Settings != nil {
if err := s.Ac3Settings.Validate(); err != nil {
invalidParams.AddNested("Ac3Settings", err.(aws.ErrInvalidParams))
}
}
if s.Eac3Settings != nil {
if err := s.Eac3Settings.Validate(); err != nil {
invalidParams.AddNested("Eac3Settings", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioCodecSettings) MarshalFields(e protocol.FieldEncoder) error {
if s.AacSettings != nil {
v := s.AacSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "aacSettings", v, metadata)
}
if s.Ac3Settings != nil {
v := s.Ac3Settings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "ac3Settings", v, metadata)
}
if s.Eac3Settings != nil {
v := s.Eac3Settings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "eac3Settings", v, metadata)
}
if s.Mp2Settings != nil {
v := s.Mp2Settings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "mp2Settings", v, metadata)
}
if s.PassThroughSettings != nil {
v := s.PassThroughSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "passThroughSettings", v, metadata)
}
return nil
}
// Audio Description
type AudioDescription struct {
_ struct{} `type:"structure"`
// Advanced audio normalization settings.
AudioNormalizationSettings *AudioNormalizationSettings `locationName:"audioNormalizationSettings" type:"structure"`
// The name of the AudioSelector used as the source for this AudioDescription.
//
// AudioSelectorName is a required field
AudioSelectorName *string `locationName:"audioSelectorName" type:"string" required:"true"`
// Applies only if audioTypeControl is useConfigured. The values for audioType
// are defined in ISO-IEC 13818-1.
AudioType AudioType `locationName:"audioType" type:"string" enum:"true"`
// Determines how audio type is determined. followInput: If the input contains
// an ISO 639 audioType, then that value is passed through to the output. If
// the input contains no ISO 639 audioType, the value in Audio Type is included
// in the output. useConfigured: The value in Audio Type is included in the
// output.Note that this field and audioType are both ignored if inputType is
// broadcasterMixedAd.
AudioTypeControl AudioDescriptionAudioTypeControl `locationName:"audioTypeControl" type:"string" enum:"true"`
// Audio codec settings.
CodecSettings *AudioCodecSettings `locationName:"codecSettings" type:"structure"`
// Indicates the language of the audio output track. Only used if languageControlMode
// is useConfigured, or there is no ISO 639 language code specified in the input.
LanguageCode *string `locationName:"languageCode" min:"3" type:"string"`
// Choosing followInput will cause the ISO 639 language code of the output to
// follow the ISO 639 language code of the input. The languageCode will be used
// when useConfigured is set, or when followInput is selected but there is no
// ISO 639 language code specified by the input.
LanguageCodeControl AudioDescriptionLanguageCodeControl `locationName:"languageCodeControl" type:"string" enum:"true"`
// The name of this AudioDescription. Outputs will use this name to uniquely
// identify this AudioDescription. Description names should be unique within
// this Live Event.
//
// Name is a required field
Name *string `locationName:"name" type:"string" required:"true"`
// Settings that control how input audio channels are remixed into the output
// audio channels.
RemixSettings *RemixSettings `locationName:"remixSettings" type:"structure"`
// Used for MS Smooth and Apple HLS outputs. Indicates the name displayed by
// the player (eg. English, or Director Commentary).
StreamName *string `locationName:"streamName" type:"string"`
}
// String returns the string representation
func (s AudioDescription) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioDescription) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioDescription"}
if s.AudioSelectorName == nil {
invalidParams.Add(aws.NewErrParamRequired("AudioSelectorName"))
}
if s.LanguageCode != nil && len(*s.LanguageCode) < 3 {
invalidParams.Add(aws.NewErrParamMinLen("LanguageCode", 3))
}
if s.Name == nil {
invalidParams.Add(aws.NewErrParamRequired("Name"))
}
if s.CodecSettings != nil {
if err := s.CodecSettings.Validate(); err != nil {
invalidParams.AddNested("CodecSettings", err.(aws.ErrInvalidParams))
}
}
if s.RemixSettings != nil {
if err := s.RemixSettings.Validate(); err != nil {
invalidParams.AddNested("RemixSettings", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioDescription) MarshalFields(e protocol.FieldEncoder) error {
if s.AudioNormalizationSettings != nil {
v := s.AudioNormalizationSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "audioNormalizationSettings", v, metadata)
}
if s.AudioSelectorName != nil {
v := *s.AudioSelectorName
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "audioSelectorName", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if len(s.AudioType) > 0 {
v := s.AudioType
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "audioType", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.AudioTypeControl) > 0 {
v := s.AudioTypeControl
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "audioTypeControl", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.CodecSettings != nil {
v := s.CodecSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "codecSettings", v, metadata)
}
if s.LanguageCode != nil {
v := *s.LanguageCode
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "languageCode", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if len(s.LanguageCodeControl) > 0 {
v := s.LanguageCodeControl
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "languageCodeControl", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.Name != nil {
v := *s.Name
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "name", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.RemixSettings != nil {
v := s.RemixSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "remixSettings", v, metadata)
}
if s.StreamName != nil {
v := *s.StreamName
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "streamName", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
return nil
}
// Audio Language Selection
type AudioLanguageSelection struct {
_ struct{} `type:"structure"`
// Selects a specific three-letter language code from within an audio source.
//
// LanguageCode is a required field
LanguageCode *string `locationName:"languageCode" type:"string" required:"true"`
// When set to "strict", the transport stream demux strictly identifies audio
// streams by their language descriptor. If a PMT update occurs such that an
// audio stream matching the initially selected language is no longer present
// then mute will be encoded until the language returns. If "loose", then on
// a PMT update the demux will choose another audio stream in the program with
// the same stream type if it can't find one with the same language.
LanguageSelectionPolicy AudioLanguageSelectionPolicy `locationName:"languageSelectionPolicy" type:"string" enum:"true"`
}
// String returns the string representation
func (s AudioLanguageSelection) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioLanguageSelection) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioLanguageSelection"}
if s.LanguageCode == nil {
invalidParams.Add(aws.NewErrParamRequired("LanguageCode"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioLanguageSelection) MarshalFields(e protocol.FieldEncoder) error {
if s.LanguageCode != nil {
v := *s.LanguageCode
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "languageCode", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if len(s.LanguageSelectionPolicy) > 0 {
v := s.LanguageSelectionPolicy
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "languageSelectionPolicy", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
return nil
}
// Audio Normalization Settings
type AudioNormalizationSettings struct {
_ struct{} `type:"structure"`
// Audio normalization algorithm to use. itu17701 conforms to the CALM Act specification,
// itu17702 conforms to the EBU R-128 specification.
Algorithm AudioNormalizationAlgorithm `locationName:"algorithm" type:"string" enum:"true"`
// When set to correctAudio the output audio is corrected using the chosen algorithm.
// If set to measureOnly, the audio will be measured but not adjusted.
AlgorithmControl AudioNormalizationAlgorithmControl `locationName:"algorithmControl" type:"string" enum:"true"`
// Target LKFS(loudness) to adjust volume to. If no value is entered, a default
// value will be used according to the chosen algorithm. The CALM Act (1770-1)
// recommends a target of -24 LKFS. The EBU R-128 specification (1770-2) recommends
// a target of -23 LKFS.
TargetLkfs *float64 `locationName:"targetLkfs" type:"double"`
}
// String returns the string representation
func (s AudioNormalizationSettings) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioNormalizationSettings) MarshalFields(e protocol.FieldEncoder) error {
if len(s.Algorithm) > 0 {
v := s.Algorithm
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "algorithm", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if len(s.AlgorithmControl) > 0 {
v := s.AlgorithmControl
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "algorithmControl", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.TargetLkfs != nil {
v := *s.TargetLkfs
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "targetLkfs", protocol.Float64Value(v), metadata)
}
return nil
}
// Audio Only Hls Settings
type AudioOnlyHlsSettings struct {
_ struct{} `type:"structure"`
// Specifies the group to which the audio Rendition belongs.
AudioGroupId *string `locationName:"audioGroupId" type:"string"`
// Optional. Specifies the .jpg or .png image to use as the cover art for an
// audio-only output. We recommend a low bit-size file because the image increases
// the output audio bandwidth.The image is attached to the audio as an ID3 tag,
// frame type APIC, picture type 0x10, as per the "ID3 tag version 2.4.0 - Native
// Frames" standard.
AudioOnlyImage *InputLocation `locationName:"audioOnlyImage" type:"structure"`
// Four types of audio-only tracks are supported:Audio-Only Variant StreamThe
// client can play back this audio-only stream instead of video in low-bandwidth
// scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest.Alternate
// Audio, Auto Select, DefaultAlternate rendition that the client should try
// to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest
// with DEFAULT=YES, AUTOSELECT=YESAlternate Audio, Auto Select, Not DefaultAlternate
// rendition that the client may try to play back by default. Represented as
// an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YESAlternate
// Audio, not Auto SelectAlternate rendition that the client will not try to
// play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with
// DEFAULT=NO, AUTOSELECT=NO
AudioTrackType AudioOnlyHlsTrackType `locationName:"audioTrackType" type:"string" enum:"true"`
}
// String returns the string representation
func (s AudioOnlyHlsSettings) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioOnlyHlsSettings) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioOnlyHlsSettings"}
if s.AudioOnlyImage != nil {
if err := s.AudioOnlyImage.Validate(); err != nil {
invalidParams.AddNested("AudioOnlyImage", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioOnlyHlsSettings) MarshalFields(e protocol.FieldEncoder) error {
if s.AudioGroupId != nil {
v := *s.AudioGroupId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "audioGroupId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.AudioOnlyImage != nil {
v := s.AudioOnlyImage
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "audioOnlyImage", v, metadata)
}
if len(s.AudioTrackType) > 0 {
v := s.AudioTrackType
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "audioTrackType", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
return nil
}
// Audio Pid Selection
type AudioPidSelection struct {
_ struct{} `type:"structure"`
// Selects a specific PID from within a source.
//
// Pid is a required field
Pid *int64 `locationName:"pid" type:"integer" required:"true"`
}
// String returns the string representation
func (s AudioPidSelection) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioPidSelection) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioPidSelection"}
if s.Pid == nil {
invalidParams.Add(aws.NewErrParamRequired("Pid"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioPidSelection) MarshalFields(e protocol.FieldEncoder) error {
if s.Pid != nil {
v := *s.Pid
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "pid", protocol.Int64Value(v), metadata)
}
return nil
}
// Audio Selector
type AudioSelector struct {
_ struct{} `type:"structure"`
// The name of this AudioSelector. AudioDescriptions will use this name to uniquely
// identify this Selector. Selector names should be unique per input.
//
// Name is a required field
Name *string `locationName:"name" min:"1" type:"string" required:"true"`
// The audio selector settings.
SelectorSettings *AudioSelectorSettings `locationName:"selectorSettings" type:"structure"`
}
// String returns the string representation
func (s AudioSelector) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioSelector) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioSelector"}
if s.Name == nil {
invalidParams.Add(aws.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Name", 1))
}
if s.SelectorSettings != nil {
if err := s.SelectorSettings.Validate(); err != nil {
invalidParams.AddNested("SelectorSettings", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AudioSelector) MarshalFields(e protocol.FieldEncoder) error {
if s.Name != nil {
v := *s.Name
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "name", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.SelectorSettings != nil {
v := s.SelectorSettings
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "selectorSettings", v, metadata)
}
return nil
}
// Audio Selector Settings
type AudioSelectorSettings struct {
_ struct{} `type:"structure"`
// Audio Language Selection
AudioLanguageSelection *AudioLanguageSelection `locationName:"audioLanguageSelection" type:"structure"`
// Audio Pid Selection
AudioPidSelection *AudioPidSelection `locationName:"audioPidSelection" type:"structure"`
}
// String returns the string representation
func (s AudioSelectorSettings) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AudioSelectorSettings) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AudioSelectorSettings"}
if s.AudioLanguageSelection != nil {