AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutBucketEncryptionRequest.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/ServerSideEncryptionConfiguration.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Http {
18class URI;
19} // namespace Http
20namespace S3 {
21namespace Model {
22
26 public:
27 AWS_S3_API PutBucketEncryptionRequest() = 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 "PutBucketEncryption"; }
34
35 AWS_S3_API Aws::String SerializePayload() const override;
36
37 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
38
40
41 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
42 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
43 AWS_S3_API bool ChecksumAlgorithmIsSet() const override;
44 inline bool RequestChecksumRequired() const override { return true; };
45
49 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
50
52
67 inline const Aws::String& GetBucket() const { return m_bucket; }
68 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
69 template <typename BucketT = Aws::String>
70 void SetBucket(BucketT&& value) {
71 m_bucketHasBeenSet = true;
72 m_bucket = std::forward<BucketT>(value);
73 }
74 template <typename BucketT = Aws::String>
76 SetBucket(std::forward<BucketT>(value));
77 return *this;
78 }
80
82
89 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
90 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
91 template <typename ContentMD5T = Aws::String>
92 void SetContentMD5(ContentMD5T&& value) {
93 m_contentMD5HasBeenSet = true;
94 m_contentMD5 = std::forward<ContentMD5T>(value);
95 }
96 template <typename ContentMD5T = Aws::String>
98 SetContentMD5(std::forward<ContentMD5T>(value));
99 return *this;
100 }
102
104
118 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
119 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
121 m_checksumAlgorithmHasBeenSet = true;
122 m_checksumAlgorithm = value;
123 }
126 return *this;
127 }
129
131
133 return m_serverSideEncryptionConfiguration;
134 }
135 inline bool ServerSideEncryptionConfigurationHasBeenSet() const { return m_serverSideEncryptionConfigurationHasBeenSet; }
136 template <typename ServerSideEncryptionConfigurationT = ServerSideEncryptionConfiguration>
137 void SetServerSideEncryptionConfiguration(ServerSideEncryptionConfigurationT&& value) {
138 m_serverSideEncryptionConfigurationHasBeenSet = true;
139 m_serverSideEncryptionConfiguration = std::forward<ServerSideEncryptionConfigurationT>(value);
140 }
141 template <typename ServerSideEncryptionConfigurationT = ServerSideEncryptionConfiguration>
142 PutBucketEncryptionRequest& WithServerSideEncryptionConfiguration(ServerSideEncryptionConfigurationT&& value) {
143 SetServerSideEncryptionConfiguration(std::forward<ServerSideEncryptionConfigurationT>(value));
144 return *this;
145 }
147
149
157 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
158 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
159 template <typename ExpectedBucketOwnerT = Aws::String>
160 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
161 m_expectedBucketOwnerHasBeenSet = true;
162 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
163 }
164 template <typename ExpectedBucketOwnerT = Aws::String>
166 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
167 return *this;
168 }
170
172
173 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
174 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
175 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
176 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
177 m_customizedAccessLogTagHasBeenSet = true;
178 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
179 }
180 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
181 PutBucketEncryptionRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
182 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
183 return *this;
184 }
185 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
186 PutBucketEncryptionRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
187 m_customizedAccessLogTagHasBeenSet = true;
188 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
189 return *this;
190 }
192 private:
193 Aws::String m_bucket;
194
195 Aws::String m_contentMD5;
196
198
199 ServerSideEncryptionConfiguration m_serverSideEncryptionConfiguration;
200
201 Aws::String m_expectedBucketOwner;
202
203 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
204 bool m_bucketHasBeenSet = false;
205 bool m_contentMD5HasBeenSet = false;
206 bool m_checksumAlgorithmHasBeenSet = false;
207 bool m_serverSideEncryptionConfigurationHasBeenSet = false;
208 bool m_expectedBucketOwnerHasBeenSet = false;
209 bool m_customizedAccessLogTagHasBeenSet = false;
210};
211
212} // namespace Model
213} // namespace S3
214} // namespace Aws
PutBucketEncryptionRequest & WithContentMD5(ContentMD5T &&value)
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutBucketEncryptionRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketEncryptionRequest & WithBucket(BucketT &&value)
virtual const char * GetServiceRequestName() const override
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API bool ChecksumAlgorithmIsSet() const override
PutBucketEncryptionRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
PutBucketEncryptionRequest & WithServerSideEncryptionConfiguration(ServerSideEncryptionConfigurationT &&value)
PutBucketEncryptionRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
AWS_S3_API Aws::String SerializePayload() const override
PutBucketEncryptionRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
AWS_S3_API PutBucketEncryptionRequest()=default
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
const ServerSideEncryptionConfiguration & GetServerSideEncryptionConfiguration() const
void SetServerSideEncryptionConfiguration(ServerSideEncryptionConfigurationT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
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