AWS SDK for C++  1.8.127
AWS SDK for C++
PutBucketPolicyRequest.h
Go to the documentation of this file.
1 
6 #pragma once
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace S3Control
15 {
16 namespace Model
17 {
18 
22  {
23  public:
25 
26  // Service request name is the Operation name which will send this request out,
27  // each operation should has unique request name, so that we can get operation's name from this request.
28  // Note: this is not true for response, multiple operations may have the same response name,
29  // so we can not get operation's name from response.
30  inline virtual const char* GetServiceRequestName() const override { return "PutBucketPolicy"; }
31 
32  Aws::String SerializePayload() const override;
33 
35 
36  inline bool ShouldComputeContentMd5() const override { return true; }
37 
38 
42  inline const Aws::String& GetAccountId() const{ return m_accountId; }
43 
47  inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
48 
52  inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
53 
57  inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
58 
62  inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
63 
67  inline PutBucketPolicyRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
68 
72  inline PutBucketPolicyRequest& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
73 
77  inline PutBucketPolicyRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;}
78 
79 
92  inline const Aws::String& GetBucket() const{ return m_bucket; }
93 
106  inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
107 
120  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
121 
134  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
135 
148  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
149 
162  inline PutBucketPolicyRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
163 
176  inline PutBucketPolicyRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
177 
190  inline PutBucketPolicyRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
191 
192 
198  inline bool GetConfirmRemoveSelfBucketAccess() const{ return m_confirmRemoveSelfBucketAccess; }
199 
205  inline bool ConfirmRemoveSelfBucketAccessHasBeenSet() const { return m_confirmRemoveSelfBucketAccessHasBeenSet; }
206 
212  inline void SetConfirmRemoveSelfBucketAccess(bool value) { m_confirmRemoveSelfBucketAccessHasBeenSet = true; m_confirmRemoveSelfBucketAccess = value; }
213 
219  inline PutBucketPolicyRequest& WithConfirmRemoveSelfBucketAccess(bool value) { SetConfirmRemoveSelfBucketAccess(value); return *this;}
220 
221 
225  inline const Aws::String& GetPolicy() const{ return m_policy; }
226 
230  inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
231 
235  inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
236 
240  inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); }
241 
245  inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
246 
250  inline PutBucketPolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
251 
255  inline PutBucketPolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;}
256 
260  inline PutBucketPolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
261 
262  private:
263 
264  Aws::String m_accountId;
265  bool m_accountIdHasBeenSet;
266 
267  Aws::String m_bucket;
268  bool m_bucketHasBeenSet;
269 
270  bool m_confirmRemoveSelfBucketAccess;
271  bool m_confirmRemoveSelfBucketAccessHasBeenSet;
272 
273  Aws::String m_policy;
274  bool m_policyHasBeenSet;
275  };
276 
277 } // namespace Model
278 } // namespace S3Control
279 } // namespace Aws
Aws::S3Control::Model::PutBucketPolicyRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::S3Control::S3ControlRequest
Definition: S3ControlRequest.h:17
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::S3Control::Model::PutBucketPolicyRequest::PutBucketPolicyRequest
PutBucketPolicyRequest()
Aws::S3Control::Model::PutBucketPolicyRequest::WithAccountId
PutBucketPolicyRequest & WithAccountId(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:67
Aws::S3Control::Model::PutBucketPolicyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: PutBucketPolicyRequest.h:30
Aws::S3Control::Model::PutBucketPolicyRequest::ConfirmRemoveSelfBucketAccessHasBeenSet
bool ConfirmRemoveSelfBucketAccessHasBeenSet() const
Definition: PutBucketPolicyRequest.h:205
Aws::S3Control::Model::PutBucketPolicyRequest::GetConfirmRemoveSelfBucketAccess
bool GetConfirmRemoveSelfBucketAccess() const
Definition: PutBucketPolicyRequest.h:198
Aws::S3Control::Model::PutBucketPolicyRequest::GetBucket
const Aws::String & GetBucket() const
Definition: PutBucketPolicyRequest.h:92
Aws::S3Control::Model::PutBucketPolicyRequest::SetAccountId
void SetAccountId(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:57
Aws::S3Control::Model::PutBucketPolicyRequest::SetPolicy
void SetPolicy(const char *value)
Definition: PutBucketPolicyRequest.h:245
Aws::S3Control::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(const char *value)
Definition: PutBucketPolicyRequest.h:190
S3Control_EXPORTS.h
Aws::S3Control::Model::PutBucketPolicyRequest::SetAccountId
void SetAccountId(const char *value)
Definition: PutBucketPolicyRequest.h:62
Aws::S3Control::Model::PutBucketPolicyRequest::SetPolicy
void SetPolicy(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:240
Aws::S3Control::Model::PutBucketPolicyRequest::WithAccountId
PutBucketPolicyRequest & WithAccountId(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:72
Aws::S3Control::Model::PutBucketPolicyRequest::SetBucket
void SetBucket(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:120
Aws::S3Control::Model::PutBucketPolicyRequest::SetAccountId
void SetAccountId(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:52
AWS_S3CONTROL_API
#define AWS_S3CONTROL_API
Definition: S3Control_EXPORTS.h:28
AWSString.h
Aws::S3Control::Model::PutBucketPolicyRequest::WithAccountId
PutBucketPolicyRequest & WithAccountId(const char *value)
Definition: PutBucketPolicyRequest.h:77
Aws::S3Control::Model::PutBucketPolicyRequest::WithPolicy
PutBucketPolicyRequest & WithPolicy(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:255
Aws::S3Control::Model::PutBucketPolicyRequest::WithPolicy
PutBucketPolicyRequest & WithPolicy(const char *value)
Definition: PutBucketPolicyRequest.h:260
Aws::S3Control::Model::PutBucketPolicyRequest::GetAccountId
const Aws::String & GetAccountId() const
Definition: PutBucketPolicyRequest.h:42
Aws::S3Control::Model::PutBucketPolicyRequest::ShouldComputeContentMd5
bool ShouldComputeContentMd5() const override
Definition: PutBucketPolicyRequest.h:36
Aws::S3Control::Model::PutBucketPolicyRequest::PolicyHasBeenSet
bool PolicyHasBeenSet() const
Definition: PutBucketPolicyRequest.h:230
Aws::S3Control::Model::PutBucketPolicyRequest::SetBucket
void SetBucket(const char *value)
Definition: PutBucketPolicyRequest.h:148
Aws
Definition: AccessManagementClient.h:15
Aws::S3Control::Model::PutBucketPolicyRequest::GetPolicy
const Aws::String & GetPolicy() const
Definition: PutBucketPolicyRequest.h:225
Aws::S3Control::Model::PutBucketPolicyRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::S3Control::Model::PutBucketPolicyRequest::SetConfirmRemoveSelfBucketAccess
void SetConfirmRemoveSelfBucketAccess(bool value)
Definition: PutBucketPolicyRequest.h:212
Aws::S3Control::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:176
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
S3ControlRequest.h
Aws::S3Control::Model::PutBucketPolicyRequest::AccountIdHasBeenSet
bool AccountIdHasBeenSet() const
Definition: PutBucketPolicyRequest.h:47
Aws::S3Control::Model::PutBucketPolicyRequest::SetBucket
void SetBucket(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:134
Aws::S3Control::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:162
Aws::S3Control::Model::PutBucketPolicyRequest::SetPolicy
void SetPolicy(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:235
Aws::S3Control::Model::PutBucketPolicyRequest::WithPolicy
PutBucketPolicyRequest & WithPolicy(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:250
Aws::S3Control::Model::PutBucketPolicyRequest::BucketHasBeenSet
bool BucketHasBeenSet() const
Definition: PutBucketPolicyRequest.h:106
Aws::S3Control::Model::PutBucketPolicyRequest
Definition: PutBucketPolicyRequest.h:22
Aws::S3Control::Model::PutBucketPolicyRequest::WithConfirmRemoveSelfBucketAccess
PutBucketPolicyRequest & WithConfirmRemoveSelfBucketAccess(bool value)
Definition: PutBucketPolicyRequest.h:219