AWS SDK for C++

AWS SDK for C++ Version 1.11.695

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 inline bool RequestChecksumRequired() const override { return true; };
44
48 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
49
51
55 inline const Aws::String& GetBucket() const { return m_bucket; }
56 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
57 template <typename BucketT = Aws::String>
58 void SetBucket(BucketT&& value) {
59 m_bucketHasBeenSet = true;
60 m_bucket = std::forward<BucketT>(value);
61 }
62 template <typename BucketT = Aws::String>
64 SetBucket(std::forward<BucketT>(value));
65 return *this;
66 }
68
70
75 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
76 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
77 template <typename ContentMD5T = Aws::String>
78 void SetContentMD5(ContentMD5T&& value) {
79 m_contentMD5HasBeenSet = true;
80 m_contentMD5 = std::forward<ContentMD5T>(value);
81 }
82 template <typename ContentMD5T = Aws::String>
84 SetContentMD5(std::forward<ContentMD5T>(value));
85 return *this;
86 }
88
90
102 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
103 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
105 m_checksumAlgorithmHasBeenSet = true;
106 m_checksumAlgorithm = value;
107 }
110 return *this;
111 }
113
115
123 inline const PublicAccessBlockConfiguration& GetPublicAccessBlockConfiguration() const { return m_publicAccessBlockConfiguration; }
124 inline bool PublicAccessBlockConfigurationHasBeenSet() const { return m_publicAccessBlockConfigurationHasBeenSet; }
125 template <typename PublicAccessBlockConfigurationT = PublicAccessBlockConfiguration>
126 void SetPublicAccessBlockConfiguration(PublicAccessBlockConfigurationT&& value) {
127 m_publicAccessBlockConfigurationHasBeenSet = true;
128 m_publicAccessBlockConfiguration = std::forward<PublicAccessBlockConfigurationT>(value);
129 }
130 template <typename PublicAccessBlockConfigurationT = PublicAccessBlockConfiguration>
131 PutPublicAccessBlockRequest& WithPublicAccessBlockConfiguration(PublicAccessBlockConfigurationT&& value) {
132 SetPublicAccessBlockConfiguration(std::forward<PublicAccessBlockConfigurationT>(value));
133 return *this;
134 }
136
138
143 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
144 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
145 template <typename ExpectedBucketOwnerT = Aws::String>
146 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
147 m_expectedBucketOwnerHasBeenSet = true;
148 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
149 }
150 template <typename ExpectedBucketOwnerT = Aws::String>
152 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
153 return *this;
154 }
156
158
159 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
160 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
161 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
162 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
163 m_customizedAccessLogTagHasBeenSet = true;
164 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
165 }
166 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
167 PutPublicAccessBlockRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
168 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
169 return *this;
170 }
171 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
172 PutPublicAccessBlockRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
173 m_customizedAccessLogTagHasBeenSet = true;
174 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
175 return *this;
176 }
178 private:
179 Aws::String m_bucket;
180 bool m_bucketHasBeenSet = false;
181
182 Aws::String m_contentMD5;
183 bool m_contentMD5HasBeenSet = false;
184
186 bool m_checksumAlgorithmHasBeenSet = false;
187
188 PublicAccessBlockConfiguration m_publicAccessBlockConfiguration;
189 bool m_publicAccessBlockConfigurationHasBeenSet = false;
190
191 Aws::String m_expectedBucketOwner;
192 bool m_expectedBucketOwnerHasBeenSet = false;
193
194 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
195 bool m_customizedAccessLogTagHasBeenSet = false;
196};
197
198} // namespace Model
199} // namespace S3
200} // 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)
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