AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ModifyImageAttributeRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/AttributeValue.h>
12#include <aws/ec2/model/LaunchPermissionModifications.h>
13#include <aws/ec2/model/OperationType.h>
14
15#include <utility>
16
17namespace Aws {
18namespace EC2 {
19namespace Model {
20
28 public:
29 AWS_EC2_API ModifyImageAttributeRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "ModifyImageAttribute"; }
36
37 AWS_EC2_API Aws::String SerializePayload() const override;
38
39 protected:
40 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
41
42 public:
44
49 inline const Aws::String& GetAttribute() const { return m_attribute; }
50 inline bool AttributeHasBeenSet() const { return m_attributeHasBeenSet; }
51 template <typename AttributeT = Aws::String>
52 void SetAttribute(AttributeT&& value) {
53 m_attributeHasBeenSet = true;
54 m_attribute = std::forward<AttributeT>(value);
55 }
56 template <typename AttributeT = Aws::String>
58 SetAttribute(std::forward<AttributeT>(value));
59 return *this;
60 }
62
64
67 inline const AttributeValue& GetDescription() const { return m_description; }
68 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
69 template <typename DescriptionT = AttributeValue>
70 void SetDescription(DescriptionT&& value) {
71 m_descriptionHasBeenSet = true;
72 m_description = std::forward<DescriptionT>(value);
73 }
74 template <typename DescriptionT = AttributeValue>
76 SetDescription(std::forward<DescriptionT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::String& GetImageId() const { return m_imageId; }
86 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
87 template <typename ImageIdT = Aws::String>
88 void SetImageId(ImageIdT&& value) {
89 m_imageIdHasBeenSet = true;
90 m_imageId = std::forward<ImageIdT>(value);
91 }
92 template <typename ImageIdT = Aws::String>
94 SetImageId(std::forward<ImageIdT>(value));
95 return *this;
96 }
98
100
103 inline const LaunchPermissionModifications& GetLaunchPermission() const { return m_launchPermission; }
104 inline bool LaunchPermissionHasBeenSet() const { return m_launchPermissionHasBeenSet; }
105 template <typename LaunchPermissionT = LaunchPermissionModifications>
106 void SetLaunchPermission(LaunchPermissionT&& value) {
107 m_launchPermissionHasBeenSet = true;
108 m_launchPermission = std::forward<LaunchPermissionT>(value);
109 }
110 template <typename LaunchPermissionT = LaunchPermissionModifications>
112 SetLaunchPermission(std::forward<LaunchPermissionT>(value));
113 return *this;
114 }
116
118
122 inline OperationType GetOperationType() const { return m_operationType; }
123 inline bool OperationTypeHasBeenSet() const { return m_operationTypeHasBeenSet; }
124 inline void SetOperationType(OperationType value) {
125 m_operationTypeHasBeenSet = true;
126 m_operationType = value;
127 }
129 SetOperationType(value);
130 return *this;
131 }
133
135
138 inline const Aws::Vector<Aws::String>& GetProductCodes() const { return m_productCodes; }
139 inline bool ProductCodesHasBeenSet() const { return m_productCodesHasBeenSet; }
140 template <typename ProductCodesT = Aws::Vector<Aws::String>>
141 void SetProductCodes(ProductCodesT&& value) {
142 m_productCodesHasBeenSet = true;
143 m_productCodes = std::forward<ProductCodesT>(value);
144 }
145 template <typename ProductCodesT = Aws::Vector<Aws::String>>
147 SetProductCodes(std::forward<ProductCodesT>(value));
148 return *this;
149 }
150 template <typename ProductCodesT = Aws::String>
152 m_productCodesHasBeenSet = true;
153 m_productCodes.emplace_back(std::forward<ProductCodesT>(value));
154 return *this;
155 }
157
159
163 inline const Aws::Vector<Aws::String>& GetUserGroups() const { return m_userGroups; }
164 inline bool UserGroupsHasBeenSet() const { return m_userGroupsHasBeenSet; }
165 template <typename UserGroupsT = Aws::Vector<Aws::String>>
166 void SetUserGroups(UserGroupsT&& value) {
167 m_userGroupsHasBeenSet = true;
168 m_userGroups = std::forward<UserGroupsT>(value);
169 }
170 template <typename UserGroupsT = Aws::Vector<Aws::String>>
172 SetUserGroups(std::forward<UserGroupsT>(value));
173 return *this;
174 }
175 template <typename UserGroupsT = Aws::String>
177 m_userGroupsHasBeenSet = true;
178 m_userGroups.emplace_back(std::forward<UserGroupsT>(value));
179 return *this;
180 }
182
184
188 inline const Aws::Vector<Aws::String>& GetUserIds() const { return m_userIds; }
189 inline bool UserIdsHasBeenSet() const { return m_userIdsHasBeenSet; }
190 template <typename UserIdsT = Aws::Vector<Aws::String>>
191 void SetUserIds(UserIdsT&& value) {
192 m_userIdsHasBeenSet = true;
193 m_userIds = std::forward<UserIdsT>(value);
194 }
195 template <typename UserIdsT = Aws::Vector<Aws::String>>
197 SetUserIds(std::forward<UserIdsT>(value));
198 return *this;
199 }
200 template <typename UserIdsT = Aws::String>
202 m_userIdsHasBeenSet = true;
203 m_userIds.emplace_back(std::forward<UserIdsT>(value));
204 return *this;
205 }
207
209
214 inline const Aws::String& GetValue() const { return m_value; }
215 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
216 template <typename ValueT = Aws::String>
217 void SetValue(ValueT&& value) {
218 m_valueHasBeenSet = true;
219 m_value = std::forward<ValueT>(value);
220 }
221 template <typename ValueT = Aws::String>
223 SetValue(std::forward<ValueT>(value));
224 return *this;
225 }
227
229
234 inline const Aws::Vector<Aws::String>& GetOrganizationArns() const { return m_organizationArns; }
235 inline bool OrganizationArnsHasBeenSet() const { return m_organizationArnsHasBeenSet; }
236 template <typename OrganizationArnsT = Aws::Vector<Aws::String>>
237 void SetOrganizationArns(OrganizationArnsT&& value) {
238 m_organizationArnsHasBeenSet = true;
239 m_organizationArns = std::forward<OrganizationArnsT>(value);
240 }
241 template <typename OrganizationArnsT = Aws::Vector<Aws::String>>
243 SetOrganizationArns(std::forward<OrganizationArnsT>(value));
244 return *this;
245 }
246 template <typename OrganizationArnsT = Aws::String>
248 m_organizationArnsHasBeenSet = true;
249 m_organizationArns.emplace_back(std::forward<OrganizationArnsT>(value));
250 return *this;
251 }
253
255
260 inline const Aws::Vector<Aws::String>& GetOrganizationalUnitArns() const { return m_organizationalUnitArns; }
261 inline bool OrganizationalUnitArnsHasBeenSet() const { return m_organizationalUnitArnsHasBeenSet; }
262 template <typename OrganizationalUnitArnsT = Aws::Vector<Aws::String>>
263 void SetOrganizationalUnitArns(OrganizationalUnitArnsT&& value) {
264 m_organizationalUnitArnsHasBeenSet = true;
265 m_organizationalUnitArns = std::forward<OrganizationalUnitArnsT>(value);
266 }
267 template <typename OrganizationalUnitArnsT = Aws::Vector<Aws::String>>
268 ModifyImageAttributeRequest& WithOrganizationalUnitArns(OrganizationalUnitArnsT&& value) {
269 SetOrganizationalUnitArns(std::forward<OrganizationalUnitArnsT>(value));
270 return *this;
271 }
272 template <typename OrganizationalUnitArnsT = Aws::String>
273 ModifyImageAttributeRequest& AddOrganizationalUnitArns(OrganizationalUnitArnsT&& value) {
274 m_organizationalUnitArnsHasBeenSet = true;
275 m_organizationalUnitArns.emplace_back(std::forward<OrganizationalUnitArnsT>(value));
276 return *this;
277 }
279
281
294 inline const AttributeValue& GetImdsSupport() const { return m_imdsSupport; }
295 inline bool ImdsSupportHasBeenSet() const { return m_imdsSupportHasBeenSet; }
296 template <typename ImdsSupportT = AttributeValue>
297 void SetImdsSupport(ImdsSupportT&& value) {
298 m_imdsSupportHasBeenSet = true;
299 m_imdsSupport = std::forward<ImdsSupportT>(value);
300 }
301 template <typename ImdsSupportT = AttributeValue>
303 SetImdsSupport(std::forward<ImdsSupportT>(value));
304 return *this;
305 }
307
309
315 inline bool GetDryRun() const { return m_dryRun; }
316 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
317 inline void SetDryRun(bool value) {
318 m_dryRunHasBeenSet = true;
319 m_dryRun = value;
320 }
322 SetDryRun(value);
323 return *this;
324 }
326 private:
327 Aws::String m_attribute;
328
329 AttributeValue m_description;
330
331 Aws::String m_imageId;
332
333 LaunchPermissionModifications m_launchPermission;
334
335 OperationType m_operationType{OperationType::NOT_SET};
336
337 Aws::Vector<Aws::String> m_productCodes;
338
339 Aws::Vector<Aws::String> m_userGroups;
340
341 Aws::Vector<Aws::String> m_userIds;
342
343 Aws::String m_value;
344
345 Aws::Vector<Aws::String> m_organizationArns;
346
347 Aws::Vector<Aws::String> m_organizationalUnitArns;
348
349 AttributeValue m_imdsSupport;
350
351 bool m_dryRun{false};
352 bool m_attributeHasBeenSet = false;
353 bool m_descriptionHasBeenSet = false;
354 bool m_imageIdHasBeenSet = false;
355 bool m_launchPermissionHasBeenSet = false;
356 bool m_operationTypeHasBeenSet = false;
357 bool m_productCodesHasBeenSet = false;
358 bool m_userGroupsHasBeenSet = false;
359 bool m_userIdsHasBeenSet = false;
360 bool m_valueHasBeenSet = false;
361 bool m_organizationArnsHasBeenSet = false;
362 bool m_organizationalUnitArnsHasBeenSet = false;
363 bool m_imdsSupportHasBeenSet = false;
364 bool m_dryRunHasBeenSet = false;
365};
366
367} // namespace Model
368} // namespace EC2
369} // namespace Aws
ModifyImageAttributeRequest & AddProductCodes(ProductCodesT &&value)
ModifyImageAttributeRequest & WithDescription(DescriptionT &&value)
const Aws::Vector< Aws::String > & GetUserGroups() const
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
const Aws::Vector< Aws::String > & GetOrganizationalUnitArns() const
ModifyImageAttributeRequest & AddUserIds(UserIdsT &&value)
ModifyImageAttributeRequest & WithAttribute(AttributeT &&value)
ModifyImageAttributeRequest & AddOrganizationArns(OrganizationArnsT &&value)
ModifyImageAttributeRequest & WithImdsSupport(ImdsSupportT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
ModifyImageAttributeRequest & WithUserIds(UserIdsT &&value)
const Aws::Vector< Aws::String > & GetProductCodes() const
ModifyImageAttributeRequest & WithUserGroups(UserGroupsT &&value)
ModifyImageAttributeRequest & WithDryRun(bool value)
ModifyImageAttributeRequest & WithLaunchPermission(LaunchPermissionT &&value)
ModifyImageAttributeRequest & WithOrganizationalUnitArns(OrganizationalUnitArnsT &&value)
ModifyImageAttributeRequest & WithOperationType(OperationType value)
ModifyImageAttributeRequest & WithImageId(ImageIdT &&value)
void SetOrganizationalUnitArns(OrganizationalUnitArnsT &&value)
const LaunchPermissionModifications & GetLaunchPermission() const
virtual const char * GetServiceRequestName() const override
ModifyImageAttributeRequest & WithOrganizationArns(OrganizationArnsT &&value)
ModifyImageAttributeRequest & WithProductCodes(ProductCodesT &&value)
ModifyImageAttributeRequest & AddOrganizationalUnitArns(OrganizationalUnitArnsT &&value)
const Aws::Vector< Aws::String > & GetUserIds() const
ModifyImageAttributeRequest & WithValue(ValueT &&value)
ModifyImageAttributeRequest & AddUserGroups(UserGroupsT &&value)
const Aws::Vector< Aws::String > & GetOrganizationArns() const
AWS_EC2_API ModifyImageAttributeRequest()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector