AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
ObjectVersion.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/s3/model/ChecksumType.h>
11#include <aws/s3/model/ObjectVersionStorageClass.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/s3/model/Owner.h>
14#include <aws/s3/model/RestoreStatus.h>
15#include <aws/s3/model/ChecksumAlgorithm.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Xml
23{
24 class XmlNode;
25} // namespace Xml
26} // namespace Utils
27namespace S3
28{
29namespace Model
30{
31
38 {
39 public:
40 AWS_S3_API ObjectVersion() = default;
41 AWS_S3_API ObjectVersion(const Aws::Utils::Xml::XmlNode& xmlNode);
43
44 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
45
46
48
51 inline const Aws::String& GetETag() const { return m_eTag; }
52 inline bool ETagHasBeenSet() const { return m_eTagHasBeenSet; }
53 template<typename ETagT = Aws::String>
54 void SetETag(ETagT&& value) { m_eTagHasBeenSet = true; m_eTag = std::forward<ETagT>(value); }
55 template<typename ETagT = Aws::String>
56 ObjectVersion& WithETag(ETagT&& value) { SetETag(std::forward<ETagT>(value)); return *this;}
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) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = std::forward<ChecksumAlgorithmT>(value); }
67 template<typename ChecksumAlgorithmT = Aws::Vector<ChecksumAlgorithm>>
68 ObjectVersion& WithChecksumAlgorithm(ChecksumAlgorithmT&& value) { SetChecksumAlgorithm(std::forward<ChecksumAlgorithmT>(value)); return *this;}
69 inline ObjectVersion& AddChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm.push_back(value); return *this; }
71
73
79 inline ChecksumType GetChecksumType() const { return m_checksumType; }
80 inline bool ChecksumTypeHasBeenSet() const { return m_checksumTypeHasBeenSet; }
81 inline void SetChecksumType(ChecksumType value) { m_checksumTypeHasBeenSet = true; m_checksumType = value; }
82 inline ObjectVersion& WithChecksumType(ChecksumType value) { SetChecksumType(value); return *this;}
84
86
89 inline long long GetSize() const { return m_size; }
90 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
91 inline void SetSize(long long value) { m_sizeHasBeenSet = true; m_size = value; }
92 inline ObjectVersion& WithSize(long long value) { SetSize(value); return *this;}
94
96
99 inline ObjectVersionStorageClass GetStorageClass() const { return m_storageClass; }
100 inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; }
101 inline void SetStorageClass(ObjectVersionStorageClass value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
104
106
109 inline const Aws::String& GetKey() const { return m_key; }
110 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
111 template<typename KeyT = Aws::String>
112 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
113 template<typename KeyT = Aws::String>
114 ObjectVersion& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
116
118
121 inline const Aws::String& GetVersionId() const { return m_versionId; }
122 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
123 template<typename VersionIdT = Aws::String>
124 void SetVersionId(VersionIdT&& value) { m_versionIdHasBeenSet = true; m_versionId = std::forward<VersionIdT>(value); }
125 template<typename VersionIdT = Aws::String>
126 ObjectVersion& WithVersionId(VersionIdT&& value) { SetVersionId(std::forward<VersionIdT>(value)); return *this;}
128
130
134 inline bool GetIsLatest() const { return m_isLatest; }
135 inline bool IsLatestHasBeenSet() const { return m_isLatestHasBeenSet; }
136 inline void SetIsLatest(bool value) { m_isLatestHasBeenSet = true; m_isLatest = value; }
137 inline ObjectVersion& WithIsLatest(bool value) { SetIsLatest(value); return *this;}
139
141
144 inline const Aws::Utils::DateTime& GetLastModified() const { return m_lastModified; }
145 inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
146 template<typename LastModifiedT = Aws::Utils::DateTime>
147 void SetLastModified(LastModifiedT&& value) { m_lastModifiedHasBeenSet = true; m_lastModified = std::forward<LastModifiedT>(value); }
148 template<typename LastModifiedT = Aws::Utils::DateTime>
149 ObjectVersion& WithLastModified(LastModifiedT&& value) { SetLastModified(std::forward<LastModifiedT>(value)); return *this;}
151
153
156 inline const Owner& GetOwner() const { return m_owner; }
157 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
158 template<typename OwnerT = Owner>
159 void SetOwner(OwnerT&& value) { m_ownerHasBeenSet = true; m_owner = std::forward<OwnerT>(value); }
160 template<typename OwnerT = Owner>
161 ObjectVersion& WithOwner(OwnerT&& value) { SetOwner(std::forward<OwnerT>(value)); return *this;}
163
165
172 inline const RestoreStatus& GetRestoreStatus() const { return m_restoreStatus; }
173 inline bool RestoreStatusHasBeenSet() const { return m_restoreStatusHasBeenSet; }
174 template<typename RestoreStatusT = RestoreStatus>
175 void SetRestoreStatus(RestoreStatusT&& value) { m_restoreStatusHasBeenSet = true; m_restoreStatus = std::forward<RestoreStatusT>(value); }
176 template<typename RestoreStatusT = RestoreStatus>
177 ObjectVersion& WithRestoreStatus(RestoreStatusT&& value) { SetRestoreStatus(std::forward<RestoreStatusT>(value)); return *this;}
179 private:
180
181 Aws::String m_eTag;
182 bool m_eTagHasBeenSet = false;
183
184 Aws::Vector<ChecksumAlgorithm> m_checksumAlgorithm;
185 bool m_checksumAlgorithmHasBeenSet = false;
186
187 ChecksumType m_checksumType{ChecksumType::NOT_SET};
188 bool m_checksumTypeHasBeenSet = false;
189
190 long long m_size{0};
191 bool m_sizeHasBeenSet = false;
192
194 bool m_storageClassHasBeenSet = false;
195
196 Aws::String m_key;
197 bool m_keyHasBeenSet = false;
198
199 Aws::String m_versionId;
200 bool m_versionIdHasBeenSet = false;
201
202 bool m_isLatest{false};
203 bool m_isLatestHasBeenSet = false;
204
205 Aws::Utils::DateTime m_lastModified{};
206 bool m_lastModifiedHasBeenSet = false;
207
208 Owner m_owner;
209 bool m_ownerHasBeenSet = false;
210
211 RestoreStatus m_restoreStatus;
212 bool m_restoreStatusHasBeenSet = false;
213 };
214
215} // namespace Model
216} // namespace S3
217} // 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