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/codedeploy/CodeDeploy_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/codedeploy/model/InstanceStatus.h>
10 #include <aws/core/utils/DateTime.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/codedeploy/model/InstanceType.h>
13 #include <aws/codedeploy/model/LifecycleEvent.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 CodeDeploy
27 {
28 namespace Model
29 {
30 
31   /**
32    * <p>Information about an instance in a deployment.</p><p><h3>See Also:</h3>   <a
33    * href="http://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/InstanceSummary">AWS
34    * API Reference</a></p>
35    */
36   class AWS_CODEDEPLOY_API InstanceSummary
37   {
38   public:
39     InstanceSummary();
40     InstanceSummary(Aws::Utils::Json::JsonView jsonValue);
41     InstanceSummary& operator=(Aws::Utils::Json::JsonView jsonValue);
42     Aws::Utils::Json::JsonValue Jsonize() const;
43 
44 
45     /**
46      * <p> The unique ID of a deployment. </p>
47      */
GetDeploymentId()48     inline const Aws::String& GetDeploymentId() const{ return m_deploymentId; }
49 
50     /**
51      * <p> The unique ID of a deployment. </p>
52      */
DeploymentIdHasBeenSet()53     inline bool DeploymentIdHasBeenSet() const { return m_deploymentIdHasBeenSet; }
54 
55     /**
56      * <p> The unique ID of a deployment. </p>
57      */
SetDeploymentId(const Aws::String & value)58     inline void SetDeploymentId(const Aws::String& value) { m_deploymentIdHasBeenSet = true; m_deploymentId = value; }
59 
60     /**
61      * <p> The unique ID of a deployment. </p>
62      */
SetDeploymentId(Aws::String && value)63     inline void SetDeploymentId(Aws::String&& value) { m_deploymentIdHasBeenSet = true; m_deploymentId = std::move(value); }
64 
65     /**
66      * <p> The unique ID of a deployment. </p>
67      */
SetDeploymentId(const char * value)68     inline void SetDeploymentId(const char* value) { m_deploymentIdHasBeenSet = true; m_deploymentId.assign(value); }
69 
70     /**
71      * <p> The unique ID of a deployment. </p>
72      */
WithDeploymentId(const Aws::String & value)73     inline InstanceSummary& WithDeploymentId(const Aws::String& value) { SetDeploymentId(value); return *this;}
74 
75     /**
76      * <p> The unique ID of a deployment. </p>
77      */
WithDeploymentId(Aws::String && value)78     inline InstanceSummary& WithDeploymentId(Aws::String&& value) { SetDeploymentId(std::move(value)); return *this;}
79 
80     /**
81      * <p> The unique ID of a deployment. </p>
82      */
WithDeploymentId(const char * value)83     inline InstanceSummary& WithDeploymentId(const char* value) { SetDeploymentId(value); return *this;}
84 
85 
86     /**
87      * <p>The instance ID.</p>
88      */
GetInstanceId()89     inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
90 
91     /**
92      * <p>The instance ID.</p>
93      */
InstanceIdHasBeenSet()94     inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
95 
96     /**
97      * <p>The instance ID.</p>
98      */
SetInstanceId(const Aws::String & value)99     inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
100 
101     /**
102      * <p>The instance ID.</p>
103      */
SetInstanceId(Aws::String && value)104     inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
105 
106     /**
107      * <p>The instance ID.</p>
108      */
SetInstanceId(const char * value)109     inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
110 
111     /**
112      * <p>The instance ID.</p>
113      */
WithInstanceId(const Aws::String & value)114     inline InstanceSummary& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
115 
116     /**
117      * <p>The instance ID.</p>
118      */
WithInstanceId(Aws::String && value)119     inline InstanceSummary& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
120 
121     /**
122      * <p>The instance ID.</p>
123      */
WithInstanceId(const char * value)124     inline InstanceSummary& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
125 
126 
127     /**
128      * <p>The deployment status for this instance:</p> <ul> <li> <p>
129      * <code>Pending</code>: The deployment is pending for this instance.</p> </li>
130      * <li> <p> <code>In Progress</code>: The deployment is in progress for this
131      * instance.</p> </li> <li> <p> <code>Succeeded</code>: The deployment has
132      * succeeded for this instance.</p> </li> <li> <p> <code>Failed</code>: The
133      * deployment has failed for this instance.</p> </li> <li> <p>
134      * <code>Skipped</code>: The deployment has been skipped for this instance.</p>
135      * </li> <li> <p> <code>Unknown</code>: The deployment status is unknown for this
136      * instance.</p> </li> </ul>
137      */
GetStatus()138     inline const InstanceStatus& GetStatus() const{ return m_status; }
139 
140     /**
141      * <p>The deployment status for this instance:</p> <ul> <li> <p>
142      * <code>Pending</code>: The deployment is pending for this instance.</p> </li>
143      * <li> <p> <code>In Progress</code>: The deployment is in progress for this
144      * instance.</p> </li> <li> <p> <code>Succeeded</code>: The deployment has
145      * succeeded for this instance.</p> </li> <li> <p> <code>Failed</code>: The
146      * deployment has failed for this instance.</p> </li> <li> <p>
147      * <code>Skipped</code>: The deployment has been skipped for this instance.</p>
148      * </li> <li> <p> <code>Unknown</code>: The deployment status is unknown for this
149      * instance.</p> </li> </ul>
150      */
StatusHasBeenSet()151     inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
152 
153     /**
154      * <p>The deployment status for this instance:</p> <ul> <li> <p>
155      * <code>Pending</code>: The deployment is pending for this instance.</p> </li>
156      * <li> <p> <code>In Progress</code>: The deployment is in progress for this
157      * instance.</p> </li> <li> <p> <code>Succeeded</code>: The deployment has
158      * succeeded for this instance.</p> </li> <li> <p> <code>Failed</code>: The
159      * deployment has failed for this instance.</p> </li> <li> <p>
160      * <code>Skipped</code>: The deployment has been skipped for this instance.</p>
161      * </li> <li> <p> <code>Unknown</code>: The deployment status is unknown for this
162      * instance.</p> </li> </ul>
163      */
SetStatus(const InstanceStatus & value)164     inline void SetStatus(const InstanceStatus& value) { m_statusHasBeenSet = true; m_status = value; }
165 
166     /**
167      * <p>The deployment status for this instance:</p> <ul> <li> <p>
168      * <code>Pending</code>: The deployment is pending for this instance.</p> </li>
169      * <li> <p> <code>In Progress</code>: The deployment is in progress for this
170      * instance.</p> </li> <li> <p> <code>Succeeded</code>: The deployment has
171      * succeeded for this instance.</p> </li> <li> <p> <code>Failed</code>: The
172      * deployment has failed for this instance.</p> </li> <li> <p>
173      * <code>Skipped</code>: The deployment has been skipped for this instance.</p>
174      * </li> <li> <p> <code>Unknown</code>: The deployment status is unknown for this
175      * instance.</p> </li> </ul>
176      */
SetStatus(InstanceStatus && value)177     inline void SetStatus(InstanceStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
178 
179     /**
180      * <p>The deployment status for this instance:</p> <ul> <li> <p>
181      * <code>Pending</code>: The deployment is pending for this instance.</p> </li>
182      * <li> <p> <code>In Progress</code>: The deployment is in progress for this
183      * instance.</p> </li> <li> <p> <code>Succeeded</code>: The deployment has
184      * succeeded for this instance.</p> </li> <li> <p> <code>Failed</code>: The
185      * deployment has failed for this instance.</p> </li> <li> <p>
186      * <code>Skipped</code>: The deployment has been skipped for this instance.</p>
187      * </li> <li> <p> <code>Unknown</code>: The deployment status is unknown for this
188      * instance.</p> </li> </ul>
189      */
WithStatus(const InstanceStatus & value)190     inline InstanceSummary& WithStatus(const InstanceStatus& value) { SetStatus(value); return *this;}
191 
192     /**
193      * <p>The deployment status for this instance:</p> <ul> <li> <p>
194      * <code>Pending</code>: The deployment is pending for this instance.</p> </li>
195      * <li> <p> <code>In Progress</code>: The deployment is in progress for this
196      * instance.</p> </li> <li> <p> <code>Succeeded</code>: The deployment has
197      * succeeded for this instance.</p> </li> <li> <p> <code>Failed</code>: The
198      * deployment has failed for this instance.</p> </li> <li> <p>
199      * <code>Skipped</code>: The deployment has been skipped for this instance.</p>
200      * </li> <li> <p> <code>Unknown</code>: The deployment status is unknown for this
201      * instance.</p> </li> </ul>
202      */
WithStatus(InstanceStatus && value)203     inline InstanceSummary& WithStatus(InstanceStatus&& value) { SetStatus(std::move(value)); return *this;}
204 
205 
206     /**
207      * <p>A timestamp that indicates when the instance information was last
208      * updated.</p>
209      */
GetLastUpdatedAt()210     inline const Aws::Utils::DateTime& GetLastUpdatedAt() const{ return m_lastUpdatedAt; }
211 
212     /**
213      * <p>A timestamp that indicates when the instance information was last
214      * updated.</p>
215      */
LastUpdatedAtHasBeenSet()216     inline bool LastUpdatedAtHasBeenSet() const { return m_lastUpdatedAtHasBeenSet; }
217 
218     /**
219      * <p>A timestamp that indicates when the instance information was last
220      * updated.</p>
221      */
SetLastUpdatedAt(const Aws::Utils::DateTime & value)222     inline void SetLastUpdatedAt(const Aws::Utils::DateTime& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = value; }
223 
224     /**
225      * <p>A timestamp that indicates when the instance information was last
226      * updated.</p>
227      */
SetLastUpdatedAt(Aws::Utils::DateTime && value)228     inline void SetLastUpdatedAt(Aws::Utils::DateTime&& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = std::move(value); }
229 
230     /**
231      * <p>A timestamp that indicates when the instance information was last
232      * updated.</p>
233      */
WithLastUpdatedAt(const Aws::Utils::DateTime & value)234     inline InstanceSummary& WithLastUpdatedAt(const Aws::Utils::DateTime& value) { SetLastUpdatedAt(value); return *this;}
235 
236     /**
237      * <p>A timestamp that indicates when the instance information was last
238      * updated.</p>
239      */
WithLastUpdatedAt(Aws::Utils::DateTime && value)240     inline InstanceSummary& WithLastUpdatedAt(Aws::Utils::DateTime&& value) { SetLastUpdatedAt(std::move(value)); return *this;}
241 
242 
243     /**
244      * <p>A list of lifecycle events for this instance.</p>
245      */
GetLifecycleEvents()246     inline const Aws::Vector<LifecycleEvent>& GetLifecycleEvents() const{ return m_lifecycleEvents; }
247 
248     /**
249      * <p>A list of lifecycle events for this instance.</p>
250      */
LifecycleEventsHasBeenSet()251     inline bool LifecycleEventsHasBeenSet() const { return m_lifecycleEventsHasBeenSet; }
252 
253     /**
254      * <p>A list of lifecycle events for this instance.</p>
255      */
SetLifecycleEvents(const Aws::Vector<LifecycleEvent> & value)256     inline void SetLifecycleEvents(const Aws::Vector<LifecycleEvent>& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents = value; }
257 
258     /**
259      * <p>A list of lifecycle events for this instance.</p>
260      */
SetLifecycleEvents(Aws::Vector<LifecycleEvent> && value)261     inline void SetLifecycleEvents(Aws::Vector<LifecycleEvent>&& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents = std::move(value); }
262 
263     /**
264      * <p>A list of lifecycle events for this instance.</p>
265      */
WithLifecycleEvents(const Aws::Vector<LifecycleEvent> & value)266     inline InstanceSummary& WithLifecycleEvents(const Aws::Vector<LifecycleEvent>& value) { SetLifecycleEvents(value); return *this;}
267 
268     /**
269      * <p>A list of lifecycle events for this instance.</p>
270      */
WithLifecycleEvents(Aws::Vector<LifecycleEvent> && value)271     inline InstanceSummary& WithLifecycleEvents(Aws::Vector<LifecycleEvent>&& value) { SetLifecycleEvents(std::move(value)); return *this;}
272 
273     /**
274      * <p>A list of lifecycle events for this instance.</p>
275      */
AddLifecycleEvents(const LifecycleEvent & value)276     inline InstanceSummary& AddLifecycleEvents(const LifecycleEvent& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents.push_back(value); return *this; }
277 
278     /**
279      * <p>A list of lifecycle events for this instance.</p>
280      */
AddLifecycleEvents(LifecycleEvent && value)281     inline InstanceSummary& AddLifecycleEvents(LifecycleEvent&& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents.push_back(std::move(value)); return *this; }
282 
283 
284     /**
285      * <p>Information about which environment an instance belongs to in a blue/green
286      * deployment.</p> <ul> <li> <p>BLUE: The instance is part of the original
287      * environment.</p> </li> <li> <p>GREEN: The instance is part of the replacement
288      * environment.</p> </li> </ul>
289      */
GetInstanceType()290     inline const InstanceType& GetInstanceType() const{ return m_instanceType; }
291 
292     /**
293      * <p>Information about which environment an instance belongs to in a blue/green
294      * deployment.</p> <ul> <li> <p>BLUE: The instance is part of the original
295      * environment.</p> </li> <li> <p>GREEN: The instance is part of the replacement
296      * environment.</p> </li> </ul>
297      */
InstanceTypeHasBeenSet()298     inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
299 
300     /**
301      * <p>Information about which environment an instance belongs to in a blue/green
302      * deployment.</p> <ul> <li> <p>BLUE: The instance is part of the original
303      * environment.</p> </li> <li> <p>GREEN: The instance is part of the replacement
304      * environment.</p> </li> </ul>
305      */
SetInstanceType(const InstanceType & value)306     inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
307 
308     /**
309      * <p>Information about which environment an instance belongs to in a blue/green
310      * deployment.</p> <ul> <li> <p>BLUE: The instance is part of the original
311      * environment.</p> </li> <li> <p>GREEN: The instance is part of the replacement
312      * environment.</p> </li> </ul>
313      */
SetInstanceType(InstanceType && value)314     inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
315 
316     /**
317      * <p>Information about which environment an instance belongs to in a blue/green
318      * deployment.</p> <ul> <li> <p>BLUE: The instance is part of the original
319      * environment.</p> </li> <li> <p>GREEN: The instance is part of the replacement
320      * environment.</p> </li> </ul>
321      */
WithInstanceType(const InstanceType & value)322     inline InstanceSummary& WithInstanceType(const InstanceType& value) { SetInstanceType(value); return *this;}
323 
324     /**
325      * <p>Information about which environment an instance belongs to in a blue/green
326      * deployment.</p> <ul> <li> <p>BLUE: The instance is part of the original
327      * environment.</p> </li> <li> <p>GREEN: The instance is part of the replacement
328      * environment.</p> </li> </ul>
329      */
WithInstanceType(InstanceType && value)330     inline InstanceSummary& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;}
331 
332   private:
333 
334     Aws::String m_deploymentId;
335     bool m_deploymentIdHasBeenSet;
336 
337     Aws::String m_instanceId;
338     bool m_instanceIdHasBeenSet;
339 
340     InstanceStatus m_status;
341     bool m_statusHasBeenSet;
342 
343     Aws::Utils::DateTime m_lastUpdatedAt;
344     bool m_lastUpdatedAtHasBeenSet;
345 
346     Aws::Vector<LifecycleEvent> m_lifecycleEvents;
347     bool m_lifecycleEventsHasBeenSet;
348 
349     InstanceType m_instanceType;
350     bool m_instanceTypeHasBeenSet;
351   };
352 
353 } // namespace Model
354 } // namespace CodeDeploy
355 } // namespace Aws
356