AWS SDK for C++  1.9.129
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 
93  inline const Aws::String& GetBucket() const{ return m_bucket; }
94 
108  inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
109 
123  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
124 
138  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
139 
153  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
154 
168  inline PutBucketPolicyRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
169 
183  inline PutBucketPolicyRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
184 
198  inline PutBucketPolicyRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
199 
200 
206  inline bool GetConfirmRemoveSelfBucketAccess() const{ return m_confirmRemoveSelfBucketAccess; }
207 
213  inline bool ConfirmRemoveSelfBucketAccessHasBeenSet() const { return m_confirmRemoveSelfBucketAccessHasBeenSet; }
214 
220  inline void SetConfirmRemoveSelfBucketAccess(bool value) { m_confirmRemoveSelfBucketAccessHasBeenSet = true; m_confirmRemoveSelfBucketAccess = value; }
221 
227  inline PutBucketPolicyRequest& WithConfirmRemoveSelfBucketAccess(bool value) { SetConfirmRemoveSelfBucketAccess(value); return *this;}
228 
229 
233  inline const Aws::String& GetPolicy() const{ return m_policy; }
234 
238  inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
239 
243  inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
244 
248  inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); }
249 
253  inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
254 
258  inline PutBucketPolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
259 
263  inline PutBucketPolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;}
264 
268  inline PutBucketPolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
269 
270  private:
271 
272  Aws::String m_accountId;
273  bool m_accountIdHasBeenSet;
274 
275  Aws::String m_bucket;
276  bool m_bucketHasBeenSet;
277 
278  bool m_confirmRemoveSelfBucketAccess;
279  bool m_confirmRemoveSelfBucketAccessHasBeenSet;
280 
281  Aws::String m_policy;
282  bool m_policyHasBeenSet;
283  };
284 
285 } // namespace Model
286 } // namespace S3Control
287 } // 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:213
Aws::S3Control::Model::PutBucketPolicyRequest::GetConfirmRemoveSelfBucketAccess
bool GetConfirmRemoveSelfBucketAccess() const
Definition: PutBucketPolicyRequest.h:206
Aws::S3Control::Model::PutBucketPolicyRequest::GetBucket
const Aws::String & GetBucket() const
Definition: PutBucketPolicyRequest.h:93
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:253
Aws::S3Control::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(const char *value)
Definition: PutBucketPolicyRequest.h:198
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:248
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:123
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:263
Aws::S3Control::Model::PutBucketPolicyRequest::WithPolicy
PutBucketPolicyRequest & WithPolicy(const char *value)
Definition: PutBucketPolicyRequest.h:268
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:238
Aws::S3Control::Model::PutBucketPolicyRequest::SetBucket
void SetBucket(const char *value)
Definition: PutBucketPolicyRequest.h:153
Aws
Definition: AccessManagementClient.h:15
Aws::S3Control::Model::PutBucketPolicyRequest::GetPolicy
const Aws::String & GetPolicy() const
Definition: PutBucketPolicyRequest.h:233
Aws::S3Control::Model::PutBucketPolicyRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::S3Control::Model::PutBucketPolicyRequest::SetConfirmRemoveSelfBucketAccess
void SetConfirmRemoveSelfBucketAccess(bool value)
Definition: PutBucketPolicyRequest.h:220
Aws::S3Control::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(Aws::String &&value)
Definition: PutBucketPolicyRequest.h:183
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:138
Aws::S3Control::Model::PutBucketPolicyRequest::WithBucket
PutBucketPolicyRequest & WithBucket(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:168
Aws::S3Control::Model::PutBucketPolicyRequest::SetPolicy
void SetPolicy(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:243
Aws::S3Control::Model::PutBucketPolicyRequest::WithPolicy
PutBucketPolicyRequest & WithPolicy(const Aws::String &value)
Definition: PutBucketPolicyRequest.h:258
Aws::S3Control::Model::PutBucketPolicyRequest::BucketHasBeenSet
bool BucketHasBeenSet() const
Definition: PutBucketPolicyRequest.h:108
Aws::S3Control::Model::PutBucketPolicyRequest
Definition: PutBucketPolicyRequest.h:22
Aws::S3Control::Model::PutBucketPolicyRequest::WithConfirmRemoveSelfBucketAccess
PutBucketPolicyRequest & WithConfirmRemoveSelfBucketAccess(bool value)
Definition: PutBucketPolicyRequest.h:227