AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutPublicAccessBlockRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/s3/S3Request.h>
10#include <aws/s3/S3_EXPORTS.h>
11#include <aws/s3/model/ChecksumAlgorithm.h>
12#include <aws/s3/model/PublicAccessBlockConfiguration.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Http {
18class URI;
19} // namespace Http
20namespace S3 {
21namespace Model {
22
26 public:
27 AWS_S3_API PutPublicAccessBlockRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "PutPublicAccessBlock"; }
34
35 AWS_S3_API Aws::String SerializePayload() const override;
36
37 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
38
40
41 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
42 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
43 AWS_S3_API bool ChecksumAlgorithmIsSet() const override;
44 inline bool RequestChecksumRequired() const override { return true; };
45
49 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
50
52
56 inline const Aws::String& GetBucket() const { return m_bucket; }
57 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
58 template <typename BucketT = Aws::String>
59 void SetBucket(BucketT&& value) {
60 m_bucketHasBeenSet = true;
61 m_bucket = std::forward<BucketT>(value);
62 }
63 template <typename BucketT = Aws::String>
65 SetBucket(std::forward<BucketT>(value));
66 return *this;
67 }
69
71
76 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
77 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
78 template <typename ContentMD5T = Aws::String>
79 void SetContentMD5(ContentMD5T&& value) {
80 m_contentMD5HasBeenSet = true;
81 m_contentMD5 = std::forward<ContentMD5T>(value);
82 }
83 template <typename ContentMD5T = Aws::String>
85 SetContentMD5(std::forward<ContentMD5T>(value));
86 return *this;
87 }
89
91
103 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
104 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
106 m_checksumAlgorithmHasBeenSet = true;
107 m_checksumAlgorithm = value;
108 }
111 return *this;
112 }
114
116
124 inline const PublicAccessBlockConfiguration& GetPublicAccessBlockConfiguration() const { return m_publicAccessBlockConfiguration; }
125 inline bool PublicAccessBlockConfigurationHasBeenSet() const { return m_publicAccessBlockConfigurationHasBeenSet; }
126 template <typename PublicAccessBlockConfigurationT = PublicAccessBlockConfiguration>
127 void SetPublicAccessBlockConfiguration(PublicAccessBlockConfigurationT&& value) {
128 m_publicAccessBlockConfigurationHasBeenSet = true;
129 m_publicAccessBlockConfiguration = std::forward<PublicAccessBlockConfigurationT>(value);
130 }
131 template <typename PublicAccessBlockConfigurationT = PublicAccessBlockConfiguration>
132 PutPublicAccessBlockRequest& WithPublicAccessBlockConfiguration(PublicAccessBlockConfigurationT&& value) {
133 SetPublicAccessBlockConfiguration(std::forward<PublicAccessBlockConfigurationT>(value));
134 return *this;
135 }
137
139
144 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
145 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
146 template <typename ExpectedBucketOwnerT = Aws::String>
147 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
148 m_expectedBucketOwnerHasBeenSet = true;
149 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
150 }
151 template <typename ExpectedBucketOwnerT = Aws::String>
153 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
154 return *this;
155 }
157
159
160 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
161 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
162 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
163 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
164 m_customizedAccessLogTagHasBeenSet = true;
165 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
166 }
167 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
168 PutPublicAccessBlockRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
169 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
170 return *this;
171 }
172 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
173 PutPublicAccessBlockRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
174 m_customizedAccessLogTagHasBeenSet = true;
175 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
176 return *this;
177 }
179 private:
180 Aws::String m_bucket;
181
182 Aws::String m_contentMD5;
183
185
186 PublicAccessBlockConfiguration m_publicAccessBlockConfiguration;
187
188 Aws::String m_expectedBucketOwner;
189
190 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
191 bool m_bucketHasBeenSet = false;
192 bool m_contentMD5HasBeenSet = false;
193 bool m_checksumAlgorithmHasBeenSet = false;
194 bool m_publicAccessBlockConfigurationHasBeenSet = false;
195 bool m_expectedBucketOwnerHasBeenSet = false;
196 bool m_customizedAccessLogTagHasBeenSet = false;
197};
198
199} // namespace Model
200} // namespace S3
201} // namespace Aws
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetPublicAccessBlockConfiguration(PublicAccessBlockConfigurationT &&value)
const PublicAccessBlockConfiguration & GetPublicAccessBlockConfiguration() const
PutPublicAccessBlockRequest & WithContentMD5(ContentMD5T &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
PutPublicAccessBlockRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutPublicAccessBlockRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
PutPublicAccessBlockRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
virtual const char * GetServiceRequestName() const override
AWS_S3_API Aws::String SerializePayload() const override
AWS_S3_API PutPublicAccessBlockRequest()=default
PutPublicAccessBlockRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API bool ChecksumAlgorithmIsSet() const override
PutPublicAccessBlockRequest & WithBucket(BucketT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutPublicAccessBlockRequest & WithPublicAccessBlockConfiguration(PublicAccessBlockConfigurationT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
Aws::Endpoint::EndpointParameters EndpointParameters
Definition S3Request.h:19
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