AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutObjectLegalHoldRequest.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/ObjectLockLegalHold.h>
11#include <aws/s3/model/RequestPayer.h>
12#include <aws/s3/model/ChecksumAlgorithm.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 PutObjectLegalHoldRequest() = 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 "PutObjectLegalHold"; }
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;
47 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
48 inline bool RequestChecksumRequired() const override { return true; };
49
53 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
54
56
72 inline const Aws::String& GetBucket() const { return m_bucket; }
73 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
74 template<typename BucketT = Aws::String>
75 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
76 template<typename BucketT = Aws::String>
77 PutObjectLegalHoldRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
79
81
84 inline const Aws::String& GetKey() const { return m_key; }
85 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
86 template<typename KeyT = Aws::String>
87 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
88 template<typename KeyT = Aws::String>
89 PutObjectLegalHoldRequest& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
91
93
97 inline const ObjectLockLegalHold& GetLegalHold() const { return m_legalHold; }
98 inline bool LegalHoldHasBeenSet() const { return m_legalHoldHasBeenSet; }
99 template<typename LegalHoldT = ObjectLockLegalHold>
100 void SetLegalHold(LegalHoldT&& value) { m_legalHoldHasBeenSet = true; m_legalHold = std::forward<LegalHoldT>(value); }
101 template<typename LegalHoldT = ObjectLockLegalHold>
102 PutObjectLegalHoldRequest& WithLegalHold(LegalHoldT&& value) { SetLegalHold(std::forward<LegalHoldT>(value)); return *this;}
104
106
107 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
108 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
109 inline void SetRequestPayer(RequestPayer value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
112
114
117 inline const Aws::String& GetVersionId() const { return m_versionId; }
118 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
119 template<typename VersionIdT = Aws::String>
120 void SetVersionId(VersionIdT&& value) { m_versionIdHasBeenSet = true; m_versionId = std::forward<VersionIdT>(value); }
121 template<typename VersionIdT = Aws::String>
122 PutObjectLegalHoldRequest& WithVersionId(VersionIdT&& value) { SetVersionId(std::forward<VersionIdT>(value)); return *this;}
124
126
131 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
132 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
133 template<typename ContentMD5T = Aws::String>
134 void SetContentMD5(ContentMD5T&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::forward<ContentMD5T>(value); }
135 template<typename ContentMD5T = Aws::String>
136 PutObjectLegalHoldRequest& WithContentMD5(ContentMD5T&& value) { SetContentMD5(std::forward<ContentMD5T>(value)); return *this;}
138
140
152 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
153 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
154 inline void SetChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
157
159
164 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
165 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
166 template<typename ExpectedBucketOwnerT = Aws::String>
167 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
168 template<typename ExpectedBucketOwnerT = Aws::String>
169 PutObjectLegalHoldRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
171
173
174 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
175 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
176 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
177 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
178 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
179 PutObjectLegalHoldRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
180 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
181 PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
182 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
183 }
185 private:
186
187 Aws::String m_bucket;
188 bool m_bucketHasBeenSet = false;
189
190 Aws::String m_key;
191 bool m_keyHasBeenSet = false;
192
193 ObjectLockLegalHold m_legalHold;
194 bool m_legalHoldHasBeenSet = false;
195
196 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
197 bool m_requestPayerHasBeenSet = false;
198
199 Aws::String m_versionId;
200 bool m_versionIdHasBeenSet = false;
201
202 Aws::String m_contentMD5;
203 bool m_contentMD5HasBeenSet = false;
204
206 bool m_checksumAlgorithmHasBeenSet = false;
207
208 Aws::String m_expectedBucketOwner;
209 bool m_expectedBucketOwnerHasBeenSet = false;
210
211 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
212 bool m_customizedAccessLogTagHasBeenSet = false;
213 };
214
215} // namespace Model
216} // namespace S3
217} // namespace Aws
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