AWS SDK for C++  0.14.3
AWS SDK for C++
DeleteObjectRequest.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>
20 
21 namespace Aws
22 {
23 namespace Http
24 {
25  class URI;
26 } //namespace Http
27 namespace S3
28 {
29 namespace Model
30 {
31 
35  {
36  public:
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  inline const Aws::String& GetBucket() const{ return m_bucket; }
46 
47 
48  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
49 
50 
51  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
52 
53 
54  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
55 
56 
57  inline DeleteObjectRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
58 
59 
60  inline DeleteObjectRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
61 
62 
63  inline DeleteObjectRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
64 
65 
66  inline const Aws::String& GetKey() const{ return m_key; }
67 
68 
69  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
70 
71 
72  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
73 
74 
75  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
76 
77 
78  inline DeleteObjectRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
79 
80 
81  inline DeleteObjectRequest& WithKey(Aws::String&& value) { SetKey(value); return *this;}
82 
83 
84  inline DeleteObjectRequest& WithKey(const char* value) { SetKey(value); return *this;}
85 
90  inline const Aws::String& GetMFA() const{ return m_mFA; }
91 
96  inline void SetMFA(const Aws::String& value) { m_mFAHasBeenSet = true; m_mFA = value; }
97 
102  inline void SetMFA(Aws::String&& value) { m_mFAHasBeenSet = true; m_mFA = value; }
103 
108  inline void SetMFA(const char* value) { m_mFAHasBeenSet = true; m_mFA.assign(value); }
109 
114  inline DeleteObjectRequest& WithMFA(const Aws::String& value) { SetMFA(value); return *this;}
115 
120  inline DeleteObjectRequest& WithMFA(Aws::String&& value) { SetMFA(value); return *this;}
121 
126  inline DeleteObjectRequest& WithMFA(const char* value) { SetMFA(value); return *this;}
127 
131  inline const Aws::String& GetVersionId() const{ return m_versionId; }
132 
136  inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
137 
141  inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
142 
146  inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
147 
151  inline DeleteObjectRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
152 
156  inline DeleteObjectRequest& WithVersionId(Aws::String&& value) { SetVersionId(value); return *this;}
157 
161  inline DeleteObjectRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
162 
163 
164  inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
165 
166 
167  inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
168 
169 
170  inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
171 
172 
173  inline DeleteObjectRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
174 
175 
176  inline DeleteObjectRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(value); return *this;}
177 
178  private:
179  Aws::String m_bucket;
180  bool m_bucketHasBeenSet;
181  Aws::String m_key;
182  bool m_keyHasBeenSet;
183  Aws::String m_mFA;
184  bool m_mFAHasBeenSet;
185  Aws::String m_versionId;
186  bool m_versionIdHasBeenSet;
187  RequestPayer m_requestPayer;
188  bool m_requestPayerHasBeenSet;
189  };
190 
191 } // namespace Model
192 } // namespace S3
193 } // namespace Aws
void SetBucket(const Aws::String &value)
DeleteObjectRequest & WithKey(const char *value)
DeleteObjectRequest & WithBucket(Aws::String &&value)
DeleteObjectRequest & WithKey(const Aws::String &value)
DeleteObjectRequest & WithVersionId(const char *value)
void SetMFA(const Aws::String &value)
DeleteObjectRequest & WithVersionId(const Aws::String &value)
DeleteObjectRequest & WithMFA(Aws::String &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
DeleteObjectRequest & WithBucket(const Aws::String &value)
DeleteObjectRequest & WithBucket(const char *value)
DeleteObjectRequest & WithKey(Aws::String &&value)
void SetKey(const Aws::String &value)
DeleteObjectRequest & WithMFA(const char *value)
void SetVersionId(Aws::String &&value)
const Aws::String & GetKey() const
void SetRequestPayer(RequestPayer &&value)
DeleteObjectRequest & WithRequestPayer(RequestPayer &&value)
const Aws::String & GetBucket() const
const RequestPayer & GetRequestPayer() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetVersionId(const Aws::String &value)
const Aws::String & GetMFA() const
void SetBucket(Aws::String &&value)
DeleteObjectRequest & WithMFA(const Aws::String &value)
void SetRequestPayer(const RequestPayer &value)
const Aws::String & GetVersionId() const
DeleteObjectRequest & WithRequestPayer(const RequestPayer &value)
JSON (JavaScript Object Notation).
DeleteObjectRequest & WithVersionId(Aws::String &&value)