AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
Object.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/s3/S3_EXPORTS.h>
11#include <aws/s3/model/ChecksumAlgorithm.h>
12#include <aws/s3/model/ChecksumType.h>
13#include <aws/s3/model/ObjectStorageClass.h>
14#include <aws/s3/model/Owner.h>
15#include <aws/s3/model/RestoreStatus.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Xml {
22class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace S3 {
26namespace Model {
27
34class Object {
35 public:
36 AWS_S3_API Object() = default;
37 AWS_S3_API Object(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_S3_API Object& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
41
43
47 inline const Aws::String& GetKey() const { return m_key; }
48 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
49 template <typename KeyT = Aws::String>
50 void SetKey(KeyT&& value) {
51 m_keyHasBeenSet = true;
52 m_key = std::forward<KeyT>(value);
53 }
54 template <typename KeyT = Aws::String>
55 Object& WithKey(KeyT&& value) {
56 SetKey(std::forward<KeyT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::Utils::DateTime& GetLastModified() const { return m_lastModified; }
66 inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
67 template <typename LastModifiedT = Aws::Utils::DateTime>
68 void SetLastModified(LastModifiedT&& value) {
69 m_lastModifiedHasBeenSet = true;
70 m_lastModified = std::forward<LastModifiedT>(value);
71 }
72 template <typename LastModifiedT = Aws::Utils::DateTime>
73 Object& WithLastModified(LastModifiedT&& value) {
74 SetLastModified(std::forward<LastModifiedT>(value));
75 return *this;
76 }
78
80
98 inline const Aws::String& GetETag() const { return m_eTag; }
99 inline bool ETagHasBeenSet() const { return m_eTagHasBeenSet; }
100 template <typename ETagT = Aws::String>
101 void SetETag(ETagT&& value) {
102 m_eTagHasBeenSet = true;
103 m_eTag = std::forward<ETagT>(value);
104 }
105 template <typename ETagT = Aws::String>
106 Object& WithETag(ETagT&& value) {
107 SetETag(std::forward<ETagT>(value));
108 return *this;
109 }
111
113
116 inline const Aws::Vector<ChecksumAlgorithm>& GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
117 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
118 template <typename ChecksumAlgorithmT = Aws::Vector<ChecksumAlgorithm>>
119 void SetChecksumAlgorithm(ChecksumAlgorithmT&& value) {
120 m_checksumAlgorithmHasBeenSet = true;
121 m_checksumAlgorithm = std::forward<ChecksumAlgorithmT>(value);
122 }
123 template <typename ChecksumAlgorithmT = Aws::Vector<ChecksumAlgorithm>>
124 Object& WithChecksumAlgorithm(ChecksumAlgorithmT&& value) {
125 SetChecksumAlgorithm(std::forward<ChecksumAlgorithmT>(value));
126 return *this;
127 }
129 m_checksumAlgorithmHasBeenSet = true;
130 m_checksumAlgorithm.push_back(value);
131 return *this;
132 }
134
136
142 inline ChecksumType GetChecksumType() const { return m_checksumType; }
143 inline bool ChecksumTypeHasBeenSet() const { return m_checksumTypeHasBeenSet; }
144 inline void SetChecksumType(ChecksumType value) {
145 m_checksumTypeHasBeenSet = true;
146 m_checksumType = value;
147 }
149 SetChecksumType(value);
150 return *this;
151 }
153
155
158 inline long long GetSize() const { return m_size; }
159 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
160 inline void SetSize(long long value) {
161 m_sizeHasBeenSet = true;
162 m_size = value;
163 }
164 inline Object& WithSize(long long value) {
165 SetSize(value);
166 return *this;
167 }
169
171
178 inline ObjectStorageClass GetStorageClass() const { return m_storageClass; }
179 inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; }
181 m_storageClassHasBeenSet = true;
182 m_storageClass = value;
183 }
185 SetStorageClass(value);
186 return *this;
187 }
189
191
195 inline const Owner& GetOwner() const { return m_owner; }
196 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
197 template <typename OwnerT = Owner>
198 void SetOwner(OwnerT&& value) {
199 m_ownerHasBeenSet = true;
200 m_owner = std::forward<OwnerT>(value);
201 }
202 template <typename OwnerT = Owner>
203 Object& WithOwner(OwnerT&& value) {
204 SetOwner(std::forward<OwnerT>(value));
205 return *this;
206 }
208
210
221 inline const RestoreStatus& GetRestoreStatus() const { return m_restoreStatus; }
222 inline bool RestoreStatusHasBeenSet() const { return m_restoreStatusHasBeenSet; }
223 template <typename RestoreStatusT = RestoreStatus>
224 void SetRestoreStatus(RestoreStatusT&& value) {
225 m_restoreStatusHasBeenSet = true;
226 m_restoreStatus = std::forward<RestoreStatusT>(value);
227 }
228 template <typename RestoreStatusT = RestoreStatus>
229 Object& WithRestoreStatus(RestoreStatusT&& value) {
230 SetRestoreStatus(std::forward<RestoreStatusT>(value));
231 return *this;
232 }
234 private:
235 Aws::String m_key;
236
237 Aws::Utils::DateTime m_lastModified{};
238
239 Aws::String m_eTag;
240
241 Aws::Vector<ChecksumAlgorithm> m_checksumAlgorithm;
242
243 ChecksumType m_checksumType{ChecksumType::NOT_SET};
244
245 long long m_size{0};
246
248
249 Owner m_owner;
250
251 RestoreStatus m_restoreStatus;
252 bool m_keyHasBeenSet = false;
253 bool m_lastModifiedHasBeenSet = false;
254 bool m_eTagHasBeenSet = false;
255 bool m_checksumAlgorithmHasBeenSet = false;
256 bool m_checksumTypeHasBeenSet = false;
257 bool m_sizeHasBeenSet = false;
258 bool m_storageClassHasBeenSet = false;
259 bool m_ownerHasBeenSet = false;
260 bool m_restoreStatusHasBeenSet = false;
261};
262
263} // namespace Model
264} // namespace S3
265} // namespace Aws
Object & WithKey(KeyT &&value)
Definition Object.h:55
bool RestoreStatusHasBeenSet() const
Definition Object.h:222
void SetRestoreStatus(RestoreStatusT &&value)
Definition Object.h:224
Object & WithRestoreStatus(RestoreStatusT &&value)
Definition Object.h:229
AWS_S3_API Object & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool SizeHasBeenSet() const
Definition Object.h:159
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
const Aws::String & GetKey() const
Definition Object.h:47
Object & AddChecksumAlgorithm(ChecksumAlgorithm value)
Definition Object.h:128
void SetKey(KeyT &&value)
Definition Object.h:50
void SetLastModified(LastModifiedT &&value)
Definition Object.h:68
bool KeyHasBeenSet() const
Definition Object.h:48
bool LastModifiedHasBeenSet() const
Definition Object.h:66
const Owner & GetOwner() const
Definition Object.h:195
Object & WithETag(ETagT &&value)
Definition Object.h:106
Object & WithStorageClass(ObjectStorageClass value)
Definition Object.h:184
void SetChecksumType(ChecksumType value)
Definition Object.h:144
Object & WithSize(long long value)
Definition Object.h:164
void SetStorageClass(ObjectStorageClass value)
Definition Object.h:180
ObjectStorageClass GetStorageClass() const
Definition Object.h:178
void SetSize(long long value)
Definition Object.h:160
void SetOwner(OwnerT &&value)
Definition Object.h:198
bool ChecksumAlgorithmHasBeenSet() const
Definition Object.h:117
AWS_S3_API Object()=default
bool StorageClassHasBeenSet() const
Definition Object.h:179
bool ChecksumTypeHasBeenSet() const
Definition Object.h:143
long long GetSize() const
Definition Object.h:158
ChecksumType GetChecksumType() const
Definition Object.h:142
Object & WithChecksumAlgorithm(ChecksumAlgorithmT &&value)
Definition Object.h:124
const RestoreStatus & GetRestoreStatus() const
Definition Object.h:221
Object & WithOwner(OwnerT &&value)
Definition Object.h:203
const Aws::String & GetETag() const
Definition Object.h:98
bool OwnerHasBeenSet() const
Definition Object.h:196
void SetChecksumAlgorithm(ChecksumAlgorithmT &&value)
Definition Object.h:119
const Aws::Vector< ChecksumAlgorithm > & GetChecksumAlgorithm() const
Definition Object.h:116
AWS_S3_API Object(const Aws::Utils::Xml::XmlNode &xmlNode)
Object & WithLastModified(LastModifiedT &&value)
Definition Object.h:73
void SetETag(ETagT &&value)
Definition Object.h:101
bool ETagHasBeenSet() const
Definition Object.h:99
Object & WithChecksumType(ChecksumType value)
Definition Object.h:148
const Aws::Utils::DateTime & GetLastModified() const
Definition Object.h:65
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector