AWS SDK for C++  0.14.3
AWS SDK for C++
HeadObjectRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/s3/S3_EXPORTS.h>
17 #include <aws/s3/S3Request.h>
21 
22 namespace Aws
23 {
24 namespace Http
25 {
26  class URI;
27 } //namespace Http
28 namespace S3
29 {
30 namespace Model
31 {
32 
36  {
37  public:
39  Aws::String SerializePayload() const override;
40 
41  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
42 
43  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
44 
45 
46  inline const Aws::String& GetBucket() const{ return m_bucket; }
47 
48 
49  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
50 
51 
52  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
53 
54 
55  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
56 
57 
58  inline HeadObjectRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
59 
60 
61  inline HeadObjectRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
62 
63 
64  inline HeadObjectRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
65 
70  inline const Aws::String& GetIfMatch() const{ return m_ifMatch; }
71 
76  inline void SetIfMatch(const Aws::String& value) { m_ifMatchHasBeenSet = true; m_ifMatch = value; }
77 
82  inline void SetIfMatch(Aws::String&& value) { m_ifMatchHasBeenSet = true; m_ifMatch = value; }
83 
88  inline void SetIfMatch(const char* value) { m_ifMatchHasBeenSet = true; m_ifMatch.assign(value); }
89 
94  inline HeadObjectRequest& WithIfMatch(const Aws::String& value) { SetIfMatch(value); return *this;}
95 
100  inline HeadObjectRequest& WithIfMatch(Aws::String&& value) { SetIfMatch(value); return *this;}
101 
106  inline HeadObjectRequest& WithIfMatch(const char* value) { SetIfMatch(value); return *this;}
107 
112  inline const Aws::Utils::DateTime& GetIfModifiedSince() const{ return m_ifModifiedSince; }
113 
118  inline void SetIfModifiedSince(const Aws::Utils::DateTime& value) { m_ifModifiedSinceHasBeenSet = true; m_ifModifiedSince = value; }
119 
124  inline void SetIfModifiedSince(Aws::Utils::DateTime&& value) { m_ifModifiedSinceHasBeenSet = true; m_ifModifiedSince = value; }
125 
130  inline HeadObjectRequest& WithIfModifiedSince(const Aws::Utils::DateTime& value) { SetIfModifiedSince(value); return *this;}
131 
136  inline HeadObjectRequest& WithIfModifiedSince(Aws::Utils::DateTime&& value) { SetIfModifiedSince(value); return *this;}
137 
142  inline const Aws::String& GetIfNoneMatch() const{ return m_ifNoneMatch; }
143 
148  inline void SetIfNoneMatch(const Aws::String& value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch = value; }
149 
154  inline void SetIfNoneMatch(Aws::String&& value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch = value; }
155 
160  inline void SetIfNoneMatch(const char* value) { m_ifNoneMatchHasBeenSet = true; m_ifNoneMatch.assign(value); }
161 
166  inline HeadObjectRequest& WithIfNoneMatch(const Aws::String& value) { SetIfNoneMatch(value); return *this;}
167 
172  inline HeadObjectRequest& WithIfNoneMatch(Aws::String&& value) { SetIfNoneMatch(value); return *this;}
173 
178  inline HeadObjectRequest& WithIfNoneMatch(const char* value) { SetIfNoneMatch(value); return *this;}
179 
184  inline const Aws::Utils::DateTime& GetIfUnmodifiedSince() const{ return m_ifUnmodifiedSince; }
185 
190  inline void SetIfUnmodifiedSince(const Aws::Utils::DateTime& value) { m_ifUnmodifiedSinceHasBeenSet = true; m_ifUnmodifiedSince = value; }
191 
196  inline void SetIfUnmodifiedSince(Aws::Utils::DateTime&& value) { m_ifUnmodifiedSinceHasBeenSet = true; m_ifUnmodifiedSince = value; }
197 
202  inline HeadObjectRequest& WithIfUnmodifiedSince(const Aws::Utils::DateTime& value) { SetIfUnmodifiedSince(value); return *this;}
203 
208  inline HeadObjectRequest& WithIfUnmodifiedSince(Aws::Utils::DateTime&& value) { SetIfUnmodifiedSince(value); return *this;}
209 
210 
211  inline const Aws::String& GetKey() const{ return m_key; }
212 
213 
214  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
215 
216 
217  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
218 
219 
220  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
221 
222 
223  inline HeadObjectRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
224 
225 
226  inline HeadObjectRequest& WithKey(Aws::String&& value) { SetKey(value); return *this;}
227 
228 
229  inline HeadObjectRequest& WithKey(const char* value) { SetKey(value); return *this;}
230 
236  inline const Aws::String& GetRange() const{ return m_range; }
237 
243  inline void SetRange(const Aws::String& value) { m_rangeHasBeenSet = true; m_range = value; }
244 
250  inline void SetRange(Aws::String&& value) { m_rangeHasBeenSet = true; m_range = value; }
251 
257  inline void SetRange(const char* value) { m_rangeHasBeenSet = true; m_range.assign(value); }
258 
264  inline HeadObjectRequest& WithRange(const Aws::String& value) { SetRange(value); return *this;}
265 
271  inline HeadObjectRequest& WithRange(Aws::String&& value) { SetRange(value); return *this;}
272 
278  inline HeadObjectRequest& WithRange(const char* value) { SetRange(value); return *this;}
279 
283  inline const Aws::String& GetVersionId() const{ return m_versionId; }
284 
288  inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
289 
293  inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
294 
298  inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
299 
303  inline HeadObjectRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
304 
308  inline HeadObjectRequest& WithVersionId(Aws::String&& value) { SetVersionId(value); return *this;}
309 
313  inline HeadObjectRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
314 
318  inline const Aws::String& GetSSECustomerAlgorithm() const{ return m_sSECustomerAlgorithm; }
319 
323  inline void SetSSECustomerAlgorithm(const Aws::String& value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm = value; }
324 
328  inline void SetSSECustomerAlgorithm(Aws::String&& value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm = value; }
329 
333  inline void SetSSECustomerAlgorithm(const char* value) { m_sSECustomerAlgorithmHasBeenSet = true; m_sSECustomerAlgorithm.assign(value); }
334 
338  inline HeadObjectRequest& WithSSECustomerAlgorithm(const Aws::String& value) { SetSSECustomerAlgorithm(value); return *this;}
339 
343  inline HeadObjectRequest& WithSSECustomerAlgorithm(Aws::String&& value) { SetSSECustomerAlgorithm(value); return *this;}
344 
348  inline HeadObjectRequest& WithSSECustomerAlgorithm(const char* value) { SetSSECustomerAlgorithm(value); return *this;}
349 
357  inline const Aws::String& GetSSECustomerKey() const{ return m_sSECustomerKey; }
358 
366  inline void SetSSECustomerKey(const Aws::String& value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey = value; }
367 
375  inline void SetSSECustomerKey(Aws::String&& value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey = value; }
376 
384  inline void SetSSECustomerKey(const char* value) { m_sSECustomerKeyHasBeenSet = true; m_sSECustomerKey.assign(value); }
385 
393  inline HeadObjectRequest& WithSSECustomerKey(const Aws::String& value) { SetSSECustomerKey(value); return *this;}
394 
402  inline HeadObjectRequest& WithSSECustomerKey(Aws::String&& value) { SetSSECustomerKey(value); return *this;}
403 
411  inline HeadObjectRequest& WithSSECustomerKey(const char* value) { SetSSECustomerKey(value); return *this;}
412 
418  inline const Aws::String& GetSSECustomerKeyMD5() const{ return m_sSECustomerKeyMD5; }
419 
425  inline void SetSSECustomerKeyMD5(const Aws::String& value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5 = value; }
426 
432  inline void SetSSECustomerKeyMD5(Aws::String&& value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5 = value; }
433 
439  inline void SetSSECustomerKeyMD5(const char* value) { m_sSECustomerKeyMD5HasBeenSet = true; m_sSECustomerKeyMD5.assign(value); }
440 
446  inline HeadObjectRequest& WithSSECustomerKeyMD5(const Aws::String& value) { SetSSECustomerKeyMD5(value); return *this;}
447 
453  inline HeadObjectRequest& WithSSECustomerKeyMD5(Aws::String&& value) { SetSSECustomerKeyMD5(value); return *this;}
454 
460  inline HeadObjectRequest& WithSSECustomerKeyMD5(const char* value) { SetSSECustomerKeyMD5(value); return *this;}
461 
462 
463  inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
464 
465 
466  inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
467 
468 
469  inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
470 
471 
472  inline HeadObjectRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
473 
474 
475  inline HeadObjectRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(value); return *this;}
476 
477  private:
478  Aws::String m_bucket;
479  bool m_bucketHasBeenSet;
480  Aws::String m_ifMatch;
481  bool m_ifMatchHasBeenSet;
482  Aws::Utils::DateTime m_ifModifiedSince;
483  bool m_ifModifiedSinceHasBeenSet;
484  Aws::String m_ifNoneMatch;
485  bool m_ifNoneMatchHasBeenSet;
486  Aws::Utils::DateTime m_ifUnmodifiedSince;
487  bool m_ifUnmodifiedSinceHasBeenSet;
488  Aws::String m_key;
489  bool m_keyHasBeenSet;
490  Aws::String m_range;
491  bool m_rangeHasBeenSet;
492  Aws::String m_versionId;
493  bool m_versionIdHasBeenSet;
494  Aws::String m_sSECustomerAlgorithm;
495  bool m_sSECustomerAlgorithmHasBeenSet;
496  Aws::String m_sSECustomerKey;
497  bool m_sSECustomerKeyHasBeenSet;
498  Aws::String m_sSECustomerKeyMD5;
499  bool m_sSECustomerKeyMD5HasBeenSet;
500  RequestPayer m_requestPayer;
501  bool m_requestPayerHasBeenSet;
502  };
503 
504 } // namespace Model
505 } // namespace S3
506 } // namespace Aws
void SetSSECustomerAlgorithm(const char *value)
void SetSSECustomerAlgorithm(Aws::String &&value)
void SetRange(const Aws::String &value)
const Aws::String & GetSSECustomerKey() const
HeadObjectRequest & WithIfNoneMatch(const char *value)
const Aws::String & GetBucket() const
HeadObjectRequest & WithRange(const Aws::String &value)
void SetSSECustomerKey(const Aws::String &value)
void SetIfNoneMatch(Aws::String &&value)
void SetIfMatch(Aws::String &&value)
HeadObjectRequest & WithKey(const Aws::String &value)
HeadObjectRequest & WithSSECustomerKeyMD5(const char *value)
HeadObjectRequest & WithIfMatch(Aws::String &&value)
void SetVersionId(Aws::String &&value)
HeadObjectRequest & WithSSECustomerAlgorithm(const Aws::String &value)
const Aws::Utils::DateTime & GetIfModifiedSince() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
HeadObjectRequest & WithRequestPayer(const RequestPayer &value)
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
void SetIfModifiedSince(const Aws::Utils::DateTime &value)
void SetIfNoneMatch(const char *value)
HeadObjectRequest & WithIfModifiedSince(const Aws::Utils::DateTime &value)
const Aws::String & GetVersionId() const
HeadObjectRequest & WithVersionId(Aws::String &&value)
HeadObjectRequest & WithRange(Aws::String &&value)
HeadObjectRequest & WithSSECustomerKey(const Aws::String &value)
void SetRange(Aws::String &&value)
const Aws::Utils::DateTime & GetIfUnmodifiedSince() const
HeadObjectRequest & WithIfUnmodifiedSince(const Aws::Utils::DateTime &value)
HeadObjectRequest & WithIfNoneMatch(Aws::String &&value)
void SetSSECustomerKey(const char *value)
void SetSSECustomerAlgorithm(const Aws::String &value)
const Aws::String & GetIfMatch() const
const RequestPayer & GetRequestPayer() const
HeadObjectRequest & WithSSECustomerKey(const char *value)
void SetIfModifiedSince(Aws::Utils::DateTime &&value)
void SetSSECustomerKeyMD5(const char *value)
HeadObjectRequest & WithBucket(Aws::String &&value)
HeadObjectRequest & WithBucket(const Aws::String &value)
void SetKey(Aws::String &&value)
HeadObjectRequest & WithSSECustomerKeyMD5(const Aws::String &value)
void SetKey(const Aws::String &value)
const Aws::String & GetIfNoneMatch() const
void SetVersionId(const Aws::String &value)
void SetBucket(const Aws::String &value)
void SetSSECustomerKey(Aws::String &&value)
HeadObjectRequest & WithIfMatch(const char *value)
void SetSSECustomerKeyMD5(const Aws::String &value)
void SetIfUnmodifiedSince(const Aws::Utils::DateTime &value)
void SetRequestPayer(const RequestPayer &value)
HeadObjectRequest & WithIfMatch(const Aws::String &value)
HeadObjectRequest & WithKey(Aws::String &&value)
void SetBucket(const char *value)
HeadObjectRequest & WithIfModifiedSince(Aws::Utils::DateTime &&value)
void SetRange(const char *value)
HeadObjectRequest & WithIfUnmodifiedSince(Aws::Utils::DateTime &&value)
HeadObjectRequest & WithIfNoneMatch(const Aws::String &value)
HeadObjectRequest & WithRange(const char *value)
void SetIfMatch(const char *value)
void SetIfUnmodifiedSince(Aws::Utils::DateTime &&value)
HeadObjectRequest & WithBucket(const char *value)
void SetVersionId(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
HeadObjectRequest & WithSSECustomerAlgorithm(Aws::String &&value)
const Aws::String & GetKey() const
HeadObjectRequest & WithSSECustomerKeyMD5(Aws::String &&value)
void SetIfNoneMatch(const Aws::String &value)
HeadObjectRequest & WithRequestPayer(RequestPayer &&value)
HeadObjectRequest & WithVersionId(const char *value)
HeadObjectRequest & WithKey(const char *value)
HeadObjectRequest & WithVersionId(const Aws::String &value)
const Aws::String & GetSSECustomerAlgorithm() const
void SetSSECustomerKeyMD5(Aws::String &&value)
HeadObjectRequest & WithSSECustomerAlgorithm(const char *value)
void SetBucket(Aws::String &&value)
const Aws::String & GetRange() const
const Aws::String & GetSSECustomerKeyMD5() const
JSON (JavaScript Object Notation).
HeadObjectRequest & WithSSECustomerKey(Aws::String &&value)
void SetIfMatch(const Aws::String &value)
void SetRequestPayer(RequestPayer &&value)