AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutBucketVersioningRequest.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-crt/S3CrtRequest.h>
10#include <aws/s3-crt/S3Crt_EXPORTS.h>
11#include <aws/s3-crt/model/ChecksumAlgorithm.h>
12#include <aws/s3-crt/model/VersioningConfiguration.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Http {
18class URI;
19} // namespace Http
20namespace S3Crt {
21namespace Model {
22
26 public:
27 AWS_S3CRT_API PutBucketVersioningRequest() = 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 "PutBucketVersioning"; }
34
35 AWS_S3CRT_API Aws::String SerializePayload() const override;
36
37 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
38
40
41 AWS_S3CRT_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
42 AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override;
43 AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override;
44 inline bool RequestChecksumRequired() const override { return true; };
45
49 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
50
52
55 inline const Aws::String& GetBucket() const { return m_bucket; }
56 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
57 template <typename BucketT = Aws::String>
58 void SetBucket(BucketT&& value) {
59 m_bucketHasBeenSet = true;
60 m_bucket = std::forward<BucketT>(value);
61 }
62 template <typename BucketT = Aws::String>
64 SetBucket(std::forward<BucketT>(value));
65 return *this;
66 }
68
70
78 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
79 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
80 template <typename ContentMD5T = Aws::String>
81 void SetContentMD5(ContentMD5T&& value) {
82 m_contentMD5HasBeenSet = true;
83 m_contentMD5 = std::forward<ContentMD5T>(value);
84 }
85 template <typename ContentMD5T = Aws::String>
87 SetContentMD5(std::forward<ContentMD5T>(value));
88 return *this;
89 }
91
93
105 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
106 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
108 m_checksumAlgorithmHasBeenSet = true;
109 m_checksumAlgorithm = value;
110 }
113 return *this;
114 }
116
118
129 inline const Aws::String& GetMFA() const { return m_mFA; }
130 inline bool MFAHasBeenSet() const { return m_mFAHasBeenSet; }
131 template <typename MFAT = Aws::String>
132 void SetMFA(MFAT&& value) {
133 m_mFAHasBeenSet = true;
134 m_mFA = std::forward<MFAT>(value);
135 }
136 template <typename MFAT = Aws::String>
138 SetMFA(std::forward<MFAT>(value));
139 return *this;
140 }
142
144
147 inline const VersioningConfiguration& GetVersioningConfiguration() const { return m_versioningConfiguration; }
148 inline bool VersioningConfigurationHasBeenSet() const { return m_versioningConfigurationHasBeenSet; }
149 template <typename VersioningConfigurationT = VersioningConfiguration>
150 void SetVersioningConfiguration(VersioningConfigurationT&& value) {
151 m_versioningConfigurationHasBeenSet = true;
152 m_versioningConfiguration = std::forward<VersioningConfigurationT>(value);
153 }
154 template <typename VersioningConfigurationT = VersioningConfiguration>
155 PutBucketVersioningRequest& WithVersioningConfiguration(VersioningConfigurationT&& value) {
156 SetVersioningConfiguration(std::forward<VersioningConfigurationT>(value));
157 return *this;
158 }
160
162
167 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
168 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
169 template <typename ExpectedBucketOwnerT = Aws::String>
170 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
171 m_expectedBucketOwnerHasBeenSet = true;
172 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
173 }
174 template <typename ExpectedBucketOwnerT = Aws::String>
176 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
177 return *this;
178 }
180
182
183 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
184 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
185 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
186 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
187 m_customizedAccessLogTagHasBeenSet = true;
188 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
189 }
190 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
191 PutBucketVersioningRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
192 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
193 return *this;
194 }
195 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
196 PutBucketVersioningRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
197 m_customizedAccessLogTagHasBeenSet = true;
198 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
199 return *this;
200 }
202 private:
203 Aws::String m_bucket;
204
205 Aws::String m_contentMD5;
206
208
209 Aws::String m_mFA;
210
211 VersioningConfiguration m_versioningConfiguration;
212
213 Aws::String m_expectedBucketOwner;
214
215 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
216 bool m_bucketHasBeenSet = false;
217 bool m_contentMD5HasBeenSet = false;
218 bool m_checksumAlgorithmHasBeenSet = false;
219 bool m_mFAHasBeenSet = false;
220 bool m_versioningConfigurationHasBeenSet = false;
221 bool m_expectedBucketOwnerHasBeenSet = false;
222 bool m_customizedAccessLogTagHasBeenSet = false;
223};
224
225} // namespace Model
226} // namespace S3Crt
227} // namespace Aws
AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketVersioningRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketVersioningRequest & WithMFA(MFAT &&value)
PutBucketVersioningRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
PutBucketVersioningRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
virtual const char * GetServiceRequestName() const override
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3CRT_API Aws::String SerializePayload() const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutBucketVersioningRequest & WithContentMD5(ContentMD5T &&value)
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override
void SetVersioningConfiguration(VersioningConfigurationT &&value)
AWS_S3CRT_API PutBucketVersioningRequest()=default
PutBucketVersioningRequest & WithVersioningConfiguration(VersioningConfigurationT &&value)
PutBucketVersioningRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
const VersioningConfiguration & GetVersioningConfiguration() const
PutBucketVersioningRequest & WithBucket(BucketT &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
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