Skip to main content

aws_sdk_cloudformation/operation/describe_generated_template/
_describe_generated_template_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeGeneratedTemplateOutput {
6    /// <p>The Amazon Resource Name (ARN) of the generated template. The format is <code>arn:${Partition}:cloudformation:${Region}:${Account}:generatedtemplate/${Id}</code>. For example, <code>arn:aws:cloudformation:<i>us-east-1</i>:<i>123456789012</i>:generatedtemplate/<i>2e8465c1-9a80-43ea-a3a3-4f2d692fe6dc</i> </code>.</p>
7    pub generated_template_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the generated template.</p>
9    pub generated_template_name: ::std::option::Option<::std::string::String>,
10    /// <p>A list of objects describing the details of the resources in the template generation.</p>
11    pub resources: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDetail>>,
12    /// <p>The status of the template generation. Supported values are:</p>
13    /// <ul>
14    /// <li>
15    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
16    /// <li>
17    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
18    /// <li>
19    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
20    /// <li>
21    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
22    /// <li>
23    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
24    /// <li>
25    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
26    /// <li>
27    /// <p><code>Failed</code> - the template operation failed.</p></li>
28    /// <li>
29    /// <p><code>Complete</code> - the template operation is complete.</p></li>
30    /// </ul>
31    pub status: ::std::option::Option<crate::types::GeneratedTemplateStatus>,
32    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
33    pub status_reason: ::std::option::Option<::std::string::String>,
34    /// <p>The time the generated template was created.</p>
35    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
36    /// <p>The time the generated template was last updated.</p>
37    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
38    /// <p>An object describing the progress of the template generation.</p>
39    pub progress: ::std::option::Option<crate::types::TemplateProgress>,
40    /// <p>The stack ARN of the base stack if a base stack was provided when generating the template.</p>
41    pub stack_id: ::std::option::Option<::std::string::String>,
42    /// <p>The configuration details of the generated template, including the <code>DeletionPolicy</code> and <code>UpdateReplacePolicy</code>.</p>
43    pub template_configuration: ::std::option::Option<crate::types::TemplateConfiguration>,
44    /// <p>The number of warnings generated for this template. The warnings are found in the details of each of the resources in the template.</p>
45    pub total_warnings: ::std::option::Option<i32>,
46    _request_id: Option<String>,
47}
48impl DescribeGeneratedTemplateOutput {
49    /// <p>The Amazon Resource Name (ARN) of the generated template. The format is <code>arn:${Partition}:cloudformation:${Region}:${Account}:generatedtemplate/${Id}</code>. For example, <code>arn:aws:cloudformation:<i>us-east-1</i>:<i>123456789012</i>:generatedtemplate/<i>2e8465c1-9a80-43ea-a3a3-4f2d692fe6dc</i> </code>.</p>
50    pub fn generated_template_id(&self) -> ::std::option::Option<&str> {
51        self.generated_template_id.as_deref()
52    }
53    /// <p>The name of the generated template.</p>
54    pub fn generated_template_name(&self) -> ::std::option::Option<&str> {
55        self.generated_template_name.as_deref()
56    }
57    /// <p>A list of objects describing the details of the resources in the template generation.</p>
58    ///
59    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resources.is_none()`.
60    pub fn resources(&self) -> &[crate::types::ResourceDetail] {
61        self.resources.as_deref().unwrap_or_default()
62    }
63    /// <p>The status of the template generation. Supported values are:</p>
64    /// <ul>
65    /// <li>
66    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
67    /// <li>
68    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
69    /// <li>
70    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
71    /// <li>
72    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
73    /// <li>
74    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
75    /// <li>
76    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
77    /// <li>
78    /// <p><code>Failed</code> - the template operation failed.</p></li>
79    /// <li>
80    /// <p><code>Complete</code> - the template operation is complete.</p></li>
81    /// </ul>
82    pub fn status(&self) -> ::std::option::Option<&crate::types::GeneratedTemplateStatus> {
83        self.status.as_ref()
84    }
85    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
86    pub fn status_reason(&self) -> ::std::option::Option<&str> {
87        self.status_reason.as_deref()
88    }
89    /// <p>The time the generated template was created.</p>
90    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
91        self.creation_time.as_ref()
92    }
93    /// <p>The time the generated template was last updated.</p>
94    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
95        self.last_updated_time.as_ref()
96    }
97    /// <p>An object describing the progress of the template generation.</p>
98    pub fn progress(&self) -> ::std::option::Option<&crate::types::TemplateProgress> {
99        self.progress.as_ref()
100    }
101    /// <p>The stack ARN of the base stack if a base stack was provided when generating the template.</p>
102    pub fn stack_id(&self) -> ::std::option::Option<&str> {
103        self.stack_id.as_deref()
104    }
105    /// <p>The configuration details of the generated template, including the <code>DeletionPolicy</code> and <code>UpdateReplacePolicy</code>.</p>
106    pub fn template_configuration(&self) -> ::std::option::Option<&crate::types::TemplateConfiguration> {
107        self.template_configuration.as_ref()
108    }
109    /// <p>The number of warnings generated for this template. The warnings are found in the details of each of the resources in the template.</p>
110    pub fn total_warnings(&self) -> ::std::option::Option<i32> {
111        self.total_warnings
112    }
113}
114impl ::aws_types::request_id::RequestId for DescribeGeneratedTemplateOutput {
115    fn request_id(&self) -> Option<&str> {
116        self._request_id.as_deref()
117    }
118}
119impl DescribeGeneratedTemplateOutput {
120    /// Creates a new builder-style object to manufacture [`DescribeGeneratedTemplateOutput`](crate::operation::describe_generated_template::DescribeGeneratedTemplateOutput).
121    pub fn builder() -> crate::operation::describe_generated_template::builders::DescribeGeneratedTemplateOutputBuilder {
122        crate::operation::describe_generated_template::builders::DescribeGeneratedTemplateOutputBuilder::default()
123    }
124}
125
126/// A builder for [`DescribeGeneratedTemplateOutput`](crate::operation::describe_generated_template::DescribeGeneratedTemplateOutput).
127#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
128#[non_exhaustive]
129pub struct DescribeGeneratedTemplateOutputBuilder {
130    pub(crate) generated_template_id: ::std::option::Option<::std::string::String>,
131    pub(crate) generated_template_name: ::std::option::Option<::std::string::String>,
132    pub(crate) resources: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDetail>>,
133    pub(crate) status: ::std::option::Option<crate::types::GeneratedTemplateStatus>,
134    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
135    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
136    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
137    pub(crate) progress: ::std::option::Option<crate::types::TemplateProgress>,
138    pub(crate) stack_id: ::std::option::Option<::std::string::String>,
139    pub(crate) template_configuration: ::std::option::Option<crate::types::TemplateConfiguration>,
140    pub(crate) total_warnings: ::std::option::Option<i32>,
141    _request_id: Option<String>,
142}
143impl DescribeGeneratedTemplateOutputBuilder {
144    /// <p>The Amazon Resource Name (ARN) of the generated template. The format is <code>arn:${Partition}:cloudformation:${Region}:${Account}:generatedtemplate/${Id}</code>. For example, <code>arn:aws:cloudformation:<i>us-east-1</i>:<i>123456789012</i>:generatedtemplate/<i>2e8465c1-9a80-43ea-a3a3-4f2d692fe6dc</i> </code>.</p>
145    pub fn generated_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.generated_template_id = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The Amazon Resource Name (ARN) of the generated template. The format is <code>arn:${Partition}:cloudformation:${Region}:${Account}:generatedtemplate/${Id}</code>. For example, <code>arn:aws:cloudformation:<i>us-east-1</i>:<i>123456789012</i>:generatedtemplate/<i>2e8465c1-9a80-43ea-a3a3-4f2d692fe6dc</i> </code>.</p>
150    pub fn set_generated_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.generated_template_id = input;
152        self
153    }
154    /// <p>The Amazon Resource Name (ARN) of the generated template. The format is <code>arn:${Partition}:cloudformation:${Region}:${Account}:generatedtemplate/${Id}</code>. For example, <code>arn:aws:cloudformation:<i>us-east-1</i>:<i>123456789012</i>:generatedtemplate/<i>2e8465c1-9a80-43ea-a3a3-4f2d692fe6dc</i> </code>.</p>
155    pub fn get_generated_template_id(&self) -> &::std::option::Option<::std::string::String> {
156        &self.generated_template_id
157    }
158    /// <p>The name of the generated template.</p>
159    pub fn generated_template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.generated_template_name = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// <p>The name of the generated template.</p>
164    pub fn set_generated_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.generated_template_name = input;
166        self
167    }
168    /// <p>The name of the generated template.</p>
169    pub fn get_generated_template_name(&self) -> &::std::option::Option<::std::string::String> {
170        &self.generated_template_name
171    }
172    /// Appends an item to `resources`.
173    ///
174    /// To override the contents of this collection use [`set_resources`](Self::set_resources).
175    ///
176    /// <p>A list of objects describing the details of the resources in the template generation.</p>
177    pub fn resources(mut self, input: crate::types::ResourceDetail) -> Self {
178        let mut v = self.resources.unwrap_or_default();
179        v.push(input);
180        self.resources = ::std::option::Option::Some(v);
181        self
182    }
183    /// <p>A list of objects describing the details of the resources in the template generation.</p>
184    pub fn set_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDetail>>) -> Self {
185        self.resources = input;
186        self
187    }
188    /// <p>A list of objects describing the details of the resources in the template generation.</p>
189    pub fn get_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceDetail>> {
190        &self.resources
191    }
192    /// <p>The status of the template generation. Supported values are:</p>
193    /// <ul>
194    /// <li>
195    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
196    /// <li>
197    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
198    /// <li>
199    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
200    /// <li>
201    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
202    /// <li>
203    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
204    /// <li>
205    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
206    /// <li>
207    /// <p><code>Failed</code> - the template operation failed.</p></li>
208    /// <li>
209    /// <p><code>Complete</code> - the template operation is complete.</p></li>
210    /// </ul>
211    pub fn status(mut self, input: crate::types::GeneratedTemplateStatus) -> Self {
212        self.status = ::std::option::Option::Some(input);
213        self
214    }
215    /// <p>The status of the template generation. Supported values are:</p>
216    /// <ul>
217    /// <li>
218    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
219    /// <li>
220    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
221    /// <li>
222    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
223    /// <li>
224    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
225    /// <li>
226    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
227    /// <li>
228    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
229    /// <li>
230    /// <p><code>Failed</code> - the template operation failed.</p></li>
231    /// <li>
232    /// <p><code>Complete</code> - the template operation is complete.</p></li>
233    /// </ul>
234    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GeneratedTemplateStatus>) -> Self {
235        self.status = input;
236        self
237    }
238    /// <p>The status of the template generation. Supported values are:</p>
239    /// <ul>
240    /// <li>
241    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
242    /// <li>
243    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
244    /// <li>
245    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
246    /// <li>
247    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
248    /// <li>
249    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
250    /// <li>
251    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
252    /// <li>
253    /// <p><code>Failed</code> - the template operation failed.</p></li>
254    /// <li>
255    /// <p><code>Complete</code> - the template operation is complete.</p></li>
256    /// </ul>
257    pub fn get_status(&self) -> &::std::option::Option<crate::types::GeneratedTemplateStatus> {
258        &self.status
259    }
260    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
261    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262        self.status_reason = ::std::option::Option::Some(input.into());
263        self
264    }
265    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
266    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
267        self.status_reason = input;
268        self
269    }
270    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
271    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
272        &self.status_reason
273    }
274    /// <p>The time the generated template was created.</p>
275    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
276        self.creation_time = ::std::option::Option::Some(input);
277        self
278    }
279    /// <p>The time the generated template was created.</p>
280    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
281        self.creation_time = input;
282        self
283    }
284    /// <p>The time the generated template was created.</p>
285    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
286        &self.creation_time
287    }
288    /// <p>The time the generated template was last updated.</p>
289    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
290        self.last_updated_time = ::std::option::Option::Some(input);
291        self
292    }
293    /// <p>The time the generated template was last updated.</p>
294    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
295        self.last_updated_time = input;
296        self
297    }
298    /// <p>The time the generated template was last updated.</p>
299    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
300        &self.last_updated_time
301    }
302    /// <p>An object describing the progress of the template generation.</p>
303    pub fn progress(mut self, input: crate::types::TemplateProgress) -> Self {
304        self.progress = ::std::option::Option::Some(input);
305        self
306    }
307    /// <p>An object describing the progress of the template generation.</p>
308    pub fn set_progress(mut self, input: ::std::option::Option<crate::types::TemplateProgress>) -> Self {
309        self.progress = input;
310        self
311    }
312    /// <p>An object describing the progress of the template generation.</p>
313    pub fn get_progress(&self) -> &::std::option::Option<crate::types::TemplateProgress> {
314        &self.progress
315    }
316    /// <p>The stack ARN of the base stack if a base stack was provided when generating the template.</p>
317    pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
318        self.stack_id = ::std::option::Option::Some(input.into());
319        self
320    }
321    /// <p>The stack ARN of the base stack if a base stack was provided when generating the template.</p>
322    pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
323        self.stack_id = input;
324        self
325    }
326    /// <p>The stack ARN of the base stack if a base stack was provided when generating the template.</p>
327    pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
328        &self.stack_id
329    }
330    /// <p>The configuration details of the generated template, including the <code>DeletionPolicy</code> and <code>UpdateReplacePolicy</code>.</p>
331    pub fn template_configuration(mut self, input: crate::types::TemplateConfiguration) -> Self {
332        self.template_configuration = ::std::option::Option::Some(input);
333        self
334    }
335    /// <p>The configuration details of the generated template, including the <code>DeletionPolicy</code> and <code>UpdateReplacePolicy</code>.</p>
336    pub fn set_template_configuration(mut self, input: ::std::option::Option<crate::types::TemplateConfiguration>) -> Self {
337        self.template_configuration = input;
338        self
339    }
340    /// <p>The configuration details of the generated template, including the <code>DeletionPolicy</code> and <code>UpdateReplacePolicy</code>.</p>
341    pub fn get_template_configuration(&self) -> &::std::option::Option<crate::types::TemplateConfiguration> {
342        &self.template_configuration
343    }
344    /// <p>The number of warnings generated for this template. The warnings are found in the details of each of the resources in the template.</p>
345    pub fn total_warnings(mut self, input: i32) -> Self {
346        self.total_warnings = ::std::option::Option::Some(input);
347        self
348    }
349    /// <p>The number of warnings generated for this template. The warnings are found in the details of each of the resources in the template.</p>
350    pub fn set_total_warnings(mut self, input: ::std::option::Option<i32>) -> Self {
351        self.total_warnings = input;
352        self
353    }
354    /// <p>The number of warnings generated for this template. The warnings are found in the details of each of the resources in the template.</p>
355    pub fn get_total_warnings(&self) -> &::std::option::Option<i32> {
356        &self.total_warnings
357    }
358    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
359        self._request_id = Some(request_id.into());
360        self
361    }
362
363    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
364        self._request_id = request_id;
365        self
366    }
367    /// Consumes the builder and constructs a [`DescribeGeneratedTemplateOutput`](crate::operation::describe_generated_template::DescribeGeneratedTemplateOutput).
368    pub fn build(self) -> crate::operation::describe_generated_template::DescribeGeneratedTemplateOutput {
369        crate::operation::describe_generated_template::DescribeGeneratedTemplateOutput {
370            generated_template_id: self.generated_template_id,
371            generated_template_name: self.generated_template_name,
372            resources: self.resources,
373            status: self.status,
374            status_reason: self.status_reason,
375            creation_time: self.creation_time,
376            last_updated_time: self.last_updated_time,
377            progress: self.progress,
378            stack_id: self.stack_id,
379            template_configuration: self.template_configuration,
380            total_warnings: self.total_warnings,
381            _request_id: self._request_id,
382        }
383    }
384}