AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateLifecyclePolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/imagebuilder/ImagebuilderRequest.h>
12#include <aws/imagebuilder/Imagebuilder_EXPORTS.h>
13#include <aws/imagebuilder/model/LifecyclePolicyDetail.h>
14#include <aws/imagebuilder/model/LifecyclePolicyResourceSelection.h>
15#include <aws/imagebuilder/model/LifecyclePolicyResourceType.h>
16#include <aws/imagebuilder/model/LifecyclePolicyStatus.h>
17
18#include <utility>
19
20namespace Aws {
21namespace imagebuilder {
22namespace Model {
23
27 public:
28 AWS_IMAGEBUILDER_API CreateLifecyclePolicyRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateLifecyclePolicy"; }
35
36 AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override;
37
39
42 inline const Aws::String& GetName() const { return m_name; }
43 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
44 template <typename NameT = Aws::String>
45 void SetName(NameT&& value) {
46 m_nameHasBeenSet = true;
47 m_name = std::forward<NameT>(value);
48 }
49 template <typename NameT = Aws::String>
51 SetName(std::forward<NameT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetDescription() const { return m_description; }
61 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
62 template <typename DescriptionT = Aws::String>
63 void SetDescription(DescriptionT&& value) {
64 m_descriptionHasBeenSet = true;
65 m_description = std::forward<DescriptionT>(value);
66 }
67 template <typename DescriptionT = Aws::String>
69 SetDescription(std::forward<DescriptionT>(value));
70 return *this;
71 }
73
75
78 inline LifecyclePolicyStatus GetStatus() const { return m_status; }
79 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
80 inline void SetStatus(LifecyclePolicyStatus value) {
81 m_statusHasBeenSet = true;
82 m_status = value;
83 }
85 SetStatus(value);
86 return *this;
87 }
89
91
95 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
96 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
97 template <typename ExecutionRoleT = Aws::String>
98 void SetExecutionRole(ExecutionRoleT&& value) {
99 m_executionRoleHasBeenSet = true;
100 m_executionRole = std::forward<ExecutionRoleT>(value);
101 }
102 template <typename ExecutionRoleT = Aws::String>
104 SetExecutionRole(std::forward<ExecutionRoleT>(value));
105 return *this;
106 }
108
110
113 inline LifecyclePolicyResourceType GetResourceType() const { return m_resourceType; }
114 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
116 m_resourceTypeHasBeenSet = true;
117 m_resourceType = value;
118 }
120 SetResourceType(value);
121 return *this;
122 }
124
126
129 inline const Aws::Vector<LifecyclePolicyDetail>& GetPolicyDetails() const { return m_policyDetails; }
130 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
131 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
132 void SetPolicyDetails(PolicyDetailsT&& value) {
133 m_policyDetailsHasBeenSet = true;
134 m_policyDetails = std::forward<PolicyDetailsT>(value);
135 }
136 template <typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
138 SetPolicyDetails(std::forward<PolicyDetailsT>(value));
139 return *this;
140 }
141 template <typename PolicyDetailsT = LifecyclePolicyDetail>
143 m_policyDetailsHasBeenSet = true;
144 m_policyDetails.emplace_back(std::forward<PolicyDetailsT>(value));
145 return *this;
146 }
148
150
154 inline const LifecyclePolicyResourceSelection& GetResourceSelection() const { return m_resourceSelection; }
155 inline bool ResourceSelectionHasBeenSet() const { return m_resourceSelectionHasBeenSet; }
156 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
157 void SetResourceSelection(ResourceSelectionT&& value) {
158 m_resourceSelectionHasBeenSet = true;
159 m_resourceSelection = std::forward<ResourceSelectionT>(value);
160 }
161 template <typename ResourceSelectionT = LifecyclePolicyResourceSelection>
163 SetResourceSelection(std::forward<ResourceSelectionT>(value));
164 return *this;
165 }
167
169
172 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
173 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
174 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
175 void SetTags(TagsT&& value) {
176 m_tagsHasBeenSet = true;
177 m_tags = std::forward<TagsT>(value);
178 }
179 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
181 SetTags(std::forward<TagsT>(value));
182 return *this;
183 }
184 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
185 CreateLifecyclePolicyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
186 m_tagsHasBeenSet = true;
187 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
188 return *this;
189 }
191
193
199 inline const Aws::String& GetClientToken() const { return m_clientToken; }
200 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
201 template <typename ClientTokenT = Aws::String>
202 void SetClientToken(ClientTokenT&& value) {
203 m_clientTokenHasBeenSet = true;
204 m_clientToken = std::forward<ClientTokenT>(value);
205 }
206 template <typename ClientTokenT = Aws::String>
208 SetClientToken(std::forward<ClientTokenT>(value));
209 return *this;
210 }
212 private:
213 Aws::String m_name;
214
215 Aws::String m_description;
216
218
219 Aws::String m_executionRole;
220
222
224
225 LifecyclePolicyResourceSelection m_resourceSelection;
226
228
230 bool m_nameHasBeenSet = false;
231 bool m_descriptionHasBeenSet = false;
232 bool m_statusHasBeenSet = false;
233 bool m_executionRoleHasBeenSet = false;
234 bool m_resourceTypeHasBeenSet = false;
235 bool m_policyDetailsHasBeenSet = false;
236 bool m_resourceSelectionHasBeenSet = false;
237 bool m_tagsHasBeenSet = false;
238 bool m_clientTokenHasBeenSet = true;
239};
240
241} // namespace Model
242} // namespace imagebuilder
243} // namespace Aws
static Aws::Utils::UUID PseudoRandomUUID()
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateLifecyclePolicyRequest & WithStatus(LifecyclePolicyStatus value)
CreateLifecyclePolicyRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateLifecyclePolicyRequest & WithPolicyDetails(PolicyDetailsT &&value)
const LifecyclePolicyResourceSelection & GetResourceSelection() const
CreateLifecyclePolicyRequest & WithExecutionRole(ExecutionRoleT &&value)
CreateLifecyclePolicyRequest & WithName(NameT &&value)
CreateLifecyclePolicyRequest & WithClientToken(ClientTokenT &&value)
CreateLifecyclePolicyRequest & WithDescription(DescriptionT &&value)
AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override
const Aws::Vector< LifecyclePolicyDetail > & GetPolicyDetails() const
CreateLifecyclePolicyRequest & AddPolicyDetails(PolicyDetailsT &&value)
CreateLifecyclePolicyRequest & WithResourceType(LifecyclePolicyResourceType value)
AWS_IMAGEBUILDER_API CreateLifecyclePolicyRequest()=default
CreateLifecyclePolicyRequest & WithResourceSelection(ResourceSelectionT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector