AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
StartSnapshotRequest.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/ebs/EBSRequest.h>
11#include <aws/ebs/EBS_EXPORTS.h>
12#include <aws/ebs/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace EBS {
18namespace Model {
19
23 public:
24 AWS_EBS_API StartSnapshotRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "StartSnapshot"; }
31
32 AWS_EBS_API Aws::String SerializePayload() const override;
33
35
39 inline long long GetVolumeSize() const { return m_volumeSize; }
40 inline bool VolumeSizeHasBeenSet() const { return m_volumeSizeHasBeenSet; }
41 inline void SetVolumeSize(long long value) {
42 m_volumeSizeHasBeenSet = true;
43 m_volumeSize = value;
44 }
45 inline StartSnapshotRequest& WithVolumeSize(long long value) {
46 SetVolumeSize(value);
47 return *this;
48 }
50
52
72 inline const Aws::String& GetParentSnapshotId() const { return m_parentSnapshotId; }
73 inline bool ParentSnapshotIdHasBeenSet() const { return m_parentSnapshotIdHasBeenSet; }
74 template <typename ParentSnapshotIdT = Aws::String>
75 void SetParentSnapshotId(ParentSnapshotIdT&& value) {
76 m_parentSnapshotIdHasBeenSet = true;
77 m_parentSnapshotId = std::forward<ParentSnapshotIdT>(value);
78 }
79 template <typename ParentSnapshotIdT = Aws::String>
80 StartSnapshotRequest& WithParentSnapshotId(ParentSnapshotIdT&& value) {
81 SetParentSnapshotId(std::forward<ParentSnapshotIdT>(value));
82 return *this;
83 }
85
87
90 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
91 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
92 template <typename TagsT = Aws::Vector<Tag>>
93 void SetTags(TagsT&& value) {
94 m_tagsHasBeenSet = true;
95 m_tags = std::forward<TagsT>(value);
96 }
97 template <typename TagsT = Aws::Vector<Tag>>
99 SetTags(std::forward<TagsT>(value));
100 return *this;
101 }
102 template <typename TagsT = Tag>
104 m_tagsHasBeenSet = true;
105 m_tags.emplace_back(std::forward<TagsT>(value));
106 return *this;
107 }
109
111
114 inline const Aws::String& GetDescription() const { return m_description; }
115 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
116 template <typename DescriptionT = Aws::String>
117 void SetDescription(DescriptionT&& value) {
118 m_descriptionHasBeenSet = true;
119 m_description = std::forward<DescriptionT>(value);
120 }
121 template <typename DescriptionT = Aws::String>
122 StartSnapshotRequest& WithDescription(DescriptionT&& value) {
123 SetDescription(std::forward<DescriptionT>(value));
124 return *this;
125 }
127
129
141 inline const Aws::String& GetClientToken() const { return m_clientToken; }
142 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
143 template <typename ClientTokenT = Aws::String>
144 void SetClientToken(ClientTokenT&& value) {
145 m_clientTokenHasBeenSet = true;
146 m_clientToken = std::forward<ClientTokenT>(value);
147 }
148 template <typename ClientTokenT = Aws::String>
149 StartSnapshotRequest& WithClientToken(ClientTokenT&& value) {
150 SetClientToken(std::forward<ClientTokenT>(value));
151 return *this;
152 }
154
156
174 inline bool GetEncrypted() const { return m_encrypted; }
175 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
176 inline void SetEncrypted(bool value) {
177 m_encryptedHasBeenSet = true;
178 m_encrypted = value;
179 }
181 SetEncrypted(value);
182 return *this;
183 }
185
187
203 inline const Aws::String& GetKmsKeyArn() const { return m_kmsKeyArn; }
204 inline bool KmsKeyArnHasBeenSet() const { return m_kmsKeyArnHasBeenSet; }
205 template <typename KmsKeyArnT = Aws::String>
206 void SetKmsKeyArn(KmsKeyArnT&& value) {
207 m_kmsKeyArnHasBeenSet = true;
208 m_kmsKeyArn = std::forward<KmsKeyArnT>(value);
209 }
210 template <typename KmsKeyArnT = Aws::String>
211 StartSnapshotRequest& WithKmsKeyArn(KmsKeyArnT&& value) {
212 SetKmsKeyArn(std::forward<KmsKeyArnT>(value));
213 return *this;
214 }
216
218
225 inline int GetTimeout() const { return m_timeout; }
226 inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; }
227 inline void SetTimeout(int value) {
228 m_timeoutHasBeenSet = true;
229 m_timeout = value;
230 }
232 SetTimeout(value);
233 return *this;
234 }
236 private:
237 long long m_volumeSize{0};
238
239 Aws::String m_parentSnapshotId;
240
241 Aws::Vector<Tag> m_tags;
242
243 Aws::String m_description;
244
246
247 bool m_encrypted{false};
248
249 Aws::String m_kmsKeyArn;
250
251 int m_timeout{0};
252 bool m_volumeSizeHasBeenSet = false;
253 bool m_parentSnapshotIdHasBeenSet = false;
254 bool m_tagsHasBeenSet = false;
255 bool m_descriptionHasBeenSet = false;
256 bool m_clientTokenHasBeenSet = true;
257 bool m_encryptedHasBeenSet = false;
258 bool m_kmsKeyArnHasBeenSet = false;
259 bool m_timeoutHasBeenSet = false;
260};
261
262} // namespace Model
263} // namespace EBS
264} // namespace Aws
StartSnapshotRequest & WithVolumeSize(long long value)
StartSnapshotRequest & WithKmsKeyArn(KmsKeyArnT &&value)
StartSnapshotRequest & WithTags(TagsT &&value)
StartSnapshotRequest & WithParentSnapshotId(ParentSnapshotIdT &&value)
StartSnapshotRequest & WithEncrypted(bool value)
StartSnapshotRequest & WithClientToken(ClientTokenT &&value)
const Aws::String & GetDescription() const
virtual const char * GetServiceRequestName() const override
const Aws::String & GetClientToken() const
StartSnapshotRequest & WithTimeout(int value)
AWS_EBS_API Aws::String SerializePayload() const override
StartSnapshotRequest & AddTags(TagsT &&value)
const Aws::String & GetParentSnapshotId() const
StartSnapshotRequest & WithDescription(DescriptionT &&value)
AWS_EBS_API StartSnapshotRequest()=default
void SetParentSnapshotId(ParentSnapshotIdT &&value)
const Aws::Vector< Tag > & GetTags() const
static Aws::Utils::UUID PseudoRandomUUID()
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector