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

/// <p>The configuration details of a generated template.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TemplateConfiguration {
    /// <p>The <code>DeletionPolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the stack is deleted.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the stack is deleted.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html">DeletionPolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub deletion_policy: ::std::option::Option<crate::types::GeneratedTemplateDeletionPolicy>,
    /// <p>The <code>UpdateReplacePolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the resource is replaced during an update operation.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the resource is replaced during an update operation.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html">UpdateReplacePolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub update_replace_policy: ::std::option::Option<crate::types::GeneratedTemplateUpdateReplacePolicy>,
}
impl TemplateConfiguration {
    /// <p>The <code>DeletionPolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the stack is deleted.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the stack is deleted.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html">DeletionPolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn deletion_policy(&self) -> ::std::option::Option<&crate::types::GeneratedTemplateDeletionPolicy> {
        self.deletion_policy.as_ref()
    }
    /// <p>The <code>UpdateReplacePolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the resource is replaced during an update operation.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the resource is replaced during an update operation.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html">UpdateReplacePolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn update_replace_policy(&self) -> ::std::option::Option<&crate::types::GeneratedTemplateUpdateReplacePolicy> {
        self.update_replace_policy.as_ref()
    }
}
impl TemplateConfiguration {
    /// Creates a new builder-style object to manufacture [`TemplateConfiguration`](crate::types::TemplateConfiguration).
    pub fn builder() -> crate::types::builders::TemplateConfigurationBuilder {
        crate::types::builders::TemplateConfigurationBuilder::default()
    }
}

/// A builder for [`TemplateConfiguration`](crate::types::TemplateConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TemplateConfigurationBuilder {
    pub(crate) deletion_policy: ::std::option::Option<crate::types::GeneratedTemplateDeletionPolicy>,
    pub(crate) update_replace_policy: ::std::option::Option<crate::types::GeneratedTemplateUpdateReplacePolicy>,
}
impl TemplateConfigurationBuilder {
    /// <p>The <code>DeletionPolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the stack is deleted.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the stack is deleted.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html">DeletionPolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn deletion_policy(mut self, input: crate::types::GeneratedTemplateDeletionPolicy) -> Self {
        self.deletion_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The <code>DeletionPolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the stack is deleted.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the stack is deleted.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html">DeletionPolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn set_deletion_policy(mut self, input: ::std::option::Option<crate::types::GeneratedTemplateDeletionPolicy>) -> Self {
        self.deletion_policy = input;
        self
    }
    /// <p>The <code>DeletionPolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the stack is deleted.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the stack is deleted.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html">DeletionPolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn get_deletion_policy(&self) -> &::std::option::Option<crate::types::GeneratedTemplateDeletionPolicy> {
        &self.deletion_policy
    }
    /// <p>The <code>UpdateReplacePolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the resource is replaced during an update operation.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the resource is replaced during an update operation.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html">UpdateReplacePolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn update_replace_policy(mut self, input: crate::types::GeneratedTemplateUpdateReplacePolicy) -> Self {
        self.update_replace_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The <code>UpdateReplacePolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the resource is replaced during an update operation.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the resource is replaced during an update operation.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html">UpdateReplacePolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn set_update_replace_policy(mut self, input: ::std::option::Option<crate::types::GeneratedTemplateUpdateReplacePolicy>) -> Self {
        self.update_replace_policy = input;
        self
    }
    /// <p>The <code>UpdateReplacePolicy</code> assigned to resources in the generated template. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>DELETE</code> - delete all resources when the resource is replaced during an update operation.</p></li>
    /// <li>
    /// <p><code>RETAIN</code> - retain all resources when the resource is replaced during an update operation.</p></li>
    /// </ul>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html">UpdateReplacePolicy attribute</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn get_update_replace_policy(&self) -> &::std::option::Option<crate::types::GeneratedTemplateUpdateReplacePolicy> {
        &self.update_replace_policy
    }
    /// Consumes the builder and constructs a [`TemplateConfiguration`](crate::types::TemplateConfiguration).
    pub fn build(self) -> crate::types::TemplateConfiguration {
        crate::types::TemplateConfiguration {
            deletion_policy: self.deletion_policy,
            update_replace_policy: self.update_replace_policy,
        }
    }
}