AWS SDK for C++

AWS SDK for C++ Version 1.11.695

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 inline bool RequestChecksumRequired() const override { return true; };
44
48 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
49
51
66 inline const Aws::String& GetBucket() const { return m_bucket; }
67 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
68 template <typename BucketT = Aws::String>
69 void SetBucket(BucketT&& value) {
70 m_bucketHasBeenSet = true;
71 m_bucket = std::forward<BucketT>(value);
72 }
73 template <typename BucketT = Aws::String>
75 SetBucket(std::forward<BucketT>(value));
76 return *this;
77 }
79
81
88 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
89 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
90 template <typename ContentMD5T = Aws::String>
91 void SetContentMD5(ContentMD5T&& value) {
92 m_contentMD5HasBeenSet = true;
93 m_contentMD5 = std::forward<ContentMD5T>(value);
94 }
95 template <typename ContentMD5T = Aws::String>
97 SetContentMD5(std::forward<ContentMD5T>(value));
98 return *this;
99 }
101
103
117 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
118 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
120 m_checksumAlgorithmHasBeenSet = true;
121 m_checksumAlgorithm = value;
122 }
125 return *this;
126 }
128
130
132 return m_serverSideEncryptionConfiguration;
133 }
134 inline bool ServerSideEncryptionConfigurationHasBeenSet() const { return m_serverSideEncryptionConfigurationHasBeenSet; }
135 template <typename ServerSideEncryptionConfigurationT = ServerSideEncryptionConfiguration>
136 void SetServerSideEncryptionConfiguration(ServerSideEncryptionConfigurationT&& value) {
137 m_serverSideEncryptionConfigurationHasBeenSet = true;
138 m_serverSideEncryptionConfiguration = std::forward<ServerSideEncryptionConfigurationT>(value);
139 }
140 template <typename ServerSideEncryptionConfigurationT = ServerSideEncryptionConfiguration>
141 PutBucketEncryptionRequest& WithServerSideEncryptionConfiguration(ServerSideEncryptionConfigurationT&& value) {
142 SetServerSideEncryptionConfiguration(std::forward<ServerSideEncryptionConfigurationT>(value));
143 return *this;
144 }
146
148
156 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
157 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
158 template <typename ExpectedBucketOwnerT = Aws::String>
159 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
160 m_expectedBucketOwnerHasBeenSet = true;
161 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
162 }
163 template <typename ExpectedBucketOwnerT = Aws::String>
165 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
166 return *this;
167 }
169
171
172 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
173 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
174 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
175 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
176 m_customizedAccessLogTagHasBeenSet = true;
177 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
178 }
179 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
180 PutBucketEncryptionRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
181 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
182 return *this;
183 }
184 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
185 PutBucketEncryptionRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
186 m_customizedAccessLogTagHasBeenSet = true;
187 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
188 return *this;
189 }
191 private:
192 Aws::String m_bucket;
193 bool m_bucketHasBeenSet = false;
194
195 Aws::String m_contentMD5;
196 bool m_contentMD5HasBeenSet = false;
197
199 bool m_checksumAlgorithmHasBeenSet = false;
200
201 ServerSideEncryptionConfiguration m_serverSideEncryptionConfiguration;
202 bool m_serverSideEncryptionConfigurationHasBeenSet = false;
203
204 Aws::String m_expectedBucketOwner;
205 bool m_expectedBucketOwnerHasBeenSet = false;
206
207 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
208 bool m_customizedAccessLogTagHasBeenSet = false;
209};
210
211} // namespace Model
212} // namespace S3
213} // 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)
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