aws_sdk_cloudformation/types/
_template_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The summary of a generated template.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TemplateSummary {
7    /// <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>
8    pub generated_template_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the generated template.</p>
10    pub generated_template_name: ::std::option::Option<::std::string::String>,
11    /// <p>The status of the template generation. Supported values are:</p>
12    /// <ul>
13    /// <li>
14    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
15    /// <li>
16    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
17    /// <li>
18    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
19    /// <li>
20    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
21    /// <li>
22    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
23    /// <li>
24    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
25    /// <li>
26    /// <p><code>Failed</code> - the template operation failed.</p></li>
27    /// <li>
28    /// <p><code>Complete</code> - the template operation is complete.</p></li>
29    /// </ul>
30    pub status: ::std::option::Option<crate::types::GeneratedTemplateStatus>,
31    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
32    pub status_reason: ::std::option::Option<::std::string::String>,
33    /// <p>The time the generated template was created.</p>
34    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
35    /// <p>The time the generated template was last updated.</p>
36    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
37    /// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
38    pub number_of_resources: ::std::option::Option<i32>,
39}
40impl TemplateSummary {
41    /// <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>
42    pub fn generated_template_id(&self) -> ::std::option::Option<&str> {
43        self.generated_template_id.as_deref()
44    }
45    /// <p>The name of the generated template.</p>
46    pub fn generated_template_name(&self) -> ::std::option::Option<&str> {
47        self.generated_template_name.as_deref()
48    }
49    /// <p>The status of the template generation. Supported values are:</p>
50    /// <ul>
51    /// <li>
52    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
53    /// <li>
54    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
55    /// <li>
56    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
57    /// <li>
58    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
59    /// <li>
60    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
61    /// <li>
62    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
63    /// <li>
64    /// <p><code>Failed</code> - the template operation failed.</p></li>
65    /// <li>
66    /// <p><code>Complete</code> - the template operation is complete.</p></li>
67    /// </ul>
68    pub fn status(&self) -> ::std::option::Option<&crate::types::GeneratedTemplateStatus> {
69        self.status.as_ref()
70    }
71    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
72    pub fn status_reason(&self) -> ::std::option::Option<&str> {
73        self.status_reason.as_deref()
74    }
75    /// <p>The time the generated template was created.</p>
76    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
77        self.creation_time.as_ref()
78    }
79    /// <p>The time the generated template was last updated.</p>
80    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
81        self.last_updated_time.as_ref()
82    }
83    /// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
84    pub fn number_of_resources(&self) -> ::std::option::Option<i32> {
85        self.number_of_resources
86    }
87}
88impl TemplateSummary {
89    /// Creates a new builder-style object to manufacture [`TemplateSummary`](crate::types::TemplateSummary).
90    pub fn builder() -> crate::types::builders::TemplateSummaryBuilder {
91        crate::types::builders::TemplateSummaryBuilder::default()
92    }
93}
94
95/// A builder for [`TemplateSummary`](crate::types::TemplateSummary).
96#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
97#[non_exhaustive]
98pub struct TemplateSummaryBuilder {
99    pub(crate) generated_template_id: ::std::option::Option<::std::string::String>,
100    pub(crate) generated_template_name: ::std::option::Option<::std::string::String>,
101    pub(crate) status: ::std::option::Option<crate::types::GeneratedTemplateStatus>,
102    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
103    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
104    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
105    pub(crate) number_of_resources: ::std::option::Option<i32>,
106}
107impl TemplateSummaryBuilder {
108    /// <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>
109    pub fn generated_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.generated_template_id = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <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>
114    pub fn set_generated_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.generated_template_id = input;
116        self
117    }
118    /// <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>
119    pub fn get_generated_template_id(&self) -> &::std::option::Option<::std::string::String> {
120        &self.generated_template_id
121    }
122    /// <p>The name of the generated template.</p>
123    pub fn generated_template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.generated_template_name = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The name of the generated template.</p>
128    pub fn set_generated_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.generated_template_name = input;
130        self
131    }
132    /// <p>The name of the generated template.</p>
133    pub fn get_generated_template_name(&self) -> &::std::option::Option<::std::string::String> {
134        &self.generated_template_name
135    }
136    /// <p>The status of the template generation. Supported values are:</p>
137    /// <ul>
138    /// <li>
139    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
140    /// <li>
141    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
142    /// <li>
143    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
144    /// <li>
145    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
146    /// <li>
147    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
148    /// <li>
149    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
150    /// <li>
151    /// <p><code>Failed</code> - the template operation failed.</p></li>
152    /// <li>
153    /// <p><code>Complete</code> - the template operation is complete.</p></li>
154    /// </ul>
155    pub fn status(mut self, input: crate::types::GeneratedTemplateStatus) -> Self {
156        self.status = ::std::option::Option::Some(input);
157        self
158    }
159    /// <p>The status of the template generation. Supported values are:</p>
160    /// <ul>
161    /// <li>
162    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
163    /// <li>
164    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
165    /// <li>
166    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
167    /// <li>
168    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
169    /// <li>
170    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
171    /// <li>
172    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
173    /// <li>
174    /// <p><code>Failed</code> - the template operation failed.</p></li>
175    /// <li>
176    /// <p><code>Complete</code> - the template operation is complete.</p></li>
177    /// </ul>
178    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GeneratedTemplateStatus>) -> Self {
179        self.status = input;
180        self
181    }
182    /// <p>The status of the template generation. Supported values are:</p>
183    /// <ul>
184    /// <li>
185    /// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
186    /// <li>
187    /// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
188    /// <li>
189    /// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
190    /// <li>
191    /// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
192    /// <li>
193    /// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
194    /// <li>
195    /// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
196    /// <li>
197    /// <p><code>Failed</code> - the template operation failed.</p></li>
198    /// <li>
199    /// <p><code>Complete</code> - the template operation is complete.</p></li>
200    /// </ul>
201    pub fn get_status(&self) -> &::std::option::Option<crate::types::GeneratedTemplateStatus> {
202        &self.status
203    }
204    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
205    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.status_reason = ::std::option::Option::Some(input.into());
207        self
208    }
209    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
210    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.status_reason = input;
212        self
213    }
214    /// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
215    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
216        &self.status_reason
217    }
218    /// <p>The time the generated template was created.</p>
219    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
220        self.creation_time = ::std::option::Option::Some(input);
221        self
222    }
223    /// <p>The time the generated template was created.</p>
224    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
225        self.creation_time = input;
226        self
227    }
228    /// <p>The time the generated template was created.</p>
229    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
230        &self.creation_time
231    }
232    /// <p>The time the generated template was last updated.</p>
233    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
234        self.last_updated_time = ::std::option::Option::Some(input);
235        self
236    }
237    /// <p>The time the generated template was last updated.</p>
238    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
239        self.last_updated_time = input;
240        self
241    }
242    /// <p>The time the generated template was last updated.</p>
243    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
244        &self.last_updated_time
245    }
246    /// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
247    pub fn number_of_resources(mut self, input: i32) -> Self {
248        self.number_of_resources = ::std::option::Option::Some(input);
249        self
250    }
251    /// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
252    pub fn set_number_of_resources(mut self, input: ::std::option::Option<i32>) -> Self {
253        self.number_of_resources = input;
254        self
255    }
256    /// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
257    pub fn get_number_of_resources(&self) -> &::std::option::Option<i32> {
258        &self.number_of_resources
259    }
260    /// Consumes the builder and constructs a [`TemplateSummary`](crate::types::TemplateSummary).
261    pub fn build(self) -> crate::types::TemplateSummary {
262        crate::types::TemplateSummary {
263            generated_template_id: self.generated_template_id,
264            generated_template_name: self.generated_template_name,
265            status: self.status,
266            status_reason: self.status_reason,
267            creation_time: self.creation_time,
268            last_updated_time: self.last_updated_time,
269            number_of_resources: self.number_of_resources,
270        }
271    }
272}