kcr_cloudfront_services_k8s_aws 3.20260116.224401

Kubernetes Custom Resource Bindings
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/aws-controllers-k8s/cloudfront-controller/cloudfront.services.k8s.aws/v1alpha1/distributions.yaml
// kopium version: 0.22.5

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}
use self::prelude::*;

/// DistributionSpec defines the desired state of Distribution.
/// 
/// A distribution tells CloudFront where you want content to be delivered from,
/// and the details about how to track and manage content delivery.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "cloudfront.services.k8s.aws", version = "v1alpha1", kind = "Distribution", plural = "distributions")]
#[kube(namespaced)]
#[kube(status = "DistributionStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct DistributionSpec {
    /// The distribution's configuration information.
    #[serde(rename = "distributionConfig")]
    pub distribution_config: DistributionDistributionConfig,
    /// A complex type that contains Tag elements.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<DistributionTags>>,
}

/// The distribution's configuration information.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfig {
    /// A complex type that contains information about CNAMEs (alternate domain names),
    /// if any, for this distribution.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub aliases: Option<DistributionDistributionConfigAliases>,
    /// A complex type that contains zero or more CacheBehavior elements.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cacheBehaviors")]
    pub cache_behaviors: Option<DistributionDistributionConfigCacheBehaviors>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "continuousDeploymentPolicyID")]
    pub continuous_deployment_policy_id: Option<String>,
    /// A complex type that controls:
    /// 
    ///    * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
    ///    with custom error messages before returning the response to the viewer.
    /// 
    ///    * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
    /// 
    /// For more information about custom error pages, see Customizing Error Responses
    /// (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)>
    /// in the Amazon CloudFront Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "customErrorResponses")]
    pub custom_error_responses: Option<DistributionDistributionConfigCustomErrorResponses>,
    /// A complex type that describes the default cache behavior if you don't specify
    /// a CacheBehavior element or if request URLs don't match any of the values
    /// of PathPattern in CacheBehavior elements. You must create exactly one default
    /// cache behavior.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultCacheBehavior")]
    pub default_cache_behavior: Option<DistributionDistributionConfigDefaultCacheBehavior>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultRootObject")]
    pub default_root_object: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpVersion")]
    pub http_version: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "isIPV6Enabled")]
    pub is_ipv6_enabled: Option<bool>,
    /// A complex type that specifies whether access logs are written for the distribution.
    /// 
    /// If you already enabled standard logging (legacy) and you want to enable standard
    /// logging (v2) to send your access logs to Amazon S3, we recommend that you
    /// specify a different Amazon S3 bucket or use a separate path in the same bucket
    /// (for example, use a log prefix or partitioning). This helps you keep track
    /// of which log files are associated with which logging subscription and prevents
    /// log files from overwriting each other. For more information, see Standard
    /// logging (access logs) (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html)>
    /// in the Amazon CloudFront Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub logging: Option<DistributionDistributionConfigLogging>,
    /// A complex data type for the origin groups specified for a distribution.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originGroups")]
    pub origin_groups: Option<DistributionDistributionConfigOriginGroups>,
    /// Contains information about the origins for this distribution.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub origins: Option<DistributionDistributionConfigOrigins>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "priceClass")]
    pub price_class: Option<String>,
    /// A complex type that identifies ways in which you want to restrict distribution
    /// of your content.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub restrictions: Option<DistributionDistributionConfigRestrictions>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub staging: Option<bool>,
    /// A complex type that determines the distribution's SSL/TLS configuration for
    /// communicating with viewers.
    /// 
    /// If the distribution doesn't use Aliases (also known as alternate domain names
    /// or CNAMEs)—that is, if the distribution uses the CloudFront domain name
    /// such as d111111abcdef8.cloudfront.net—set CloudFrontDefaultCertificate
    /// to true and leave all other fields empty.
    /// 
    /// If the distribution uses Aliases (alternate domain names or CNAMEs), use
    /// the fields in this type to specify the following settings:
    /// 
    ///    * Which viewers the distribution accepts HTTPS connections from: only
    ///    viewers that support server name indication (SNI) (<https://en.wikipedia.org/wiki/Server_Name_Indication)>
    ///    (recommended), or all viewers including those that don't support SNI.
    ///    To accept HTTPS connections from only viewers that support SNI, set SSLSupportMethod
    ///    to sni-only. This is recommended. Most browsers and clients support SNI.
    ///    To accept HTTPS connections from all viewers, including those that don't
    ///    support SNI, set SSLSupportMethod to vip. This is not recommended, and
    ///    results in additional monthly charges from CloudFront.
    /// 
    ///    * The minimum SSL/TLS protocol version that the distribution can use to
    ///    communicate with viewers. To specify a minimum version, choose a value
    ///    for MinimumProtocolVersion. For more information, see Security Policy
    ///    (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy)>
    ///    in the Amazon CloudFront Developer Guide.
    /// 
    ///    * The location of the SSL/TLS certificate, Certificate Manager (ACM) (<https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html)>
    ///    (recommended) or Identity and Access Management (IAM) (<https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html).>
    ///    You specify the location by setting a value in one of the following fields
    ///    (not both): ACMCertificateArn IAMCertificateId
    /// 
    /// All distributions support HTTPS connections from viewers. To require viewers
    /// to use HTTPS only, or to redirect them from HTTP to HTTPS, use ViewerProtocolPolicy
    /// in the CacheBehavior or DefaultCacheBehavior. To specify how CloudFront should
    /// use SSL/TLS to communicate with your custom origin, use CustomOriginConfig.
    /// 
    /// For more information, see Using HTTPS with CloudFront (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html)>
    /// and Using Alternate Domain Names and HTTPS (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-names.html)>
    /// in the Amazon CloudFront Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "viewerCertificate")]
    pub viewer_certificate: Option<DistributionDistributionConfigViewerCertificate>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "webACLID")]
    pub web_aclid: Option<String>,
}

/// A complex type that contains information about CNAMEs (alternate domain names),
/// if any, for this distribution.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigAliases {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A complex type that contains zero or more CacheBehavior elements.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviors {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigCacheBehaviorsItems>>,
}

/// A complex type that describes how CloudFront processes requests.
/// 
/// You must create at least as many cache behaviors (including the default cache
/// behavior) as you have origins if you want CloudFront to serve objects from
/// all of the origins. Each cache behavior specifies the one origin from which
/// you want CloudFront to get objects. If you have two origins and only the
/// default cache behavior, the default cache behavior will cause CloudFront
/// to get objects from one of the origins, but the other origin is never used.
/// 
/// For the current quota (formerly known as limit) on the number of cache behaviors
/// that you can add to a distribution, see Quotas (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html)>
/// in the Amazon CloudFront Developer Guide.
/// 
/// If you don't want to specify any cache behaviors, include only an empty CacheBehaviors
/// element. Don't specify an empty individual CacheBehavior element, because
/// this is invalid. For more information, see CacheBehaviors (<https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CacheBehaviors.html).>
/// 
/// To delete all cache behaviors in an existing distribution, update the distribution
/// configuration and include only an empty CacheBehaviors element.
/// 
/// To add, change, or remove one or more cache behaviors, update the distribution
/// configuration and specify all of the cache behaviors that you want to include
/// in the updated distribution.
/// 
/// For more information about cache behaviors, see Cache Behavior Settings (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItems {
    /// A complex type that controls which HTTP methods CloudFront processes and
    /// forwards to your Amazon S3 bucket or your custom origin. There are three
    /// choices:
    /// 
    ///    * CloudFront forwards only GET and HEAD requests.
    /// 
    ///    * CloudFront forwards only GET, HEAD, and OPTIONS requests.
    /// 
    ///    * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
    ///    requests.
    /// 
    /// If you pick the third choice, you may need to restrict access to your Amazon
    /// S3 bucket or to your custom origin so users can't perform operations that
    /// you don't want them to. For example, you might not want users to have permissions
    /// to delete objects from your origin.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "allowedMethods")]
    pub allowed_methods: Option<DistributionDistributionConfigCacheBehaviorsItemsAllowedMethods>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cachePolicyID")]
    pub cache_policy_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub compress: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultTTL")]
    pub default_ttl: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldLevelEncryptionID")]
    pub field_level_encryption_id: Option<String>,
    /// This field is deprecated. We recommend that you use a cache policy or an
    /// origin request policy instead of this field.
    /// 
    /// If you want to include values in the cache key, use a cache policy. For more
    /// information, see Creating cache policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy)>
    /// in the Amazon CloudFront Developer Guide.
    /// 
    /// If you want to send values to the origin but not include them in the cache
    /// key, use an origin request policy. For more information, see Creating origin
    /// request policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy)>
    /// in the Amazon CloudFront Developer Guide.
    /// 
    /// A complex type that specifies how CloudFront handles query strings, cookies,
    /// and HTTP headers.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "forwardedValues")]
    pub forwarded_values: Option<DistributionDistributionConfigCacheBehaviorsItemsForwardedValues>,
    /// A list of CloudFront functions that are associated with a cache behavior
    /// in a CloudFront distribution. Your functions must be published to the LIVE
    /// stage to associate them with a cache behavior.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "functionAssociations")]
    pub function_associations: Option<DistributionDistributionConfigCacheBehaviorsItemsFunctionAssociations>,
    /// A complex type that specifies a list of Lambda@Edge functions associations
    /// for a cache behavior.
    /// 
    /// If you want to invoke one or more Lambda@Edge functions triggered by requests
    /// that match the PathPattern of the cache behavior, specify the applicable
    /// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation
    /// items in this list (one for each possible value of EventType) and each EventType
    /// can be associated with only one function.
    /// 
    /// If you don't want to invoke any Lambda@Edge functions for the requests that
    /// match PathPattern, specify 0 for Quantity and omit Items.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lambdaFunctionAssociations")]
    pub lambda_function_associations: Option<DistributionDistributionConfigCacheBehaviorsItemsLambdaFunctionAssociations>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxTTL")]
    pub max_ttl: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minTTL")]
    pub min_ttl: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originRequestPolicyID")]
    pub origin_request_policy_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "pathPattern")]
    pub path_pattern: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "realtimeLogConfigARN")]
    pub realtime_log_config_arn: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "responseHeadersPolicyID")]
    pub response_headers_policy_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "smoothStreaming")]
    pub smooth_streaming: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "targetOriginID")]
    pub target_origin_id: Option<String>,
    /// A list of key groups whose public keys CloudFront can use to verify the signatures
    /// of signed URLs and signed cookies.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "trustedKeyGroups")]
    pub trusted_key_groups: Option<DistributionDistributionConfigCacheBehaviorsItemsTrustedKeyGroups>,
    /// A list of Amazon Web Services accounts whose public keys CloudFront can use
    /// to verify the signatures of signed URLs and signed cookies.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "trustedSigners")]
    pub trusted_signers: Option<DistributionDistributionConfigCacheBehaviorsItemsTrustedSigners>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "viewerProtocolPolicy")]
    pub viewer_protocol_policy: Option<String>,
}

/// A complex type that controls which HTTP methods CloudFront processes and
/// forwards to your Amazon S3 bucket or your custom origin. There are three
/// choices:
/// 
///    * CloudFront forwards only GET and HEAD requests.
/// 
///    * CloudFront forwards only GET, HEAD, and OPTIONS requests.
/// 
///    * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
///    requests.
/// 
/// If you pick the third choice, you may need to restrict access to your Amazon
/// S3 bucket or to your custom origin so users can't perform operations that
/// you don't want them to. For example, you might not want users to have permissions
/// to delete objects from your origin.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsAllowedMethods {
    /// A complex type that controls whether CloudFront caches the response to requests
    /// using the specified HTTP methods. There are two choices:
    /// 
    ///    * CloudFront caches responses to GET and HEAD requests.
    /// 
    ///    * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
    /// 
    /// If you pick the second choice for your Amazon S3 Origin, you may need to
    /// forward Access-Control-Request-Method, Access-Control-Request-Headers, and
    /// Origin headers for the responses to be cached correctly.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cachedMethods")]
    pub cached_methods: Option<DistributionDistributionConfigCacheBehaviorsItemsAllowedMethodsCachedMethods>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A complex type that controls whether CloudFront caches the response to requests
/// using the specified HTTP methods. There are two choices:
/// 
///    * CloudFront caches responses to GET and HEAD requests.
/// 
///    * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
/// 
/// If you pick the second choice for your Amazon S3 Origin, you may need to
/// forward Access-Control-Request-Method, Access-Control-Request-Headers, and
/// Origin headers for the responses to be cached correctly.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsAllowedMethodsCachedMethods {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// This field is deprecated. We recommend that you use a cache policy or an
/// origin request policy instead of this field.
/// 
/// If you want to include values in the cache key, use a cache policy. For more
/// information, see Creating cache policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy)>
/// in the Amazon CloudFront Developer Guide.
/// 
/// If you want to send values to the origin but not include them in the cache
/// key, use an origin request policy. For more information, see Creating origin
/// request policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy)>
/// in the Amazon CloudFront Developer Guide.
/// 
/// A complex type that specifies how CloudFront handles query strings, cookies,
/// and HTTP headers.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsForwardedValues {
    /// This field is deprecated. We recommend that you use a cache policy or an
    /// origin request policy instead of this field.
    /// 
    /// If you want to include cookies in the cache key, use CookiesConfig in a cache
    /// policy. See CachePolicy.
    /// 
    /// If you want to send cookies to the origin but not include them in the cache
    /// key, use CookiesConfig in an origin request policy. See OriginRequestPolicy.
    /// 
    /// A complex type that specifies whether you want CloudFront to forward cookies
    /// to the origin and, if so, which ones. For more information about forwarding
    /// cookies to the origin, see Caching Content Based on Cookies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)>
    /// in the Amazon CloudFront Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cookies: Option<DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesCookies>,
    /// Contains a list of HTTP header names.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub headers: Option<DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesHeaders>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryString")]
    pub query_string: Option<bool>,
    /// This field is deprecated. We recommend that you use a cache policy or an
    /// origin request policy instead of this field.
    /// 
    /// If you want to include query strings in the cache key, use QueryStringsConfig
    /// in a cache policy. See CachePolicy.
    /// 
    /// If you want to send query strings to the origin but not include them in the
    /// cache key, use QueryStringsConfig in an origin request policy. See OriginRequestPolicy.
    /// 
    /// A complex type that contains information about the query string parameters
    /// that you want CloudFront to use for caching for a cache behavior.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryStringCacheKeys")]
    pub query_string_cache_keys: Option<DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesQueryStringCacheKeys>,
}

/// This field is deprecated. We recommend that you use a cache policy or an
/// origin request policy instead of this field.
/// 
/// If you want to include cookies in the cache key, use CookiesConfig in a cache
/// policy. See CachePolicy.
/// 
/// If you want to send cookies to the origin but not include them in the cache
/// key, use CookiesConfig in an origin request policy. See OriginRequestPolicy.
/// 
/// A complex type that specifies whether you want CloudFront to forward cookies
/// to the origin and, if so, which ones. For more information about forwarding
/// cookies to the origin, see Caching Content Based on Cookies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesCookies {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub forward: Option<String>,
    /// Contains a list of cookie names.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "whitelistedNames")]
    pub whitelisted_names: Option<DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesCookiesWhitelistedNames>,
}

/// Contains a list of cookie names.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesCookiesWhitelistedNames {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// Contains a list of HTTP header names.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesHeaders {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// This field is deprecated. We recommend that you use a cache policy or an
/// origin request policy instead of this field.
/// 
/// If you want to include query strings in the cache key, use QueryStringsConfig
/// in a cache policy. See CachePolicy.
/// 
/// If you want to send query strings to the origin but not include them in the
/// cache key, use QueryStringsConfig in an origin request policy. See OriginRequestPolicy.
/// 
/// A complex type that contains information about the query string parameters
/// that you want CloudFront to use for caching for a cache behavior.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsForwardedValuesQueryStringCacheKeys {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A list of CloudFront functions that are associated with a cache behavior
/// in a CloudFront distribution. Your functions must be published to the LIVE
/// stage to associate them with a cache behavior.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsFunctionAssociations {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigCacheBehaviorsItemsFunctionAssociationsItems>>,
}

/// A CloudFront function that is associated with a cache behavior in a CloudFront
/// distribution.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsFunctionAssociationsItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "eventType")]
    pub event_type: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "functionARN")]
    pub function_arn: Option<String>,
}

/// A complex type that specifies a list of Lambda@Edge functions associations
/// for a cache behavior.
/// 
/// If you want to invoke one or more Lambda@Edge functions triggered by requests
/// that match the PathPattern of the cache behavior, specify the applicable
/// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation
/// items in this list (one for each possible value of EventType) and each EventType
/// can be associated with only one function.
/// 
/// If you don't want to invoke any Lambda@Edge functions for the requests that
/// match PathPattern, specify 0 for Quantity and omit Items.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsLambdaFunctionAssociations {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigCacheBehaviorsItemsLambdaFunctionAssociationsItems>>,
}

/// A complex type that contains a Lambda@Edge function association.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsLambdaFunctionAssociationsItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "eventType")]
    pub event_type: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "includeBody")]
    pub include_body: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lambdaFunctionARN")]
    pub lambda_function_arn: Option<String>,
}

/// A list of key groups whose public keys CloudFront can use to verify the signatures
/// of signed URLs and signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsTrustedKeyGroups {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A list of Amazon Web Services accounts whose public keys CloudFront can use
/// to verify the signatures of signed URLs and signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCacheBehaviorsItemsTrustedSigners {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A complex type that controls:
/// 
///    * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
///    with custom error messages before returning the response to the viewer.
/// 
///    * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
/// 
/// For more information about custom error pages, see Customizing Error Responses
/// (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCustomErrorResponses {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigCustomErrorResponsesItems>>,
}

/// A complex type that controls:
/// 
///    * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
///    with custom error messages before returning the response to the viewer.
/// 
///    * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
/// 
/// For more information about custom error pages, see Customizing Error Responses
/// (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigCustomErrorResponsesItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "errorCachingMinTTL")]
    pub error_caching_min_ttl: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "errorCode")]
    pub error_code: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "responseCode")]
    pub response_code: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "responsePagePath")]
    pub response_page_path: Option<String>,
}

/// A complex type that describes the default cache behavior if you don't specify
/// a CacheBehavior element or if request URLs don't match any of the values
/// of PathPattern in CacheBehavior elements. You must create exactly one default
/// cache behavior.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehavior {
    /// A complex type that controls which HTTP methods CloudFront processes and
    /// forwards to your Amazon S3 bucket or your custom origin. There are three
    /// choices:
    /// 
    ///    * CloudFront forwards only GET and HEAD requests.
    /// 
    ///    * CloudFront forwards only GET, HEAD, and OPTIONS requests.
    /// 
    ///    * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
    ///    requests.
    /// 
    /// If you pick the third choice, you may need to restrict access to your Amazon
    /// S3 bucket or to your custom origin so users can't perform operations that
    /// you don't want them to. For example, you might not want users to have permissions
    /// to delete objects from your origin.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "allowedMethods")]
    pub allowed_methods: Option<DistributionDistributionConfigDefaultCacheBehaviorAllowedMethods>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cachePolicyID")]
    pub cache_policy_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub compress: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultTTL")]
    pub default_ttl: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldLevelEncryptionID")]
    pub field_level_encryption_id: Option<String>,
    /// This field is deprecated. We recommend that you use a cache policy or an
    /// origin request policy instead of this field.
    /// 
    /// If you want to include values in the cache key, use a cache policy. For more
    /// information, see Creating cache policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy)>
    /// in the Amazon CloudFront Developer Guide.
    /// 
    /// If you want to send values to the origin but not include them in the cache
    /// key, use an origin request policy. For more information, see Creating origin
    /// request policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy)>
    /// in the Amazon CloudFront Developer Guide.
    /// 
    /// A complex type that specifies how CloudFront handles query strings, cookies,
    /// and HTTP headers.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "forwardedValues")]
    pub forwarded_values: Option<DistributionDistributionConfigDefaultCacheBehaviorForwardedValues>,
    /// A list of CloudFront functions that are associated with a cache behavior
    /// in a CloudFront distribution. Your functions must be published to the LIVE
    /// stage to associate them with a cache behavior.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "functionAssociations")]
    pub function_associations: Option<DistributionDistributionConfigDefaultCacheBehaviorFunctionAssociations>,
    /// A complex type that specifies a list of Lambda@Edge functions associations
    /// for a cache behavior.
    /// 
    /// If you want to invoke one or more Lambda@Edge functions triggered by requests
    /// that match the PathPattern of the cache behavior, specify the applicable
    /// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation
    /// items in this list (one for each possible value of EventType) and each EventType
    /// can be associated with only one function.
    /// 
    /// If you don't want to invoke any Lambda@Edge functions for the requests that
    /// match PathPattern, specify 0 for Quantity and omit Items.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lambdaFunctionAssociations")]
    pub lambda_function_associations: Option<DistributionDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociations>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxTTL")]
    pub max_ttl: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minTTL")]
    pub min_ttl: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originRequestPolicyID")]
    pub origin_request_policy_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "realtimeLogConfigARN")]
    pub realtime_log_config_arn: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "responseHeadersPolicyID")]
    pub response_headers_policy_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "smoothStreaming")]
    pub smooth_streaming: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "targetOriginID")]
    pub target_origin_id: Option<String>,
    /// A list of key groups whose public keys CloudFront can use to verify the signatures
    /// of signed URLs and signed cookies.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "trustedKeyGroups")]
    pub trusted_key_groups: Option<DistributionDistributionConfigDefaultCacheBehaviorTrustedKeyGroups>,
    /// A list of Amazon Web Services accounts whose public keys CloudFront can use
    /// to verify the signatures of signed URLs and signed cookies.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "trustedSigners")]
    pub trusted_signers: Option<DistributionDistributionConfigDefaultCacheBehaviorTrustedSigners>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "viewerProtocolPolicy")]
    pub viewer_protocol_policy: Option<String>,
}

/// A complex type that controls which HTTP methods CloudFront processes and
/// forwards to your Amazon S3 bucket or your custom origin. There are three
/// choices:
/// 
///    * CloudFront forwards only GET and HEAD requests.
/// 
///    * CloudFront forwards only GET, HEAD, and OPTIONS requests.
/// 
///    * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
///    requests.
/// 
/// If you pick the third choice, you may need to restrict access to your Amazon
/// S3 bucket or to your custom origin so users can't perform operations that
/// you don't want them to. For example, you might not want users to have permissions
/// to delete objects from your origin.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorAllowedMethods {
    /// A complex type that controls whether CloudFront caches the response to requests
    /// using the specified HTTP methods. There are two choices:
    /// 
    ///    * CloudFront caches responses to GET and HEAD requests.
    /// 
    ///    * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
    /// 
    /// If you pick the second choice for your Amazon S3 Origin, you may need to
    /// forward Access-Control-Request-Method, Access-Control-Request-Headers, and
    /// Origin headers for the responses to be cached correctly.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cachedMethods")]
    pub cached_methods: Option<DistributionDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethods>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A complex type that controls whether CloudFront caches the response to requests
/// using the specified HTTP methods. There are two choices:
/// 
///    * CloudFront caches responses to GET and HEAD requests.
/// 
///    * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
/// 
/// If you pick the second choice for your Amazon S3 Origin, you may need to
/// forward Access-Control-Request-Method, Access-Control-Request-Headers, and
/// Origin headers for the responses to be cached correctly.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethods {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// This field is deprecated. We recommend that you use a cache policy or an
/// origin request policy instead of this field.
/// 
/// If you want to include values in the cache key, use a cache policy. For more
/// information, see Creating cache policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy)>
/// in the Amazon CloudFront Developer Guide.
/// 
/// If you want to send values to the origin but not include them in the cache
/// key, use an origin request policy. For more information, see Creating origin
/// request policies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy)>
/// in the Amazon CloudFront Developer Guide.
/// 
/// A complex type that specifies how CloudFront handles query strings, cookies,
/// and HTTP headers.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorForwardedValues {
    /// This field is deprecated. We recommend that you use a cache policy or an
    /// origin request policy instead of this field.
    /// 
    /// If you want to include cookies in the cache key, use CookiesConfig in a cache
    /// policy. See CachePolicy.
    /// 
    /// If you want to send cookies to the origin but not include them in the cache
    /// key, use CookiesConfig in an origin request policy. See OriginRequestPolicy.
    /// 
    /// A complex type that specifies whether you want CloudFront to forward cookies
    /// to the origin and, if so, which ones. For more information about forwarding
    /// cookies to the origin, see Caching Content Based on Cookies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)>
    /// in the Amazon CloudFront Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cookies: Option<DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesCookies>,
    /// Contains a list of HTTP header names.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub headers: Option<DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesHeaders>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryString")]
    pub query_string: Option<bool>,
    /// This field is deprecated. We recommend that you use a cache policy or an
    /// origin request policy instead of this field.
    /// 
    /// If you want to include query strings in the cache key, use QueryStringsConfig
    /// in a cache policy. See CachePolicy.
    /// 
    /// If you want to send query strings to the origin but not include them in the
    /// cache key, use QueryStringsConfig in an origin request policy. See OriginRequestPolicy.
    /// 
    /// A complex type that contains information about the query string parameters
    /// that you want CloudFront to use for caching for a cache behavior.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryStringCacheKeys")]
    pub query_string_cache_keys: Option<DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeys>,
}

/// This field is deprecated. We recommend that you use a cache policy or an
/// origin request policy instead of this field.
/// 
/// If you want to include cookies in the cache key, use CookiesConfig in a cache
/// policy. See CachePolicy.
/// 
/// If you want to send cookies to the origin but not include them in the cache
/// key, use CookiesConfig in an origin request policy. See OriginRequestPolicy.
/// 
/// A complex type that specifies whether you want CloudFront to forward cookies
/// to the origin and, if so, which ones. For more information about forwarding
/// cookies to the origin, see Caching Content Based on Cookies (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesCookies {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub forward: Option<String>,
    /// Contains a list of cookie names.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "whitelistedNames")]
    pub whitelisted_names: Option<DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNames>,
}

/// Contains a list of cookie names.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNames {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// Contains a list of HTTP header names.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesHeaders {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// This field is deprecated. We recommend that you use a cache policy or an
/// origin request policy instead of this field.
/// 
/// If you want to include query strings in the cache key, use QueryStringsConfig
/// in a cache policy. See CachePolicy.
/// 
/// If you want to send query strings to the origin but not include them in the
/// cache key, use QueryStringsConfig in an origin request policy. See OriginRequestPolicy.
/// 
/// A complex type that contains information about the query string parameters
/// that you want CloudFront to use for caching for a cache behavior.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeys {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A list of CloudFront functions that are associated with a cache behavior
/// in a CloudFront distribution. Your functions must be published to the LIVE
/// stage to associate them with a cache behavior.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorFunctionAssociations {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigDefaultCacheBehaviorFunctionAssociationsItems>>,
}

/// A CloudFront function that is associated with a cache behavior in a CloudFront
/// distribution.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorFunctionAssociationsItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "eventType")]
    pub event_type: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "functionARN")]
    pub function_arn: Option<String>,
}

/// A complex type that specifies a list of Lambda@Edge functions associations
/// for a cache behavior.
/// 
/// If you want to invoke one or more Lambda@Edge functions triggered by requests
/// that match the PathPattern of the cache behavior, specify the applicable
/// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation
/// items in this list (one for each possible value of EventType) and each EventType
/// can be associated with only one function.
/// 
/// If you don't want to invoke any Lambda@Edge functions for the requests that
/// match PathPattern, specify 0 for Quantity and omit Items.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociations {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItems>>,
}

/// A complex type that contains a Lambda@Edge function association.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "eventType")]
    pub event_type: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "includeBody")]
    pub include_body: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lambdaFunctionARN")]
    pub lambda_function_arn: Option<String>,
}

/// A list of key groups whose public keys CloudFront can use to verify the signatures
/// of signed URLs and signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorTrustedKeyGroups {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A list of Amazon Web Services accounts whose public keys CloudFront can use
/// to verify the signatures of signed URLs and signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigDefaultCacheBehaviorTrustedSigners {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// A complex type that specifies whether access logs are written for the distribution.
/// 
/// If you already enabled standard logging (legacy) and you want to enable standard
/// logging (v2) to send your access logs to Amazon S3, we recommend that you
/// specify a different Amazon S3 bucket or use a separate path in the same bucket
/// (for example, use a log prefix or partitioning). This helps you keep track
/// of which log files are associated with which logging subscription and prevents
/// log files from overwriting each other. For more information, see Standard
/// logging (access logs) (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigLogging {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bucket: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "includeCookies")]
    pub include_cookies: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
}

/// A complex data type for the origin groups specified for a distribution.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginGroups {
    /// List of origin groups for a distribution.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigOriginGroupsItems>>,
}

/// An origin group includes two origins (a primary origin and a secondary origin
/// to failover to) and a failover criteria that you specify. You create an origin
/// group to support origin failover in CloudFront. When you create or update
/// a distribution, you can specify the origin group instead of a single origin,
/// and CloudFront will failover from the primary origin to the secondary origin
/// under the failover conditions that you've chosen.
/// 
/// Optionally, you can choose selection criteria for your origin group to specify
/// how your origins are selected when your distribution routes viewer requests.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginGroupsItems {
    /// A complex data type that includes information about the failover criteria
    /// for an origin group, including the status codes for which CloudFront will
    /// failover from the primary origin to the second origin.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "failoverCriteria")]
    pub failover_criteria: Option<DistributionDistributionConfigOriginGroupsItemsFailoverCriteria>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// A complex data type for the origins included in an origin group.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub members: Option<DistributionDistributionConfigOriginGroupsItemsMembers>,
}

/// A complex data type that includes information about the failover criteria
/// for an origin group, including the status codes for which CloudFront will
/// failover from the primary origin to the second origin.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginGroupsItemsFailoverCriteria {
    /// A complex data type for the status codes that you specify that, when returned
    /// by a primary origin, trigger CloudFront to failover to a second origin.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "statusCodes")]
    pub status_codes: Option<DistributionDistributionConfigOriginGroupsItemsFailoverCriteriaStatusCodes>,
}

/// A complex data type for the status codes that you specify that, when returned
/// by a primary origin, trigger CloudFront to failover to a second origin.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginGroupsItemsFailoverCriteriaStatusCodes {
    /// List of status codes for origin failover.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<i64>>,
}

/// A complex data type for the origins included in an origin group.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginGroupsItemsMembers {
    /// List of origins in an origin group.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigOriginGroupsItemsMembersItems>>,
}

/// An origin in an origin group.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginGroupsItemsMembersItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originID")]
    pub origin_id: Option<String>,
}

/// Contains information about the origins for this distribution.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOrigins {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigOriginsItems>>,
}

/// An origin.
/// 
/// An origin is the location where content is stored, and from which CloudFront
/// gets content to serve to viewers. To specify an origin:
/// 
///    * Use S3OriginConfig to specify an Amazon S3 bucket that is not configured
///    with static website hosting.
/// 
///    * Use VpcOriginConfig to specify a VPC origin.
/// 
///    * Use CustomOriginConfig to specify all other kinds of origins, including:
///    An Amazon S3 bucket that is configured with static website hosting An
///    Elastic Load Balancing load balancer An Elemental MediaPackage endpoint
///    An Elemental MediaStore container Any other HTTP server, running on an
///    Amazon EC2 instance or any other kind of host
/// 
/// For the current maximum number of origins that you can specify per distribution,
/// see General Quotas on Web Distributions (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-web-distributions)>
/// in the Amazon CloudFront Developer Guide (quotas were formerly referred to
/// as limits).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "connectionAttempts")]
    pub connection_attempts: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "connectionTimeout")]
    pub connection_timeout: Option<i64>,
    /// A complex type that contains the list of Custom Headers for each origin.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "customHeaders")]
    pub custom_headers: Option<DistributionDistributionConfigOriginsItemsCustomHeaders>,
    /// A custom origin. A custom origin is any origin that is not an Amazon S3 bucket,
    /// with one exception. An Amazon S3 bucket that is configured with static website
    /// hosting (<https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)>
    /// is a custom origin.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "customOriginConfig")]
    pub custom_origin_config: Option<DistributionDistributionConfigOriginsItemsCustomOriginConfig>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "domainName")]
    pub domain_name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originAccessControlID")]
    pub origin_access_control_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originPath")]
    pub origin_path: Option<String>,
    /// CloudFront Origin Shield.
    /// 
    /// Using Origin Shield can help reduce the load on your origin. For more information,
    /// see Using Origin Shield (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html)>
    /// in the Amazon CloudFront Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originShield")]
    pub origin_shield: Option<DistributionDistributionConfigOriginsItemsOriginShield>,
    /// A complex type that contains information about the Amazon S3 origin. If the
    /// origin is a custom origin or an S3 bucket that is configured as a website
    /// endpoint, use the CustomOriginConfig element instead.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3OriginConfig")]
    pub s3_origin_config: Option<DistributionDistributionConfigOriginsItemsS3OriginConfig>,
    /// An Amazon CloudFront VPC origin configuration.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "vpcOriginConfig")]
    pub vpc_origin_config: Option<DistributionDistributionConfigOriginsItemsVpcOriginConfig>,
}

/// A complex type that contains the list of Custom Headers for each origin.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItemsCustomHeaders {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionDistributionConfigOriginsItemsCustomHeadersItems>>,
}

/// A complex type that contains HeaderName and HeaderValue elements, if any,
/// for this distribution.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItemsCustomHeadersItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "headerName")]
    pub header_name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "headerValue")]
    pub header_value: Option<String>,
}

/// A custom origin. A custom origin is any origin that is not an Amazon S3 bucket,
/// with one exception. An Amazon S3 bucket that is configured with static website
/// hosting (<https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)>
/// is a custom origin.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItemsCustomOriginConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpPort")]
    pub http_port: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpSPort")]
    pub http_s_port: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originKeepaliveTimeout")]
    pub origin_keepalive_timeout: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originProtocolPolicy")]
    pub origin_protocol_policy: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originReadTimeout")]
    pub origin_read_timeout: Option<i64>,
    /// A complex type that contains information about the SSL/TLS protocols that
    /// CloudFront can use when establishing an HTTPS connection with your origin.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originSSLProtocols")]
    pub origin_ssl_protocols: Option<DistributionDistributionConfigOriginsItemsCustomOriginConfigOriginSslProtocols>,
}

/// A complex type that contains information about the SSL/TLS protocols that
/// CloudFront can use when establishing an HTTPS connection with your origin.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItemsCustomOriginConfigOriginSslProtocols {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
}

/// CloudFront Origin Shield.
/// 
/// Using Origin Shield can help reduce the load on your origin. For more information,
/// see Using Origin Shield (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItemsOriginShield {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originShieldRegion")]
    pub origin_shield_region: Option<String>,
}

/// A complex type that contains information about the Amazon S3 origin. If the
/// origin is a custom origin or an S3 bucket that is configured as a website
/// endpoint, use the CustomOriginConfig element instead.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItemsS3OriginConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originAccessIdentity")]
    pub origin_access_identity: Option<String>,
}

/// An Amazon CloudFront VPC origin configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigOriginsItemsVpcOriginConfig {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originKeepaliveTimeout")]
    pub origin_keepalive_timeout: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "originReadTimeout")]
    pub origin_read_timeout: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "vpcOriginID")]
    pub vpc_origin_id: Option<String>,
}

/// A complex type that identifies ways in which you want to restrict distribution
/// of your content.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigRestrictions {
    /// A complex type that controls the countries in which your content is distributed.
    /// CloudFront determines the location of your users using MaxMind GeoIP databases.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "geoRestriction")]
    pub geo_restriction: Option<DistributionDistributionConfigRestrictionsGeoRestriction>,
}

/// A complex type that controls the countries in which your content is distributed.
/// CloudFront determines the location of your users using MaxMind GeoIP databases.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigRestrictionsGeoRestriction {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "restrictionType")]
    pub restriction_type: Option<String>,
}

/// A complex type that determines the distribution's SSL/TLS configuration for
/// communicating with viewers.
/// 
/// If the distribution doesn't use Aliases (also known as alternate domain names
/// or CNAMEs)—that is, if the distribution uses the CloudFront domain name
/// such as d111111abcdef8.cloudfront.net—set CloudFrontDefaultCertificate
/// to true and leave all other fields empty.
/// 
/// If the distribution uses Aliases (alternate domain names or CNAMEs), use
/// the fields in this type to specify the following settings:
/// 
///    * Which viewers the distribution accepts HTTPS connections from: only
///    viewers that support server name indication (SNI) (<https://en.wikipedia.org/wiki/Server_Name_Indication)>
///    (recommended), or all viewers including those that don't support SNI.
///    To accept HTTPS connections from only viewers that support SNI, set SSLSupportMethod
///    to sni-only. This is recommended. Most browsers and clients support SNI.
///    To accept HTTPS connections from all viewers, including those that don't
///    support SNI, set SSLSupportMethod to vip. This is not recommended, and
///    results in additional monthly charges from CloudFront.
/// 
///    * The minimum SSL/TLS protocol version that the distribution can use to
///    communicate with viewers. To specify a minimum version, choose a value
///    for MinimumProtocolVersion. For more information, see Security Policy
///    (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy)>
///    in the Amazon CloudFront Developer Guide.
/// 
///    * The location of the SSL/TLS certificate, Certificate Manager (ACM) (<https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html)>
///    (recommended) or Identity and Access Management (IAM) (<https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html).>
///    You specify the location by setting a value in one of the following fields
///    (not both): ACMCertificateArn IAMCertificateId
/// 
/// All distributions support HTTPS connections from viewers. To require viewers
/// to use HTTPS only, or to redirect them from HTTP to HTTPS, use ViewerProtocolPolicy
/// in the CacheBehavior or DefaultCacheBehavior. To specify how CloudFront should
/// use SSL/TLS to communicate with your custom origin, use CustomOriginConfig.
/// 
/// For more information, see Using HTTPS with CloudFront (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html)>
/// and Using Alternate Domain Names and HTTPS (<https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-names.html)>
/// in the Amazon CloudFront Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigViewerCertificate {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "acmCertificateARN")]
    pub acm_certificate_arn: Option<String>,
    /// Reference field for ACMCertificateARN
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "acmCertificateRef")]
    pub acm_certificate_ref: Option<DistributionDistributionConfigViewerCertificateAcmCertificateRef>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub certificate: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "certificateSource")]
    pub certificate_source: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cloudFrontDefaultCertificate")]
    pub cloud_front_default_certificate: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "iamCertificateID")]
    pub iam_certificate_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minimumProtocolVersion")]
    pub minimum_protocol_version: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "sslSupportMethod")]
    pub ssl_support_method: Option<String>,
}

/// Reference field for ACMCertificateARN
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigViewerCertificateAcmCertificateRef {
    /// AWSResourceReference provides all the values necessary to reference another
    /// k8s resource for finding the identifier(Id/ARN/Name)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<DistributionDistributionConfigViewerCertificateAcmCertificateRefFrom>,
}

/// AWSResourceReference provides all the values necessary to reference another
/// k8s resource for finding the identifier(Id/ARN/Name)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionDistributionConfigViewerCertificateAcmCertificateRefFrom {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// A complex type that contains Tag key and Tag value.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionTags {
    /// A string that contains Tag key.
    /// 
    /// The string length should be between 1 and 128 characters. Valid characters
    /// include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// DistributionStatus defines the observed state of Distribution
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatus {
    /// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
    /// that is used to contain resource sync state, account ownership,
    /// constructed ARN for the resource
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ackResourceMetadata")]
    pub ack_resource_metadata: Option<DistributionStatusAckResourceMetadata>,
    /// This field contains a list of key groups and the public keys in each key
    /// group that CloudFront can use to verify the signatures of signed URLs or
    /// signed cookies.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "activeTrustedKeyGroups")]
    pub active_trusted_key_groups: Option<DistributionStatusActiveTrustedKeyGroups>,
    /// We recommend using TrustedKeyGroups instead of TrustedSigners.
    /// 
    /// This field contains a list of Amazon Web Services account IDs and the active
    /// CloudFront key pairs in each account that CloudFront can use to verify the
    /// signatures of signed URLs or signed cookies.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "activeTrustedSigners")]
    pub active_trusted_signers: Option<DistributionStatusActiveTrustedSigners>,
    /// Amazon Web Services services in China customers must file for an Internet
    /// Content Provider (ICP) recordal if they want to serve content publicly on
    /// an alternate domain name, also known as a CNAME, that they've added to CloudFront.
    /// AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
    /// distributions.
    /// 
    /// For more information about ICP recordals, see Signup, Accounts, and Credentials
    /// (<https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html)>
    /// in Getting Started with Amazon Web Services services in China.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "aliasICPRecordals")]
    pub alias_icp_recordals: Option<Vec<DistributionStatusAliasIcpRecordals>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "callerReference")]
    pub caller_reference: Option<String>,
    /// All CRs managed by ACK have a common `Status.Conditions` member that
    /// contains a collection of `ackv1alpha1.Condition` objects that describe
    /// the various terminal states of the CR and its backend AWS service API
    /// resource
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<Condition>>,
    /// The distribution's CloudFront domain name. For example: d111111abcdef8.cloudfront.net.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "domainName")]
    pub domain_name: Option<String>,
    /// The current version of the distribution created.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "eTag")]
    pub e_tag: Option<String>,
    /// The distribution's identifier. For example: E1U5RQF7T870K0.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The number of invalidation batches currently in progress.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "inProgressInvalidationBatches")]
    pub in_progress_invalidation_batches: Option<i64>,
    /// The date and time when the distribution was last modified.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastModifiedTime")]
    pub last_modified_time: Option<String>,
    /// The distribution's status. When the status is Deployed, the distribution's
    /// information is fully propagated to all CloudFront edge locations.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

/// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
/// that is used to contain resource sync state, account ownership,
/// constructed ARN for the resource
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusAckResourceMetadata {
    /// ARN is the Amazon Resource Name for the resource. This is a
    /// globally-unique identifier and is set only by the ACK service controller
    /// once the controller has orchestrated the creation of the resource OR
    /// when it has verified that an "adopted" resource (a resource where the
    /// ARN annotation was set by the Kubernetes user on the CR) exists and
    /// matches the supplied CR's Spec field values.
    /// <https://github.com/aws/aws-controllers-k8s/issues/270>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub arn: Option<String>,
    /// OwnerAccountID is the AWS Account ID of the account that owns the
    /// backend AWS service API resource.
    #[serde(rename = "ownerAccountID")]
    pub owner_account_id: String,
    /// Region is the AWS region in which the resource exists or will exist.
    pub region: String,
}

/// This field contains a list of key groups and the public keys in each key
/// group that CloudFront can use to verify the signatures of signed URLs or
/// signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusActiveTrustedKeyGroups {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionStatusActiveTrustedKeyGroupsItems>>,
}

/// A list of identifiers for the public keys that CloudFront can use to verify
/// the signatures of signed URLs and signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusActiveTrustedKeyGroupsItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "keyGroupID")]
    pub key_group_id: Option<String>,
    /// A list of CloudFront key pair identifiers.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "keyPairIDs")]
    pub key_pair_i_ds: Option<DistributionStatusActiveTrustedKeyGroupsItemsKeyPairIDs>,
}

/// A list of CloudFront key pair identifiers.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusActiveTrustedKeyGroupsItemsKeyPairIDs {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub quantity: Option<i64>,
}

/// We recommend using TrustedKeyGroups instead of TrustedSigners.
/// 
/// This field contains a list of Amazon Web Services account IDs and the active
/// CloudFront key pairs in each account that CloudFront can use to verify the
/// signatures of signed URLs or signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusActiveTrustedSigners {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<DistributionStatusActiveTrustedSignersItems>>,
}

/// A list of Amazon Web Services accounts and the active CloudFront key pairs
/// in each account that CloudFront can use to verify the signatures of signed
/// URLs and signed cookies.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusActiveTrustedSignersItems {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsAccountNumber")]
    pub aws_account_number: Option<String>,
    /// A list of CloudFront key pair identifiers.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "keyPairIDs")]
    pub key_pair_i_ds: Option<DistributionStatusActiveTrustedSignersItemsKeyPairIDs>,
}

/// A list of CloudFront key pair identifiers.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusActiveTrustedSignersItemsKeyPairIDs {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub quantity: Option<i64>,
}

/// Amazon Web Services services in China customers must file for an Internet
/// Content Provider (ICP) recordal if they want to serve content publicly on
/// an alternate domain name, also known as a CNAME, that they've added to CloudFront.
/// AliasICPRecordal provides the ICP recordal status for CNAMEs associated with
/// distributions. The status is returned in the CloudFront response; you can't
/// configure it yourself.
/// 
/// For more information about ICP recordals, see Signup, Accounts, and Credentials
/// (<https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html)>
/// in Getting Started with Amazon Web Services services in China.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DistributionStatusAliasIcpRecordals {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cname: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "iCPRecordalStatus")]
    pub i_cp_recordal_status: Option<String>,
}