1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/servicecatalog/ServiceCatalog_EXPORTS.h>
8 #include <aws/servicecatalog/model/ChangeAction.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/servicecatalog/model/Replacement.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/servicecatalog/model/ResourceAttribute.h>
13 #include <aws/servicecatalog/model/ResourceChangeDetail.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace Utils
19 {
20 namespace Json
21 {
22   class JsonValue;
23   class JsonView;
24 } // namespace Json
25 } // namespace Utils
26 namespace ServiceCatalog
27 {
28 namespace Model
29 {
30 
31   /**
32    * <p>Information about a resource change that will occur when a plan is
33    * executed.</p><p><h3>See Also:</h3>   <a
34    * href="http://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ResourceChange">AWS
35    * API Reference</a></p>
36    */
37   class AWS_SERVICECATALOG_API ResourceChange
38   {
39   public:
40     ResourceChange();
41     ResourceChange(Aws::Utils::Json::JsonView jsonValue);
42     ResourceChange& operator=(Aws::Utils::Json::JsonView jsonValue);
43     Aws::Utils::Json::JsonValue Jsonize() const;
44 
45 
46     /**
47      * <p>The change action.</p>
48      */
GetAction()49     inline const ChangeAction& GetAction() const{ return m_action; }
50 
51     /**
52      * <p>The change action.</p>
53      */
ActionHasBeenSet()54     inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
55 
56     /**
57      * <p>The change action.</p>
58      */
SetAction(const ChangeAction & value)59     inline void SetAction(const ChangeAction& value) { m_actionHasBeenSet = true; m_action = value; }
60 
61     /**
62      * <p>The change action.</p>
63      */
SetAction(ChangeAction && value)64     inline void SetAction(ChangeAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); }
65 
66     /**
67      * <p>The change action.</p>
68      */
WithAction(const ChangeAction & value)69     inline ResourceChange& WithAction(const ChangeAction& value) { SetAction(value); return *this;}
70 
71     /**
72      * <p>The change action.</p>
73      */
WithAction(ChangeAction && value)74     inline ResourceChange& WithAction(ChangeAction&& value) { SetAction(std::move(value)); return *this;}
75 
76 
77     /**
78      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
79      */
GetLogicalResourceId()80     inline const Aws::String& GetLogicalResourceId() const{ return m_logicalResourceId; }
81 
82     /**
83      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
84      */
LogicalResourceIdHasBeenSet()85     inline bool LogicalResourceIdHasBeenSet() const { return m_logicalResourceIdHasBeenSet; }
86 
87     /**
88      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
89      */
SetLogicalResourceId(const Aws::String & value)90     inline void SetLogicalResourceId(const Aws::String& value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId = value; }
91 
92     /**
93      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
94      */
SetLogicalResourceId(Aws::String && value)95     inline void SetLogicalResourceId(Aws::String&& value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId = std::move(value); }
96 
97     /**
98      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
99      */
SetLogicalResourceId(const char * value)100     inline void SetLogicalResourceId(const char* value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId.assign(value); }
101 
102     /**
103      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
104      */
WithLogicalResourceId(const Aws::String & value)105     inline ResourceChange& WithLogicalResourceId(const Aws::String& value) { SetLogicalResourceId(value); return *this;}
106 
107     /**
108      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
109      */
WithLogicalResourceId(Aws::String && value)110     inline ResourceChange& WithLogicalResourceId(Aws::String&& value) { SetLogicalResourceId(std::move(value)); return *this;}
111 
112     /**
113      * <p>The ID of the resource, as defined in the CloudFormation template.</p>
114      */
WithLogicalResourceId(const char * value)115     inline ResourceChange& WithLogicalResourceId(const char* value) { SetLogicalResourceId(value); return *this;}
116 
117 
118     /**
119      * <p>The ID of the resource, if it was already created.</p>
120      */
GetPhysicalResourceId()121     inline const Aws::String& GetPhysicalResourceId() const{ return m_physicalResourceId; }
122 
123     /**
124      * <p>The ID of the resource, if it was already created.</p>
125      */
PhysicalResourceIdHasBeenSet()126     inline bool PhysicalResourceIdHasBeenSet() const { return m_physicalResourceIdHasBeenSet; }
127 
128     /**
129      * <p>The ID of the resource, if it was already created.</p>
130      */
SetPhysicalResourceId(const Aws::String & value)131     inline void SetPhysicalResourceId(const Aws::String& value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId = value; }
132 
133     /**
134      * <p>The ID of the resource, if it was already created.</p>
135      */
SetPhysicalResourceId(Aws::String && value)136     inline void SetPhysicalResourceId(Aws::String&& value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId = std::move(value); }
137 
138     /**
139      * <p>The ID of the resource, if it was already created.</p>
140      */
SetPhysicalResourceId(const char * value)141     inline void SetPhysicalResourceId(const char* value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId.assign(value); }
142 
143     /**
144      * <p>The ID of the resource, if it was already created.</p>
145      */
WithPhysicalResourceId(const Aws::String & value)146     inline ResourceChange& WithPhysicalResourceId(const Aws::String& value) { SetPhysicalResourceId(value); return *this;}
147 
148     /**
149      * <p>The ID of the resource, if it was already created.</p>
150      */
WithPhysicalResourceId(Aws::String && value)151     inline ResourceChange& WithPhysicalResourceId(Aws::String&& value) { SetPhysicalResourceId(std::move(value)); return *this;}
152 
153     /**
154      * <p>The ID of the resource, if it was already created.</p>
155      */
WithPhysicalResourceId(const char * value)156     inline ResourceChange& WithPhysicalResourceId(const char* value) { SetPhysicalResourceId(value); return *this;}
157 
158 
159     /**
160      * <p>The type of resource.</p>
161      */
GetResourceType()162     inline const Aws::String& GetResourceType() const{ return m_resourceType; }
163 
164     /**
165      * <p>The type of resource.</p>
166      */
ResourceTypeHasBeenSet()167     inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
168 
169     /**
170      * <p>The type of resource.</p>
171      */
SetResourceType(const Aws::String & value)172     inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
173 
174     /**
175      * <p>The type of resource.</p>
176      */
SetResourceType(Aws::String && value)177     inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
178 
179     /**
180      * <p>The type of resource.</p>
181      */
SetResourceType(const char * value)182     inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); }
183 
184     /**
185      * <p>The type of resource.</p>
186      */
WithResourceType(const Aws::String & value)187     inline ResourceChange& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;}
188 
189     /**
190      * <p>The type of resource.</p>
191      */
WithResourceType(Aws::String && value)192     inline ResourceChange& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;}
193 
194     /**
195      * <p>The type of resource.</p>
196      */
WithResourceType(const char * value)197     inline ResourceChange& WithResourceType(const char* value) { SetResourceType(value); return *this;}
198 
199 
200     /**
201      * <p>If the change type is <code>Modify</code>, indicates whether the existing
202      * resource is deleted and replaced with a new one.</p>
203      */
GetReplacement()204     inline const Replacement& GetReplacement() const{ return m_replacement; }
205 
206     /**
207      * <p>If the change type is <code>Modify</code>, indicates whether the existing
208      * resource is deleted and replaced with a new one.</p>
209      */
ReplacementHasBeenSet()210     inline bool ReplacementHasBeenSet() const { return m_replacementHasBeenSet; }
211 
212     /**
213      * <p>If the change type is <code>Modify</code>, indicates whether the existing
214      * resource is deleted and replaced with a new one.</p>
215      */
SetReplacement(const Replacement & value)216     inline void SetReplacement(const Replacement& value) { m_replacementHasBeenSet = true; m_replacement = value; }
217 
218     /**
219      * <p>If the change type is <code>Modify</code>, indicates whether the existing
220      * resource is deleted and replaced with a new one.</p>
221      */
SetReplacement(Replacement && value)222     inline void SetReplacement(Replacement&& value) { m_replacementHasBeenSet = true; m_replacement = std::move(value); }
223 
224     /**
225      * <p>If the change type is <code>Modify</code>, indicates whether the existing
226      * resource is deleted and replaced with a new one.</p>
227      */
WithReplacement(const Replacement & value)228     inline ResourceChange& WithReplacement(const Replacement& value) { SetReplacement(value); return *this;}
229 
230     /**
231      * <p>If the change type is <code>Modify</code>, indicates whether the existing
232      * resource is deleted and replaced with a new one.</p>
233      */
WithReplacement(Replacement && value)234     inline ResourceChange& WithReplacement(Replacement&& value) { SetReplacement(std::move(value)); return *this;}
235 
236 
237     /**
238      * <p>The change scope.</p>
239      */
GetScope()240     inline const Aws::Vector<ResourceAttribute>& GetScope() const{ return m_scope; }
241 
242     /**
243      * <p>The change scope.</p>
244      */
ScopeHasBeenSet()245     inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
246 
247     /**
248      * <p>The change scope.</p>
249      */
SetScope(const Aws::Vector<ResourceAttribute> & value)250     inline void SetScope(const Aws::Vector<ResourceAttribute>& value) { m_scopeHasBeenSet = true; m_scope = value; }
251 
252     /**
253      * <p>The change scope.</p>
254      */
SetScope(Aws::Vector<ResourceAttribute> && value)255     inline void SetScope(Aws::Vector<ResourceAttribute>&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); }
256 
257     /**
258      * <p>The change scope.</p>
259      */
WithScope(const Aws::Vector<ResourceAttribute> & value)260     inline ResourceChange& WithScope(const Aws::Vector<ResourceAttribute>& value) { SetScope(value); return *this;}
261 
262     /**
263      * <p>The change scope.</p>
264      */
WithScope(Aws::Vector<ResourceAttribute> && value)265     inline ResourceChange& WithScope(Aws::Vector<ResourceAttribute>&& value) { SetScope(std::move(value)); return *this;}
266 
267     /**
268      * <p>The change scope.</p>
269      */
AddScope(const ResourceAttribute & value)270     inline ResourceChange& AddScope(const ResourceAttribute& value) { m_scopeHasBeenSet = true; m_scope.push_back(value); return *this; }
271 
272     /**
273      * <p>The change scope.</p>
274      */
AddScope(ResourceAttribute && value)275     inline ResourceChange& AddScope(ResourceAttribute&& value) { m_scopeHasBeenSet = true; m_scope.push_back(std::move(value)); return *this; }
276 
277 
278     /**
279      * <p>Information about the resource changes.</p>
280      */
GetDetails()281     inline const Aws::Vector<ResourceChangeDetail>& GetDetails() const{ return m_details; }
282 
283     /**
284      * <p>Information about the resource changes.</p>
285      */
DetailsHasBeenSet()286     inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
287 
288     /**
289      * <p>Information about the resource changes.</p>
290      */
SetDetails(const Aws::Vector<ResourceChangeDetail> & value)291     inline void SetDetails(const Aws::Vector<ResourceChangeDetail>& value) { m_detailsHasBeenSet = true; m_details = value; }
292 
293     /**
294      * <p>Information about the resource changes.</p>
295      */
SetDetails(Aws::Vector<ResourceChangeDetail> && value)296     inline void SetDetails(Aws::Vector<ResourceChangeDetail>&& value) { m_detailsHasBeenSet = true; m_details = std::move(value); }
297 
298     /**
299      * <p>Information about the resource changes.</p>
300      */
WithDetails(const Aws::Vector<ResourceChangeDetail> & value)301     inline ResourceChange& WithDetails(const Aws::Vector<ResourceChangeDetail>& value) { SetDetails(value); return *this;}
302 
303     /**
304      * <p>Information about the resource changes.</p>
305      */
WithDetails(Aws::Vector<ResourceChangeDetail> && value)306     inline ResourceChange& WithDetails(Aws::Vector<ResourceChangeDetail>&& value) { SetDetails(std::move(value)); return *this;}
307 
308     /**
309      * <p>Information about the resource changes.</p>
310      */
AddDetails(const ResourceChangeDetail & value)311     inline ResourceChange& AddDetails(const ResourceChangeDetail& value) { m_detailsHasBeenSet = true; m_details.push_back(value); return *this; }
312 
313     /**
314      * <p>Information about the resource changes.</p>
315      */
AddDetails(ResourceChangeDetail && value)316     inline ResourceChange& AddDetails(ResourceChangeDetail&& value) { m_detailsHasBeenSet = true; m_details.push_back(std::move(value)); return *this; }
317 
318   private:
319 
320     ChangeAction m_action;
321     bool m_actionHasBeenSet;
322 
323     Aws::String m_logicalResourceId;
324     bool m_logicalResourceIdHasBeenSet;
325 
326     Aws::String m_physicalResourceId;
327     bool m_physicalResourceIdHasBeenSet;
328 
329     Aws::String m_resourceType;
330     bool m_resourceTypeHasBeenSet;
331 
332     Replacement m_replacement;
333     bool m_replacementHasBeenSet;
334 
335     Aws::Vector<ResourceAttribute> m_scope;
336     bool m_scopeHasBeenSet;
337 
338     Aws::Vector<ResourceChangeDetail> m_details;
339     bool m_detailsHasBeenSet;
340   };
341 
342 } // namespace Model
343 } // namespace ServiceCatalog
344 } // namespace Aws
345