1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/s3-crt/S3Crt_EXPORTS.h>
8 #include <aws/s3-crt/S3CrtRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/s3-crt/model/RequestPayer.h>
11 #include <aws/core/utils/memory/stl/AWSMap.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Http
17 {
18     class URI;
19 } //namespace Http
20 namespace S3Crt
21 {
22 namespace Model
23 {
24 
25   /**
26    */
27   class AWS_S3CRT_API GetObjectRetentionRequest : public S3CrtRequest
28   {
29   public:
30     GetObjectRetentionRequest();
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.
GetServiceRequestName()36     inline virtual const char* GetServiceRequestName() const override { return "GetObjectRetention"; }
37 
38     Aws::String SerializePayload() const override;
39 
40     void AddQueryStringParameters(Aws::Http::URI& uri) const override;
41 
42     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
43 
44 
45     /**
46      * <p>The bucket name containing the object whose retention settings you want to
47      * retrieve. </p> <p>When using this action with an access point, you must direct
48      * requests to the access point hostname. The access point hostname takes the form
49      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
50      * When using this action with an access point through the Amazon Web Services
51      * SDKs, you provide the access point ARN in place of the bucket name. For more
52      * information about access point ARNs, see <a
53      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
54      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
55      */
GetBucket()56     inline const Aws::String& GetBucket() const{ return m_bucket; }
57 
58     /**
59      * <p>The bucket name containing the object whose retention settings you want to
60      * retrieve. </p> <p>When using this action with an access point, you must direct
61      * requests to the access point hostname. The access point hostname takes the form
62      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
63      * When using this action with an access point through the Amazon Web Services
64      * SDKs, you provide the access point ARN in place of the bucket name. For more
65      * information about access point ARNs, see <a
66      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
67      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
68      */
BucketHasBeenSet()69     inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
70 
71     /**
72      * <p>The bucket name containing the object whose retention settings you want to
73      * retrieve. </p> <p>When using this action with an access point, you must direct
74      * requests to the access point hostname. The access point hostname takes the form
75      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
76      * When using this action with an access point through the Amazon Web Services
77      * SDKs, you provide the access point ARN in place of the bucket name. For more
78      * information about access point ARNs, see <a
79      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
80      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
81      */
SetBucket(const Aws::String & value)82     inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
83 
84     /**
85      * <p>The bucket name containing the object whose retention settings you want to
86      * retrieve. </p> <p>When using this action with an access point, you must direct
87      * requests to the access point hostname. The access point hostname takes the form
88      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
89      * When using this action with an access point through the Amazon Web Services
90      * SDKs, you provide the access point ARN in place of the bucket name. For more
91      * information about access point ARNs, see <a
92      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
93      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
94      */
SetBucket(Aws::String && value)95     inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
96 
97     /**
98      * <p>The bucket name containing the object whose retention settings you want to
99      * retrieve. </p> <p>When using this action with an access point, you must direct
100      * requests to the access point hostname. The access point hostname takes the form
101      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
102      * When using this action with an access point through the Amazon Web Services
103      * SDKs, you provide the access point ARN in place of the bucket name. For more
104      * information about access point ARNs, see <a
105      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
106      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
107      */
SetBucket(const char * value)108     inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
109 
110     /**
111      * <p>The bucket name containing the object whose retention settings you want to
112      * retrieve. </p> <p>When using this action with an access point, you must direct
113      * requests to the access point hostname. The access point hostname takes the form
114      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
115      * When using this action with an access point through the Amazon Web Services
116      * SDKs, you provide the access point ARN in place of the bucket name. For more
117      * information about access point ARNs, see <a
118      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
119      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
120      */
WithBucket(const Aws::String & value)121     inline GetObjectRetentionRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
122 
123     /**
124      * <p>The bucket name containing the object whose retention settings you want to
125      * retrieve. </p> <p>When using this action with an access point, you must direct
126      * requests to the access point hostname. The access point hostname takes the form
127      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
128      * When using this action with an access point through the Amazon Web Services
129      * SDKs, you provide the access point ARN in place of the bucket name. For more
130      * information about access point ARNs, see <a
131      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
132      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
133      */
WithBucket(Aws::String && value)134     inline GetObjectRetentionRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
135 
136     /**
137      * <p>The bucket name containing the object whose retention settings you want to
138      * retrieve. </p> <p>When using this action with an access point, you must direct
139      * requests to the access point hostname. The access point hostname takes the form
140      * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com.
141      * When using this action with an access point through the Amazon Web Services
142      * SDKs, you provide the access point ARN in place of the bucket name. For more
143      * information about access point ARNs, see <a
144      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using
145      * access points</a> in the <i>Amazon S3 User Guide</i>.</p>
146      */
WithBucket(const char * value)147     inline GetObjectRetentionRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
148 
149 
150     /**
151      * <p>The key name for the object whose retention settings you want to
152      * retrieve.</p>
153      */
GetKey()154     inline const Aws::String& GetKey() const{ return m_key; }
155 
156     /**
157      * <p>The key name for the object whose retention settings you want to
158      * retrieve.</p>
159      */
KeyHasBeenSet()160     inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
161 
162     /**
163      * <p>The key name for the object whose retention settings you want to
164      * retrieve.</p>
165      */
SetKey(const Aws::String & value)166     inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
167 
168     /**
169      * <p>The key name for the object whose retention settings you want to
170      * retrieve.</p>
171      */
SetKey(Aws::String && value)172     inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
173 
174     /**
175      * <p>The key name for the object whose retention settings you want to
176      * retrieve.</p>
177      */
SetKey(const char * value)178     inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
179 
180     /**
181      * <p>The key name for the object whose retention settings you want to
182      * retrieve.</p>
183      */
WithKey(const Aws::String & value)184     inline GetObjectRetentionRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
185 
186     /**
187      * <p>The key name for the object whose retention settings you want to
188      * retrieve.</p>
189      */
WithKey(Aws::String && value)190     inline GetObjectRetentionRequest& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
191 
192     /**
193      * <p>The key name for the object whose retention settings you want to
194      * retrieve.</p>
195      */
WithKey(const char * value)196     inline GetObjectRetentionRequest& WithKey(const char* value) { SetKey(value); return *this;}
197 
198 
199     /**
200      * <p>The version ID for the object whose retention settings you want to
201      * retrieve.</p>
202      */
GetVersionId()203     inline const Aws::String& GetVersionId() const{ return m_versionId; }
204 
205     /**
206      * <p>The version ID for the object whose retention settings you want to
207      * retrieve.</p>
208      */
VersionIdHasBeenSet()209     inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
210 
211     /**
212      * <p>The version ID for the object whose retention settings you want to
213      * retrieve.</p>
214      */
SetVersionId(const Aws::String & value)215     inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
216 
217     /**
218      * <p>The version ID for the object whose retention settings you want to
219      * retrieve.</p>
220      */
SetVersionId(Aws::String && value)221     inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
222 
223     /**
224      * <p>The version ID for the object whose retention settings you want to
225      * retrieve.</p>
226      */
SetVersionId(const char * value)227     inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
228 
229     /**
230      * <p>The version ID for the object whose retention settings you want to
231      * retrieve.</p>
232      */
WithVersionId(const Aws::String & value)233     inline GetObjectRetentionRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
234 
235     /**
236      * <p>The version ID for the object whose retention settings you want to
237      * retrieve.</p>
238      */
WithVersionId(Aws::String && value)239     inline GetObjectRetentionRequest& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
240 
241     /**
242      * <p>The version ID for the object whose retention settings you want to
243      * retrieve.</p>
244      */
WithVersionId(const char * value)245     inline GetObjectRetentionRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
246 
247 
248 
GetRequestPayer()249     inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
250 
251 
RequestPayerHasBeenSet()252     inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
253 
254 
SetRequestPayer(const RequestPayer & value)255     inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
256 
257 
SetRequestPayer(RequestPayer && value)258     inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); }
259 
260 
WithRequestPayer(const RequestPayer & value)261     inline GetObjectRetentionRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
262 
263 
WithRequestPayer(RequestPayer && value)264     inline GetObjectRetentionRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;}
265 
266 
267     /**
268      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
269      * different account, the request will fail with an HTTP <code>403 (Access
270      * Denied)</code> error.</p>
271      */
GetExpectedBucketOwner()272     inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
273 
274     /**
275      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
276      * different account, the request will fail with an HTTP <code>403 (Access
277      * Denied)</code> error.</p>
278      */
ExpectedBucketOwnerHasBeenSet()279     inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
280 
281     /**
282      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
283      * different account, the request will fail with an HTTP <code>403 (Access
284      * Denied)</code> error.</p>
285      */
SetExpectedBucketOwner(const Aws::String & value)286     inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
287 
288     /**
289      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
290      * different account, the request will fail with an HTTP <code>403 (Access
291      * Denied)</code> error.</p>
292      */
SetExpectedBucketOwner(Aws::String && value)293     inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
294 
295     /**
296      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
297      * different account, the request will fail with an HTTP <code>403 (Access
298      * Denied)</code> error.</p>
299      */
SetExpectedBucketOwner(const char * value)300     inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
301 
302     /**
303      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
304      * different account, the request will fail with an HTTP <code>403 (Access
305      * Denied)</code> error.</p>
306      */
WithExpectedBucketOwner(const Aws::String & value)307     inline GetObjectRetentionRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;}
308 
309     /**
310      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
311      * different account, the request will fail with an HTTP <code>403 (Access
312      * Denied)</code> error.</p>
313      */
WithExpectedBucketOwner(Aws::String && value)314     inline GetObjectRetentionRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
315 
316     /**
317      * <p>The account ID of the expected bucket owner. If the bucket is owned by a
318      * different account, the request will fail with an HTTP <code>403 (Access
319      * Denied)</code> error.</p>
320      */
WithExpectedBucketOwner(const char * value)321     inline GetObjectRetentionRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
322 
323 
324 
GetCustomizedAccessLogTag()325     inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
326 
327 
CustomizedAccessLogTagHasBeenSet()328     inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
329 
330 
SetCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)331     inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
332 
333 
SetCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)334     inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
335 
336 
WithCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)337     inline GetObjectRetentionRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;}
338 
339 
WithCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)340     inline GetObjectRetentionRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;}
341 
342 
AddCustomizedAccessLogTag(const Aws::String & key,const Aws::String & value)343     inline GetObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
344 
345 
AddCustomizedAccessLogTag(Aws::String && key,const Aws::String & value)346     inline GetObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
347 
348 
AddCustomizedAccessLogTag(const Aws::String & key,Aws::String && value)349     inline GetObjectRetentionRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
350 
351 
AddCustomizedAccessLogTag(Aws::String && key,Aws::String && value)352     inline GetObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
353 
354 
AddCustomizedAccessLogTag(const char * key,Aws::String && value)355     inline GetObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
356 
357 
AddCustomizedAccessLogTag(Aws::String && key,const char * value)358     inline GetObjectRetentionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
359 
360 
AddCustomizedAccessLogTag(const char * key,const char * value)361     inline GetObjectRetentionRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
362 
363   private:
364 
365     Aws::String m_bucket;
366     bool m_bucketHasBeenSet;
367 
368     Aws::String m_key;
369     bool m_keyHasBeenSet;
370 
371     Aws::String m_versionId;
372     bool m_versionIdHasBeenSet;
373 
374     RequestPayer m_requestPayer;
375     bool m_requestPayerHasBeenSet;
376 
377     Aws::String m_expectedBucketOwner;
378     bool m_expectedBucketOwnerHasBeenSet;
379 
380     Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
381     bool m_customizedAccessLogTagHasBeenSet;
382   };
383 
384 } // namespace Model
385 } // namespace S3Crt
386 } // namespace Aws
387