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

/// <p>The field that CloudFormation will change, such as the name of a resource's property, and whether the resource will be recreated.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ResourceTargetDefinition {
    /// <p>Indicates which resource attribute is triggering this update, such as a change in the resource attribute's <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>.</p>
    pub attribute: ::std::option::Option<crate::types::ResourceAttribute>,
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, the name of the property. For all other attributes, the value is null.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this property causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see the update behavior for that <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">property</a> in the <i>CloudFormation User Guide</i>.</p>
    pub requires_recreation: ::std::option::Option<crate::types::RequiresRecreation>,
    /// <p>The property path of the property.</p>
    pub path: ::std::option::Option<::std::string::String>,
    /// <p>The value of the property before the change is executed. Large values can be truncated.</p>
    pub before_value: ::std::option::Option<::std::string::String>,
    /// <p>The value of the property after the change is executed. Large values can be truncated.</p>
    pub after_value: ::std::option::Option<::std::string::String>,
    /// <p>The type of change to be made to the property if the change is executed.</p>
    /// <ul>
    /// <li>
    /// <p><code>Add</code> The item will be added.</p></li>
    /// <li>
    /// <p><code>Remove</code> The item will be removed.</p></li>
    /// <li>
    /// <p><code>Modify</code> The item will be modified.</p></li>
    /// </ul>
    pub attribute_change_type: ::std::option::Option<crate::types::AttributeChangeType>,
}
impl ResourceTargetDefinition {
    /// <p>Indicates which resource attribute is triggering this update, such as a change in the resource attribute's <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>.</p>
    pub fn attribute(&self) -> ::std::option::Option<&crate::types::ResourceAttribute> {
        self.attribute.as_ref()
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, the name of the property. For all other attributes, the value is null.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this property causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see the update behavior for that <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">property</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn requires_recreation(&self) -> ::std::option::Option<&crate::types::RequiresRecreation> {
        self.requires_recreation.as_ref()
    }
    /// <p>The property path of the property.</p>
    pub fn path(&self) -> ::std::option::Option<&str> {
        self.path.as_deref()
    }
    /// <p>The value of the property before the change is executed. Large values can be truncated.</p>
    pub fn before_value(&self) -> ::std::option::Option<&str> {
        self.before_value.as_deref()
    }
    /// <p>The value of the property after the change is executed. Large values can be truncated.</p>
    pub fn after_value(&self) -> ::std::option::Option<&str> {
        self.after_value.as_deref()
    }
    /// <p>The type of change to be made to the property if the change is executed.</p>
    /// <ul>
    /// <li>
    /// <p><code>Add</code> The item will be added.</p></li>
    /// <li>
    /// <p><code>Remove</code> The item will be removed.</p></li>
    /// <li>
    /// <p><code>Modify</code> The item will be modified.</p></li>
    /// </ul>
    pub fn attribute_change_type(&self) -> ::std::option::Option<&crate::types::AttributeChangeType> {
        self.attribute_change_type.as_ref()
    }
}
impl ResourceTargetDefinition {
    /// Creates a new builder-style object to manufacture [`ResourceTargetDefinition`](crate::types::ResourceTargetDefinition).
    pub fn builder() -> crate::types::builders::ResourceTargetDefinitionBuilder {
        crate::types::builders::ResourceTargetDefinitionBuilder::default()
    }
}

