AWS SDK for C++  0.14.3
AWS SDK for C++
RestoreObjectRequest.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 RestoreObjectRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
59 
60 
61  inline RestoreObjectRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
62 
63 
64  inline RestoreObjectRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
65 
66 
67  inline const Aws::String& GetKey() const{ return m_key; }
68 
69 
70  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
71 
72 
73  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
74 
75 
76  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
77 
78 
79  inline RestoreObjectRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
80 
81 
82  inline RestoreObjectRequest& WithKey(Aws::String&& value) { SetKey(value); return *this;}
83 
84 
85  inline RestoreObjectRequest& WithKey(const char* value) { SetKey(value); return *this;}
86 
87 
88  inline const Aws::String& GetVersionId() const{ return m_versionId; }
89 
90 
91  inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
92 
93 
94  inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
95 
96 
97  inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
98 
99 
100  inline RestoreObjectRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
101 
102 
103  inline RestoreObjectRequest& WithVersionId(Aws::String&& value) { SetVersionId(value); return *this;}
104 
105 
106  inline RestoreObjectRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
107 
108 
109  inline const RestoreRequest& GetRestoreRequest() const{ return m_restoreRequest; }
110 
111 
112  inline void SetRestoreRequest(const RestoreRequest& value) { m_restoreRequestHasBeenSet = true; m_restoreRequest = value; }
113 
114 
115  inline void SetRestoreRequest(RestoreRequest&& value) { m_restoreRequestHasBeenSet = true; m_restoreRequest = value; }
116 
117 
118  inline RestoreObjectRequest& WithRestoreRequest(const RestoreRequest& value) { SetRestoreRequest(value); return *this;}
119 
120 
121  inline RestoreObjectRequest& WithRestoreRequest(RestoreRequest&& value) { SetRestoreRequest(value); return *this;}
122 
123 
124  inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
125 
126 
127  inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
128 
129 
130  inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
131 
132 
133  inline RestoreObjectRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
134 
135 
136  inline RestoreObjectRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(value); return *this;}
137 
138  private:
139  Aws::String m_bucket;
140  bool m_bucketHasBeenSet;
141  Aws::String m_key;
142  bool m_keyHasBeenSet;
143  Aws::String m_versionId;
144  bool m_versionIdHasBeenSet;
145  RestoreRequest m_restoreRequest;
146  bool m_restoreRequestHasBeenSet;
147  RequestPayer m_requestPayer;
148  bool m_requestPayerHasBeenSet;
149  };
150 
151 } // namespace Model
152 } // namespace S3
153 } // namespace Aws
RestoreObjectRequest & WithVersionId(const char *value)
void SetRequestPayer(const RequestPayer &value)
RestoreObjectRequest & WithBucket(const Aws::String &value)
void SetVersionId(Aws::String &&value)
const Aws::String & GetKey() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
RestoreObjectRequest & WithKey(Aws::String &&value)
RestoreObjectRequest & WithBucket(const char *value)
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
RestoreObjectRequest & WithRestoreRequest(RestoreRequest &&value)
RestoreObjectRequest & WithRequestPayer(const RequestPayer &value)
RestoreObjectRequest & WithRestoreRequest(const RestoreRequest &value)
void SetRestoreRequest(RestoreRequest &&value)
RestoreObjectRequest & WithRequestPayer(RequestPayer &&value)
void SetBucket(const Aws::String &value)
void SetKey(const Aws::String &value)
void SetRestoreRequest(const RestoreRequest &value)
RestoreObjectRequest & WithBucket(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::String & GetBucket() const
const RestoreRequest & GetRestoreRequest() const
void SetRequestPayer(RequestPayer &&value)
RestoreObjectRequest & WithVersionId(const Aws::String &value)
RestoreObjectRequest & WithKey(const Aws::String &value)
const RequestPayer & GetRequestPayer() const
RestoreObjectRequest & WithKey(const char *value)
const Aws::String & GetVersionId() const
RestoreObjectRequest & WithVersionId(Aws::String &&value)
void SetVersionId(const Aws::String &value)
JSON (JavaScript Object Notation).