-
Notifications
You must be signed in to change notification settings - Fork 598
/
api_types.go
1346 lines (1092 loc) · 42.2 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 amplify
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"
)
var _ aws.Config
var _ = awsutil.Prettify
// Amplify App represents different branches of a repository for building, deploying,
// and hosting.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/App
type App struct {
_ struct{} `type:"structure"`
// ARN for the Amplify App.
//
// AppArn is a required field
AppArn *string `locationName:"appArn" type:"string" required:"true"`
// Unique Id for the Amplify App.
//
// AppId is a required field
AppId *string `locationName:"appId" min:"1" type:"string" required:"true"`
// Automated branch creation config for the Amplify App.
AutoBranchCreationConfig *AutoBranchCreationConfig `locationName:"autoBranchCreationConfig" type:"structure"`
// Automated branch creation glob patterns for the Amplify App.
AutoBranchCreationPatterns []string `locationName:"autoBranchCreationPatterns" type:"list"`
// Basic Authorization credentials for branches for the Amplify App.
BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
// BuildSpec content for Amplify App.
BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
// Create date / time for the Amplify App.
//
// CreateTime is a required field
CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"`
// Custom redirect / rewrite rules for the Amplify App.
CustomRules []CustomRule `locationName:"customRules" type:"list"`
// Default domain for the Amplify App.
//
// DefaultDomain is a required field
DefaultDomain *string `locationName:"defaultDomain" min:"1" type:"string" required:"true"`
// Description for the Amplify App.
//
// Description is a required field
Description *string `locationName:"description" type:"string" required:"true"`
// Enables automated branch creation for the Amplify App.
EnableAutoBranchCreation *bool `locationName:"enableAutoBranchCreation" type:"boolean"`
// Enables Basic Authorization for branches for the Amplify App.
//
// EnableBasicAuth is a required field
EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean" required:"true"`
// Enables auto-building of branches for the Amplify App.
//
// EnableBranchAutoBuild is a required field
EnableBranchAutoBuild *bool `locationName:"enableBranchAutoBuild" type:"boolean" required:"true"`
// Environment Variables for the Amplify App.
//
// EnvironmentVariables is a required field
EnvironmentVariables map[string]string `locationName:"environmentVariables" type:"map" required:"true"`
// IAM service role ARN for the Amplify App.
IamServiceRoleArn *string `locationName:"iamServiceRoleArn" min:"1" type:"string"`
// Name for the Amplify App.
//
// Name is a required field
Name *string `locationName:"name" min:"1" type:"string" required:"true"`
// Platform for the Amplify App.
//
// Platform is a required field
Platform Platform `locationName:"platform" type:"string" required:"true" enum:"true"`
// Structure with Production Branch information.
ProductionBranch *ProductionBranch `locationName:"productionBranch" type:"structure"`
// Repository for the Amplify App.
//
// Repository is a required field
Repository *string `locationName:"repository" type:"string" required:"true"`
// Tag for Amplify App.
Tags map[string]string `locationName:"tags" min:"1" type:"map"`
// Update date / time for the Amplify App.
//
// UpdateTime is a required field
UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" required:"true"`
}
// String returns the string representation
func (s App) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s App) MarshalFields(e protocol.FieldEncoder) error {
if s.AppArn != nil {
v := *s.AppArn
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "appArn", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.AppId != nil {
v := *s.AppId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "appId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.AutoBranchCreationConfig != nil {
v := s.AutoBranchCreationConfig
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "autoBranchCreationConfig", v, metadata)
}
if s.AutoBranchCreationPatterns != nil {
v := s.AutoBranchCreationPatterns
metadata := protocol.Metadata{}
ls0 := e.List(protocol.BodyTarget, "autoBranchCreationPatterns", metadata)
ls0.Start()
for _, v1 := range v {
ls0.ListAddValue(protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ls0.End()
}
if s.BasicAuthCredentials != nil {
v := *s.BasicAuthCredentials
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "basicAuthCredentials", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.BuildSpec != nil {
v := *s.BuildSpec
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "buildSpec", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.CreateTime != nil {
v := *s.CreateTime
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "createTime",
protocol.TimeValue{V: v, Format: protocol.UnixTimeFormatName, QuotedFormatTime: true}, metadata)
}
if s.CustomRules != nil {
v := s.CustomRules
metadata := protocol.Metadata{}
ls0 := e.List(protocol.BodyTarget, "customRules", metadata)
ls0.Start()
for _, v1 := range v {
ls0.ListAddFields(v1)
}
ls0.End()
}
if s.DefaultDomain != nil {
v := *s.DefaultDomain
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "defaultDomain", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Description != nil {
v := *s.Description
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "description", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.EnableAutoBranchCreation != nil {
v := *s.EnableAutoBranchCreation
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableAutoBranchCreation", protocol.BoolValue(v), metadata)
}
if s.EnableBasicAuth != nil {
v := *s.EnableBasicAuth
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableBasicAuth", protocol.BoolValue(v), metadata)
}
if s.EnableBranchAutoBuild != nil {
v := *s.EnableBranchAutoBuild
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableBranchAutoBuild", protocol.BoolValue(v), metadata)
}
if s.EnvironmentVariables != nil {
v := s.EnvironmentVariables
metadata := protocol.Metadata{}
ms0 := e.Map(protocol.BodyTarget, "environmentVariables", metadata)
ms0.Start()
for k1, v1 := range v {
ms0.MapSetValue(k1, protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ms0.End()
}
if s.IamServiceRoleArn != nil {
v := *s.IamServiceRoleArn
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "iamServiceRoleArn", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(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 len(s.Platform) > 0 {
v := s.Platform
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "platform", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.ProductionBranch != nil {
v := s.ProductionBranch
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "productionBranch", v, metadata)
}
if s.Repository != nil {
v := *s.Repository
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "repository", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Tags != nil {
v := s.Tags
metadata := protocol.Metadata{}
ms0 := e.Map(protocol.BodyTarget, "tags", metadata)
ms0.Start()
for k1, v1 := range v {
ms0.MapSetValue(k1, protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ms0.End()
}
if s.UpdateTime != nil {
v := *s.UpdateTime
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "updateTime",
protocol.TimeValue{V: v, Format: protocol.UnixTimeFormatName, QuotedFormatTime: true}, metadata)
}
return nil
}
// Structure with auto branch creation config.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/AutoBranchCreationConfig
type AutoBranchCreationConfig struct {
_ struct{} `type:"structure"`
// Basic Authorization credentials for the auto created branch.
BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
// BuildSpec for the auto created branch.
BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
// Enables auto building for the auto created branch.
EnableAutoBuild *bool `locationName:"enableAutoBuild" type:"boolean"`
// Enables Basic Auth for the auto created branch.
EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean"`
// Environment Variables for the auto created branch.
EnvironmentVariables map[string]string `locationName:"environmentVariables" type:"map"`
// Framework for the auto created branch.
Framework *string `locationName:"framework" type:"string"`
// Stage for the auto created branch.
Stage Stage `locationName:"stage" type:"string" enum:"true"`
}
// String returns the string representation
func (s AutoBranchCreationConfig) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AutoBranchCreationConfig) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "AutoBranchCreationConfig"}
if s.BuildSpec != nil && len(*s.BuildSpec) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("BuildSpec", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AutoBranchCreationConfig) MarshalFields(e protocol.FieldEncoder) error {
if s.BasicAuthCredentials != nil {
v := *s.BasicAuthCredentials
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "basicAuthCredentials", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.BuildSpec != nil {
v := *s.BuildSpec
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "buildSpec", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.EnableAutoBuild != nil {
v := *s.EnableAutoBuild
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableAutoBuild", protocol.BoolValue(v), metadata)
}
if s.EnableBasicAuth != nil {
v := *s.EnableBasicAuth
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableBasicAuth", protocol.BoolValue(v), metadata)
}
if s.EnvironmentVariables != nil {
v := s.EnvironmentVariables
metadata := protocol.Metadata{}
ms0 := e.Map(protocol.BodyTarget, "environmentVariables", metadata)
ms0.Start()
for k1, v1 := range v {
ms0.MapSetValue(k1, protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ms0.End()
}
if s.Framework != nil {
v := *s.Framework
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "framework", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if len(s.Stage) > 0 {
v := s.Stage
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "stage", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
return nil
}
// Branch for an Amplify App, which maps to a 3rd party repository branch.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/Branch
type Branch struct {
_ struct{} `type:"structure"`
// Id of the active job for a branch, part of an Amplify App.
//
// ActiveJobId is a required field
ActiveJobId *string `locationName:"activeJobId" type:"string" required:"true"`
// List of custom resources that are linked to this branch.
AssociatedResources []string `locationName:"associatedResources" type:"list"`
// Basic Authorization credentials for a branch, part of an Amplify App.
BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
// ARN for a branch, part of an Amplify App.
//
// BranchArn is a required field
BranchArn *string `locationName:"branchArn" type:"string" required:"true"`
// Name for a branch, part of an Amplify App.
//
// BranchName is a required field
BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
// BuildSpec content for branch for Amplify App.
BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
// Creation date and time for a branch, part of an Amplify App.
//
// CreateTime is a required field
CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"`
// Custom domains for a branch, part of an Amplify App.
//
// CustomDomains is a required field
CustomDomains []string `locationName:"customDomains" type:"list" required:"true"`
// Description for a branch, part of an Amplify App.
//
// Description is a required field
Description *string `locationName:"description" type:"string" required:"true"`
// Display name for a branch, will use as the default domain prefix.
//
// DisplayName is a required field
DisplayName *string `locationName:"displayName" type:"string" required:"true"`
// Enables auto-building on push for a branch, part of an Amplify App.
//
// EnableAutoBuild is a required field
EnableAutoBuild *bool `locationName:"enableAutoBuild" type:"boolean" required:"true"`
// Enables Basic Authorization for a branch, part of an Amplify App.
//
// EnableBasicAuth is a required field
EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean" required:"true"`
// Enables notifications for a branch, part of an Amplify App.
//
// EnableNotification is a required field
EnableNotification *bool `locationName:"enableNotification" type:"boolean" required:"true"`
// Environment Variables specific to a branch, part of an Amplify App.
//
// EnvironmentVariables is a required field
EnvironmentVariables map[string]string `locationName:"environmentVariables" type:"map" required:"true"`
// Framework for a branch, part of an Amplify App.
//
// Framework is a required field
Framework *string `locationName:"framework" type:"string" required:"true"`
// Stage for a branch, part of an Amplify App.
//
// Stage is a required field
Stage Stage `locationName:"stage" type:"string" required:"true" enum:"true"`
// Tag for branch for Amplify App.
Tags map[string]string `locationName:"tags" min:"1" type:"map"`
// Thumbnail URL for the branch.
ThumbnailUrl *string `locationName:"thumbnailUrl" min:"1" type:"string"`
// Total number of Jobs part of an Amplify App.
//
// TotalNumberOfJobs is a required field
TotalNumberOfJobs *string `locationName:"totalNumberOfJobs" type:"string" required:"true"`
// The content TTL for the website in seconds.
//
// Ttl is a required field
Ttl *string `locationName:"ttl" type:"string" required:"true"`
// Last updated date and time for a branch, part of an Amplify App.
//
// UpdateTime is a required field
UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" required:"true"`
}
// String returns the string representation
func (s Branch) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s Branch) MarshalFields(e protocol.FieldEncoder) error {
if s.ActiveJobId != nil {
v := *s.ActiveJobId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "activeJobId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.AssociatedResources != nil {
v := s.AssociatedResources
metadata := protocol.Metadata{}
ls0 := e.List(protocol.BodyTarget, "associatedResources", metadata)
ls0.Start()
for _, v1 := range v {
ls0.ListAddValue(protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ls0.End()
}
if s.BasicAuthCredentials != nil {
v := *s.BasicAuthCredentials
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "basicAuthCredentials", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.BranchArn != nil {
v := *s.BranchArn
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "branchArn", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.BranchName != nil {
v := *s.BranchName
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "branchName", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.BuildSpec != nil {
v := *s.BuildSpec
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "buildSpec", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.CreateTime != nil {
v := *s.CreateTime
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "createTime",
protocol.TimeValue{V: v, Format: protocol.UnixTimeFormatName, QuotedFormatTime: true}, metadata)
}
if s.CustomDomains != nil {
v := s.CustomDomains
metadata := protocol.Metadata{}
ls0 := e.List(protocol.BodyTarget, "customDomains", metadata)
ls0.Start()
for _, v1 := range v {
ls0.ListAddValue(protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ls0.End()
}
if s.Description != nil {
v := *s.Description
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "description", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.DisplayName != nil {
v := *s.DisplayName
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "displayName", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.EnableAutoBuild != nil {
v := *s.EnableAutoBuild
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableAutoBuild", protocol.BoolValue(v), metadata)
}
if s.EnableBasicAuth != nil {
v := *s.EnableBasicAuth
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableBasicAuth", protocol.BoolValue(v), metadata)
}
if s.EnableNotification != nil {
v := *s.EnableNotification
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableNotification", protocol.BoolValue(v), metadata)
}
if s.EnvironmentVariables != nil {
v := s.EnvironmentVariables
metadata := protocol.Metadata{}
ms0 := e.Map(protocol.BodyTarget, "environmentVariables", metadata)
ms0.Start()
for k1, v1 := range v {
ms0.MapSetValue(k1, protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ms0.End()
}
if s.Framework != nil {
v := *s.Framework
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "framework", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if len(s.Stage) > 0 {
v := s.Stage
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "stage", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.Tags != nil {
v := s.Tags
metadata := protocol.Metadata{}
ms0 := e.Map(protocol.BodyTarget, "tags", metadata)
ms0.Start()
for k1, v1 := range v {
ms0.MapSetValue(k1, protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)})
}
ms0.End()
}
if s.ThumbnailUrl != nil {
v := *s.ThumbnailUrl
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "thumbnailUrl", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.TotalNumberOfJobs != nil {
v := *s.TotalNumberOfJobs
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "totalNumberOfJobs", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Ttl != nil {
v := *s.Ttl
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "ttl", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.UpdateTime != nil {
v := *s.UpdateTime
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "updateTime",
protocol.TimeValue{V: v, Format: protocol.UnixTimeFormatName, QuotedFormatTime: true}, metadata)
}
return nil
}
// Custom rewrite / redirect rule.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CustomRule
type CustomRule struct {
_ struct{} `type:"structure"`
// The condition for a URL rewrite or redirect rule, e.g. country code.
Condition *string `locationName:"condition" min:"1" type:"string"`
// The source pattern for a URL rewrite or redirect rule.
//
// Source is a required field
Source *string `locationName:"source" min:"1" type:"string" required:"true"`
// The status code for a URL rewrite or redirect rule.
Status *string `locationName:"status" min:"3" type:"string"`
// The target pattern for a URL rewrite or redirect rule.
//
// Target is a required field
Target *string `locationName:"target" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s CustomRule) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CustomRule) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CustomRule"}
if s.Condition != nil && len(*s.Condition) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Condition", 1))
}
if s.Source == nil {
invalidParams.Add(aws.NewErrParamRequired("Source"))
}
if s.Source != nil && len(*s.Source) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Source", 1))
}
if s.Status != nil && len(*s.Status) < 3 {
invalidParams.Add(aws.NewErrParamMinLen("Status", 3))
}
if s.Target == nil {
invalidParams.Add(aws.NewErrParamRequired("Target"))
}
if s.Target != nil && len(*s.Target) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Target", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s CustomRule) MarshalFields(e protocol.FieldEncoder) error {
if s.Condition != nil {
v := *s.Condition
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "condition", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Source != nil {
v := *s.Source
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "source", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Status != nil {
v := *s.Status
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "status", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Target != nil {
v := *s.Target
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "target", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
return nil
}
// Structure for Domain Association, which associates a custom domain with an
// Amplify App.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DomainAssociation
type DomainAssociation struct {
_ struct{} `type:"structure"`
// DNS Record for certificate verification.
CertificateVerificationDNSRecord *string `locationName:"certificateVerificationDNSRecord" type:"string"`
// ARN for the Domain Association.
//
// DomainAssociationArn is a required field
DomainAssociationArn *string `locationName:"domainAssociationArn" type:"string" required:"true"`
// Name of the domain.
//
// DomainName is a required field
DomainName *string `locationName:"domainName" type:"string" required:"true"`
// Status fo the Domain Association.
//
// DomainStatus is a required field
DomainStatus DomainStatus `locationName:"domainStatus" type:"string" required:"true" enum:"true"`
// Enables automated creation of Subdomains for branches.
//
// EnableAutoSubDomain is a required field
EnableAutoSubDomain *bool `locationName:"enableAutoSubDomain" type:"boolean" required:"true"`
// Reason for the current status of the Domain Association.
//
// StatusReason is a required field
StatusReason *string `locationName:"statusReason" type:"string" required:"true"`
// Subdomains for the Domain Association.
//
// SubDomains is a required field
SubDomains []SubDomain `locationName:"subDomains" type:"list" required:"true"`
}
// String returns the string representation
func (s DomainAssociation) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s DomainAssociation) MarshalFields(e protocol.FieldEncoder) error {
if s.CertificateVerificationDNSRecord != nil {
v := *s.CertificateVerificationDNSRecord
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "certificateVerificationDNSRecord", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.DomainAssociationArn != nil {
v := *s.DomainAssociationArn
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "domainAssociationArn", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.DomainName != nil {
v := *s.DomainName
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "domainName", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if len(s.DomainStatus) > 0 {
v := s.DomainStatus
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "domainStatus", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.EnableAutoSubDomain != nil {
v := *s.EnableAutoSubDomain
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "enableAutoSubDomain", protocol.BoolValue(v), metadata)
}
if s.StatusReason != nil {
v := *s.StatusReason
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "statusReason", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.SubDomains != nil {
v := s.SubDomains
metadata := protocol.Metadata{}
ls0 := e.List(protocol.BodyTarget, "subDomains", metadata)
ls0.Start()
for _, v1 := range v {
ls0.ListAddFields(v1)
}
ls0.End()
}
return nil
}
// Structure for an execution job for an Amplify App.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/Job
type Job struct {
_ struct{} `type:"structure"`
// Execution steps for an execution job, for an Amplify App.
//
// Steps is a required field
Steps []Step `locationName:"steps" type:"list" required:"true"`
// Summary for an execution job for an Amplify App.
//
// Summary is a required field
Summary *JobSummary `locationName:"summary" type:"structure" required:"true"`
}
// String returns the string representation
func (s Job) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s Job) MarshalFields(e protocol.FieldEncoder) error {
if s.Steps != nil {
v := s.Steps
metadata := protocol.Metadata{}
ls0 := e.List(protocol.BodyTarget, "steps", metadata)
ls0.Start()
for _, v1 := range v {
ls0.ListAddFields(v1)
}
ls0.End()
}
if s.Summary != nil {
v := s.Summary
metadata := protocol.Metadata{}
e.SetFields(protocol.BodyTarget, "summary", v, metadata)
}
return nil
}
// Structure for the summary of a Job.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/JobSummary
type JobSummary struct {
_ struct{} `type:"structure"`
// Commit Id from 3rd party repository provider for the Job.
//
// CommitId is a required field
CommitId *string `locationName:"commitId" type:"string" required:"true"`
// Commit message from 3rd party repository provider for the Job.
//
// CommitMessage is a required field
CommitMessage *string `locationName:"commitMessage" type:"string" required:"true"`
// Commit date / time for the Job.
//
// CommitTime is a required field
CommitTime *time.Time `locationName:"commitTime" type:"timestamp" required:"true"`
// End date / time for the Job.
EndTime *time.Time `locationName:"endTime" type:"timestamp"`
// Arn for the Job.
//
// JobArn is a required field
JobArn *string `locationName:"jobArn" type:"string" required:"true"`
// Unique Id for the Job.
//
// JobId is a required field
JobId *string `locationName:"jobId" type:"string" required:"true"`
// Type for the Job. \n "RELEASE": Manually released from source by using StartJob
// API. "RETRY": Manually retried by using StartJob API. "WEB_HOOK": Automatically
// triggered by WebHooks.
//
// JobType is a required field
JobType JobType `locationName:"jobType" type:"string" required:"true" enum:"true"`
// Start date / time for the Job.
//
// StartTime is a required field
StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"`
// Status for the Job.
//
// Status is a required field
Status JobStatus `locationName:"status" type:"string" required:"true" enum:"true"`
}
// String returns the string representation
func (s JobSummary) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s JobSummary) MarshalFields(e protocol.FieldEncoder) error {
if s.CommitId != nil {
v := *s.CommitId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "commitId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.CommitMessage != nil {
v := *s.CommitMessage
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "commitMessage", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.CommitTime != nil {
v := *s.CommitTime
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "commitTime",
protocol.TimeValue{V: v, Format: protocol.UnixTimeFormatName, QuotedFormatTime: true}, metadata)
}
if s.EndTime != nil {
v := *s.EndTime
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "endTime",
protocol.TimeValue{V: v, Format: protocol.UnixTimeFormatName, QuotedFormatTime: true}, metadata)
}
if s.JobArn != nil {
v := *s.JobArn
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "jobArn", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.JobId != nil {
v := *s.JobId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "jobId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if len(s.JobType) > 0 {
v := s.JobType
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "jobType", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
if s.StartTime != nil {
v := *s.StartTime
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "startTime",
protocol.TimeValue{V: v, Format: protocol.UnixTimeFormatName, QuotedFormatTime: true}, metadata)
}
if len(s.Status) > 0 {
v := s.Status
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "status", protocol.QuotedValue{ValueMarshaler: v}, metadata)
}
return nil
}
// Structure with Production Branch information.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ProductionBranch
type ProductionBranch struct {
_ struct{} `type:"structure"`
// Branch Name for Production Branch.
BranchName *string `locationName:"branchName" min:"1" type:"string"`
// Last Deploy Time of Production Branch.
LastDeployTime *time.Time `locationName:"lastDeployTime" type:"timestamp"`
// Status of Production Branch.
Status *string `locationName:"status" min:"3" type:"string"`
// Thumbnail URL for Production Branch.
ThumbnailUrl *string `locationName:"thumbnailUrl" min:"1" type:"string"`
}
// String returns the string representation
func (s ProductionBranch) String() string {
return awsutil.Prettify(s)
}