AWS SDK for C++

AWS SDK for C++ Version 1.11.921

Loading...
Searching...
No Matches
CopyImageRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2Request.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/TagSpecification.h>
13
14#include <utility>
15
16namespace Aws {
17namespace EC2 {
18namespace Model {
19
26 public:
27 AWS_EC2_API CopyImageRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CopyImage"; }
34
35 AWS_EC2_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
39
40 public:
42
49 inline const Aws::String& GetClientToken() const { return m_clientToken; }
50 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
51 template <typename ClientTokenT = Aws::String>
52 void SetClientToken(ClientTokenT&& value) {
53 m_clientTokenHasBeenSet = true;
54 m_clientToken = std::forward<ClientTokenT>(value);
55 }
56 template <typename ClientTokenT = Aws::String>
57 CopyImageRequest& WithClientToken(ClientTokenT&& value) {
58 SetClientToken(std::forward<ClientTokenT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::String& GetDescription() const { return m_description; }
68 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
69 template <typename DescriptionT = Aws::String>
70 void SetDescription(DescriptionT&& value) {
71 m_descriptionHasBeenSet = true;
72 m_description = std::forward<DescriptionT>(value);
73 }
74 template <typename DescriptionT = Aws::String>
75 CopyImageRequest& WithDescription(DescriptionT&& value) {
76 SetDescription(std::forward<DescriptionT>(value));
77 return *this;
78 }
80
82
91 inline bool GetEncrypted() const { return m_encrypted; }
92 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
93 inline void SetEncrypted(bool value) {
94 m_encryptedHasBeenSet = true;
95 m_encrypted = value;
96 }
97 inline CopyImageRequest& WithEncrypted(bool value) {
98 SetEncrypted(value);
99 return *this;
100 }
102
104
120 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
121 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
122 template <typename KmsKeyIdT = Aws::String>
123 void SetKmsKeyId(KmsKeyIdT&& value) {
124 m_kmsKeyIdHasBeenSet = true;
125 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
126 }
127 template <typename KmsKeyIdT = Aws::String>
128 CopyImageRequest& WithKmsKeyId(KmsKeyIdT&& value) {
129 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
130 return *this;
131 }
133
135
138 inline const Aws::String& GetName() const { return m_name; }
139 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
140 template <typename NameT = Aws::String>
141 void SetName(NameT&& value) {
142 m_nameHasBeenSet = true;
143 m_name = std::forward<NameT>(value);
144 }
145 template <typename NameT = Aws::String>
146 CopyImageRequest& WithName(NameT&& value) {
147 SetName(std::forward<NameT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::String& GetSourceImageId() const { return m_sourceImageId; }
157 inline bool SourceImageIdHasBeenSet() const { return m_sourceImageIdHasBeenSet; }
158 template <typename SourceImageIdT = Aws::String>
159 void SetSourceImageId(SourceImageIdT&& value) {
160 m_sourceImageIdHasBeenSet = true;
161 m_sourceImageId = std::forward<SourceImageIdT>(value);
162 }
163 template <typename SourceImageIdT = Aws::String>
164 CopyImageRequest& WithSourceImageId(SourceImageIdT&& value) {
165 SetSourceImageId(std::forward<SourceImageIdT>(value));
166 return *this;
167 }
169
171
174 inline const Aws::String& GetSourceRegion() const { return m_sourceRegion; }
175 inline bool SourceRegionHasBeenSet() const { return m_sourceRegionHasBeenSet; }
176 template <typename SourceRegionT = Aws::String>
177 void SetSourceRegion(SourceRegionT&& value) {
178 m_sourceRegionHasBeenSet = true;
179 m_sourceRegion = std::forward<SourceRegionT>(value);
180 }
181 template <typename SourceRegionT = Aws::String>
182 CopyImageRequest& WithSourceRegion(SourceRegionT&& value) {
183 SetSourceRegion(std::forward<SourceRegionT>(value));
184 return *this;
185 }
187
189
201 inline const Aws::String& GetDestinationOutpostArn() const { return m_destinationOutpostArn; }
202 inline bool DestinationOutpostArnHasBeenSet() const { return m_destinationOutpostArnHasBeenSet; }
203 template <typename DestinationOutpostArnT = Aws::String>
204 void SetDestinationOutpostArn(DestinationOutpostArnT&& value) {
205 m_destinationOutpostArnHasBeenSet = true;
206 m_destinationOutpostArn = std::forward<DestinationOutpostArnT>(value);
207 }
208 template <typename DestinationOutpostArnT = Aws::String>
209 CopyImageRequest& WithDestinationOutpostArn(DestinationOutpostArnT&& value) {
210 SetDestinationOutpostArn(std::forward<DestinationOutpostArnT>(value));
211 return *this;
212 }
214
216
227 inline bool GetCopyImageTags() const { return m_copyImageTags; }
228 inline bool CopyImageTagsHasBeenSet() const { return m_copyImageTagsHasBeenSet; }
229 inline void SetCopyImageTags(bool value) {
230 m_copyImageTagsHasBeenSet = true;
231 m_copyImageTags = value;
232 }
234 SetCopyImageTags(value);
235 return *this;
236 }
238
240
251 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
252 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
253 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
254 void SetTagSpecifications(TagSpecificationsT&& value) {
255 m_tagSpecificationsHasBeenSet = true;
256 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
257 }
258 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
259 CopyImageRequest& WithTagSpecifications(TagSpecificationsT&& value) {
260 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
261 return *this;
262 }
263 template <typename TagSpecificationsT = TagSpecification>
264 CopyImageRequest& AddTagSpecifications(TagSpecificationsT&& value) {
265 m_tagSpecificationsHasBeenSet = true;
266 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
267 return *this;
268 }
270
272
285 inline long long GetSnapshotCopyCompletionDurationMinutes() const { return m_snapshotCopyCompletionDurationMinutes; }
286 inline bool SnapshotCopyCompletionDurationMinutesHasBeenSet() const { return m_snapshotCopyCompletionDurationMinutesHasBeenSet; }
287 inline void SetSnapshotCopyCompletionDurationMinutes(long long value) {
288 m_snapshotCopyCompletionDurationMinutesHasBeenSet = true;
289 m_snapshotCopyCompletionDurationMinutes = value;
290 }
293 return *this;
294 }
296
298
305 inline const Aws::String& GetDestinationAvailabilityZone() const { return m_destinationAvailabilityZone; }
306 inline bool DestinationAvailabilityZoneHasBeenSet() const { return m_destinationAvailabilityZoneHasBeenSet; }
307 template <typename DestinationAvailabilityZoneT = Aws::String>
308 void SetDestinationAvailabilityZone(DestinationAvailabilityZoneT&& value) {
309 m_destinationAvailabilityZoneHasBeenSet = true;
310 m_destinationAvailabilityZone = std::forward<DestinationAvailabilityZoneT>(value);
311 }
312 template <typename DestinationAvailabilityZoneT = Aws::String>
313 CopyImageRequest& WithDestinationAvailabilityZone(DestinationAvailabilityZoneT&& value) {
314 SetDestinationAvailabilityZone(std::forward<DestinationAvailabilityZoneT>(value));
315 return *this;
316 }
318
320
327 inline const Aws::String& GetDestinationAvailabilityZoneId() const { return m_destinationAvailabilityZoneId; }
328 inline bool DestinationAvailabilityZoneIdHasBeenSet() const { return m_destinationAvailabilityZoneIdHasBeenSet; }
329 template <typename DestinationAvailabilityZoneIdT = Aws::String>
330 void SetDestinationAvailabilityZoneId(DestinationAvailabilityZoneIdT&& value) {
331 m_destinationAvailabilityZoneIdHasBeenSet = true;
332 m_destinationAvailabilityZoneId = std::forward<DestinationAvailabilityZoneIdT>(value);
333 }
334 template <typename DestinationAvailabilityZoneIdT = Aws::String>
335 CopyImageRequest& WithDestinationAvailabilityZoneId(DestinationAvailabilityZoneIdT&& value) {
336 SetDestinationAvailabilityZoneId(std::forward<DestinationAvailabilityZoneIdT>(value));
337 return *this;
338 }
340
342
348 inline bool GetDryRun() const { return m_dryRun; }
349 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
350 inline void SetDryRun(bool value) {
351 m_dryRunHasBeenSet = true;
352 m_dryRun = value;
353 }
354 inline CopyImageRequest& WithDryRun(bool value) {
355 SetDryRun(value);
356 return *this;
357 }
359 private:
361
362 Aws::String m_description;
363
364 bool m_encrypted{false};
365
366 Aws::String m_kmsKeyId;
367
368 Aws::String m_name;
369
370 Aws::String m_sourceImageId;
371
372 Aws::String m_sourceRegion;
373
374 Aws::String m_destinationOutpostArn;
375
376 bool m_copyImageTags{false};
377
378 Aws::Vector<TagSpecification> m_tagSpecifications;
379
380 long long m_snapshotCopyCompletionDurationMinutes{0};
381
382 Aws::String m_destinationAvailabilityZone;
383
384 Aws::String m_destinationAvailabilityZoneId;
385
386 bool m_dryRun{false};
387 bool m_clientTokenHasBeenSet = true;
388 bool m_descriptionHasBeenSet = false;
389 bool m_encryptedHasBeenSet = false;
390 bool m_kmsKeyIdHasBeenSet = false;
391 bool m_nameHasBeenSet = false;
392 bool m_sourceImageIdHasBeenSet = false;
393 bool m_sourceRegionHasBeenSet = false;
394 bool m_destinationOutpostArnHasBeenSet = false;
395 bool m_copyImageTagsHasBeenSet = false;
396 bool m_tagSpecificationsHasBeenSet = false;
397 bool m_snapshotCopyCompletionDurationMinutesHasBeenSet = false;
398 bool m_destinationAvailabilityZoneHasBeenSet = false;
399 bool m_destinationAvailabilityZoneIdHasBeenSet = false;
400 bool m_dryRunHasBeenSet = false;
401};
402
403} // namespace Model
404} // namespace EC2
405} // namespace Aws
CopyImageRequest & WithDryRun(bool value)
const Aws::String & GetKmsKeyId() const
CopyImageRequest & AddTagSpecifications(TagSpecificationsT &&value)
CopyImageRequest & WithEncrypted(bool value)
CopyImageRequest & WithName(NameT &&value)
const Aws::String & GetDestinationAvailabilityZone() const
AWS_EC2_API CopyImageRequest()=default
CopyImageRequest & WithKmsKeyId(KmsKeyIdT &&value)
CopyImageRequest & WithSourceRegion(SourceRegionT &&value)
CopyImageRequest & WithClientToken(ClientTokenT &&value)
void SetDescription(DescriptionT &&value)
CopyImageRequest & WithCopyImageTags(bool value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
const Aws::String & GetSourceRegion() const
virtual const char * GetServiceRequestName() const override
CopyImageRequest & WithSourceImageId(SourceImageIdT &&value)
void SetDestinationOutpostArn(DestinationOutpostArnT &&value)
void SetDestinationAvailabilityZoneId(DestinationAvailabilityZoneIdT &&value)
const Aws::String & GetClientToken() const
CopyImageRequest & WithTagSpecifications(TagSpecificationsT &&value)
CopyImageRequest & WithDescription(DescriptionT &&value)
const Aws::String & GetSourceImageId() const
void SetTagSpecifications(TagSpecificationsT &&value)
void SetSourceImageId(SourceImageIdT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetSourceRegion(SourceRegionT &&value)
void SetKmsKeyId(KmsKeyIdT &&value)
long long GetSnapshotCopyCompletionDurationMinutes() const
void SetClientToken(ClientTokenT &&value)
const Aws::String & GetDestinationAvailabilityZoneId() const
const Aws::String & GetDescription() const
void SetDestinationAvailabilityZone(DestinationAvailabilityZoneT &&value)
void SetSnapshotCopyCompletionDurationMinutes(long long value)
CopyImageRequest & WithDestinationOutpostArn(DestinationOutpostArnT &&value)
bool SnapshotCopyCompletionDurationMinutesHasBeenSet() const
CopyImageRequest & WithDestinationAvailabilityZoneId(DestinationAvailabilityZoneIdT &&value)
const Aws::String & GetName() const
const Aws::String & GetDestinationOutpostArn() const
CopyImageRequest & WithDestinationAvailabilityZone(DestinationAvailabilityZoneT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
CopyImageRequest & WithSnapshotCopyCompletionDurationMinutes(long long value)
static Aws::Utils::UUID PseudoRandomUUID()
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector