AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutBucketVersioningRequest.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/s3/model/VersioningConfiguration.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Http
18{
19 class URI;
20} //namespace Http
21namespace S3
22{
23namespace Model
24{
25
29 {
30 public:
31 AWS_S3_API PutBucketVersioningRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "PutBucketVersioning"; }
38
39 AWS_S3_API Aws::String SerializePayload() const override;
40
41 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
42
44
45 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
46 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
47 inline bool RequestChecksumRequired() const override { return true; };
48
52 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
53
55
58 inline const Aws::String& GetBucket() const { return m_bucket; }
59 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
60 template<typename BucketT = Aws::String>
61 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
62 template<typename BucketT = Aws::String>
63 PutBucketVersioningRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
65
67
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) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::forward<ContentMD5T>(value); }
79 template<typename ContentMD5T = Aws::String>
80 PutBucketVersioningRequest& WithContentMD5(ContentMD5T&& value) { SetContentMD5(std::forward<ContentMD5T>(value)); return *this;}
82
84
96 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
97 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
98 inline void SetChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
101
103
107 inline const Aws::String& GetMFA() const { return m_mFA; }
108 inline bool MFAHasBeenSet() const { return m_mFAHasBeenSet; }
109 template<typename MFAT = Aws::String>
110 void SetMFA(MFAT&& value) { m_mFAHasBeenSet = true; m_mFA = std::forward<MFAT>(value); }
111 template<typename MFAT = Aws::String>
112 PutBucketVersioningRequest& WithMFA(MFAT&& value) { SetMFA(std::forward<MFAT>(value)); return *this;}
114
116
119 inline const VersioningConfiguration& GetVersioningConfiguration() const { return m_versioningConfiguration; }
120 inline bool VersioningConfigurationHasBeenSet() const { return m_versioningConfigurationHasBeenSet; }
121 template<typename VersioningConfigurationT = VersioningConfiguration>
122 void SetVersioningConfiguration(VersioningConfigurationT&& value) { m_versioningConfigurationHasBeenSet = true; m_versioningConfiguration = std::forward<VersioningConfigurationT>(value); }
123 template<typename VersioningConfigurationT = VersioningConfiguration>
124 PutBucketVersioningRequest& WithVersioningConfiguration(VersioningConfigurationT&& value) { SetVersioningConfiguration(std::forward<VersioningConfigurationT>(value)); return *this;}
126
128
133 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
134 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
135 template<typename ExpectedBucketOwnerT = Aws::String>
136 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
137 template<typename ExpectedBucketOwnerT = Aws::String>
138 PutBucketVersioningRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
140
142
143 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
144 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
145 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
146 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
147 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
148 PutBucketVersioningRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
149 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
150 PutBucketVersioningRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
151 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
152 }
154 private:
155
156 Aws::String m_bucket;
157 bool m_bucketHasBeenSet = false;
158
159 Aws::String m_contentMD5;
160 bool m_contentMD5HasBeenSet = false;
161
163 bool m_checksumAlgorithmHasBeenSet = false;
164
165 Aws::String m_mFA;
166 bool m_mFAHasBeenSet = false;
167
168 VersioningConfiguration m_versioningConfiguration;
169 bool m_versioningConfigurationHasBeenSet = false;
170
171 Aws::String m_expectedBucketOwner;
172 bool m_expectedBucketOwnerHasBeenSet = false;
173
174 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
175 bool m_customizedAccessLogTagHasBeenSet = false;
176 };
177
178} // namespace Model
179} // namespace S3
180} // namespace Aws
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
AWS_S3_API PutBucketVersioningRequest()=default
PutBucketVersioningRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
void SetVersioningConfiguration(VersioningConfigurationT &&value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutBucketVersioningRequest & WithContentMD5(ContentMD5T &&value)
PutBucketVersioningRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutBucketVersioningRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutBucketVersioningRequest & WithVersioningConfiguration(VersioningConfigurationT &&value)
PutBucketVersioningRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutBucketVersioningRequest & WithMFA(MFAT &&value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
virtual const char * GetServiceRequestName() const override
AWS_S3_API Aws::String SerializePayload() const override
const VersioningConfiguration & GetVersioningConfiguration() const
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
PutBucketVersioningRequest & WithBucket(BucketT &&value)
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