AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateBucketRequest.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
9#include <aws/s3/model/BucketCannedACL.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/s3/model/CreateBucketConfiguration.h>
12#include <aws/s3/model/ObjectOwnership.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Http
19{
20 class URI;
21} //namespace Http
22namespace S3
23{
24namespace Model
25{
26
30 {
31 public:
32 AWS_S3_API CreateBucketRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateBucket"; }
39
40 AWS_S3_API Aws::String SerializePayload() const override;
41
42 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
43
45
46 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
50 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
51
53
57 inline BucketCannedACL GetACL() const { return m_aCL; }
58 inline bool ACLHasBeenSet() const { return m_aCLHasBeenSet; }
59 inline void SetACL(BucketCannedACL value) { m_aCLHasBeenSet = true; m_aCL = value; }
60 inline CreateBucketRequest& WithACL(BucketCannedACL value) { SetACL(value); return *this;}
62
64
81 inline const Aws::String& GetBucket() const { return m_bucket; }
82 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
83 template<typename BucketT = Aws::String>
84 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
85 template<typename BucketT = Aws::String>
86 CreateBucketRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
88
90
93 inline const CreateBucketConfiguration& GetCreateBucketConfiguration() const { return m_createBucketConfiguration; }
94 inline bool CreateBucketConfigurationHasBeenSet() const { return m_createBucketConfigurationHasBeenSet; }
95 template<typename CreateBucketConfigurationT = CreateBucketConfiguration>
96 void SetCreateBucketConfiguration(CreateBucketConfigurationT&& value) { m_createBucketConfigurationHasBeenSet = true; m_createBucketConfiguration = std::forward<CreateBucketConfigurationT>(value); }
97 template<typename CreateBucketConfigurationT = CreateBucketConfiguration>
98 CreateBucketRequest& WithCreateBucketConfiguration(CreateBucketConfigurationT&& value) { SetCreateBucketConfiguration(std::forward<CreateBucketConfigurationT>(value)); return *this;}
100
102
107 inline const Aws::String& GetGrantFullControl() const { return m_grantFullControl; }
108 inline bool GrantFullControlHasBeenSet() const { return m_grantFullControlHasBeenSet; }
109 template<typename GrantFullControlT = Aws::String>
110 void SetGrantFullControl(GrantFullControlT&& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = std::forward<GrantFullControlT>(value); }
111 template<typename GrantFullControlT = Aws::String>
112 CreateBucketRequest& WithGrantFullControl(GrantFullControlT&& value) { SetGrantFullControl(std::forward<GrantFullControlT>(value)); return *this;}
114
116
120 inline const Aws::String& GetGrantRead() const { return m_grantRead; }
121 inline bool GrantReadHasBeenSet() const { return m_grantReadHasBeenSet; }
122 template<typename GrantReadT = Aws::String>
123 void SetGrantRead(GrantReadT&& value) { m_grantReadHasBeenSet = true; m_grantRead = std::forward<GrantReadT>(value); }
124 template<typename GrantReadT = Aws::String>
125 CreateBucketRequest& WithGrantRead(GrantReadT&& value) { SetGrantRead(std::forward<GrantReadT>(value)); return *this;}
127
129
133 inline const Aws::String& GetGrantReadACP() const { return m_grantReadACP; }
134 inline bool GrantReadACPHasBeenSet() const { return m_grantReadACPHasBeenSet; }
135 template<typename GrantReadACPT = Aws::String>
136 void SetGrantReadACP(GrantReadACPT&& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = std::forward<GrantReadACPT>(value); }
137 template<typename GrantReadACPT = Aws::String>
138 CreateBucketRequest& WithGrantReadACP(GrantReadACPT&& value) { SetGrantReadACP(std::forward<GrantReadACPT>(value)); return *this;}
140
142
148 inline const Aws::String& GetGrantWrite() const { return m_grantWrite; }
149 inline bool GrantWriteHasBeenSet() const { return m_grantWriteHasBeenSet; }
150 template<typename GrantWriteT = Aws::String>
151 void SetGrantWrite(GrantWriteT&& value) { m_grantWriteHasBeenSet = true; m_grantWrite = std::forward<GrantWriteT>(value); }
152 template<typename GrantWriteT = Aws::String>
153 CreateBucketRequest& WithGrantWrite(GrantWriteT&& value) { SetGrantWrite(std::forward<GrantWriteT>(value)); return *this;}
155
157
161 inline const Aws::String& GetGrantWriteACP() const { return m_grantWriteACP; }
162 inline bool GrantWriteACPHasBeenSet() const { return m_grantWriteACPHasBeenSet; }
163 template<typename GrantWriteACPT = Aws::String>
164 void SetGrantWriteACP(GrantWriteACPT&& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = std::forward<GrantWriteACPT>(value); }
165 template<typename GrantWriteACPT = Aws::String>
166 CreateBucketRequest& WithGrantWriteACP(GrantWriteACPT&& value) { SetGrantWriteACP(std::forward<GrantWriteACPT>(value)); return *this;}
168
170
175 inline bool GetObjectLockEnabledForBucket() const { return m_objectLockEnabledForBucket; }
176 inline bool ObjectLockEnabledForBucketHasBeenSet() const { return m_objectLockEnabledForBucketHasBeenSet; }
177 inline void SetObjectLockEnabledForBucket(bool value) { m_objectLockEnabledForBucketHasBeenSet = true; m_objectLockEnabledForBucket = value; }
180
182
183 inline ObjectOwnership GetObjectOwnership() const { return m_objectOwnership; }
184 inline bool ObjectOwnershipHasBeenSet() const { return m_objectOwnershipHasBeenSet; }
185 inline void SetObjectOwnership(ObjectOwnership value) { m_objectOwnershipHasBeenSet = true; m_objectOwnership = value; }
188
190
191 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
192 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
193 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
194 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
195 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
196 CreateBucketRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
197 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
198 CreateBucketRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
199 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
200 }
202 private:
203
205 bool m_aCLHasBeenSet = false;
206
207 Aws::String m_bucket;
208 bool m_bucketHasBeenSet = false;
209
210 CreateBucketConfiguration m_createBucketConfiguration;
211 bool m_createBucketConfigurationHasBeenSet = false;
212
213 Aws::String m_grantFullControl;
214 bool m_grantFullControlHasBeenSet = false;
215
216 Aws::String m_grantRead;
217 bool m_grantReadHasBeenSet = false;
218
219 Aws::String m_grantReadACP;
220 bool m_grantReadACPHasBeenSet = false;
221
222 Aws::String m_grantWrite;
223 bool m_grantWriteHasBeenSet = false;
224
225 Aws::String m_grantWriteACP;
226 bool m_grantWriteACPHasBeenSet = false;
227
228 bool m_objectLockEnabledForBucket{false};
229 bool m_objectLockEnabledForBucketHasBeenSet = false;
230
231 ObjectOwnership m_objectOwnership{ObjectOwnership::NOT_SET};
232 bool m_objectOwnershipHasBeenSet = false;
233
234 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
235 bool m_customizedAccessLogTagHasBeenSet = false;
236 };
237
238} // namespace Model
239} // namespace S3
240} // namespace Aws
CreateBucketRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API CreateBucketRequest()=default
const Aws::String & GetBucket() const
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
CreateBucketRequest & WithBucket(BucketT &&value)
CreateBucketRequest & WithGrantWrite(GrantWriteT &&value)
const Aws::String & GetGrantFullControl() const
AWS_S3_API Aws::String SerializePayload() const override
const Aws::String & GetGrantReadACP() const
void SetGrantReadACP(GrantReadACPT &&value)
CreateBucketRequest & WithCreateBucketConfiguration(CreateBucketConfigurationT &&value)
const Aws::String & GetGrantRead() const
virtual const char * GetServiceRequestName() const override
void SetGrantWriteACP(GrantWriteACPT &&value)
void SetCreateBucketConfiguration(CreateBucketConfigurationT &&value)
CreateBucketRequest & WithObjectLockEnabledForBucket(bool value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateBucketRequest & WithGrantReadACP(GrantReadACPT &&value)
void SetACL(BucketCannedACL value)
CreateBucketRequest & WithACL(BucketCannedACL value)
const Aws::String & GetGrantWrite() const
CreateBucketRequest & WithGrantRead(GrantReadT &&value)
const CreateBucketConfiguration & GetCreateBucketConfiguration() const
void SetGrantFullControl(GrantFullControlT &&value)
void SetGrantWrite(GrantWriteT &&value)
const Aws::String & GetGrantWriteACP() const
void SetObjectOwnership(ObjectOwnership value)
CreateBucketRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
CreateBucketRequest & WithObjectOwnership(ObjectOwnership value)
CreateBucketRequest & WithGrantFullControl(GrantFullControlT &&value)
CreateBucketRequest & WithGrantWriteACP(GrantWriteACPT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
Aws::Endpoint::EndpointParameters EndpointParameters
Definition S3Request.h:22
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String