AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateLifecyclePolicyRequest.h
1
6#pragma once
7#include <aws/imagebuilder/Imagebuilder_EXPORTS.h>
8#include <aws/imagebuilder/ImagebuilderRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/imagebuilder/model/LifecyclePolicyStatus.h>
11#include <aws/imagebuilder/model/LifecyclePolicyResourceType.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/imagebuilder/model/LifecyclePolicyResourceSelection.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/imagebuilder/model/LifecyclePolicyDetail.h>
16#include <utility>
17#include <aws/core/utils/UUID.h>
18
19namespace Aws
20{
21namespace imagebuilder
22{
23namespace Model
24{
25
29 {
30 public:
31 AWS_IMAGEBUILDER_API CreateLifecyclePolicyRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateLifecyclePolicy"; }
38
39 AWS_IMAGEBUILDER_API Aws::String SerializePayload() const override;
40
41
43
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template<typename NameT = Aws::String>
49 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
50 template<typename NameT = Aws::String>
51 CreateLifecyclePolicyRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
53
55
58 inline const Aws::String& GetDescription() const { return m_description; }
59 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
60 template<typename DescriptionT = Aws::String>
61 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
62 template<typename DescriptionT = Aws::String>
63 CreateLifecyclePolicyRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
65
67
70 inline LifecyclePolicyStatus GetStatus() const { return m_status; }
71 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
72 inline void SetStatus(LifecyclePolicyStatus value) { m_statusHasBeenSet = true; m_status = value; }
75
77
81 inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
82 inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
83 template<typename ExecutionRoleT = Aws::String>
84 void SetExecutionRole(ExecutionRoleT&& value) { m_executionRoleHasBeenSet = true; m_executionRole = std::forward<ExecutionRoleT>(value); }
85 template<typename ExecutionRoleT = Aws::String>
86 CreateLifecyclePolicyRequest& WithExecutionRole(ExecutionRoleT&& value) { SetExecutionRole(std::forward<ExecutionRoleT>(value)); return *this;}
88
90
93 inline LifecyclePolicyResourceType GetResourceType() const { return m_resourceType; }
94 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
95 inline void SetResourceType(LifecyclePolicyResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
98
100
103 inline const Aws::Vector<LifecyclePolicyDetail>& GetPolicyDetails() const { return m_policyDetails; }
104 inline bool PolicyDetailsHasBeenSet() const { return m_policyDetailsHasBeenSet; }
105 template<typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
106 void SetPolicyDetails(PolicyDetailsT&& value) { m_policyDetailsHasBeenSet = true; m_policyDetails = std::forward<PolicyDetailsT>(value); }
107 template<typename PolicyDetailsT = Aws::Vector<LifecyclePolicyDetail>>
108 CreateLifecyclePolicyRequest& WithPolicyDetails(PolicyDetailsT&& value) { SetPolicyDetails(std::forward<PolicyDetailsT>(value)); return *this;}
109 template<typename PolicyDetailsT = LifecyclePolicyDetail>
110 CreateLifecyclePolicyRequest& AddPolicyDetails(PolicyDetailsT&& value) { m_policyDetailsHasBeenSet = true; m_policyDetails.emplace_back(std::forward<PolicyDetailsT>(value)); return *this; }
112
114
118 inline const LifecyclePolicyResourceSelection& GetResourceSelection() const { return m_resourceSelection; }
119 inline bool ResourceSelectionHasBeenSet() const { return m_resourceSelectionHasBeenSet; }
120 template<typename ResourceSelectionT = LifecyclePolicyResourceSelection>
121 void SetResourceSelection(ResourceSelectionT&& value) { m_resourceSelectionHasBeenSet = true; m_resourceSelection = std::forward<ResourceSelectionT>(value); }
122 template<typename ResourceSelectionT = LifecyclePolicyResourceSelection>
123 CreateLifecyclePolicyRequest& WithResourceSelection(ResourceSelectionT&& value) { SetResourceSelection(std::forward<ResourceSelectionT>(value)); return *this;}
125
127
130 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
131 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
132 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
133 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
134 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
135 CreateLifecyclePolicyRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
136 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
137 CreateLifecyclePolicyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
138 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
139 }
141
143
149 inline const Aws::String& GetClientToken() const { return m_clientToken; }
150 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
151 template<typename ClientTokenT = Aws::String>
152 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
153 template<typename ClientTokenT = Aws::String>
154 CreateLifecyclePolicyRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
156 private:
157
158 Aws::String m_name;
159 bool m_nameHasBeenSet = false;
160
161 Aws::String m_description;
162 bool m_descriptionHasBeenSet = false;
163
165 bool m_statusHasBeenSet = false;
166
167 Aws::String m_executionRole;
168 bool m_executionRoleHasBeenSet = false;
169
171 bool m_resourceTypeHasBeenSet = false;
172
174 bool m_policyDetailsHasBeenSet = false;
175
176 LifecyclePolicyResourceSelection m_resourceSelection;
177 bool m_resourceSelectionHasBeenSet = false;
178
180 bool m_tagsHasBeenSet = false;
181
183 bool m_clientTokenHasBeenSet = true;
184 };
185
186} // namespace Model
187} // namespace imagebuilder
188} // 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