/// A builder for [`ResourceTargetDefinition`](crate::types::ResourceTargetDefinition).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ResourceTargetDefinitionBuilder {
    pub(crate) attribute: ::std::option::Option<crate::types::ResourceAttribute>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) requires_recreation: ::std::option::Option<crate::types::RequiresRecreation>,
    pub(crate) path: ::std::option::Option<::std::string::String>,
    pub(crate) before_value: ::std::option::Option<::std::string::String>,
    pub(crate) after_value: ::std::option::Option<::std::string::String>,
    pub(crate) attribute_change_type: ::std::option::Option<crate::types::AttributeChangeType>,
}
impl ResourceTargetDefinitionBuilder {
    /// <p>Indicates which resource attribute is triggering this update, such as a change in the resource attribute's <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>.</p>
    pub fn attribute(mut self, input: crate::types::ResourceAttribute) -> Self {
        self.attribute = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates which resource attribute is triggering this update, such as a change in the resource attribute's <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>.</p>
    pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::ResourceAttribute>) -> Self {
        self.attribute = input;
        self
    }
    /// <p>Indicates which resource attribute is triggering this update, such as a change in the resource attribute's <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>.</p>
    pub fn get_attribute(&self) -> &::std::option::Option<crate::types::ResourceAttribute> {
        &self.attribute
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, the name of the property. For all other attributes, the value is null.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, the name of the property. For all other attributes, the value is null.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, the name of the property. For all other attributes, the value is null.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this property causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see the update behavior for that <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">property</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn requires_recreation(mut self, input: crate::types::RequiresRecreation) -> Self {
        self.requires_recreation = ::std::option::Option::Some(input);
        self
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this property causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see the update behavior for that <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">property</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn set_requires_recreation(mut self, input: ::std::option::Option<crate::types::RequiresRecreation>) -> Self {
        self.requires_recreation = input;
        self
    }
    /// <p>If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this property causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see the update behavior for that <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">property</a> in the <i>CloudFormation User Guide</i>.</p>
    pub fn get_requires_recreation(&self) -> &::std::option::Option<crate::types::RequiresRecreation> {
        &self.requires_recreation
    }
    /// <p>The property path of the property.</p>
    pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The property path of the property.</p>
    pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.path = input;
        self
    }
    /// <p>The property path of the property.</p>
    pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.path
    }
    /// <p>The value of the property before the change is executed. Large values can be truncated.</p>
    pub fn before_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.before_value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value of the property before the change is executed. Large values can be truncated.</p>
    pub fn set_before_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.before_value = input;
        self
    }
    /// <p>The value of the property before the change is executed. Large values can be truncated.</p>
    pub fn get_before_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.before_value
    }
    /// <p>The value of the property after the change is executed. Large values can be truncated.</p>
    pub fn after_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.after_value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value of the property after the change is executed. Large values can be truncated.</p>
    pub fn set_after_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.after_value = input;
        self
    }
    /// <p>The value of the property after the change is executed. Large values can be truncated.</p>
    pub fn get_after_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.after_value
    }
    /// <p>The type of change to be made to the property if the change is executed.</p>
    /// <ul>
    /// <li>
    /// <p><code>Add</code> The item will be added.</p></li>
    /// <li>
    /// <p><code>Remove</code> The item will be removed.</p></li>
    /// <li>
    /// <p><code>Modify</code> The item will be modified.</p></li>
    /// </ul>
    pub fn attribute_change_type(mut self, input: crate::types::AttributeChangeType) -> Self {
        self.attribute_change_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of change to be made to the property if the change is executed.</p>
    /// <ul>
    /// <li>
    /// <p><code>Add</code> The item will be added.</p></li>
    /// <li>
    /// <p><code>Remove</code> The item will be removed.</p></li>
    /// <li>
    /// <p><code>Modify</code> The item will be modified.</p></li>
    /// </ul>
    pub fn set_attribute_change_type(mut self, input: ::std::option::Option<crate::types::AttributeChangeType>) -> Self {
        self.attribute_change_type = input;
        self
    }
    /// <p>The type of change to be made to the property if the change is executed.</p>
    /// <ul>
    /// <li>
    /// <p><code>Add</code> The item will be added.</p></li>
    /// <li>
    /// <p><code>Remove</code> The item will be removed.</p></li>
    /// <li>
    /// <p><code>Modify</code> The item will be modified.</p></li>
    /// </ul>
    pub fn get_attribute_change_type(&self) -> &::std::option::Option<crate::types::AttributeChangeType> {
        &self.attribute_change_type
    }
    /// Consumes the builder and constructs a [`ResourceTargetDefinition`](crate::types::ResourceTargetDefinition).
    pub fn build(self) -> crate::types::ResourceTargetDefinition {
        crate::types::ResourceTargetDefinition {
            attribute: self.attribute,
            name: self.name,
            requires_recreation: self.requires_recreation,
            path: self.path,
            before_value: self.before_value,
            after_value: self.after_value,
            attribute_change_type: self.attribute_change_type,
        }
    }
}