AWS SDK for C++

AWS SDK for C++ Version 1.11.695

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 inline bool RequestChecksumRequired() const override { return true; };
44
48 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
49
51
54 inline const Aws::String& GetBucket() const { return m_bucket; }
55 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
56 template <typename BucketT = Aws::String>
57 void SetBucket(BucketT&& value) {
58 m_bucketHasBeenSet = true;
59 m_bucket = std::forward<BucketT>(value);
60 }
61 template <typename BucketT = Aws::String>
63 SetBucket(std::forward<BucketT>(value));
64 return *this;
65 }
67
69
77 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
78 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
79 template <typename ContentMD5T = Aws::String>
80 void SetContentMD5(ContentMD5T&& value) {
81 m_contentMD5HasBeenSet = true;
82 m_contentMD5 = std::forward<ContentMD5T>(value);
83 }
84 template <typename ContentMD5T = Aws::String>
86 SetContentMD5(std::forward<ContentMD5T>(value));
87 return *this;
88 }
90
92
104 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
105 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
107 m_checksumAlgorithmHasBeenSet = true;
108 m_checksumAlgorithm = value;
109 }
112 return *this;
113 }
115
117
128 inline const Aws::String& GetMFA() const { return m_mFA; }
129 inline bool MFAHasBeenSet() const { return m_mFAHasBeenSet; }
130 template <typename MFAT = Aws::String>
131 void SetMFA(MFAT&& value) {
132 m_mFAHasBeenSet = true;
133 m_mFA = std::forward<MFAT>(value);
134 }
135 template <typename MFAT = Aws::String>
137 SetMFA(std::forward<MFAT>(value));
138 return *this;
139 }
141
143
146 inline const VersioningConfiguration& GetVersioningConfiguration() const { return m_versioningConfiguration; }
147 inline bool VersioningConfigurationHasBeenSet() const { return m_versioningConfigurationHasBeenSet; }
148 template <typename VersioningConfigurationT = VersioningConfiguration>
149 void SetVersioningConfiguration(VersioningConfigurationT&& value) {
150 m_versioningConfigurationHasBeenSet = true;
151 m_versioningConfiguration = std::forward<VersioningConfigurationT>(value);
152 }
153 template <typename VersioningConfigurationT = VersioningConfiguration>
154 PutBucketVersioningRequest& WithVersioningConfiguration(VersioningConfigurationT&& value) {
155 SetVersioningConfiguration(std::forward<VersioningConfigurationT>(value));
156 return *this;
157 }
159
161
166 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
167 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
168 template <typename ExpectedBucketOwnerT = Aws::String>
169 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
170 m_expectedBucketOwnerHasBeenSet = true;
171 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
172 }
173 template <typename ExpectedBucketOwnerT = Aws::String>
175 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
176 return *this;
177 }
179
181
182 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
183 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
184 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
185 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
186 m_customizedAccessLogTagHasBeenSet = true;
187 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
188 }
189 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
190 PutBucketVersioningRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
191 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
192 return *this;
193 }
194 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
195 PutBucketVersioningRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
196 m_customizedAccessLogTagHasBeenSet = true;
197 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
198 return *this;
199 }
201 private:
202 Aws::String m_bucket;
203 bool m_bucketHasBeenSet = false;
204
205 Aws::String m_contentMD5;
206 bool m_contentMD5HasBeenSet = false;
207
209 bool m_checksumAlgorithmHasBeenSet = false;
210
211 Aws::String m_mFA;
212 bool m_mFAHasBeenSet = false;
213
214 VersioningConfiguration m_versioningConfiguration;
215 bool m_versioningConfigurationHasBeenSet = false;
216
217 Aws::String m_expectedBucketOwner;
218 bool m_expectedBucketOwnerHasBeenSet = false;
219
220 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
221 bool m_customizedAccessLogTagHasBeenSet = false;
222};
223
224} // namespace Model
225} // namespace S3Crt
226} // 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
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