AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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:
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
52 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
53
55
68 inline const Aws::String& GetBucket() const{ return m_bucket; }
69 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
70 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
71 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
72 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
73 inline PutObjectLegalHoldRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
74 inline PutObjectLegalHoldRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
75 inline PutObjectLegalHoldRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
77
79
82 inline const Aws::String& GetKey() const{ return m_key; }
83 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
84 inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
85 inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
86 inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
87 inline PutObjectLegalHoldRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
88 inline PutObjectLegalHoldRequest& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
89 inline PutObjectLegalHoldRequest& WithKey(const char* value) { SetKey(value); return *this;}
91
93
97 inline const ObjectLockLegalHold& GetLegalHold() const{ return m_legalHold; }
98 inline bool LegalHoldHasBeenSet() const { return m_legalHoldHasBeenSet; }
99 inline void SetLegalHold(const ObjectLockLegalHold& value) { m_legalHoldHasBeenSet = true; m_legalHold = value; }
100 inline void SetLegalHold(ObjectLockLegalHold&& value) { m_legalHoldHasBeenSet = true; m_legalHold = std::move(value); }
101 inline PutObjectLegalHoldRequest& WithLegalHold(const ObjectLockLegalHold& value) { SetLegalHold(value); return *this;}
102 inline PutObjectLegalHoldRequest& WithLegalHold(ObjectLockLegalHold&& value) { SetLegalHold(std::move(value)); return *this;}
104
106
107 inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
108 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
109 inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
110 inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); }
111 inline PutObjectLegalHoldRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
112 inline PutObjectLegalHoldRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;}
114
116
119 inline const Aws::String& GetVersionId() const{ return m_versionId; }
120 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
121 inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
122 inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
123 inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
124 inline PutObjectLegalHoldRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
125 inline PutObjectLegalHoldRequest& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
126 inline PutObjectLegalHoldRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
128
130
135 inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
136 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
137 inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
138 inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::move(value); }
139 inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
140 inline PutObjectLegalHoldRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
141 inline PutObjectLegalHoldRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(std::move(value)); return *this;}
142 inline PutObjectLegalHoldRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
144
146
158 inline const ChecksumAlgorithm& GetChecksumAlgorithm() const{ return m_checksumAlgorithm; }
159 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
160 inline void SetChecksumAlgorithm(const ChecksumAlgorithm& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
161 inline void SetChecksumAlgorithm(ChecksumAlgorithm&& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = std::move(value); }
165
167
172 inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
173 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
174 inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
175 inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
176 inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
178 inline PutObjectLegalHoldRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
179 inline PutObjectLegalHoldRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
181
183
184 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
185 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
186 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
187 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
190 inline PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
191 inline PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
192 inline PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
193 inline PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
194 inline PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
195 inline PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
196 inline PutObjectLegalHoldRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
198 private:
199
200 Aws::String m_bucket;
201 bool m_bucketHasBeenSet = false;
202
203 Aws::String m_key;
204 bool m_keyHasBeenSet = false;
205
206 ObjectLockLegalHold m_legalHold;
207 bool m_legalHoldHasBeenSet = false;
208
209 RequestPayer m_requestPayer;
210 bool m_requestPayerHasBeenSet = false;
211
212 Aws::String m_versionId;
213 bool m_versionIdHasBeenSet = false;
214
215 Aws::String m_contentMD5;
216 bool m_contentMD5HasBeenSet = false;
217
218 ChecksumAlgorithm m_checksumAlgorithm;
219 bool m_checksumAlgorithmHasBeenSet = false;
220
221 Aws::String m_expectedBucketOwner;
222 bool m_expectedBucketOwnerHasBeenSet = false;
223
224 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
225 bool m_customizedAccessLogTagHasBeenSet = false;
226 };
227
228} // namespace Model
229} // namespace S3
230} // 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