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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The summary of a generated template.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TemplateSummary {
/// <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>
pub generated_template_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the generated template.</p>
pub generated_template_name: ::std::option::Option<::std::string::String>,
/// <p>The status of the template generation. Supported values are:</p>
/// <ul>
/// <li>
/// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
/// <li>
/// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
/// <li>
/// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
/// <li>
/// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
/// <li>
/// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
/// <li>
/// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
/// <li>
/// <p><code>Failed</code> - the template operation failed.</p></li>
/// <li>
/// <p><code>Complete</code> - the template operation is complete.</p></li>
/// </ul>
pub status: ::std::option::Option<crate::types::GeneratedTemplateStatus>,
/// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
pub status_reason: ::std::option::Option<::std::string::String>,
/// <p>The time the generated template was created.</p>
pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The time the generated template was last updated.</p>
pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
pub number_of_resources: ::std::option::Option<i32>,
}
impl TemplateSummary {
/// <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>
pub fn generated_template_id(&self) -> ::std::option::Option<&str> {
self.generated_template_id.as_deref()
}
/// <p>The name of the generated template.</p>
pub fn generated_template_name(&self) -> ::std::option::Option<&str> {
self.generated_template_name.as_deref()
}
/// <p>The status of the template generation. Supported values are:</p>
/// <ul>
/// <li>
/// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
/// <li>
/// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
/// <li>
/// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
/// <li>
/// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
/// <li>
/// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
/// <li>
/// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
/// <li>
/// <p><code>Failed</code> - the template operation failed.</p></li>
/// <li>
/// <p><code>Complete</code> - the template operation is complete.</p></li>
/// </ul>
pub fn status(&self) -> ::std::option::Option<&crate::types::GeneratedTemplateStatus> {
self.status.as_ref()
}
/// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
pub fn status_reason(&self) -> ::std::option::Option<&str> {
self.status_reason.as_deref()
}
/// <p>The time the generated template was created.</p>
pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
/// <p>The time the generated template was last updated.</p>
pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_time.as_ref()
}
/// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
pub fn number_of_resources(&self) -> ::std::option::Option<i32> {
self.number_of_resources
}
}
impl TemplateSummary {
/// Creates a new builder-style object to manufacture [`TemplateSummary`](crate::types::TemplateSummary).
pub fn builder() -> crate::types::builders::TemplateSummaryBuilder {
crate::types::builders::TemplateSummaryBuilder::default()
}
}
/// A builder for [`TemplateSummary`](crate::types::TemplateSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TemplateSummaryBuilder {
pub(crate) generated_template_id: ::std::option::Option<::std::string::String>,
pub(crate) generated_template_name: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::GeneratedTemplateStatus>,
pub(crate) status_reason: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) number_of_resources: ::std::option::Option<i32>,
}
impl TemplateSummaryBuilder {
/// <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>
pub fn generated_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.generated_template_id = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_generated_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.generated_template_id = input;
self
}
/// <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>
pub fn get_generated_template_id(&self) -> &::std::option::Option<::std::string::String> {
&self.generated_template_id
}
/// <p>The name of the generated template.</p>
pub fn generated_template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.generated_template_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the generated template.</p>
pub fn set_generated_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.generated_template_name = input;
self
}
/// <p>The name of the generated template.</p>
pub fn get_generated_template_name(&self) -> &::std::option::Option<::std::string::String> {
&self.generated_template_name
}
/// <p>The status of the template generation. Supported values are:</p>
/// <ul>
/// <li>
/// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
/// <li>
/// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
/// <li>
/// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
/// <li>
/// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
/// <li>
/// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
/// <li>
/// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
/// <li>
/// <p><code>Failed</code> - the template operation failed.</p></li>
/// <li>
/// <p><code>Complete</code> - the template operation is complete.</p></li>
/// </ul>
pub fn status(mut self, input: crate::types::GeneratedTemplateStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the template generation. Supported values are:</p>
/// <ul>
/// <li>
/// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
/// <li>
/// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
/// <li>
/// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
/// <li>
/// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
/// <li>
/// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
/// <li>
/// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
/// <li>
/// <p><code>Failed</code> - the template operation failed.</p></li>
/// <li>
/// <p><code>Complete</code> - the template operation is complete.</p></li>
/// </ul>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::GeneratedTemplateStatus>) -> Self {
self.status = input;
self
}
/// <p>The status of the template generation. Supported values are:</p>
/// <ul>
/// <li>
/// <p><code>CreatePending</code> - the creation of the template is pending.</p></li>
/// <li>
/// <p><code>CreateInProgress</code> - the creation of the template is in progress.</p></li>
/// <li>
/// <p><code>DeletePending</code> - the deletion of the template is pending.</p></li>
/// <li>
/// <p><code>DeleteInProgress</code> - the deletion of the template is in progress.</p></li>
/// <li>
/// <p><code>UpdatePending</code> - the update of the template is pending.</p></li>
/// <li>
/// <p><code>UpdateInProgress</code> - the update of the template is in progress.</p></li>
/// <li>
/// <p><code>Failed</code> - the template operation failed.</p></li>
/// <li>
/// <p><code>Complete</code> - the template operation is complete.</p></li>
/// </ul>
pub fn get_status(&self) -> &::std::option::Option<crate::types::GeneratedTemplateStatus> {
&self.status
}
/// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_reason = ::std::option::Option::Some(input.into());
self
}
/// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_reason = input;
self
}
/// <p>The reason for the current template generation status. This will provide more details if a failure happened.</p>
pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.status_reason
}
/// <p>The time the generated template was created.</p>
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
/// <p>The time the generated template was created.</p>
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
/// <p>The time the generated template was created.</p>
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
/// <p>The time the generated template was last updated.</p>
pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_time = ::std::option::Option::Some(input);
self
}
/// <p>The time the generated template was last updated.</p>
pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_time = input;
self
}
/// <p>The time the generated template was last updated.</p>
pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_time
}
/// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
pub fn number_of_resources(mut self, input: i32) -> Self {
self.number_of_resources = ::std::option::Option::Some(input);
self
}
/// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
pub fn set_number_of_resources(mut self, input: ::std::option::Option<i32>) -> Self {
self.number_of_resources = input;
self
}
/// <p>The number of resources in the generated template. This is a total of resources in pending, in-progress, completed, and failed states.</p>
pub fn get_number_of_resources(&self) -> &::std::option::Option<i32> {
&self.number_of_resources
}
/// Consumes the builder and constructs a [`TemplateSummary`](crate::types::TemplateSummary).
pub fn build(self) -> crate::types::TemplateSummary {
crate::types::TemplateSummary {
generated_template_id: self.generated_template_id,
generated_template_name: self.generated_template_name,
status: self.status,
status_reason: self.status_reason,
creation_time: self.creation_time,
last_updated_time: self.last_updated_time,
number_of_resources: self.number_of_resources,
}
}
}