cfn/aws/
datapipeline.rs

1//! Types for the `DataPipeline` service.
2
3/// The [`AWS::DataPipeline::Pipeline`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html) resource type.
4#[derive(Debug, Default)]
5pub struct Pipeline {
6    properties: PipelineProperties
7}
8
9/// Properties for the `Pipeline` resource.
10#[derive(Debug, Default)]
11pub struct PipelineProperties {
12    /// Property [`Activate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#cfn-datapipeline-pipeline-activate).
13    ///
14    /// Update type: _Mutable_.
15    /// AWS CloudFormation doesn't replace the resource when you change this property.
16    pub activate: Option<::Value<bool>>,
17    /// Property [`Description`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#cfn-datapipeline-pipeline-description).
18    ///
19    /// Update type: _Immutable_.
20    /// AWS CloudFormation replaces the resource when you change this property.
21    pub description: Option<::Value<String>>,
22    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#cfn-datapipeline-pipeline-name).
23    ///
24    /// Update type: _Immutable_.
25    /// AWS CloudFormation replaces the resource when you change this property.
26    pub name: ::Value<String>,
27    /// Property [`ParameterObjects`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#cfn-datapipeline-pipeline-parameterobjects).
28    ///
29    /// Update type: _Mutable_.
30    /// AWS CloudFormation doesn't replace the resource when you change this property.
31    pub parameter_objects: ::ValueList<self::pipeline::ParameterObject>,
32    /// Property [`ParameterValues`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#cfn-datapipeline-pipeline-parametervalues).
33    ///
34    /// Update type: _Mutable_.
35    /// AWS CloudFormation doesn't replace the resource when you change this property.
36    pub parameter_values: Option<::ValueList<self::pipeline::ParameterValue>>,
37    /// Property [`PipelineObjects`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#cfn-datapipeline-pipeline-pipelineobjects).
38    ///
39    /// Update type: _Mutable_.
40    /// AWS CloudFormation doesn't replace the resource when you change this property.
41    pub pipeline_objects: Option<::ValueList<self::pipeline::PipelineObject>>,
42    /// Property [`PipelineTags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datapipeline-pipeline.html#cfn-datapipeline-pipeline-pipelinetags).
43    ///
44    /// Update type: _Mutable_.
45    /// AWS CloudFormation doesn't replace the resource when you change this property.
46    pub pipeline_tags: Option<::ValueList<self::pipeline::PipelineTag>>,
47}
48
49impl ::serde::Serialize for PipelineProperties {
50    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
51        let mut map = ::serde::Serializer::serialize_map(s, None)?;
52        if let Some(ref activate) = self.activate {
53            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Activate", activate)?;
54        }
55        if let Some(ref description) = self.description {
56            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Description", description)?;
57        }
58        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
59        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ParameterObjects", &self.parameter_objects)?;
60        if let Some(ref parameter_values) = self.parameter_values {
61            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ParameterValues", parameter_values)?;
62        }
63        if let Some(ref pipeline_objects) = self.pipeline_objects {
64            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PipelineObjects", pipeline_objects)?;
65        }
66        if let Some(ref pipeline_tags) = self.pipeline_tags {
67            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PipelineTags", pipeline_tags)?;
68        }
69        ::serde::ser::SerializeMap::end(map)
70    }
71}
72
73impl<'de> ::serde::Deserialize<'de> for PipelineProperties {
74    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<PipelineProperties, D::Error> {
75        struct Visitor;
76
77        impl<'de> ::serde::de::Visitor<'de> for Visitor {
78            type Value = PipelineProperties;
79
80            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
81                write!(f, "a struct of type PipelineProperties")
82            }
83
84            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
85                let mut activate: Option<::Value<bool>> = None;
86                let mut description: Option<::Value<String>> = None;
87                let mut name: Option<::Value<String>> = None;
88                let mut parameter_objects: Option<::ValueList<self::pipeline::ParameterObject>> = None;
89                let mut parameter_values: Option<::ValueList<self::pipeline::ParameterValue>> = None;
90                let mut pipeline_objects: Option<::ValueList<self::pipeline::PipelineObject>> = None;
91                let mut pipeline_tags: Option<::ValueList<self::pipeline::PipelineTag>> = None;
92
93                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
94                    match __cfn_key.as_ref() {
95                        "Activate" => {
96                            activate = ::serde::de::MapAccess::next_value(&mut map)?;
97                        }
98                        "Description" => {
99                            description = ::serde::de::MapAccess::next_value(&mut map)?;
100                        }
101                        "Name" => {
102                            name = ::serde::de::MapAccess::next_value(&mut map)?;
103                        }
104                        "ParameterObjects" => {
105                            parameter_objects = ::serde::de::MapAccess::next_value(&mut map)?;
106                        }
107                        "ParameterValues" => {
108                            parameter_values = ::serde::de::MapAccess::next_value(&mut map)?;
109                        }
110                        "PipelineObjects" => {
111                            pipeline_objects = ::serde::de::MapAccess::next_value(&mut map)?;
112                        }
113                        "PipelineTags" => {
114                            pipeline_tags = ::serde::de::MapAccess::next_value(&mut map)?;
115                        }
116                        _ => {}
117                    }
118                }
119
120                Ok(PipelineProperties {
121                    activate: activate,
122                    description: description,
123                    name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
124                    parameter_objects: parameter_objects.ok_or(::serde::de::Error::missing_field("ParameterObjects"))?,
125                    parameter_values: parameter_values,
126                    pipeline_objects: pipeline_objects,
127                    pipeline_tags: pipeline_tags,
128                })
129            }
130        }
131
132        d.deserialize_map(Visitor)
133    }
134}
135
136impl ::Resource for Pipeline {
137    type Properties = PipelineProperties;
138    const TYPE: &'static str = "AWS::DataPipeline::Pipeline";
139    fn properties(&self) -> &PipelineProperties {
140        &self.properties
141    }
142    fn properties_mut(&mut self) -> &mut PipelineProperties {
143        &mut self.properties
144    }
145}
146
147impl ::private::Sealed for Pipeline {}
148
149impl From<PipelineProperties> for Pipeline {
150    fn from(properties: PipelineProperties) -> Pipeline {
151        Pipeline { properties }
152    }
153}
154
155pub mod pipeline {
156    //! Property types for the `Pipeline` resource.
157
158    /// The [`AWS::DataPipeline::Pipeline.Field`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html) property type.
159    #[derive(Debug, Default)]
160    pub struct Field {
161        /// Property [`Key`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html#cfn-datapipeline-pipeline-pipelineobjects-fields-key).
162        ///
163        /// Update type: _Mutable_.
164        /// AWS CloudFormation doesn't replace the resource when you change this property.
165        pub key: ::Value<String>,
166        /// Property [`RefValue`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html#cfn-datapipeline-pipeline-pipelineobjects-fields-refvalue).
167        ///
168        /// Update type: _Mutable_.
169        /// AWS CloudFormation doesn't replace the resource when you change this property.
170        pub ref_value: Option<::Value<String>>,
171        /// Property [`StringValue`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html#cfn-datapipeline-pipeline-pipelineobjects-fields-stringvalue).
172        ///
173        /// Update type: _Mutable_.
174        /// AWS CloudFormation doesn't replace the resource when you change this property.
175        pub string_value: Option<::Value<String>>,
176    }
177
178    impl ::codec::SerializeValue for Field {
179        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
180            let mut map = ::serde::Serializer::serialize_map(s, None)?;
181            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Key", &self.key)?;
182            if let Some(ref ref_value) = self.ref_value {
183                ::serde::ser::SerializeMap::serialize_entry(&mut map, "RefValue", ref_value)?;
184            }
185            if let Some(ref string_value) = self.string_value {
186                ::serde::ser::SerializeMap::serialize_entry(&mut map, "StringValue", string_value)?;
187            }
188            ::serde::ser::SerializeMap::end(map)
189        }
190    }
191
192    impl ::codec::DeserializeValue for Field {
193        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Field, D::Error> {
194            struct Visitor;
195
196            impl<'de> ::serde::de::Visitor<'de> for Visitor {
197                type Value = Field;
198
199                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
200                    write!(f, "a struct of type Field")
201                }
202
203                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
204                    let mut key: Option<::Value<String>> = None;
205                    let mut ref_value: Option<::Value<String>> = None;
206                    let mut string_value: Option<::Value<String>> = None;
207
208                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
209                        match __cfn_key.as_ref() {
210                            "Key" => {
211                                key = ::serde::de::MapAccess::next_value(&mut map)?;
212                            }
213                            "RefValue" => {
214                                ref_value = ::serde::de::MapAccess::next_value(&mut map)?;
215                            }
216                            "StringValue" => {
217                                string_value = ::serde::de::MapAccess::next_value(&mut map)?;
218                            }
219                            _ => {}
220                        }
221                    }
222
223                    Ok(Field {
224                        key: key.ok_or(::serde::de::Error::missing_field("Key"))?,
225                        ref_value: ref_value,
226                        string_value: string_value,
227                    })
228                }
229            }
230
231            d.deserialize_map(Visitor)
232        }
233    }
234
235    /// The [`AWS::DataPipeline::Pipeline.ParameterAttribute`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html) property type.
236    #[derive(Debug, Default)]
237    pub struct ParameterAttribute {
238        /// Property [`Key`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html#cfn-datapipeline-pipeline-parameterobjects-attribtues-key).
239        ///
240        /// Update type: _Mutable_.
241        /// AWS CloudFormation doesn't replace the resource when you change this property.
242        pub key: ::Value<String>,
243        /// Property [`StringValue`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects-attributes.html#cfn-datapipeline-pipeline-parameterobjects-attribtues-stringvalue).
244        ///
245        /// Update type: _Mutable_.
246        /// AWS CloudFormation doesn't replace the resource when you change this property.
247        pub string_value: ::Value<String>,
248    }
249
250    impl ::codec::SerializeValue for ParameterAttribute {
251        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
252            let mut map = ::serde::Serializer::serialize_map(s, None)?;
253            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Key", &self.key)?;
254            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StringValue", &self.string_value)?;
255            ::serde::ser::SerializeMap::end(map)
256        }
257    }
258
259    impl ::codec::DeserializeValue for ParameterAttribute {
260        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ParameterAttribute, D::Error> {
261            struct Visitor;
262
263            impl<'de> ::serde::de::Visitor<'de> for Visitor {
264                type Value = ParameterAttribute;
265
266                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
267                    write!(f, "a struct of type ParameterAttribute")
268                }
269
270                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
271                    let mut key: Option<::Value<String>> = None;
272                    let mut string_value: Option<::Value<String>> = None;
273
274                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
275                        match __cfn_key.as_ref() {
276                            "Key" => {
277                                key = ::serde::de::MapAccess::next_value(&mut map)?;
278                            }
279                            "StringValue" => {
280                                string_value = ::serde::de::MapAccess::next_value(&mut map)?;
281                            }
282                            _ => {}
283                        }
284                    }
285
286                    Ok(ParameterAttribute {
287                        key: key.ok_or(::serde::de::Error::missing_field("Key"))?,
288                        string_value: string_value.ok_or(::serde::de::Error::missing_field("StringValue"))?,
289                    })
290                }
291            }
292
293            d.deserialize_map(Visitor)
294        }
295    }
296
297    /// The [`AWS::DataPipeline::Pipeline.ParameterObject`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects.html) property type.
298    #[derive(Debug, Default)]
299    pub struct ParameterObject {
300        /// Property [`Attributes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects.html#cfn-datapipeline-pipeline-parameterobjects-attributes).
301        ///
302        /// Update type: _Mutable_.
303        /// AWS CloudFormation doesn't replace the resource when you change this property.
304        pub attributes: ::ValueList<ParameterAttribute>,
305        /// Property [`Id`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parameterobjects.html#cfn-datapipeline-pipeline-parameterobjects-id).
306        ///
307        /// Update type: _Mutable_.
308        /// AWS CloudFormation doesn't replace the resource when you change this property.
309        pub id: ::Value<String>,
310    }
311
312    impl ::codec::SerializeValue for ParameterObject {
313        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
314            let mut map = ::serde::Serializer::serialize_map(s, None)?;
315            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Attributes", &self.attributes)?;
316            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Id", &self.id)?;
317            ::serde::ser::SerializeMap::end(map)
318        }
319    }
320
321    impl ::codec::DeserializeValue for ParameterObject {
322        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ParameterObject, D::Error> {
323            struct Visitor;
324
325            impl<'de> ::serde::de::Visitor<'de> for Visitor {
326                type Value = ParameterObject;
327
328                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
329                    write!(f, "a struct of type ParameterObject")
330                }
331
332                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
333                    let mut attributes: Option<::ValueList<ParameterAttribute>> = None;
334                    let mut id: Option<::Value<String>> = None;
335
336                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
337                        match __cfn_key.as_ref() {
338                            "Attributes" => {
339                                attributes = ::serde::de::MapAccess::next_value(&mut map)?;
340                            }
341                            "Id" => {
342                                id = ::serde::de::MapAccess::next_value(&mut map)?;
343                            }
344                            _ => {}
345                        }
346                    }
347
348                    Ok(ParameterObject {
349                        attributes: attributes.ok_or(::serde::de::Error::missing_field("Attributes"))?,
350                        id: id.ok_or(::serde::de::Error::missing_field("Id"))?,
351                    })
352                }
353            }
354
355            d.deserialize_map(Visitor)
356        }
357    }
358
359    /// The [`AWS::DataPipeline::Pipeline.ParameterValue`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parametervalues.html) property type.
360    #[derive(Debug, Default)]
361    pub struct ParameterValue {
362        /// Property [`Id`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parametervalues.html#cfn-datapipeline-pipeline-parametervalues-id).
363        ///
364        /// Update type: _Mutable_.
365        /// AWS CloudFormation doesn't replace the resource when you change this property.
366        pub id: ::Value<String>,
367        /// Property [`StringValue`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-parametervalues.html#cfn-datapipeline-pipeline-parametervalues-stringvalue).
368        ///
369        /// Update type: _Mutable_.
370        /// AWS CloudFormation doesn't replace the resource when you change this property.
371        pub string_value: ::Value<String>,
372    }
373
374    impl ::codec::SerializeValue for ParameterValue {
375        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
376            let mut map = ::serde::Serializer::serialize_map(s, None)?;
377            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Id", &self.id)?;
378            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StringValue", &self.string_value)?;
379            ::serde::ser::SerializeMap::end(map)
380        }
381    }
382
383    impl ::codec::DeserializeValue for ParameterValue {
384        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ParameterValue, D::Error> {
385            struct Visitor;
386
387            impl<'de> ::serde::de::Visitor<'de> for Visitor {
388                type Value = ParameterValue;
389
390                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
391                    write!(f, "a struct of type ParameterValue")
392                }
393
394                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
395                    let mut id: Option<::Value<String>> = None;
396                    let mut string_value: Option<::Value<String>> = None;
397
398                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
399                        match __cfn_key.as_ref() {
400                            "Id" => {
401                                id = ::serde::de::MapAccess::next_value(&mut map)?;
402                            }
403                            "StringValue" => {
404                                string_value = ::serde::de::MapAccess::next_value(&mut map)?;
405                            }
406                            _ => {}
407                        }
408                    }
409
410                    Ok(ParameterValue {
411                        id: id.ok_or(::serde::de::Error::missing_field("Id"))?,
412                        string_value: string_value.ok_or(::serde::de::Error::missing_field("StringValue"))?,
413                    })
414                }
415            }
416
417            d.deserialize_map(Visitor)
418        }
419    }
420
421    /// The [`AWS::DataPipeline::Pipeline.PipelineObject`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects.html) property type.
422    #[derive(Debug, Default)]
423    pub struct PipelineObject {
424        /// Property [`Fields`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects.html#cfn-datapipeline-pipeline-pipelineobjects-fields).
425        ///
426        /// Update type: _Mutable_.
427        /// AWS CloudFormation doesn't replace the resource when you change this property.
428        pub fields: ::ValueList<Field>,
429        /// Property [`Id`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects.html#cfn-datapipeline-pipeline-pipelineobjects-id).
430        ///
431        /// Update type: _Mutable_.
432        /// AWS CloudFormation doesn't replace the resource when you change this property.
433        pub id: ::Value<String>,
434        /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects.html#cfn-datapipeline-pipeline-pipelineobjects-name).
435        ///
436        /// Update type: _Mutable_.
437        /// AWS CloudFormation doesn't replace the resource when you change this property.
438        pub name: ::Value<String>,
439    }
440
441    impl ::codec::SerializeValue for PipelineObject {
442        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
443            let mut map = ::serde::Serializer::serialize_map(s, None)?;
444            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Fields", &self.fields)?;
445            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Id", &self.id)?;
446            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
447            ::serde::ser::SerializeMap::end(map)
448        }
449    }
450
451    impl ::codec::DeserializeValue for PipelineObject {
452        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<PipelineObject, D::Error> {
453            struct Visitor;
454
455            impl<'de> ::serde::de::Visitor<'de> for Visitor {
456                type Value = PipelineObject;
457
458                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
459                    write!(f, "a struct of type PipelineObject")
460                }
461
462                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
463                    let mut fields: Option<::ValueList<Field>> = None;
464                    let mut id: Option<::Value<String>> = None;
465                    let mut name: Option<::Value<String>> = None;
466
467                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
468                        match __cfn_key.as_ref() {
469                            "Fields" => {
470                                fields = ::serde::de::MapAccess::next_value(&mut map)?;
471                            }
472                            "Id" => {
473                                id = ::serde::de::MapAccess::next_value(&mut map)?;
474                            }
475                            "Name" => {
476                                name = ::serde::de::MapAccess::next_value(&mut map)?;
477                            }
478                            _ => {}
479                        }
480                    }
481
482                    Ok(PipelineObject {
483                        fields: fields.ok_or(::serde::de::Error::missing_field("Fields"))?,
484                        id: id.ok_or(::serde::de::Error::missing_field("Id"))?,
485                        name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
486                    })
487                }
488            }
489
490            d.deserialize_map(Visitor)
491        }
492    }
493
494    /// The [`AWS::DataPipeline::Pipeline.PipelineTag`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelinetags.html) property type.
495    #[derive(Debug, Default)]
496    pub struct PipelineTag {
497        /// Property [`Key`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelinetags.html#cfn-datapipeline-pipeline-pipelinetags-key).
498        ///
499        /// Update type: _Mutable_.
500        /// AWS CloudFormation doesn't replace the resource when you change this property.
501        pub key: ::Value<String>,
502        /// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelinetags.html#cfn-datapipeline-pipeline-pipelinetags-value).
503        ///
504        /// Update type: _Mutable_.
505        /// AWS CloudFormation doesn't replace the resource when you change this property.
506        pub value: ::Value<String>,
507    }
508
509    impl ::codec::SerializeValue for PipelineTag {
510        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
511            let mut map = ::serde::Serializer::serialize_map(s, None)?;
512            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Key", &self.key)?;
513            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", &self.value)?;
514            ::serde::ser::SerializeMap::end(map)
515        }
516    }
517
518    impl ::codec::DeserializeValue for PipelineTag {
519        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<PipelineTag, D::Error> {
520            struct Visitor;
521
522            impl<'de> ::serde::de::Visitor<'de> for Visitor {
523                type Value = PipelineTag;
524
525                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
526                    write!(f, "a struct of type PipelineTag")
527                }
528
529                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
530                    let mut key: Option<::Value<String>> = None;
531                    let mut value: Option<::Value<String>> = None;
532
533                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
534                        match __cfn_key.as_ref() {
535                            "Key" => {
536                                key = ::serde::de::MapAccess::next_value(&mut map)?;
537                            }
538                            "Value" => {
539                                value = ::serde::de::MapAccess::next_value(&mut map)?;
540                            }
541                            _ => {}
542                        }
543                    }
544
545                    Ok(PipelineTag {
546                        key: key.ok_or(::serde::de::Error::missing_field("Key"))?,
547                        value: value.ok_or(::serde::de::Error::missing_field("Value"))?,
548                    })
549                }
550            }
551
552            d.deserialize_map(Visitor)
553        }
554    }
555}