AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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/S3Request.h>
10#include <aws/s3/S3_EXPORTS.h>
11#include <aws/s3/model/ChecksumAlgorithm.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Http {
17class URI;
18} // namespace Http
19namespace S3 {
20namespace Model {
21
25 public:
26 AWS_S3_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_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
35
37
38 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
39 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
40 inline bool RequestChecksumRequired() const override { return true; };
41
42 AWS_S3_API bool IsStreaming() const override { return false; }
43
47 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
48
50
64 inline const Aws::String& GetBucket() const { return m_bucket; }
65 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
66 template <typename BucketT = Aws::String>
67 void SetBucket(BucketT&& value) {
68 m_bucketHasBeenSet = true;
69 m_bucket = std::forward<BucketT>(value);
70 }
71 template <typename BucketT = Aws::String>
73 SetBucket(std::forward<BucketT>(value));
74 return *this;
75 }
77
79
85 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
86 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
87 template <typename ContentMD5T = Aws::String>
88 void SetContentMD5(ContentMD5T&& value) {
89 m_contentMD5HasBeenSet = true;
90 m_contentMD5 = std::forward<ContentMD5T>(value);
91 }
92 template <typename ContentMD5T = Aws::String>
93 PutBucketPolicyRequest& WithContentMD5(ContentMD5T&& value) {
94 SetContentMD5(std::forward<ContentMD5T>(value));
95 return *this;
96 }
98
100
122 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
123 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
125 m_checksumAlgorithmHasBeenSet = true;
126 m_checksumAlgorithm = value;
127 }
130 return *this;
131 }
133
135
140 inline bool GetConfirmRemoveSelfBucketAccess() const { return m_confirmRemoveSelfBucketAccess; }
141 inline bool ConfirmRemoveSelfBucketAccessHasBeenSet() const { return m_confirmRemoveSelfBucketAccessHasBeenSet; }
142 inline void SetConfirmRemoveSelfBucketAccess(bool value) {
143 m_confirmRemoveSelfBucketAccessHasBeenSet = true;
144 m_confirmRemoveSelfBucketAccess = value;
145 }
148 return *this;
149 }
151
153
161 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
162 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
163 template <typename ExpectedBucketOwnerT = Aws::String>
164 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
165 m_expectedBucketOwnerHasBeenSet = true;
166 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
167 }
168 template <typename ExpectedBucketOwnerT = Aws::String>
169 PutBucketPolicyRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
170 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
171 return *this;
172 }
174
176
177 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
178 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
179 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
180 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
181 m_customizedAccessLogTagHasBeenSet = true;
182 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
183 }
184 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
185 PutBucketPolicyRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
186 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
187 return *this;
188 }
189 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
190 PutBucketPolicyRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
191 m_customizedAccessLogTagHasBeenSet = true;
192 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
193 return *this;
194 }
196 private:
197 Aws::String m_bucket;
198
199 Aws::String m_contentMD5;
200
202
203 bool m_confirmRemoveSelfBucketAccess{false};
204
205 Aws::String m_expectedBucketOwner;
206
207 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
208 bool m_bucketHasBeenSet = false;
209 bool m_contentMD5HasBeenSet = false;
210 bool m_checksumAlgorithmHasBeenSet = false;
211 bool m_confirmRemoveSelfBucketAccessHasBeenSet = false;
212 bool m_expectedBucketOwnerHasBeenSet = false;
213 bool m_customizedAccessLogTagHasBeenSet = false;
214};
215
216} // namespace Model
217} // namespace S3
218} // namespace Aws
Aws::Vector< Aws::Endpoint::EndpointParameter > EndpointParameters
PutBucketPolicyRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketPolicyRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
PutBucketPolicyRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutBucketPolicyRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
virtual const char * GetServiceRequestName() const override
AWS_S3_API bool IsStreaming() const override
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutBucketPolicyRequest & WithConfirmRemoveSelfBucketAccess(bool value)
PutBucketPolicyRequest & WithBucket(BucketT &&value)
AWS_S3_API PutBucketPolicyRequest()=default
const Aws::String & GetExpectedBucketOwner() const
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetChecksumAlgorithm(ChecksumAlgorithm value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketPolicyRequest & WithContentMD5(ContentMD5T &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
AWS_S3_API EndpointParameters GetEndpointContextParams() 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