AWS SDK for C++  1.9.40
AWS SDK for C++
PutBucketPolicyRequest.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Http
16 {
17  class URI;
18 } //namespace Http
19 namespace S3Crt
20 {
21 namespace Model
22 {
23 
27  {
28  public:
30 
31  // Service request name is the Operation name which will send this request out,
32  // each operation should has unique request name, so that we can get operation's name from this request.
33  // Note: this is not true for response, multiple operations may have the same response name,
34  // so we can not get operation's name from response.
35  inline virtual const char* GetServiceRequestName() const override { return "PutBucketPolicy"; }
36 
37  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
38 
40 
41  inline bool ShouldComputeContentMd5() const override { return true; }
42 
43 
47  inline const Aws::String& GetBucket() const{ return m_bucket; }
48 
52  inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
53 
57  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
58 
62  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
63 
67  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
68 
72  inline PutBucketPolicyRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
73 
77  inline PutBucketPolicyRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
78 
82  inline PutBucketPolicyRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
83 
84 
90  inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
91 
97  inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
98 
104  inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
105 
111  inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::move(value); }
112 
118  inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
119 
125  inline PutBucketPolicyRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
126 
132  inline PutBucketPolicyRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(std::move(value)); return *this;}
133 
139  inline PutBucketPolicyRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
140 
141 
146  inline bool GetConfirmRemoveSelfBucketAccess() const{ return m_confirmRemoveSelfBucketAccess; }
147 
152  inline bool ConfirmRemoveSelfBucketAccessHasBeenSet() const { return m_confirmRemoveSelfBucketAccessHasBeenSet; }
153 
158  inline void SetConfirmRemoveSelfBucketAccess(bool value) { m_confirmRemoveSelfBucketAccessHasBeenSet = true; m_confirmRemoveSelfBucketAccess = value; }
159 
164  inline PutBucketPolicyRequest& WithConfirmRemoveSelfBucketAccess(bool value) { SetConfirmRemoveSelfBucketAccess(value); return *this;}
165 
166 
172  inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
173 
179  inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
180 
186  inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
187 
193  inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
194 
200  inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
201 
207  inline PutBucketPolicyRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;}
208 
214  inline PutBucketPolicyRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
215 
221  inline PutBucketPolicyRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
222 
223 
224 
225  inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
226 
227 
228  inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
229 
230 
231  inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
232 
233 
234  inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
235 
236 
237  inline PutBucketPolicyRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;}
238 
239 
240  inline PutBucketPolicyRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;}
241 
242 
243  inline PutBucketPolicyRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
244 
245 
246  inline PutBucketPolicyRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
247 
248 
249  inline PutBucketPolicyRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
250 
251 
252  inline PutBucketPolicyRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
253 
254 
255  inline PutBucketPolicyRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
256 
257 
258  inline PutBucketPolicyRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
259 
260 
261  inline PutBucketPolicyRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
262 
263  private:
264 
265  Aws::String m_bucket;
266  bool m_bucketHasBeenSet;
267 
268  Aws::String m_contentMD5;
269  bool m_contentMD5HasBeenSet;
270 
271  bool m_confirmRemoveSelfBucketAccess;
272  bool m_confirmRemoveSelfBucketAccessHasBeenSet;
273 
274 
275  Aws::String m_expectedBucketOwner;
276  bool m_expectedBucketOwnerHasBeenSet;
277 
278  Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
279  bool m_customizedAccessLogTagHasBeenSet;
280  };
281 
282 } // namespace Model
283 } // namespace S3Crt
284 } // namespace Aws
Aws::S3Crt::Model::PutBucketPolicyRequest::AddCustomizedAccessLogTag
PutBucketPolicyRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
Definition: PutBucketPolicyRequest.h:261
Aws::S3Crt::Model::PutBucketPolicyRequest::AddCustomizedAccessLogTag
PutBucketPolicyRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
Definition: PutBucketPolicyRequest.h:258
Aws::Http::URI
Definition: URI.h:32
Aws::S3Crt::Model::PutBucketPolicyRequest::SetBucket
void SetBucket(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:57
Aws::S3Crt::Model::PutBucketPolicyRequest::WithContentMD5
PutBucketPolicyRequest & WithContentMD5(const char *value)
Definition: PutBucketPolicyRequest.h:139
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::S3Crt::Model::PutBucketPolicyRequest::WithExpectedBucketOwner
PutBucketPolicyRequest & WithExpectedBucketOwner(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:214
Aws::S3Crt::Model::PutBucketPolicyRequest::SetExpectedBucketOwner
void SetExpectedBucketOwner(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:193
Aws::S3Crt::Model::PutBucketPolicyRequest::AddQueryStringParameters
void AddQueryStringParameters(Aws::Http::URI &uri) const override
Aws::S3Crt::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:72
Aws::S3Crt::Model::PutBucketPolicyRequest::GetCustomizedAccessLogTag
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
Definition: PutBucketPolicyRequest.h:225
Aws::S3Crt::Model::PutBucketPolicyRequest::AddCustomizedAccessLogTag
PutBucketPolicyRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
Definition: PutBucketPolicyRequest.h:252
Aws::S3Crt::Model::PutBucketPolicyRequest::WithContentMD5
PutBucketPolicyRequest & WithContentMD5(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:132
Aws::S3Crt::Model::PutBucketPolicyRequest::AddCustomizedAccessLogTag
PutBucketPolicyRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
Definition: PutBucketPolicyRequest.h:255
Aws::S3Crt::Model::PutBucketPolicyRequest::SetExpectedBucketOwner
void SetExpectedBucketOwner(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:186
Aws::S3Crt::Model::PutBucketPolicyRequest::AddCustomizedAccessLogTag
PutBucketPolicyRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
Definition: PutBucketPolicyRequest.h:246
Aws::S3Crt::Model::PutBucketPolicyRequest::ContentMD5HasBeenSet
bool ContentMD5HasBeenSet() const
Definition: PutBucketPolicyRequest.h:97
Aws::S3Crt::Model::PutBucketPolicyRequest::ShouldComputeContentMd5
bool ShouldComputeContentMd5() const override
Definition: PutBucketPolicyRequest.h:41
Aws::S3Crt::Model::PutBucketPolicyRequest::SetContentMD5
void SetContentMD5(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:104
Aws::S3Crt::Model::PutBucketPolicyRequest::GetBucket
const Aws::String & GetBucket() const
Definition: PutBucketPolicyRequest.h:47
Aws::S3Crt::Model::PutBucketPolicyRequest::SetContentMD5
void SetContentMD5(const char *value)
Definition: PutBucketPolicyRequest.h:118
Aws::S3Crt::Model::PutBucketPolicyRequest::WithContentMD5
PutBucketPolicyRequest & WithContentMD5(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:125
Aws::S3Crt::Model::PutBucketPolicyRequest::BucketHasBeenSet
bool BucketHasBeenSet() const
Definition: PutBucketPolicyRequest.h:52
Aws::S3Crt::Model::PutBucketPolicyRequest::GetContentMD5
const Aws::String & GetContentMD5() const
Definition: PutBucketPolicyRequest.h:90
S3CrtRequest.h
Aws::S3Crt::Model::PutBucketPolicyRequest::SetCustomizedAccessLogTag
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
Definition: PutBucketPolicyRequest.h:234
Aws::S3Crt::Model::PutBucketPolicyRequest::GetConfirmRemoveSelfBucketAccess
bool GetConfirmRemoveSelfBucketAccess() const
Definition: PutBucketPolicyRequest.h:146
Aws::S3Crt::Model::PutBucketPolicyRequest::WithExpectedBucketOwner
PutBucketPolicyRequest & WithExpectedBucketOwner(const char *value)
Definition: PutBucketPolicyRequest.h:221
Aws::S3Crt::Model::PutBucketPolicyRequest::PutBucketPolicyRequest
PutBucketPolicyRequest()
AWS_S3CRT_API
#define AWS_S3CRT_API
Definition: S3Crt_EXPORTS.h:28
Aws::S3Crt::Model::PutBucketPolicyRequest::CustomizedAccessLogTagHasBeenSet
bool CustomizedAccessLogTagHasBeenSet() const
Definition: PutBucketPolicyRequest.h:228
Aws::S3Crt::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:77
AWSString.h
Aws::S3Crt::Model::PutBucketPolicyRequest::WithCustomizedAccessLogTag
PutBucketPolicyRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
Definition: PutBucketPolicyRequest.h:240
Aws::S3Crt::Model::PutBucketPolicyRequest::SetBucket
void SetBucket(const char *value)
Definition: PutBucketPolicyRequest.h:67
Aws::S3Crt::Model::PutBucketPolicyRequest::SetContentMD5
void SetContentMD5(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:111
Aws::S3Crt::Model::PutBucketPolicyRequest::ConfirmRemoveSelfBucketAccessHasBeenSet
bool ConfirmRemoveSelfBucketAccessHasBeenSet() const
Definition: PutBucketPolicyRequest.h:152
Aws::S3Crt::Model::PutBucketPolicyRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::S3Crt::Model::PutBucketPolicyRequest::AddCustomizedAccessLogTag
PutBucketPolicyRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
Definition: PutBucketPolicyRequest.h:243
Aws::AmazonStreamingWebServiceRequest
Definition: AmazonStreamingWebServiceRequest.h:26
Aws::S3Crt::Model::PutBucketPolicyRequest::SetCustomizedAccessLogTag
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
Definition: PutBucketPolicyRequest.h:231
Aws::S3Crt::Model::PutBucketPolicyRequest
Definition: PutBucketPolicyRequest.h:27
Aws
Definition: AccessManagementClient.h:15
Aws::S3Crt::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(const char *value)
Definition: PutBucketPolicyRequest.h:82
Aws::S3Crt::Model::PutBucketPolicyRequest::WithConfirmRemoveSelfBucketAccess
PutBucketPolicyRequest & WithConfirmRemoveSelfBucketAccess(bool value)
Definition: PutBucketPolicyRequest.h:164
Aws::S3Crt::Model::PutBucketPolicyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: PutBucketPolicyRequest.h:35
Aws::S3Crt::Model::PutBucketPolicyRequest::AddCustomizedAccessLogTag
PutBucketPolicyRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
Definition: PutBucketPolicyRequest.h:249
Aws::S3Crt::Model::PutBucketPolicyRequest::GetExpectedBucketOwner
const Aws::String & GetExpectedBucketOwner() const
Definition: PutBucketPolicyRequest.h:172
Aws::S3Crt::Model::PutBucketPolicyRequest::ExpectedBucketOwnerHasBeenSet
bool ExpectedBucketOwnerHasBeenSet() const
Definition: PutBucketPolicyRequest.h:179
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::S3Crt::Model::PutBucketPolicyRequest::WithCustomizedAccessLogTag
PutBucketPolicyRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
Definition: PutBucketPolicyRequest.h:237
Aws::S3Crt::Model::PutBucketPolicyRequest::SetExpectedBucketOwner
void SetExpectedBucketOwner(const char *value)
Definition: PutBucketPolicyRequest.h:200
Aws::S3Crt::Model::PutBucketPolicyRequest::SetBucket
void SetBucket(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:62
Aws::S3Crt::Model::PutBucketPolicyRequest::WithExpectedBucketOwner
PutBucketPolicyRequest & WithExpectedBucketOwner(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:207
Aws::S3Crt::Model::PutBucketPolicyRequest::SetConfirmRemoveSelfBucketAccess
void SetConfirmRemoveSelfBucketAccess(bool value)
Definition: PutBucketPolicyRequest.h:158
AWSMap.h
S3Crt_EXPORTS.h
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19