AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutBucketPolicyRequest.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
13#include <utility>
14
15namespace Aws {
16namespace Http {
17class URI;
18} // namespace Http
19namespace S3Crt {
20namespace Model {
21
25 public:
26 AWS_S3CRT_API PutBucketPolicyRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "PutBucketPolicy"; }
33
34 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
35
37
38 AWS_S3CRT_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
39 AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override;
40 AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override;
41 inline bool RequestChecksumRequired() const override { return true; };
42
43 AWS_S3CRT_API bool IsStreaming() const override { return false; }
44
48 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
49
51
65 inline const Aws::String& GetBucket() const { return m_bucket; }
66 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
67 template <typename BucketT = Aws::String>
68 void SetBucket(BucketT&& value) {
69 m_bucketHasBeenSet = true;
70 m_bucket = std::forward<BucketT>(value);
71 }
72 template <typename BucketT = Aws::String>
74 SetBucket(std::forward<BucketT>(value));
75 return *this;
76 }
78
80
86 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
87 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
88 template <typename ContentMD5T = Aws::String>
89 void SetContentMD5(ContentMD5T&& value) {
90 m_contentMD5HasBeenSet = true;
91 m_contentMD5 = std::forward<ContentMD5T>(value);
92 }
93 template <typename ContentMD5T = Aws::String>
94 PutBucketPolicyRequest& WithContentMD5(ContentMD5T&& value) {
95 SetContentMD5(std::forward<ContentMD5T>(value));
96 return *this;
97 }
99
101
125 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
126 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
128 m_checksumAlgorithmHasBeenSet = true;
129 m_checksumAlgorithm = value;
130 }
133 return *this;
134 }
136
138
143 inline bool GetConfirmRemoveSelfBucketAccess() const { return m_confirmRemoveSelfBucketAccess; }
144 inline bool ConfirmRemoveSelfBucketAccessHasBeenSet() const { return m_confirmRemoveSelfBucketAccessHasBeenSet; }
145 inline void SetConfirmRemoveSelfBucketAccess(bool value) {
146 m_confirmRemoveSelfBucketAccessHasBeenSet = true;
147 m_confirmRemoveSelfBucketAccess = value;
148 }
151 return *this;
152 }
154
156
164 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
165 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
166 template <typename ExpectedBucketOwnerT = Aws::String>
167 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
168 m_expectedBucketOwnerHasBeenSet = true;
169 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
170 }
171 template <typename ExpectedBucketOwnerT = Aws::String>
172 PutBucketPolicyRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
173 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
174 return *this;
175 }
177
179
180 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
181 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
182 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
183 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
184 m_customizedAccessLogTagHasBeenSet = true;
185 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
186 }
187 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
188 PutBucketPolicyRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
189 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
190 return *this;
191 }
192 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
193 PutBucketPolicyRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
194 m_customizedAccessLogTagHasBeenSet = true;
195 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
196 return *this;
197 }
199 private:
200 Aws::String m_bucket;
201
202 Aws::String m_contentMD5;
203
205
206 bool m_confirmRemoveSelfBucketAccess{false};
207
208 Aws::String m_expectedBucketOwner;
209
210 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
211 bool m_bucketHasBeenSet = false;
212 bool m_contentMD5HasBeenSet = false;
213 bool m_checksumAlgorithmHasBeenSet = false;
214 bool m_confirmRemoveSelfBucketAccessHasBeenSet = false;
215 bool m_expectedBucketOwnerHasBeenSet = false;
216 bool m_customizedAccessLogTagHasBeenSet = false;
217};
218
219} // namespace Model
220} // namespace S3Crt
221} // namespace Aws
Aws::Vector< Aws::Endpoint::EndpointParameter > EndpointParameters
PutBucketPolicyRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
PutBucketPolicyRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutBucketPolicyRequest & WithContentMD5(ContentMD5T &&value)
void SetChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutBucketPolicyRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
PutBucketPolicyRequest & WithConfirmRemoveSelfBucketAccess(bool value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutBucketPolicyRequest & WithBucket(BucketT &&value)
AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override
virtual const char * GetServiceRequestName() const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketPolicyRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
AWS_S3CRT_API bool IsStreaming() const override
AWS_S3CRT_API PutBucketPolicyRequest()=default
AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override
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