AWS SDK for C++

AWS SDK for C++ Version 1.11.849

Loading...
Searching...
No Matches
DeploymentLifecycleHook.h
1
6#pragma once
7#include <aws/core/utils/Document.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ecs/ECS_EXPORTS.h>
11#include <aws/ecs/model/DeploymentLifecycleHookStage.h>
12#include <aws/ecs/model/DeploymentLifecycleHookTargetType.h>
13#include <aws/ecs/model/DeploymentLifecycleHookTimeoutConfiguration.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace ECS {
25namespace Model {
26
38 public:
39 AWS_ECS_API DeploymentLifecycleHook() = default;
43
45
54 inline DeploymentLifecycleHookTargetType GetTargetType() const { return m_targetType; }
55 inline bool TargetTypeHasBeenSet() const { return m_targetTypeHasBeenSet; }
57 m_targetTypeHasBeenSet = true;
58 m_targetType = value;
59 }
61 SetTargetType(value);
62 return *this;
63 }
65
67
73 inline const Aws::String& GetHookTargetArn() const { return m_hookTargetArn; }
74 inline bool HookTargetArnHasBeenSet() const { return m_hookTargetArnHasBeenSet; }
75 template <typename HookTargetArnT = Aws::String>
76 void SetHookTargetArn(HookTargetArnT&& value) {
77 m_hookTargetArnHasBeenSet = true;
78 m_hookTargetArn = std::forward<HookTargetArnT>(value);
79 }
80 template <typename HookTargetArnT = Aws::String>
81 DeploymentLifecycleHook& WithHookTargetArn(HookTargetArnT&& value) {
82 SetHookTargetArn(std::forward<HookTargetArnT>(value));
83 return *this;
84 }
86
88
96 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
97 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
98 template <typename RoleArnT = Aws::String>
99 void SetRoleArn(RoleArnT&& value) {
100 m_roleArnHasBeenSet = true;
101 m_roleArn = std::forward<RoleArnT>(value);
102 }
103 template <typename RoleArnT = Aws::String>
105 SetRoleArn(std::forward<RoleArnT>(value));
106 return *this;
107 }
109
111
144 inline const Aws::Vector<DeploymentLifecycleHookStage>& GetLifecycleStages() const { return m_lifecycleStages; }
145 inline bool LifecycleStagesHasBeenSet() const { return m_lifecycleStagesHasBeenSet; }
146 template <typename LifecycleStagesT = Aws::Vector<DeploymentLifecycleHookStage>>
147 void SetLifecycleStages(LifecycleStagesT&& value) {
148 m_lifecycleStagesHasBeenSet = true;
149 m_lifecycleStages = std::forward<LifecycleStagesT>(value);
150 }
151 template <typename LifecycleStagesT = Aws::Vector<DeploymentLifecycleHookStage>>
152 DeploymentLifecycleHook& WithLifecycleStages(LifecycleStagesT&& value) {
153 SetLifecycleStages(std::forward<LifecycleStagesT>(value));
154 return *this;
155 }
157 m_lifecycleStagesHasBeenSet = true;
158 m_lifecycleStages.push_back(value);
159 return *this;
160 }
162
164
169 inline Aws::Utils::DocumentView GetHookDetails() const { return m_hookDetails; }
170 inline bool HookDetailsHasBeenSet() const { return m_hookDetailsHasBeenSet; }
171 template <typename HookDetailsT = Aws::Utils::Document>
172 void SetHookDetails(HookDetailsT&& value) {
173 m_hookDetailsHasBeenSet = true;
174 m_hookDetails = std::forward<HookDetailsT>(value);
175 }
176 template <typename HookDetailsT = Aws::Utils::Document>
178 SetHookDetails(std::forward<HookDetailsT>(value));
179 return *this;
180 }
182
184
189 inline const DeploymentLifecycleHookTimeoutConfiguration& GetTimeoutConfiguration() const { return m_timeoutConfiguration; }
190 inline bool TimeoutConfigurationHasBeenSet() const { return m_timeoutConfigurationHasBeenSet; }
191 template <typename TimeoutConfigurationT = DeploymentLifecycleHookTimeoutConfiguration>
192 void SetTimeoutConfiguration(TimeoutConfigurationT&& value) {
193 m_timeoutConfigurationHasBeenSet = true;
194 m_timeoutConfiguration = std::forward<TimeoutConfigurationT>(value);
195 }
196 template <typename TimeoutConfigurationT = DeploymentLifecycleHookTimeoutConfiguration>
197 DeploymentLifecycleHook& WithTimeoutConfiguration(TimeoutConfigurationT&& value) {
198 SetTimeoutConfiguration(std::forward<TimeoutConfigurationT>(value));
199 return *this;
200 }
202 private:
204
205 Aws::String m_hookTargetArn;
206
207 Aws::String m_roleArn;
208
210
211 Aws::Utils::Document m_hookDetails;
212
213 DeploymentLifecycleHookTimeoutConfiguration m_timeoutConfiguration;
214 bool m_targetTypeHasBeenSet = false;
215 bool m_hookTargetArnHasBeenSet = false;
216 bool m_roleArnHasBeenSet = false;
217 bool m_lifecycleStagesHasBeenSet = false;
218 bool m_hookDetailsHasBeenSet = false;
219 bool m_timeoutConfigurationHasBeenSet = false;
220};
221
222} // namespace Model
223} // namespace ECS
224} // namespace Aws
DeploymentLifecycleHook & WithTargetType(DeploymentLifecycleHookTargetType value)
DeploymentLifecycleHook & WithRoleArn(RoleArnT &&value)
Aws::Utils::DocumentView GetHookDetails() const
DeploymentLifecycleHook & WithLifecycleStages(LifecycleStagesT &&value)
DeploymentLifecycleHook & WithTimeoutConfiguration(TimeoutConfigurationT &&value)
AWS_ECS_API DeploymentLifecycleHook()=default
DeploymentLifecycleHook & WithHookTargetArn(HookTargetArnT &&value)
DeploymentLifecycleHook & AddLifecycleStages(DeploymentLifecycleHookStage value)
DeploymentLifecycleHook & WithHookDetails(HookDetailsT &&value)
AWS_ECS_API DeploymentLifecycleHook & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetLifecycleStages(LifecycleStagesT &&value)
DeploymentLifecycleHookTargetType GetTargetType() const
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
const DeploymentLifecycleHookTimeoutConfiguration & GetTimeoutConfiguration() const
AWS_ECS_API DeploymentLifecycleHook(Aws::Utils::Json::JsonView jsonValue)
void SetTimeoutConfiguration(TimeoutConfigurationT &&value)
const Aws::Vector< DeploymentLifecycleHookStage > & GetLifecycleStages() const
void SetTargetType(DeploymentLifecycleHookTargetType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue