AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
RestoreObjectRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/s3/S3Request.h>
10#include <aws/s3/S3_EXPORTS.h>
11#include <aws/s3/model/ChecksumAlgorithm.h>
12#include <aws/s3/model/RequestPayer.h>
13#include <aws/s3/model/RestoreRequest.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Http {
19class URI;
20} // namespace Http
21namespace S3 {
22namespace Model {
23
27 public:
28 AWS_S3_API RestoreObjectRequest() = 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 "RestoreObject"; }
35
36 AWS_S3_API Aws::String SerializePayload() const override;
37
38 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
39
41
42 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
43 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
44 AWS_S3_API bool ChecksumAlgorithmIsSet() const override;
48 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
49
51
75 inline const Aws::String& GetBucket() const { return m_bucket; }
76 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
77 template <typename BucketT = Aws::String>
78 void SetBucket(BucketT&& value) {
79 m_bucketHasBeenSet = true;
80 m_bucket = std::forward<BucketT>(value);
81 }
82 template <typename BucketT = Aws::String>
83 RestoreObjectRequest& WithBucket(BucketT&& value) {
84 SetBucket(std::forward<BucketT>(value));
85 return *this;
86 }
88
90
93 inline const Aws::String& GetKey() const { return m_key; }
94 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
95 template <typename KeyT = Aws::String>
96 void SetKey(KeyT&& value) {
97 m_keyHasBeenSet = true;
98 m_key = std::forward<KeyT>(value);
99 }
100 template <typename KeyT = Aws::String>
102 SetKey(std::forward<KeyT>(value));
103 return *this;
104 }
106
108
111 inline const Aws::String& GetVersionId() const { return m_versionId; }
112 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
113 template <typename VersionIdT = Aws::String>
114 void SetVersionId(VersionIdT&& value) {
115 m_versionIdHasBeenSet = true;
116 m_versionId = std::forward<VersionIdT>(value);
117 }
118 template <typename VersionIdT = Aws::String>
119 RestoreObjectRequest& WithVersionId(VersionIdT&& value) {
120 SetVersionId(std::forward<VersionIdT>(value));
121 return *this;
122 }
124
126
127 inline const RestoreRequest& GetRestoreRequest() const { return m_restoreRequest; }
128 inline bool RestoreRequestHasBeenSet() const { return m_restoreRequestHasBeenSet; }
129 template <typename RestoreRequestT = RestoreRequest>
130 void SetRestoreRequest(RestoreRequestT&& value) {
131 m_restoreRequestHasBeenSet = true;
132 m_restoreRequest = std::forward<RestoreRequestT>(value);
133 }
134 template <typename RestoreRequestT = RestoreRequest>
135 RestoreObjectRequest& WithRestoreRequest(RestoreRequestT&& value) {
136 SetRestoreRequest(std::forward<RestoreRequestT>(value));
137 return *this;
138 }
140
142
143 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
144 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
145 inline void SetRequestPayer(RequestPayer value) {
146 m_requestPayerHasBeenSet = true;
147 m_requestPayer = value;
148 }
150 SetRequestPayer(value);
151 return *this;
152 }
154
156
168 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
169 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
171 m_checksumAlgorithmHasBeenSet = true;
172 m_checksumAlgorithm = value;
173 }
176 return *this;
177 }
179
181
186 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
187 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
188 template <typename ExpectedBucketOwnerT = Aws::String>
189 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
190 m_expectedBucketOwnerHasBeenSet = true;
191 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
192 }
193 template <typename ExpectedBucketOwnerT = Aws::String>
194 RestoreObjectRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
195 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
196 return *this;
197 }
199
201
202 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
203 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
204 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
205 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
206 m_customizedAccessLogTagHasBeenSet = true;
207 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
208 }
209 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
210 RestoreObjectRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
211 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
212 return *this;
213 }
214 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
215 RestoreObjectRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
216 m_customizedAccessLogTagHasBeenSet = true;
217 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
218 return *this;
219 }
221 private:
222 Aws::String m_bucket;
223
224 Aws::String m_key;
225
226 Aws::String m_versionId;
227
228 RestoreRequest m_restoreRequest;
229
230 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
231
233
234 Aws::String m_expectedBucketOwner;
235
236 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
237 bool m_bucketHasBeenSet = false;
238 bool m_keyHasBeenSet = false;
239 bool m_versionIdHasBeenSet = false;
240 bool m_restoreRequestHasBeenSet = false;
241 bool m_requestPayerHasBeenSet = false;
242 bool m_checksumAlgorithmHasBeenSet = false;
243 bool m_expectedBucketOwnerHasBeenSet = false;
244 bool m_customizedAccessLogTagHasBeenSet = false;
245};
246
247} // namespace Model
248} // namespace S3
249} // namespace Aws
void SetChecksumAlgorithm(ChecksumAlgorithm value)
RestoreObjectRequest & WithRequestPayer(RequestPayer value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
RestoreObjectRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
RestoreObjectRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
RestoreObjectRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
ChecksumAlgorithm GetChecksumAlgorithm() const
RestoreObjectRequest & WithRestoreRequest(RestoreRequestT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
RestoreObjectRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::String & GetBucket() const
AWS_S3_API RestoreObjectRequest()=default
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
const Aws::String & GetExpectedBucketOwner() const
const RestoreRequest & GetRestoreRequest() const
AWS_S3_API Aws::String SerializePayload() const override
const Aws::String & GetVersionId() const
void SetRestoreRequest(RestoreRequestT &&value)
RestoreObjectRequest & WithBucket(BucketT &&value)
RestoreObjectRequest & WithVersionId(VersionIdT &&value)
virtual const char * GetServiceRequestName() const override
AWS_S3_API bool ChecksumAlgorithmIsSet() const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
RestoreObjectRequest & WithKey(KeyT &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
Definition S3Request.h:19
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String