cfn/aws/
s3outposts.rs

1//! Types for the `S3Outposts` service.
2
3/// The [`AWS::S3Outposts::AccessPoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-accesspoint.html) resource type.
4#[derive(Debug, Default)]
5pub struct AccessPoint {
6    properties: AccessPointProperties
7}
8
9/// Properties for the `AccessPoint` resource.
10#[derive(Debug, Default)]
11pub struct AccessPointProperties {
12    /// Property [`Bucket`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-accesspoint.html#cfn-s3outposts-accesspoint-bucket).
13    ///
14    /// Update type: _Immutable_.
15    /// AWS CloudFormation replaces the resource when you change this property.
16    pub bucket: ::Value<String>,
17    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-accesspoint.html#cfn-s3outposts-accesspoint-name).
18    ///
19    /// Update type: _Immutable_.
20    /// AWS CloudFormation replaces the resource when you change this property.
21    pub name: ::Value<String>,
22    /// Property [`Policy`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-accesspoint.html#cfn-s3outposts-accesspoint-policy).
23    ///
24    /// Update type: _Mutable_.
25    /// AWS CloudFormation doesn't replace the resource when you change this property.
26    pub policy: Option<::Value<::json::Value>>,
27    /// Property [`VpcConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-accesspoint.html#cfn-s3outposts-accesspoint-vpcconfiguration).
28    ///
29    /// Update type: _Immutable_.
30    /// AWS CloudFormation replaces the resource when you change this property.
31    pub vpc_configuration: ::Value<self::access_point::VpcConfiguration>,
32}
33
34impl ::serde::Serialize for AccessPointProperties {
35    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
36        let mut map = ::serde::Serializer::serialize_map(s, None)?;
37        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Bucket", &self.bucket)?;
38        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
39        if let Some(ref policy) = self.policy {
40            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Policy", policy)?;
41        }
42        ::serde::ser::SerializeMap::serialize_entry(&mut map, "VpcConfiguration", &self.vpc_configuration)?;
43        ::serde::ser::SerializeMap::end(map)
44    }
45}
46
47impl<'de> ::serde::Deserialize<'de> for AccessPointProperties {
48    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<AccessPointProperties, D::Error> {
49        struct Visitor;
50
51        impl<'de> ::serde::de::Visitor<'de> for Visitor {
52            type Value = AccessPointProperties;
53
54            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
55                write!(f, "a struct of type AccessPointProperties")
56            }
57
58            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
59                let mut bucket: Option<::Value<String>> = None;
60                let mut name: Option<::Value<String>> = None;
61                let mut policy: Option<::Value<::json::Value>> = None;
62                let mut vpc_configuration: Option<::Value<self::access_point::VpcConfiguration>> = None;
63
64                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
65                    match __cfn_key.as_ref() {
66                        "Bucket" => {
67                            bucket = ::serde::de::MapAccess::next_value(&mut map)?;
68                        }
69                        "Name" => {
70                            name = ::serde::de::MapAccess::next_value(&mut map)?;
71                        }
72                        "Policy" => {
73                            policy = ::serde::de::MapAccess::next_value(&mut map)?;
74                        }
75                        "VpcConfiguration" => {
76                            vpc_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
77                        }
78                        _ => {}
79                    }
80                }
81
82                Ok(AccessPointProperties {
83                    bucket: bucket.ok_or(::serde::de::Error::missing_field("Bucket"))?,
84                    name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
85                    policy: policy,
86                    vpc_configuration: vpc_configuration.ok_or(::serde::de::Error::missing_field("VpcConfiguration"))?,
87                })
88            }
89        }
90
91        d.deserialize_map(Visitor)
92    }
93}
94
95impl ::Resource for AccessPoint {
96    type Properties = AccessPointProperties;
97    const TYPE: &'static str = "AWS::S3Outposts::AccessPoint";
98    fn properties(&self) -> &AccessPointProperties {
99        &self.properties
100    }
101    fn properties_mut(&mut self) -> &mut AccessPointProperties {
102        &mut self.properties
103    }
104}
105
106impl ::private::Sealed for AccessPoint {}
107
108impl From<AccessPointProperties> for AccessPoint {
109    fn from(properties: AccessPointProperties) -> AccessPoint {
110        AccessPoint { properties }
111    }
112}
113
114/// The [`AWS::S3Outposts::Bucket`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucket.html) resource type.
115#[derive(Debug, Default)]
116pub struct Bucket {
117    properties: BucketProperties
118}
119
120/// Properties for the `Bucket` resource.
121#[derive(Debug, Default)]
122pub struct BucketProperties {
123    /// Property [`BucketName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucket.html#cfn-s3outposts-bucket-bucketname).
124    ///
125    /// Update type: _Immutable_.
126    /// AWS CloudFormation replaces the resource when you change this property.
127    pub bucket_name: ::Value<String>,
128    /// Property [`LifecycleConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucket.html#cfn-s3outposts-bucket-lifecycleconfiguration).
129    ///
130    /// Update type: _Mutable_.
131    /// AWS CloudFormation doesn't replace the resource when you change this property.
132    pub lifecycle_configuration: Option<::Value<self::bucket::LifecycleConfiguration>>,
133    /// Property [`OutpostId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucket.html#cfn-s3outposts-bucket-outpostid).
134    ///
135    /// Update type: _Immutable_.
136    /// AWS CloudFormation replaces the resource when you change this property.
137    pub outpost_id: ::Value<String>,
138    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucket.html#cfn-s3outposts-bucket-tags).
139    ///
140    /// Update type: _Mutable_.
141    /// AWS CloudFormation doesn't replace the resource when you change this property.
142    pub tags: Option<::ValueList<::Tag>>,
143}
144
145impl ::serde::Serialize for BucketProperties {
146    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
147        let mut map = ::serde::Serializer::serialize_map(s, None)?;
148        ::serde::ser::SerializeMap::serialize_entry(&mut map, "BucketName", &self.bucket_name)?;
149        if let Some(ref lifecycle_configuration) = self.lifecycle_configuration {
150            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LifecycleConfiguration", lifecycle_configuration)?;
151        }
152        ::serde::ser::SerializeMap::serialize_entry(&mut map, "OutpostId", &self.outpost_id)?;
153        if let Some(ref tags) = self.tags {
154            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
155        }
156        ::serde::ser::SerializeMap::end(map)
157    }
158}
159
160impl<'de> ::serde::Deserialize<'de> for BucketProperties {
161    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<BucketProperties, D::Error> {
162        struct Visitor;
163
164        impl<'de> ::serde::de::Visitor<'de> for Visitor {
165            type Value = BucketProperties;
166
167            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
168                write!(f, "a struct of type BucketProperties")
169            }
170
171            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
172                let mut bucket_name: Option<::Value<String>> = None;
173                let mut lifecycle_configuration: Option<::Value<self::bucket::LifecycleConfiguration>> = None;
174                let mut outpost_id: Option<::Value<String>> = None;
175                let mut tags: Option<::ValueList<::Tag>> = None;
176
177                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
178                    match __cfn_key.as_ref() {
179                        "BucketName" => {
180                            bucket_name = ::serde::de::MapAccess::next_value(&mut map)?;
181                        }
182                        "LifecycleConfiguration" => {
183                            lifecycle_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
184                        }
185                        "OutpostId" => {
186                            outpost_id = ::serde::de::MapAccess::next_value(&mut map)?;
187                        }
188                        "Tags" => {
189                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
190                        }
191                        _ => {}
192                    }
193                }
194
195                Ok(BucketProperties {
196                    bucket_name: bucket_name.ok_or(::serde::de::Error::missing_field("BucketName"))?,
197                    lifecycle_configuration: lifecycle_configuration,
198                    outpost_id: outpost_id.ok_or(::serde::de::Error::missing_field("OutpostId"))?,
199                    tags: tags,
200                })
201            }
202        }
203
204        d.deserialize_map(Visitor)
205    }
206}
207
208impl ::Resource for Bucket {
209    type Properties = BucketProperties;
210    const TYPE: &'static str = "AWS::S3Outposts::Bucket";
211    fn properties(&self) -> &BucketProperties {
212        &self.properties
213    }
214    fn properties_mut(&mut self) -> &mut BucketProperties {
215        &mut self.properties
216    }
217}
218
219impl ::private::Sealed for Bucket {}
220
221impl From<BucketProperties> for Bucket {
222    fn from(properties: BucketProperties) -> Bucket {
223        Bucket { properties }
224    }
225}
226
227/// The [`AWS::S3Outposts::BucketPolicy`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucketpolicy.html) resource type.
228#[derive(Debug, Default)]
229pub struct BucketPolicy {
230    properties: BucketPolicyProperties
231}
232
233/// Properties for the `BucketPolicy` resource.
234#[derive(Debug, Default)]
235pub struct BucketPolicyProperties {
236    /// Property [`Bucket`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucketpolicy.html#cfn-s3outposts-bucketpolicy-bucket).
237    ///
238    /// Update type: _Immutable_.
239    /// AWS CloudFormation replaces the resource when you change this property.
240    pub bucket: ::Value<String>,
241    /// Property [`PolicyDocument`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucketpolicy.html#cfn-s3outposts-bucketpolicy-policydocument).
242    ///
243    /// Update type: _Mutable_.
244    /// AWS CloudFormation doesn't replace the resource when you change this property.
245    pub policy_document: ::Value<::json::Value>,
246}
247
248impl ::serde::Serialize for BucketPolicyProperties {
249    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
250        let mut map = ::serde::Serializer::serialize_map(s, None)?;
251        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Bucket", &self.bucket)?;
252        ::serde::ser::SerializeMap::serialize_entry(&mut map, "PolicyDocument", &self.policy_document)?;
253        ::serde::ser::SerializeMap::end(map)
254    }
255}
256
257impl<'de> ::serde::Deserialize<'de> for BucketPolicyProperties {
258    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<BucketPolicyProperties, D::Error> {
259        struct Visitor;
260
261        impl<'de> ::serde::de::Visitor<'de> for Visitor {
262            type Value = BucketPolicyProperties;
263
264            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
265                write!(f, "a struct of type BucketPolicyProperties")
266            }
267
268            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
269                let mut bucket: Option<::Value<String>> = None;
270                let mut policy_document: Option<::Value<::json::Value>> = None;
271
272                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
273                    match __cfn_key.as_ref() {
274                        "Bucket" => {
275                            bucket = ::serde::de::MapAccess::next_value(&mut map)?;
276                        }
277                        "PolicyDocument" => {
278                            policy_document = ::serde::de::MapAccess::next_value(&mut map)?;
279                        }
280                        _ => {}
281                    }
282                }
283
284                Ok(BucketPolicyProperties {
285                    bucket: bucket.ok_or(::serde::de::Error::missing_field("Bucket"))?,
286                    policy_document: policy_document.ok_or(::serde::de::Error::missing_field("PolicyDocument"))?,
287                })
288            }
289        }
290
291        d.deserialize_map(Visitor)
292    }
293}
294
295impl ::Resource for BucketPolicy {
296    type Properties = BucketPolicyProperties;
297    const TYPE: &'static str = "AWS::S3Outposts::BucketPolicy";
298    fn properties(&self) -> &BucketPolicyProperties {
299        &self.properties
300    }
301    fn properties_mut(&mut self) -> &mut BucketPolicyProperties {
302        &mut self.properties
303    }
304}
305
306impl ::private::Sealed for BucketPolicy {}
307
308impl From<BucketPolicyProperties> for BucketPolicy {
309    fn from(properties: BucketPolicyProperties) -> BucketPolicy {
310        BucketPolicy { properties }
311    }
312}
313
314/// The [`AWS::S3Outposts::Endpoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-endpoint.html) resource type.
315#[derive(Debug, Default)]
316pub struct Endpoint {
317    properties: EndpointProperties
318}
319
320/// Properties for the `Endpoint` resource.
321#[derive(Debug, Default)]
322pub struct EndpointProperties {
323    /// Property [`OutpostId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-endpoint.html#cfn-s3outposts-endpoint-outpostid).
324    ///
325    /// Update type: _Immutable_.
326    /// AWS CloudFormation replaces the resource when you change this property.
327    pub outpost_id: ::Value<String>,
328    /// Property [`SecurityGroupId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-endpoint.html#cfn-s3outposts-endpoint-securitygroupid).
329    ///
330    /// Update type: _Immutable_.
331    /// AWS CloudFormation replaces the resource when you change this property.
332    pub security_group_id: ::Value<String>,
333    /// Property [`SubnetId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-endpoint.html#cfn-s3outposts-endpoint-subnetid).
334    ///
335    /// Update type: _Immutable_.
336    /// AWS CloudFormation replaces the resource when you change this property.
337    pub subnet_id: ::Value<String>,
338}
339
340impl ::serde::Serialize for EndpointProperties {
341    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
342        let mut map = ::serde::Serializer::serialize_map(s, None)?;
343        ::serde::ser::SerializeMap::serialize_entry(&mut map, "OutpostId", &self.outpost_id)?;
344        ::serde::ser::SerializeMap::serialize_entry(&mut map, "SecurityGroupId", &self.security_group_id)?;
345        ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubnetId", &self.subnet_id)?;
346        ::serde::ser::SerializeMap::end(map)
347    }
348}
349
350impl<'de> ::serde::Deserialize<'de> for EndpointProperties {
351    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<EndpointProperties, D::Error> {
352        struct Visitor;
353
354        impl<'de> ::serde::de::Visitor<'de> for Visitor {
355            type Value = EndpointProperties;
356
357            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
358                write!(f, "a struct of type EndpointProperties")
359            }
360
361            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
362                let mut outpost_id: Option<::Value<String>> = None;
363                let mut security_group_id: Option<::Value<String>> = None;
364                let mut subnet_id: Option<::Value<String>> = None;
365
366                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
367                    match __cfn_key.as_ref() {
368                        "OutpostId" => {
369                            outpost_id = ::serde::de::MapAccess::next_value(&mut map)?;
370                        }
371                        "SecurityGroupId" => {
372                            security_group_id = ::serde::de::MapAccess::next_value(&mut map)?;
373                        }
374                        "SubnetId" => {
375                            subnet_id = ::serde::de::MapAccess::next_value(&mut map)?;
376                        }
377                        _ => {}
378                    }
379                }
380
381                Ok(EndpointProperties {
382                    outpost_id: outpost_id.ok_or(::serde::de::Error::missing_field("OutpostId"))?,
383                    security_group_id: security_group_id.ok_or(::serde::de::Error::missing_field("SecurityGroupId"))?,
384                    subnet_id: subnet_id.ok_or(::serde::de::Error::missing_field("SubnetId"))?,
385                })
386            }
387        }
388
389        d.deserialize_map(Visitor)
390    }
391}
392
393impl ::Resource for Endpoint {
394    type Properties = EndpointProperties;
395    const TYPE: &'static str = "AWS::S3Outposts::Endpoint";
396    fn properties(&self) -> &EndpointProperties {
397        &self.properties
398    }
399    fn properties_mut(&mut self) -> &mut EndpointProperties {
400        &mut self.properties
401    }
402}
403
404impl ::private::Sealed for Endpoint {}
405
406impl From<EndpointProperties> for Endpoint {
407    fn from(properties: EndpointProperties) -> Endpoint {
408        Endpoint { properties }
409    }
410}
411
412pub mod access_point {
413    //! Property types for the `AccessPoint` resource.
414
415    /// The [`AWS::S3Outposts::AccessPoint.VpcConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-accesspoint-vpcconfiguration.html) property type.
416    #[derive(Debug, Default)]
417    pub struct VpcConfiguration {
418        /// Property [`VpcId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-accesspoint-vpcconfiguration.html#cfn-s3outposts-accesspoint-vpcconfiguration-vpcid).
419        ///
420        /// Update type: _Immutable_.
421        /// AWS CloudFormation replaces the resource when you change this property.
422        pub vpc_id: Option<::Value<String>>,
423    }
424
425    impl ::codec::SerializeValue for VpcConfiguration {
426        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
427            let mut map = ::serde::Serializer::serialize_map(s, None)?;
428            if let Some(ref vpc_id) = self.vpc_id {
429                ::serde::ser::SerializeMap::serialize_entry(&mut map, "VpcId", vpc_id)?;
430            }
431            ::serde::ser::SerializeMap::end(map)
432        }
433    }
434
435    impl ::codec::DeserializeValue for VpcConfiguration {
436        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<VpcConfiguration, D::Error> {
437            struct Visitor;
438
439            impl<'de> ::serde::de::Visitor<'de> for Visitor {
440                type Value = VpcConfiguration;
441
442                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
443                    write!(f, "a struct of type VpcConfiguration")
444                }
445
446                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
447                    let mut vpc_id: Option<::Value<String>> = None;
448
449                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
450                        match __cfn_key.as_ref() {
451                            "VpcId" => {
452                                vpc_id = ::serde::de::MapAccess::next_value(&mut map)?;
453                            }
454                            _ => {}
455                        }
456                    }
457
458                    Ok(VpcConfiguration {
459                        vpc_id: vpc_id,
460                    })
461                }
462            }
463
464            d.deserialize_map(Visitor)
465        }
466    }
467}
468
469pub mod bucket {
470    //! Property types for the `Bucket` resource.
471
472    /// The [`AWS::S3Outposts::Bucket.AbortIncompleteMultipartUpload`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-abortincompletemultipartupload.html) property type.
473    #[derive(Debug, Default)]
474    pub struct AbortIncompleteMultipartUpload {
475        /// Property [`DaysAfterInitiation`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-abortincompletemultipartupload.html#cfn-s3outposts-bucket-abortincompletemultipartupload-daysafterinitiation).
476        ///
477        /// Update type: _Mutable_.
478        /// AWS CloudFormation doesn't replace the resource when you change this property.
479        pub days_after_initiation: ::Value<u32>,
480    }
481
482    impl ::codec::SerializeValue for AbortIncompleteMultipartUpload {
483        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
484            let mut map = ::serde::Serializer::serialize_map(s, None)?;
485            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DaysAfterInitiation", &self.days_after_initiation)?;
486            ::serde::ser::SerializeMap::end(map)
487        }
488    }
489
490    impl ::codec::DeserializeValue for AbortIncompleteMultipartUpload {
491        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AbortIncompleteMultipartUpload, D::Error> {
492            struct Visitor;
493
494            impl<'de> ::serde::de::Visitor<'de> for Visitor {
495                type Value = AbortIncompleteMultipartUpload;
496
497                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
498                    write!(f, "a struct of type AbortIncompleteMultipartUpload")
499                }
500
501                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
502                    let mut days_after_initiation: Option<::Value<u32>> = None;
503
504                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
505                        match __cfn_key.as_ref() {
506                            "DaysAfterInitiation" => {
507                                days_after_initiation = ::serde::de::MapAccess::next_value(&mut map)?;
508                            }
509                            _ => {}
510                        }
511                    }
512
513                    Ok(AbortIncompleteMultipartUpload {
514                        days_after_initiation: days_after_initiation.ok_or(::serde::de::Error::missing_field("DaysAfterInitiation"))?,
515                    })
516                }
517            }
518
519            d.deserialize_map(Visitor)
520        }
521    }
522
523    /// The [`AWS::S3Outposts::Bucket.LifecycleConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-lifecycleconfiguration.html) property type.
524    #[derive(Debug, Default)]
525    pub struct LifecycleConfiguration {
526        /// Property [`Rules`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-lifecycleconfiguration.html#cfn-s3outposts-bucket-lifecycleconfiguration-rules).
527        ///
528        /// Update type: _Mutable_.
529        /// AWS CloudFormation doesn't replace the resource when you change this property.
530        pub rules: ::ValueList<Rule>,
531    }
532
533    impl ::codec::SerializeValue for LifecycleConfiguration {
534        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
535            let mut map = ::serde::Serializer::serialize_map(s, None)?;
536            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Rules", &self.rules)?;
537            ::serde::ser::SerializeMap::end(map)
538        }
539    }
540
541    impl ::codec::DeserializeValue for LifecycleConfiguration {
542        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LifecycleConfiguration, D::Error> {
543            struct Visitor;
544
545            impl<'de> ::serde::de::Visitor<'de> for Visitor {
546                type Value = LifecycleConfiguration;
547
548                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
549                    write!(f, "a struct of type LifecycleConfiguration")
550                }
551
552                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
553                    let mut rules: Option<::ValueList<Rule>> = None;
554
555                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
556                        match __cfn_key.as_ref() {
557                            "Rules" => {
558                                rules = ::serde::de::MapAccess::next_value(&mut map)?;
559                            }
560                            _ => {}
561                        }
562                    }
563
564                    Ok(LifecycleConfiguration {
565                        rules: rules.ok_or(::serde::de::Error::missing_field("Rules"))?,
566                    })
567                }
568            }
569
570            d.deserialize_map(Visitor)
571        }
572    }
573
574    /// The [`AWS::S3Outposts::Bucket.Rule`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-rule.html) property type.
575    #[derive(Debug, Default)]
576    pub struct Rule {
577        /// Property [`AbortIncompleteMultipartUpload`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-rule.html#cfn-s3outposts-bucket-rule-abortincompletemultipartupload).
578        ///
579        /// Update type: _Mutable_.
580        /// AWS CloudFormation doesn't replace the resource when you change this property.
581        pub abort_incomplete_multipart_upload: Option<::Value<AbortIncompleteMultipartUpload>>,
582        /// Property [`ExpirationDate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-rule.html#cfn-s3outposts-bucket-rule-expirationdate).
583        ///
584        /// Update type: _Mutable_.
585        /// AWS CloudFormation doesn't replace the resource when you change this property.
586        pub expiration_date: Option<::Value<String>>,
587        /// Property [`ExpirationInDays`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-rule.html#cfn-s3outposts-bucket-rule-expirationindays).
588        ///
589        /// Update type: _Mutable_.
590        /// AWS CloudFormation doesn't replace the resource when you change this property.
591        pub expiration_in_days: Option<::Value<u32>>,
592        /// Property [`Filter`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-rule.html#cfn-s3outposts-bucket-rule-filter).
593        ///
594        /// Update type: _Mutable_.
595        /// AWS CloudFormation doesn't replace the resource when you change this property.
596        pub filter: Option<::Value<::json::Value>>,
597        /// Property [`Id`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-rule.html#cfn-s3outposts-bucket-rule-id).
598        ///
599        /// Update type: _Mutable_.
600        /// AWS CloudFormation doesn't replace the resource when you change this property.
601        pub id: Option<::Value<String>>,
602        /// Property [`Status`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-rule.html#cfn-s3outposts-bucket-rule-status).
603        ///
604        /// Update type: _Mutable_.
605        /// AWS CloudFormation doesn't replace the resource when you change this property.
606        pub status: Option<::Value<String>>,
607    }
608
609    impl ::codec::SerializeValue for Rule {
610        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
611            let mut map = ::serde::Serializer::serialize_map(s, None)?;
612            if let Some(ref abort_incomplete_multipart_upload) = self.abort_incomplete_multipart_upload {
613                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AbortIncompleteMultipartUpload", abort_incomplete_multipart_upload)?;
614            }
615            if let Some(ref expiration_date) = self.expiration_date {
616                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ExpirationDate", expiration_date)?;
617            }
618            if let Some(ref expiration_in_days) = self.expiration_in_days {
619                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ExpirationInDays", expiration_in_days)?;
620            }
621            if let Some(ref filter) = self.filter {
622                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Filter", filter)?;
623            }
624            if let Some(ref id) = self.id {
625                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Id", id)?;
626            }
627            if let Some(ref status) = self.status {
628                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Status", status)?;
629            }
630            ::serde::ser::SerializeMap::end(map)
631        }
632    }
633
634    impl ::codec::DeserializeValue for Rule {
635        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Rule, D::Error> {
636            struct Visitor;
637
638            impl<'de> ::serde::de::Visitor<'de> for Visitor {
639                type Value = Rule;
640
641                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
642                    write!(f, "a struct of type Rule")
643                }
644
645                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
646                    let mut abort_incomplete_multipart_upload: Option<::Value<AbortIncompleteMultipartUpload>> = None;
647                    let mut expiration_date: Option<::Value<String>> = None;
648                    let mut expiration_in_days: Option<::Value<u32>> = None;
649                    let mut filter: Option<::Value<::json::Value>> = None;
650                    let mut id: Option<::Value<String>> = None;
651                    let mut status: Option<::Value<String>> = None;
652
653                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
654                        match __cfn_key.as_ref() {
655                            "AbortIncompleteMultipartUpload" => {
656                                abort_incomplete_multipart_upload = ::serde::de::MapAccess::next_value(&mut map)?;
657                            }
658                            "ExpirationDate" => {
659                                expiration_date = ::serde::de::MapAccess::next_value(&mut map)?;
660                            }
661                            "ExpirationInDays" => {
662                                expiration_in_days = ::serde::de::MapAccess::next_value(&mut map)?;
663                            }
664                            "Filter" => {
665                                filter = ::serde::de::MapAccess::next_value(&mut map)?;
666                            }
667                            "Id" => {
668                                id = ::serde::de::MapAccess::next_value(&mut map)?;
669                            }
670                            "Status" => {
671                                status = ::serde::de::MapAccess::next_value(&mut map)?;
672                            }
673                            _ => {}
674                        }
675                    }
676
677                    Ok(Rule {
678                        abort_incomplete_multipart_upload: abort_incomplete_multipart_upload,
679                        expiration_date: expiration_date,
680                        expiration_in_days: expiration_in_days,
681                        filter: filter,
682                        id: id,
683                        status: status,
684                    })
685                }
686            }
687
688            d.deserialize_map(Visitor)
689        }
690    }
691}
692
693pub mod endpoint {
694    //! Property types for the `Endpoint` resource.
695
696    /// The [`AWS::S3Outposts::Endpoint.NetworkInterface`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-endpoint-networkinterface.html) property type.
697    #[derive(Debug, Default)]
698    pub struct NetworkInterface {
699        /// Property [`NetworkInterfaceId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-endpoint-networkinterface.html#cfn-s3outposts-endpoint-networkinterface-networkinterfaceid).
700        ///
701        /// Update type: _Mutable_.
702        /// AWS CloudFormation doesn't replace the resource when you change this property.
703        pub network_interface_id: ::Value<String>,
704    }
705
706    impl ::codec::SerializeValue for NetworkInterface {
707        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
708            let mut map = ::serde::Serializer::serialize_map(s, None)?;
709            ::serde::ser::SerializeMap::serialize_entry(&mut map, "NetworkInterfaceId", &self.network_interface_id)?;
710            ::serde::ser::SerializeMap::end(map)
711        }
712    }
713
714    impl ::codec::DeserializeValue for NetworkInterface {
715        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<NetworkInterface, D::Error> {
716            struct Visitor;
717
718            impl<'de> ::serde::de::Visitor<'de> for Visitor {
719                type Value = NetworkInterface;
720
721                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
722                    write!(f, "a struct of type NetworkInterface")
723                }
724
725                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
726                    let mut network_interface_id: Option<::Value<String>> = None;
727
728                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
729                        match __cfn_key.as_ref() {
730                            "NetworkInterfaceId" => {
731                                network_interface_id = ::serde::de::MapAccess::next_value(&mut map)?;
732                            }
733                            _ => {}
734                        }
735                    }
736
737                    Ok(NetworkInterface {
738                        network_interface_id: network_interface_id.ok_or(::serde::de::Error::missing_field("NetworkInterfaceId"))?,
739                    })
740                }
741            }
742
743            d.deserialize_map(Visitor)
744        }
745    }
746}