AWS SDK for C++
AWS SDK for C++
Loading...
Searching...
No Matches
ObjectVersion.h
Go to the documentation of this file.
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
12#include <aws/s3/model/Owner.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Xml
21{
22 class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace S3
26{
27namespace Model
28{
29
36 {
37 public:
41
43
44
48 inline const Aws::String& GetETag() const{ return m_eTag; }
49
53 inline bool ETagHasBeenSet() const { return m_eTagHasBeenSet; }
54
58 inline void SetETag(const Aws::String& value) { m_eTagHasBeenSet = true; m_eTag = value; }
59
63 inline void SetETag(Aws::String&& value) { m_eTagHasBeenSet = true; m_eTag = std::move(value); }
64
68 inline void SetETag(const char* value) { m_eTagHasBeenSet = true; m_eTag.assign(value); }
69
73 inline ObjectVersion& WithETag(const Aws::String& value) { SetETag(value); return *this;}
74
78 inline ObjectVersion& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;}
79
83 inline ObjectVersion& WithETag(const char* value) { SetETag(value); return *this;}
84
85
89 inline const Aws::Vector<ChecksumAlgorithm>& GetChecksumAlgorithm() const{ return m_checksumAlgorithm; }
90
94 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
95
99 inline void SetChecksumAlgorithm(const Aws::Vector<ChecksumAlgorithm>& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
100
104 inline void SetChecksumAlgorithm(Aws::Vector<ChecksumAlgorithm>&& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = std::move(value); }
105
110
115
119 inline ObjectVersion& AddChecksumAlgorithm(const ChecksumAlgorithm& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm.push_back(value); return *this; }
120
124 inline ObjectVersion& AddChecksumAlgorithm(ChecksumAlgorithm&& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm.push_back(std::move(value)); return *this; }
125
126
130 inline long long GetSize() const{ return m_size; }
131
135 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
136
140 inline void SetSize(long long value) { m_sizeHasBeenSet = true; m_size = value; }
141
145 inline ObjectVersion& WithSize(long long value) { SetSize(value); return *this;}
146
147
151 inline const ObjectVersionStorageClass& GetStorageClass() const{ return m_storageClass; }
152
156 inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; }
157
161 inline void SetStorageClass(const ObjectVersionStorageClass& value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
162
166 inline void SetStorageClass(ObjectVersionStorageClass&& value) { m_storageClassHasBeenSet = true; m_storageClass = std::move(value); }
167
171 inline ObjectVersion& WithStorageClass(const ObjectVersionStorageClass& value) { SetStorageClass(value); return *this;}
172
176 inline ObjectVersion& WithStorageClass(ObjectVersionStorageClass&& value) { SetStorageClass(std::move(value)); return *this;}
177
178
182 inline const Aws::String& GetKey() const{ return m_key; }
183
187 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
188
192 inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
193
197 inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
198
202 inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
203
207 inline ObjectVersion& WithKey(const Aws::String& value) { SetKey(value); return *this;}
208
212 inline ObjectVersion& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
213
217 inline ObjectVersion& WithKey(const char* value) { SetKey(value); return *this;}
218
219
223 inline const Aws::String& GetVersionId() const{ return m_versionId; }
224
228 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
229
233 inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
234
238 inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
239
243 inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
244
248 inline ObjectVersion& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
249
253 inline ObjectVersion& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
254
258 inline ObjectVersion& WithVersionId(const char* value) { SetVersionId(value); return *this;}
259
260
265 inline bool GetIsLatest() const{ return m_isLatest; }
266
271 inline bool IsLatestHasBeenSet() const { return m_isLatestHasBeenSet; }
272
277 inline void SetIsLatest(bool value) { m_isLatestHasBeenSet = true; m_isLatest = value; }
278
283 inline ObjectVersion& WithIsLatest(bool value) { SetIsLatest(value); return *this;}
284
285
289 inline const Aws::Utils::DateTime& GetLastModified() const{ return m_lastModified; }
290
294 inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
295
299 inline void SetLastModified(const Aws::Utils::DateTime& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; }
300
304 inline void SetLastModified(Aws::Utils::DateTime&& value) { m_lastModifiedHasBeenSet = true; m_lastModified = std::move(value); }
305
309 inline ObjectVersion& WithLastModified(const Aws::Utils::DateTime& value) { SetLastModified(value); return *this;}
310
314 inline ObjectVersion& WithLastModified(Aws::Utils::DateTime&& value) { SetLastModified(std::move(value)); return *this;}
315
316
320 inline const Owner& GetOwner() const{ return m_owner; }
321
325 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
326
330 inline void SetOwner(const Owner& value) { m_ownerHasBeenSet = true; m_owner = value; }
331
335 inline void SetOwner(Owner&& value) { m_ownerHasBeenSet = true; m_owner = std::move(value); }
336
340 inline ObjectVersion& WithOwner(const Owner& value) { SetOwner(value); return *this;}
341
345 inline ObjectVersion& WithOwner(Owner&& value) { SetOwner(std::move(value)); return *this;}
346
347 private:
348
349 Aws::String m_eTag;
350 bool m_eTagHasBeenSet = false;
351
352 Aws::Vector<ChecksumAlgorithm> m_checksumAlgorithm;
353 bool m_checksumAlgorithmHasBeenSet = false;
354
355 long long m_size;
356 bool m_sizeHasBeenSet = false;
357
358 ObjectVersionStorageClass m_storageClass;
359 bool m_storageClassHasBeenSet = false;
360
361 Aws::String m_key;
362 bool m_keyHasBeenSet = false;
363
364 Aws::String m_versionId;
365 bool m_versionIdHasBeenSet = false;
366
367 bool m_isLatest;
368 bool m_isLatestHasBeenSet = false;
369
370 Aws::Utils::DateTime m_lastModified;
371 bool m_lastModifiedHasBeenSet = false;
372
373 Owner m_owner;
374 bool m_ownerHasBeenSet = false;
375 };
376
377} // namespace Model
378} // namespace S3
379} // namespace Aws
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
ObjectVersion & WithLastModified(const Aws::Utils::DateTime &value)
void SetStorageClass(ObjectVersionStorageClass &&value)
const Owner & GetOwner() const
const Aws::Vector< ChecksumAlgorithm > & GetChecksumAlgorithm() const
Definition: ObjectVersion.h:89
void SetSize(long long value)
ObjectVersion & WithSize(long long value)
ObjectVersion & WithOwner(const Owner &value)
void SetOwner(const Owner &value)
const Aws::String & GetETag() const
Definition: ObjectVersion.h:48
void SetChecksumAlgorithm(Aws::Vector< ChecksumAlgorithm > &&value)
void SetLastModified(Aws::Utils::DateTime &&value)
const Aws::String & GetVersionId() const
AWS_S3_API ObjectVersion & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const ObjectVersionStorageClass & GetStorageClass() const
ObjectVersion & WithVersionId(const char *value)
ObjectVersion & AddChecksumAlgorithm(ChecksumAlgorithm &&value)
ObjectVersion & WithStorageClass(const ObjectVersionStorageClass &value)
void SetLastModified(const Aws::Utils::DateTime &value)
ObjectVersion & WithChecksumAlgorithm(const Aws::Vector< ChecksumAlgorithm > &value)
void SetKey(const char *value)
void SetKey(const Aws::String &value)
void SetVersionId(Aws::String &&value)
void SetETag(const char *value)
Definition: ObjectVersion.h:68
ObjectVersion & WithKey(const Aws::String &value)
void SetChecksumAlgorithm(const Aws::Vector< ChecksumAlgorithm > &value)
Definition: ObjectVersion.h:99
AWS_S3_API ObjectVersion(const Aws::Utils::Xml::XmlNode &xmlNode)
ObjectVersion & WithVersionId(Aws::String &&value)
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
const Aws::Utils::DateTime & GetLastModified() const
ObjectVersion & AddChecksumAlgorithm(const ChecksumAlgorithm &value)
void SetVersionId(const Aws::String &value)
bool ChecksumAlgorithmHasBeenSet() const
Definition: ObjectVersion.h:94
ObjectVersion & WithKey(const char *value)
ObjectVersion & WithChecksumAlgorithm(Aws::Vector< ChecksumAlgorithm > &&value)
void SetVersionId(const char *value)
void SetStorageClass(const ObjectVersionStorageClass &value)
ObjectVersion & WithStorageClass(ObjectVersionStorageClass &&value)
ObjectVersion & WithETag(Aws::String &&value)
Definition: ObjectVersion.h:78
void SetETag(Aws::String &&value)
Definition: ObjectVersion.h:63
void SetKey(Aws::String &&value)
void SetETag(const Aws::String &value)
Definition: ObjectVersion.h:58
const Aws::String & GetKey() const
ObjectVersion & WithOwner(Owner &&value)
void SetOwner(Owner &&value)
ObjectVersion & WithETag(const Aws::String &value)
Definition: ObjectVersion.h:73
ObjectVersion & WithIsLatest(bool value)
ObjectVersion & WithKey(Aws::String &&value)
ObjectVersion & WithVersionId(const Aws::String &value)
ObjectVersion & WithETag(const char *value)
Definition: ObjectVersion.h:83
ObjectVersion & WithLastModified(Aws::Utils::DateTime &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector