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/AWSString.h>
8#include <aws/s3control/S3ControlRequest.h>
9#include <aws/s3control/S3Control_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace S3Control {
15namespace Model {
16
20 public:
21 AWS_S3CONTROL_API PutBucketPolicyRequest() = default;
22
23 // Service request name is the Operation name which will send this request out,
24 // each operation should has unique request name, so that we can get operation's name from this request.
25 // Note: this is not true for response, multiple operations may have the same response name,
26 // so we can not get operation's name from response.
27 inline virtual const char* GetServiceRequestName() const override { return "PutBucketPolicy"; }
28
29 AWS_S3CONTROL_API Aws::String SerializePayload() const override;
30
32
33 AWS_S3CONTROL_API inline bool ShouldComputeContentMd5() const override { return true; }
34
38 AWS_S3CONTROL_API EndpointParameters GetEndpointContextParams() const override;
39
41
44 inline const Aws::String& GetAccountId() const { return m_accountId; }
45 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
46 template <typename AccountIdT = Aws::String>
47 void SetAccountId(AccountIdT&& value) {
48 m_accountIdHasBeenSet = true;
49 m_accountId = std::forward<AccountIdT>(value);
50 }
51 template <typename AccountIdT = Aws::String>
53 SetAccountId(std::forward<AccountIdT>(value));
54 return *this;
55 }
57
59
72 inline const Aws::String& GetBucket() const { return m_bucket; }
73 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
74 template <typename BucketT = Aws::String>
75 void SetBucket(BucketT&& value) {
76 m_bucketHasBeenSet = true;
77 m_bucket = std::forward<BucketT>(value);
78 }
79 template <typename BucketT = Aws::String>
81 SetBucket(std::forward<BucketT>(value));
82 return *this;
83 }
85
87
92 inline bool GetConfirmRemoveSelfBucketAccess() const { return m_confirmRemoveSelfBucketAccess; }
93 inline bool ConfirmRemoveSelfBucketAccessHasBeenSet() const { return m_confirmRemoveSelfBucketAccessHasBeenSet; }
94 inline void SetConfirmRemoveSelfBucketAccess(bool value) {
95 m_confirmRemoveSelfBucketAccessHasBeenSet = true;
96 m_confirmRemoveSelfBucketAccess = value;
97 }
100 return *this;
101 }
103
105
108 inline const Aws::String& GetPolicy() const { return m_policy; }
109 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
110 template <typename PolicyT = Aws::String>
111 void SetPolicy(PolicyT&& value) {
112 m_policyHasBeenSet = true;
113 m_policy = std::forward<PolicyT>(value);
114 }
115 template <typename PolicyT = Aws::String>
117 SetPolicy(std::forward<PolicyT>(value));
118 return *this;
119 }
121 private:
122 Aws::String m_accountId;
123
124 Aws::String m_bucket;
125
126 bool m_confirmRemoveSelfBucketAccess{false};
127
128 Aws::String m_policy;
129 bool m_accountIdHasBeenSet = false;
130 bool m_bucketHasBeenSet = false;
131 bool m_confirmRemoveSelfBucketAccessHasBeenSet = false;
132 bool m_policyHasBeenSet = false;
133};
134
135} // namespace Model
136} // namespace S3Control
137} // namespace Aws
PutBucketPolicyRequest & WithPolicy(PolicyT &&value)
PutBucketPolicyRequest & WithAccountId(AccountIdT &&value)
PutBucketPolicyRequest & WithConfirmRemoveSelfBucketAccess(bool value)
AWS_S3CONTROL_API PutBucketPolicyRequest()=default
virtual const char * GetServiceRequestName() const override
AWS_S3CONTROL_API Aws::String SerializePayload() const override
AWS_S3CONTROL_API bool ShouldComputeContentMd5() const override
PutBucketPolicyRequest & WithBucket(BucketT &&value)
AWS_S3CONTROL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_S3CONTROL_API EndpointParameters GetEndpointContextParams() const override
Aws::Endpoint::EndpointParameters EndpointParameters
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String