AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutBucketPolicyRequest.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/s3/model/ChecksumAlgorithm.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Http
17{
18 class URI;
19} //namespace Http
20namespace S3
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_S3_API PutBucketPolicyRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "PutBucketPolicy"; }
37
38 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
39
41
42 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
43 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
44 inline bool RequestChecksumRequired() const override { return true; };
45
46 AWS_S3_API bool IsStreaming() const override { return false; }
47
51 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
52
54
68 inline const Aws::String& GetBucket() const { return m_bucket; }
69 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
70 template<typename BucketT = Aws::String>
71 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
72 template<typename BucketT = Aws::String>
73 PutBucketPolicyRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
75
77
83 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
84 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
85 template<typename ContentMD5T = Aws::String>
86 void SetContentMD5(ContentMD5T&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::forward<ContentMD5T>(value); }
87 template<typename ContentMD5T = Aws::String>
88 PutBucketPolicyRequest& WithContentMD5(ContentMD5T&& value) { SetContentMD5(std::forward<ContentMD5T>(value)); return *this;}
90
92
114 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
115 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
116 inline void SetChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
119
121
126 inline bool GetConfirmRemoveSelfBucketAccess() const { return m_confirmRemoveSelfBucketAccess; }
127 inline bool ConfirmRemoveSelfBucketAccessHasBeenSet() const { return m_confirmRemoveSelfBucketAccessHasBeenSet; }
128 inline void SetConfirmRemoveSelfBucketAccess(bool value) { m_confirmRemoveSelfBucketAccessHasBeenSet = true; m_confirmRemoveSelfBucketAccess = value; }
131
133
141 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
142 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
143 template<typename ExpectedBucketOwnerT = Aws::String>
144 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
145 template<typename ExpectedBucketOwnerT = Aws::String>
146 PutBucketPolicyRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
148
150
151 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
152 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
153 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
154 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
155 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
156 PutBucketPolicyRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
157 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
158 PutBucketPolicyRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
159 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
160 }
162 private:
163
164 Aws::String m_bucket;
165 bool m_bucketHasBeenSet = false;
166
167 Aws::String m_contentMD5;
168 bool m_contentMD5HasBeenSet = false;
169
171 bool m_checksumAlgorithmHasBeenSet = false;
172
173 bool m_confirmRemoveSelfBucketAccess{false};
174 bool m_confirmRemoveSelfBucketAccessHasBeenSet = false;
175
176
177 Aws::String m_expectedBucketOwner;
178 bool m_expectedBucketOwnerHasBeenSet = false;
179
180 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
181 bool m_customizedAccessLogTagHasBeenSet = false;
182 };
183
184} // namespace Model
185} // namespace S3
186} // namespace Aws
Aws::Vector< Aws::Endpoint::EndpointParameter > EndpointParameters
PutBucketPolicyRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketPolicyRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
PutBucketPolicyRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutBucketPolicyRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
virtual const char * GetServiceRequestName() const override
AWS_S3_API bool IsStreaming() const override
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutBucketPolicyRequest & WithConfirmRemoveSelfBucketAccess(bool value)
PutBucketPolicyRequest & WithBucket(BucketT &&value)
AWS_S3_API PutBucketPolicyRequest()=default
const Aws::String & GetExpectedBucketOwner() const
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
void SetChecksumAlgorithm(ChecksumAlgorithm value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketPolicyRequest & WithContentMD5(ContentMD5T &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
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