AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
InstanceTarget.h
1
6#pragma once
7#include <aws/codedeploy/CodeDeploy_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/codedeploy/model/TargetStatus.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/codedeploy/model/TargetLabel.h>
13#include <aws/codedeploy/model/LifecycleEvent.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace CodeDeploy
27{
28namespace Model
29{
30
38 {
39 public:
40 AWS_CODEDEPLOY_API InstanceTarget() = default;
41 AWS_CODEDEPLOY_API InstanceTarget(Aws::Utils::Json::JsonView jsonValue);
42 AWS_CODEDEPLOY_API InstanceTarget& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
50 inline const Aws::String& GetDeploymentId() const { return m_deploymentId; }
51 inline bool DeploymentIdHasBeenSet() const { return m_deploymentIdHasBeenSet; }
52 template<typename DeploymentIdT = Aws::String>
53 void SetDeploymentId(DeploymentIdT&& value) { m_deploymentIdHasBeenSet = true; m_deploymentId = std::forward<DeploymentIdT>(value); }
54 template<typename DeploymentIdT = Aws::String>
55 InstanceTarget& WithDeploymentId(DeploymentIdT&& value) { SetDeploymentId(std::forward<DeploymentIdT>(value)); return *this;}
57
59
63 inline const Aws::String& GetTargetId() const { return m_targetId; }
64 inline bool TargetIdHasBeenSet() const { return m_targetIdHasBeenSet; }
65 template<typename TargetIdT = Aws::String>
66 void SetTargetId(TargetIdT&& value) { m_targetIdHasBeenSet = true; m_targetId = std::forward<TargetIdT>(value); }
67 template<typename TargetIdT = Aws::String>
68 InstanceTarget& WithTargetId(TargetIdT&& value) { SetTargetId(std::forward<TargetIdT>(value)); return *this;}
70
72
75 inline const Aws::String& GetTargetArn() const { return m_targetArn; }
76 inline bool TargetArnHasBeenSet() const { return m_targetArnHasBeenSet; }
77 template<typename TargetArnT = Aws::String>
78 void SetTargetArn(TargetArnT&& value) { m_targetArnHasBeenSet = true; m_targetArn = std::forward<TargetArnT>(value); }
79 template<typename TargetArnT = Aws::String>
80 InstanceTarget& WithTargetArn(TargetArnT&& value) { SetTargetArn(std::forward<TargetArnT>(value)); return *this;}
82
84
87 inline TargetStatus GetStatus() const { return m_status; }
88 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
89 inline void SetStatus(TargetStatus value) { m_statusHasBeenSet = true; m_status = value; }
90 inline InstanceTarget& WithStatus(TargetStatus value) { SetStatus(value); return *this;}
92
94
97 inline const Aws::Utils::DateTime& GetLastUpdatedAt() const { return m_lastUpdatedAt; }
98 inline bool LastUpdatedAtHasBeenSet() const { return m_lastUpdatedAtHasBeenSet; }
99 template<typename LastUpdatedAtT = Aws::Utils::DateTime>
100 void SetLastUpdatedAt(LastUpdatedAtT&& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = std::forward<LastUpdatedAtT>(value); }
101 template<typename LastUpdatedAtT = Aws::Utils::DateTime>
102 InstanceTarget& WithLastUpdatedAt(LastUpdatedAtT&& value) { SetLastUpdatedAt(std::forward<LastUpdatedAtT>(value)); return *this;}
104
106
109 inline const Aws::Vector<LifecycleEvent>& GetLifecycleEvents() const { return m_lifecycleEvents; }
110 inline bool LifecycleEventsHasBeenSet() const { return m_lifecycleEventsHasBeenSet; }
111 template<typename LifecycleEventsT = Aws::Vector<LifecycleEvent>>
112 void SetLifecycleEvents(LifecycleEventsT&& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents = std::forward<LifecycleEventsT>(value); }
113 template<typename LifecycleEventsT = Aws::Vector<LifecycleEvent>>
114 InstanceTarget& WithLifecycleEvents(LifecycleEventsT&& value) { SetLifecycleEvents(std::forward<LifecycleEventsT>(value)); return *this;}
115 template<typename LifecycleEventsT = LifecycleEvent>
116 InstanceTarget& AddLifecycleEvents(LifecycleEventsT&& value) { m_lifecycleEventsHasBeenSet = true; m_lifecycleEvents.emplace_back(std::forward<LifecycleEventsT>(value)); return *this; }
118
120
124 inline TargetLabel GetInstanceLabel() const { return m_instanceLabel; }
125 inline bool InstanceLabelHasBeenSet() const { return m_instanceLabelHasBeenSet; }
126 inline void SetInstanceLabel(TargetLabel value) { m_instanceLabelHasBeenSet = true; m_instanceLabel = value; }
127 inline InstanceTarget& WithInstanceLabel(TargetLabel value) { SetInstanceLabel(value); return *this;}
129 private:
130
131 Aws::String m_deploymentId;
132 bool m_deploymentIdHasBeenSet = false;
133
134 Aws::String m_targetId;
135 bool m_targetIdHasBeenSet = false;
136
137 Aws::String m_targetArn;
138 bool m_targetArnHasBeenSet = false;
139
141 bool m_statusHasBeenSet = false;
142
143 Aws::Utils::DateTime m_lastUpdatedAt{};
144 bool m_lastUpdatedAtHasBeenSet = false;
145
146 Aws::Vector<LifecycleEvent> m_lifecycleEvents;
147 bool m_lifecycleEventsHasBeenSet = false;
148
149 TargetLabel m_instanceLabel{TargetLabel::NOT_SET};
150 bool m_instanceLabelHasBeenSet = false;
151 };
152
153} // namespace Model
154} // namespace CodeDeploy
155} // namespace Aws
void SetInstanceLabel(TargetLabel value)
InstanceTarget & WithLastUpdatedAt(LastUpdatedAtT &&value)
AWS_CODEDEPLOY_API InstanceTarget & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetLifecycleEvents(LifecycleEventsT &&value)
const Aws::String & GetTargetId() const
InstanceTarget & AddLifecycleEvents(LifecycleEventsT &&value)
AWS_CODEDEPLOY_API InstanceTarget(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< LifecycleEvent > & GetLifecycleEvents() const
InstanceTarget & WithDeploymentId(DeploymentIdT &&value)
void SetLastUpdatedAt(LastUpdatedAtT &&value)
const Aws::Utils::DateTime & GetLastUpdatedAt() const
void SetDeploymentId(DeploymentIdT &&value)
void SetTargetArn(TargetArnT &&value)
InstanceTarget & WithTargetArn(TargetArnT &&value)
AWS_CODEDEPLOY_API InstanceTarget()=default
InstanceTarget & WithTargetId(TargetIdT &&value)
const Aws::String & GetDeploymentId() const
AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const
InstanceTarget & WithInstanceLabel(TargetLabel value)
InstanceTarget & WithStatus(TargetStatus value)
InstanceTarget & WithLifecycleEvents(LifecycleEventsT &&value)
const Aws::String & GetTargetArn() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue