AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ObjectVersion.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/ObjectVersionStorageClass.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
34 public:
35 AWS_S3_API ObjectVersion() = default;
36 AWS_S3_API ObjectVersion(const Aws::Utils::Xml::XmlNode& xmlNode);
38
39 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
40
42
45 inline const Aws::String& GetETag() const { return m_eTag; }
46 inline bool ETagHasBeenSet() const { return m_eTagHasBeenSet; }
47 template <typename ETagT = Aws::String>
48 void SetETag(ETagT&& value) {
49 m_eTagHasBeenSet = true;
50 m_eTag = std::forward<ETagT>(value);
51 }
52 template <typename ETagT = Aws::String>
53 ObjectVersion& WithETag(ETagT&& value) {
54 SetETag(std::forward<ETagT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::Vector<ChecksumAlgorithm>& GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
64 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
65 template <typename ChecksumAlgorithmT = Aws::Vector<ChecksumAlgorithm>>
66 void SetChecksumAlgorithm(ChecksumAlgorithmT&& value) {
67 m_checksumAlgorithmHasBeenSet = true;
68 m_checksumAlgorithm = std::forward<ChecksumAlgorithmT>(value);
69 }
70 template <typename ChecksumAlgorithmT = Aws::Vector<ChecksumAlgorithm>>
71 ObjectVersion& WithChecksumAlgorithm(ChecksumAlgorithmT&& value) {
72 SetChecksumAlgorithm(std::forward<ChecksumAlgorithmT>(value));
73 return *this;
74 }
76 m_checksumAlgorithmHasBeenSet = true;
77 m_checksumAlgorithm.push_back(value);
78 return *this;
79 }
81
83
89 inline ChecksumType GetChecksumType() const { return m_checksumType; }
90 inline bool ChecksumTypeHasBeenSet() const { return m_checksumTypeHasBeenSet; }
91 inline void SetChecksumType(ChecksumType value) {
92 m_checksumTypeHasBeenSet = true;
93 m_checksumType = value;
94 }
96 SetChecksumType(value);
97 return *this;
98 }
100
102
105 inline long long GetSize() const { return m_size; }
106 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
107 inline void SetSize(long long value) {
108 m_sizeHasBeenSet = true;
109 m_size = value;
110 }
111 inline ObjectVersion& WithSize(long long value) {
112 SetSize(value);
113 return *this;
114 }
116
118
121 inline ObjectVersionStorageClass GetStorageClass() const { return m_storageClass; }
122 inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; }
124 m_storageClassHasBeenSet = true;
125 m_storageClass = value;
126 }
128 SetStorageClass(value);
129 return *this;
130 }
132
134
137 inline const Aws::String& GetKey() const { return m_key; }
138 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
139 template <typename KeyT = Aws::String>
140 void SetKey(KeyT&& value) {
141 m_keyHasBeenSet = true;
142 m_key = std::forward<KeyT>(value);
143 }
144 template <typename KeyT = Aws::String>
145 ObjectVersion& WithKey(KeyT&& value) {
146 SetKey(std::forward<KeyT>(value));
147 return *this;
148 }
150
152
155 inline const Aws::String& GetVersionId() const { return m_versionId; }
156 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
157 template <typename VersionIdT = Aws::String>
158 void SetVersionId(VersionIdT&& value) {
159 m_versionIdHasBeenSet = true;
160 m_versionId = std::forward<VersionIdT>(value);
161 }
162 template <typename VersionIdT = Aws::String>
163 ObjectVersion& WithVersionId(VersionIdT&& value) {
164 SetVersionId(std::forward<VersionIdT>(value));
165 return *this;
166 }
168
170
174 inline bool GetIsLatest() const { return m_isLatest; }
175 inline bool IsLatestHasBeenSet() const { return m_isLatestHasBeenSet; }
176 inline void SetIsLatest(bool value) {
177 m_isLatestHasBeenSet = true;
178 m_isLatest = value;
179 }
180 inline ObjectVersion& WithIsLatest(bool value) {
181 SetIsLatest(value);
182 return *this;
183 }
185
187
190 inline const Aws::Utils::DateTime& GetLastModified() const { return m_lastModified; }
191 inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
192 template <typename LastModifiedT = Aws::Utils::DateTime>
193 void SetLastModified(LastModifiedT&& value) {
194 m_lastModifiedHasBeenSet = true;
195 m_lastModified = std::forward<LastModifiedT>(value);
196 }
197 template <typename LastModifiedT = Aws::Utils::DateTime>
198 ObjectVersion& WithLastModified(LastModifiedT&& value) {
199 SetLastModified(std::forward<LastModifiedT>(value));
200 return *this;
201 }
203
205
208 inline const Owner& GetOwner() const { return m_owner; }
209 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
210 template <typename OwnerT = Owner>
211 void SetOwner(OwnerT&& value) {
212 m_ownerHasBeenSet = true;
213 m_owner = std::forward<OwnerT>(value);
214 }
215 template <typename OwnerT = Owner>
216 ObjectVersion& WithOwner(OwnerT&& value) {
217 SetOwner(std::forward<OwnerT>(value));
218 return *this;
219 }
221
223
230 inline const RestoreStatus& GetRestoreStatus() const { return m_restoreStatus; }
231 inline bool RestoreStatusHasBeenSet() const { return m_restoreStatusHasBeenSet; }
232 template <typename RestoreStatusT = RestoreStatus>
233 void SetRestoreStatus(RestoreStatusT&& value) {
234 m_restoreStatusHasBeenSet = true;
235 m_restoreStatus = std::forward<RestoreStatusT>(value);
236 }
237 template <typename RestoreStatusT = RestoreStatus>
238 ObjectVersion& WithRestoreStatus(RestoreStatusT&& value) {
239 SetRestoreStatus(std::forward<RestoreStatusT>(value));
240 return *this;
241 }
243 private:
244 Aws::String m_eTag;
245
246 Aws::Vector<ChecksumAlgorithm> m_checksumAlgorithm;
247
248 ChecksumType m_checksumType{ChecksumType::NOT_SET};
249
250 long long m_size{0};
251
253
254 Aws::String m_key;
255
256 Aws::String m_versionId;
257
258 bool m_isLatest{false};
259
260 Aws::Utils::DateTime m_lastModified{};
261
262 Owner m_owner;
263
264 RestoreStatus m_restoreStatus;
265 bool m_eTagHasBeenSet = false;
266 bool m_checksumAlgorithmHasBeenSet = false;
267 bool m_checksumTypeHasBeenSet = false;
268 bool m_sizeHasBeenSet = false;
269 bool m_storageClassHasBeenSet = false;
270 bool m_keyHasBeenSet = false;
271 bool m_versionIdHasBeenSet = false;
272 bool m_isLatestHasBeenSet = false;
273 bool m_lastModifiedHasBeenSet = false;
274 bool m_ownerHasBeenSet = false;
275 bool m_restoreStatusHasBeenSet = false;
276};
277
278} // namespace Model
279} // namespace S3
280} // namespace Aws
void SetVersionId(VersionIdT &&value)
ObjectVersion & WithRestoreStatus(RestoreStatusT &&value)
const Owner & GetOwner() const
const Aws::Vector< ChecksumAlgorithm > & GetChecksumAlgorithm() const
ObjectVersion & WithChecksumAlgorithm(ChecksumAlgorithmT &&value)
ObjectVersion & WithOwner(OwnerT &&value)
void SetSize(long long value)
ObjectVersion & WithSize(long long value)
void SetChecksumType(ChecksumType value)
const Aws::String & GetETag() const
const Aws::String & GetVersionId() const
AWS_S3_API ObjectVersion & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
ObjectVersion & WithStorageClass(ObjectVersionStorageClass value)
void SetLastModified(LastModifiedT &&value)
void SetOwner(OwnerT &&value)
ObjectVersion & WithLastModified(LastModifiedT &&value)
AWS_S3_API ObjectVersion()=default
const RestoreStatus & GetRestoreStatus() const
AWS_S3_API ObjectVersion(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
const Aws::Utils::DateTime & GetLastModified() const
bool ChecksumAlgorithmHasBeenSet() const
void SetRestoreStatus(RestoreStatusT &&value)
void SetETag(ETagT &&value)
ChecksumType GetChecksumType() const
ObjectVersion & WithVersionId(VersionIdT &&value)
const Aws::String & GetKey() const
ObjectVersion & WithKey(KeyT &&value)
void SetStorageClass(ObjectVersionStorageClass value)
ObjectVersion & WithIsLatest(bool value)
void SetChecksumAlgorithm(ChecksumAlgorithmT &&value)
ObjectVersion & WithETag(ETagT &&value)
ObjectVersion & WithChecksumType(ChecksumType value)
ObjectVersionStorageClass GetStorageClass() const
ObjectVersion & AddChecksumAlgorithm(ChecksumAlgorithm value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector