AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateBucketRequest.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#include <aws/s3control/model/BucketCannedACL.h>
11#include <aws/s3control/model/CreateBucketConfiguration.h>
12
13#include <utility>
14
15namespace Aws {
16namespace S3Control {
17namespace Model {
18
22 public:
23 AWS_S3CONTROL_API CreateBucketRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "CreateBucket"; }
30
31 AWS_S3CONTROL_API Aws::String SerializePayload() const override;
32
34
35 AWS_S3CONTROL_API inline bool ShouldComputeContentMd5() const override { return true; }
36
40 AWS_S3CONTROL_API EndpointParameters GetEndpointContextParams() const override;
41
43
47 inline BucketCannedACL GetACL() const { return m_aCL; }
48 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
49 inline void SetACL(BucketCannedACL value) {
50 m_aCLHasBeenSet = true;
51 m_aCL = value;
52 }
54 SetACL(value);
55 return *this;
56 }
58
60
63 inline const Aws::String& GetBucket() const { return m_bucket; }
64 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
65 template <typename BucketT = Aws::String>
66 void SetBucket(BucketT&& value) {
67 m_bucketHasBeenSet = true;
68 m_bucket = std::forward<BucketT>(value);
69 }
70 template <typename BucketT = Aws::String>
71 CreateBucketRequest& WithBucket(BucketT&& value) {
72 SetBucket(std::forward<BucketT>(value));
73 return *this;
74 }
76
78
82 inline const CreateBucketConfiguration& GetCreateBucketConfiguration() const { return m_createBucketConfiguration; }
83 inline bool CreateBucketConfigurationHasBeenSet() const { return m_createBucketConfigurationHasBeenSet; }
84 template <typename CreateBucketConfigurationT = CreateBucketConfiguration>
85 void SetCreateBucketConfiguration(CreateBucketConfigurationT&& value) {
86 m_createBucketConfigurationHasBeenSet = true;
87 m_createBucketConfiguration = std::forward<CreateBucketConfigurationT>(value);
88 }
89 template <typename CreateBucketConfigurationT = CreateBucketConfiguration>
90 CreateBucketRequest& WithCreateBucketConfiguration(CreateBucketConfigurationT&& value) {
91 SetCreateBucketConfiguration(std::forward<CreateBucketConfigurationT>(value));
92 return *this;
93 }
95
97
102 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
103 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
104 template <typename GrantFullControlT = Aws::String>
105 void SetGrantFullControl(GrantFullControlT&& value) {
106 m_grantFullControlHasBeenSet = true;
107 m_grantFullControl = std::forward<GrantFullControlT>(value);
108 }
109 template <typename GrantFullControlT = Aws::String>
110 CreateBucketRequest& WithGrantFullControl(GrantFullControlT&& value) {
111 SetGrantFullControl(std::forward<GrantFullControlT>(value));
112 return *this;
113 }
115
117
121 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
122 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
123 template <typename GrantReadT = Aws::String>
124 void SetGrantRead(GrantReadT&& value) {
125 m_grantReadHasBeenSet = true;
126 m_grantRead = std::forward<GrantReadT>(value);
127 }
128 template <typename GrantReadT = Aws::String>
129 CreateBucketRequest& WithGrantRead(GrantReadT&& value) {
130 SetGrantRead(std::forward<GrantReadT>(value));
131 return *this;
132 }
134
136
140 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
141 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
142 template <typename GrantReadACPT = Aws::String>
143 void SetGrantReadACP(GrantReadACPT&& value) {
144 m_grantReadACPHasBeenSet = true;
145 m_grantReadACP = std::forward<GrantReadACPT>(value);
146 }
147 template <typename GrantReadACPT = Aws::String>
148 CreateBucketRequest& WithGrantReadACP(GrantReadACPT&& value) {
149 SetGrantReadACP(std::forward<GrantReadACPT>(value));
150 return *this;
151 }
153
155
159 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
160 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
161 template <typename GrantWriteT = Aws::String>
162 void SetGrantWrite(GrantWriteT&& value) {
163 m_grantWriteHasBeenSet = true;
164 m_grantWrite = std::forward<GrantWriteT>(value);
165 }
166 template <typename GrantWriteT = Aws::String>
167 CreateBucketRequest& WithGrantWrite(GrantWriteT&& value) {
168 SetGrantWrite(std::forward<GrantWriteT>(value));
169 return *this;
170 }
172
174
178 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
179 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
180 template <typename GrantWriteACPT = Aws::String>
181 void SetGrantWriteACP(GrantWriteACPT&& value) {
182 m_grantWriteACPHasBeenSet = true;
183 m_grantWriteACP = std::forward<GrantWriteACPT>(value);
184 }
185 template <typename GrantWriteACPT = Aws::String>
186 CreateBucketRequest& WithGrantWriteACP(GrantWriteACPT&& value) {
187 SetGrantWriteACP(std::forward<GrantWriteACPT>(value));
188 return *this;
189 }
191
193
198 inline bool GetObjectLockEnabledForBucket() const { return m_objectLockEnabledForBucket; }
199 inline bool ObjectLockEnabledForBucketHasBeenSet() const { return m_objectLockEnabledForBucketHasBeenSet; }
200 inline void SetObjectLockEnabledForBucket(bool value) {
201 m_objectLockEnabledForBucketHasBeenSet = true;
202 m_objectLockEnabledForBucket = value;
203 }
206 return *this;
207 }
209
211
215 inline const Aws::String& GetOutpostId() const { return m_outpostId; }
216 inline bool OutpostIdHasBeenSet() const { return m_outpostIdHasBeenSet; }
217 template <typename OutpostIdT = Aws::String>
218 void SetOutpostId(OutpostIdT&& value) {
219 m_outpostIdHasBeenSet = true;
220 m_outpostId = std::forward<OutpostIdT>(value);
221 }
222 template <typename OutpostIdT = Aws::String>
223 CreateBucketRequest& WithOutpostId(OutpostIdT&& value) {
224 SetOutpostId(std::forward<OutpostIdT>(value));
225 return *this;
226 }
228 private:
230
231 Aws::String m_bucket;
232
233 CreateBucketConfiguration m_createBucketConfiguration;
234
235 Aws::String m_grantFullControl;
236
237 Aws::String m_grantRead;
238
239 Aws::String m_grantReadACP;
240
241 Aws::String m_grantWrite;
242
243 Aws::String m_grantWriteACP;
244
245 bool m_objectLockEnabledForBucket{false};
246
247 Aws::String m_outpostId;
248 bool m_aCLHasBeenSet = false;
249 bool m_bucketHasBeenSet = false;
250 bool m_createBucketConfigurationHasBeenSet = false;
251 bool m_grantFullControlHasBeenSet = false;
252 bool m_grantReadHasBeenSet = false;
253 bool m_grantReadACPHasBeenSet = false;
254 bool m_grantWriteHasBeenSet = false;
255 bool m_grantWriteACPHasBeenSet = false;
256 bool m_objectLockEnabledForBucketHasBeenSet = false;
257 bool m_outpostIdHasBeenSet = false;
258};
259
260} // namespace Model
261} // namespace S3Control
262} // namespace Aws
AWS_S3CONTROL_API bool ShouldComputeContentMd5() const override
AWS_S3CONTROL_API EndpointParameters GetEndpointContextParams() const override
void SetCreateBucketConfiguration(CreateBucketConfigurationT &&value)
CreateBucketRequest & WithACL(BucketCannedACL value)
AWS_S3CONTROL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_S3CONTROL_API CreateBucketRequest()=default
CreateBucketRequest & WithGrantWrite(GrantWriteT &&value)
CreateBucketRequest & WithOutpostId(OutpostIdT &&value)
CreateBucketRequest & WithGrantFullControl(GrantFullControlT &&value)
AWS_S3CONTROL_API Aws::String SerializePayload() const override
CreateBucketRequest & WithCreateBucketConfiguration(CreateBucketConfigurationT &&value)
virtual const char * GetServiceRequestName() const override
CreateBucketRequest & WithGrantRead(GrantReadT &&value)
CreateBucketRequest & WithBucket(BucketT &&value)
CreateBucketRequest & WithGrantReadACP(GrantReadACPT &&value)
CreateBucketRequest & WithGrantWriteACP(GrantWriteACPT &&value)
CreateBucketRequest & WithObjectLockEnabledForBucket(bool value)
const CreateBucketConfiguration & GetCreateBucketConfiguration() const
void SetGrantFullControl(GrantFullControlT &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String