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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The output for the <code>GetTemplateSummary</code> action.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetTemplateSummaryOutput {
    /// <p>A list of parameter declarations that describe various properties for each parameter.</p>
    pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterDeclaration>>,
    /// <p>The value that's defined in the <code>Description</code> property of the template.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the <code>CAPABILITY_IAM</code> or <code>CAPABILITY_NAMED_IAM</code> value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an <code>InsufficientCapabilities</code> error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub capabilities_reason: ::std::option::Option<::std::string::String>,
    /// <p>A list of all the template resource types that are defined in the template, such as <code>AWS::EC2::Instance</code>, <code>AWS::Dynamo::Table</code>, and <code>Custom::MyCustomInstance</code>.</p>
    pub resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The Amazon Web Services template format version, which identifies the capabilities of the template.</p>
    pub version: ::std::option::Option<::std::string::String>,
    /// <p>The value that's defined for the <code>Metadata</code> property of the template.</p>
    pub metadata: ::std::option::Option<::std::string::String>,
    /// <p>A list of the transforms that are declared in the template.</p>
    pub declared_transforms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A list of resource identifier summaries that describe the target resources of an import operation and the properties you can provide during the import to identify the target resources. For example, <code>BucketName</code> is a possible identifier property for an <code>AWS::S3::Bucket</code> resource.</p>
    pub resource_identifier_summaries: ::std::option::Option<::std::vec::Vec<crate::types::ResourceIdentifierSummary>>,
    /// <p>An object containing any warnings returned.</p>
    pub warnings: ::std::option::Option<crate::types::Warnings>,
    _request_id: Option<String>,
}
impl GetTemplateSummaryOutput {
    /// <p>A list of parameter declarations that describe various properties for each parameter.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters.is_none()`.
    pub fn parameters(&self) -> &[crate::types::ParameterDeclaration] {
        self.parameters.as_deref().unwrap_or_default()
    }
    /// <p>The value that's defined in the <code>Description</code> property of the template.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the <code>CAPABILITY_IAM</code> or <code>CAPABILITY_NAMED_IAM</code> value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an <code>InsufficientCapabilities</code> error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capabilities.is_none()`.
    pub fn capabilities(&self) -> &[crate::types::Capability] {
        self.capabilities.as_deref().unwrap_or_default()
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn capabilities_reason(&self) -> ::std::option::Option<&str> {
        self.capabilities_reason.as_deref()
    }
    /// <p>A list of all the template resource types that are defined in the template, such as <code>AWS::EC2::Instance</code>, <code>AWS::Dynamo::Table</code>, and <code>Custom::MyCustomInstance</code>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_types.is_none()`.
    pub fn resource_types(&self) -> &[::std::string::String] {
        self.resource_types.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Web Services template format version, which identifies the capabilities of the template.</p>
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
    /// <p>The value that's defined for the <code>Metadata</code> property of the template.</p>
    pub fn metadata(&self) -> ::std::option::Option<&str> {
        self.metadata.as_deref()
    }
    /// <p>A list of the transforms that are declared in the template.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.declared_transforms.is_none()`.
    pub fn declared_transforms(&self) -> &[::std::string::String] {
        self.declared_transforms.as_deref().unwrap_or_default()
    }
    /// <p>A list of resource identifier summaries that describe the target resources of an import operation and the properties you can provide during the import to identify the target resources. For example, <code>BucketName</code> is a possible identifier property for an <code>AWS::S3::Bucket</code> resource.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_identifier_summaries.is_none()`.
    pub fn resource_identifier_summaries(&self) -> &[crate::types::ResourceIdentifierSummary] {
        self.resource_identifier_summaries.as_deref().unwrap_or_default()
    }
    /// <p>An object containing any warnings returned.</p>
    pub fn warnings(&self) -> ::std::option::Option<&crate::types::Warnings> {
        self.warnings.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetTemplateSummaryOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetTemplateSummaryOutput {
    /// Creates a new builder-style object to manufacture [`GetTemplateSummaryOutput`](crate::operation::get_template_summary::GetTemplateSummaryOutput).
    pub fn builder() -> crate::operation::get_template_summary::builders::GetTemplateSummaryOutputBuilder {
        crate::operation::get_template_summary::builders::GetTemplateSummaryOutputBuilder::default()
    }
}

/// A builder for [`GetTemplateSummaryOutput`](crate::operation::get_template_summary::GetTemplateSummaryOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetTemplateSummaryOutputBuilder {
    pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterDeclaration>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
    pub(crate) capabilities_reason: ::std::option::Option<::std::string::String>,
    pub(crate) resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    pub(crate) metadata: ::std::option::Option<::std::string::String>,
    pub(crate) declared_transforms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) resource_identifier_summaries: ::std::option::Option<::std::vec::Vec<crate::types::ResourceIdentifierSummary>>,
    pub(crate) warnings: ::std::option::Option<crate::types::Warnings>,
    _request_id: Option<String>,
}
impl GetTemplateSummaryOutputBuilder {
    /// Appends an item to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>A list of parameter declarations that describe various properties for each parameter.</p>
    pub fn parameters(mut self, input: crate::types::ParameterDeclaration) -> Self {
        let mut v = self.parameters.unwrap_or_default();
        v.push(input);
        self.parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of parameter declarations that describe various properties for each parameter.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterDeclaration>>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>A list of parameter declarations that describe various properties for each parameter.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterDeclaration>> {
        &self.parameters
    }
    /// <p>The value that's defined in the <code>Description</code> property of the template.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value that's defined in the <code>Description</code> property of the template.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The value that's defined in the <code>Description</code> property of the template.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `capabilities`.
    ///
    /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
    ///
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the <code>CAPABILITY_IAM</code> or <code>CAPABILITY_NAMED_IAM</code> value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an <code>InsufficientCapabilities</code> error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub fn capabilities(mut self, input: crate::types::Capability) -> Self {
        let mut v = self.capabilities.unwrap_or_default();
        v.push(input);
        self.capabilities = ::std::option::Option::Some(v);
        self
    }
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the <code>CAPABILITY_IAM</code> or <code>CAPABILITY_NAMED_IAM</code> value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an <code>InsufficientCapabilities</code> error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>) -> Self {
        self.capabilities = input;
        self
    }
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the <code>CAPABILITY_IAM</code> or <code>CAPABILITY_NAMED_IAM</code> value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an <code>InsufficientCapabilities</code> error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Capability>> {
        &self.capabilities
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn capabilities_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capabilities_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn set_capabilities_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capabilities_reason = input;
        self
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn get_capabilities_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.capabilities_reason
    }
    /// Appends an item to `resource_types`.
    ///
    /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
    ///
    /// <p>A list of all the template resource types that are defined in the template, such as <code>AWS::EC2::Instance</code>, <code>AWS::Dynamo::Table</code>, and <code>Custom::MyCustomInstance</code>.</p>
    pub fn resource_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.resource_types.unwrap_or_default();
        v.push(input.into());
        self.resource_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of all the template resource types that are defined in the template, such as <code>AWS::EC2::Instance</code>, <code>AWS::Dynamo::Table</code>, and <code>Custom::MyCustomInstance</code>.</p>
    pub fn set_resource_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.resource_types = input;
        self
    }
    /// <p>A list of all the template resource types that are defined in the template, such as <code>AWS::EC2::Instance</code>, <code>AWS::Dynamo::Table</code>, and <code>Custom::MyCustomInstance</code>.</p>
    pub fn get_resource_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.resource_types
    }
    /// <p>The Amazon Web Services template format version, which identifies the capabilities of the template.</p>
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services template format version, which identifies the capabilities of the template.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>The Amazon Web Services template format version, which identifies the capabilities of the template.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// <p>The value that's defined for the <code>Metadata</code> property of the template.</p>
    pub fn metadata(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.metadata = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value that's defined for the <code>Metadata</code> property of the template.</p>
    pub fn set_metadata(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.metadata = input;
        self
    }
    /// <p>The value that's defined for the <code>Metadata</code> property of the template.</p>
    pub fn get_metadata(&self) -> &::std::option::Option<::std::string::String> {
        &self.metadata
    }
    /// Appends an item to `declared_transforms`.
    ///
    /// To override the contents of this collection use [`set_declared_transforms`](Self::set_declared_transforms).
    ///
    /// <p>A list of the transforms that are declared in the template.</p>
    pub fn declared_transforms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.declared_transforms.unwrap_or_default();
        v.push(input.into());
        self.declared_transforms = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of the transforms that are declared in the template.</p>
    pub fn set_declared_transforms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.declared_transforms = input;
        self
    }
    /// <p>A list of the transforms that are declared in the template.</p>
    pub fn get_declared_transforms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.declared_transforms
    }
    /// Appends an item to `resource_identifier_summaries`.
    ///
    /// To override the contents of this collection use [`set_resource_identifier_summaries`](Self::set_resource_identifier_summaries).
    ///
    /// <p>A list of resource identifier summaries that describe the target resources of an import operation and the properties you can provide during the import to identify the target resources. For example, <code>BucketName</code> is a possible identifier property for an <code>AWS::S3::Bucket</code> resource.</p>
    pub fn resource_identifier_summaries(mut self, input: crate::types::ResourceIdentifierSummary) -> Self {
        let mut v = self.resource_identifier_summaries.unwrap_or_default();
        v.push(input);
        self.resource_identifier_summaries = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of resource identifier summaries that describe the target resources of an import operation and the properties you can provide during the import to identify the target resources. For example, <code>BucketName</code> is a possible identifier property for an <code>AWS::S3::Bucket</code> resource.</p>
    pub fn set_resource_identifier_summaries(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceIdentifierSummary>>,
    ) -> Self {
        self.resource_identifier_summaries = input;
        self
    }
    /// <p>A list of resource identifier summaries that describe the target resources of an import operation and the properties you can provide during the import to identify the target resources. For example, <code>BucketName</code> is a possible identifier property for an <code>AWS::S3::Bucket</code> resource.</p>
    pub fn get_resource_identifier_summaries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceIdentifierSummary>> {
        &self.resource_identifier_summaries
    }
    /// <p>An object containing any warnings returned.</p>
    pub fn warnings(mut self, input: crate::types::Warnings) -> Self {
        self.warnings = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object containing any warnings returned.</p>
    pub fn set_warnings(mut self, input: ::std::option::Option<crate::types::Warnings>) -> Self {
        self.warnings = input;
        self
    }
    /// <p>An object containing any warnings returned.</p>
    pub fn get_warnings(&self) -> &::std::option::Option<crate::types::Warnings> {
        &self.warnings
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetTemplateSummaryOutput`](crate::operation::get_template_summary::GetTemplateSummaryOutput).
    pub fn build(self) -> crate::operation::get_template_summary::GetTemplateSummaryOutput {
        crate::operation::get_template_summary::GetTemplateSummaryOutput {
            parameters: self.parameters,
            description: self.description,
            capabilities: self.capabilities,
            capabilities_reason: self.capabilities_reason,
            resource_types: self.resource_types,
            version: self.version,
            metadata: self.metadata,
            declared_transforms: self.declared_transforms,
            resource_identifier_summaries: self.resource_identifier_summaries,
            warnings: self.warnings,
            _request_id: self._request_id,
        }
    }
}