AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
Object.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/DateTime.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/s3/model/ChecksumType.h>
12#include <aws/s3/model/ObjectStorageClass.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 class Object
39 {
40 public:
41 AWS_S3_API Object() = default;
42 AWS_S3_API Object(const Aws::Utils::Xml::XmlNode& xmlNode);
43 AWS_S3_API Object& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44
45 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
46
47
49
53 inline const Aws::String& GetKey() const { return m_key; }
54 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
55 template<typename KeyT = Aws::String>
56 void SetKey(KeyT&& value) { m_keyHasBeenSet = true; m_key = std::forward<KeyT>(value); }
57 template<typename KeyT = Aws::String>
58 Object& WithKey(KeyT&& value) { SetKey(std::forward<KeyT>(value)); return *this;}
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) { m_lastModifiedHasBeenSet = true; m_lastModified = std::forward<LastModifiedT>(value); }
69 template<typename LastModifiedT = Aws::Utils::DateTime>
70 Object& WithLastModified(LastModifiedT&& value) { SetLastModified(std::forward<LastModifiedT>(value)); return *this;}
72
74
92 inline const Aws::String& GetETag() const { return m_eTag; }
93 inline bool ETagHasBeenSet() const { return m_eTagHasBeenSet; }
94 template<typename ETagT = Aws::String>
95 void SetETag(ETagT&& value) { m_eTagHasBeenSet = true; m_eTag = std::forward<ETagT>(value); }
96 template<typename ETagT = Aws::String>
97 Object& WithETag(ETagT&& value) { SetETag(std::forward<ETagT>(value)); return *this;}
99
101
104 inline const Aws::Vector<ChecksumAlgorithm>& GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
105 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
106 template<typename ChecksumAlgorithmT = Aws::Vector<ChecksumAlgorithm>>
107 void SetChecksumAlgorithm(ChecksumAlgorithmT&& value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = std::forward<ChecksumAlgorithmT>(value); }
108 template<typename ChecksumAlgorithmT = Aws::Vector<ChecksumAlgorithm>>
109 Object& WithChecksumAlgorithm(ChecksumAlgorithmT&& value) { SetChecksumAlgorithm(std::forward<ChecksumAlgorithmT>(value)); return *this;}
110 inline Object& AddChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm.push_back(value); return *this; }
112
114
120 inline ChecksumType GetChecksumType() const { return m_checksumType; }
121 inline bool ChecksumTypeHasBeenSet() const { return m_checksumTypeHasBeenSet; }
122 inline void SetChecksumType(ChecksumType value) { m_checksumTypeHasBeenSet = true; m_checksumType = value; }
123 inline Object& WithChecksumType(ChecksumType value) { SetChecksumType(value); return *this;}
125
127
130 inline long long GetSize() const { return m_size; }
131 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
132 inline void SetSize(long long value) { m_sizeHasBeenSet = true; m_size = value; }
133 inline Object& WithSize(long long value) { SetSize(value); return *this;}
135
137
144 inline ObjectStorageClass GetStorageClass() const { return m_storageClass; }
145 inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; }
146 inline void SetStorageClass(ObjectStorageClass value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
147 inline Object& WithStorageClass(ObjectStorageClass value) { SetStorageClass(value); return *this;}
149
151
155 inline const Owner& GetOwner() const { return m_owner; }
156 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
157 template<typename OwnerT = Owner>
158 void SetOwner(OwnerT&& value) { m_ownerHasBeenSet = true; m_owner = std::forward<OwnerT>(value); }
159 template<typename OwnerT = Owner>
160 Object& WithOwner(OwnerT&& value) { SetOwner(std::forward<OwnerT>(value)); return *this;}
162
164
175 inline const RestoreStatus& GetRestoreStatus() const { return m_restoreStatus; }
176 inline bool RestoreStatusHasBeenSet() const { return m_restoreStatusHasBeenSet; }
177 template<typename RestoreStatusT = RestoreStatus>
178 void SetRestoreStatus(RestoreStatusT&& value) { m_restoreStatusHasBeenSet = true; m_restoreStatus = std::forward<RestoreStatusT>(value); }
179 template<typename RestoreStatusT = RestoreStatus>
180 Object& WithRestoreStatus(RestoreStatusT&& value) { SetRestoreStatus(std::forward<RestoreStatusT>(value)); return *this;}
182 private:
183
184 Aws::String m_key;
185 bool m_keyHasBeenSet = false;
186
187 Aws::Utils::DateTime m_lastModified{};
188 bool m_lastModifiedHasBeenSet = false;
189
190 Aws::String m_eTag;
191 bool m_eTagHasBeenSet = false;
192
193 Aws::Vector<ChecksumAlgorithm> m_checksumAlgorithm;
194 bool m_checksumAlgorithmHasBeenSet = false;
195
196 ChecksumType m_checksumType{ChecksumType::NOT_SET};
197 bool m_checksumTypeHasBeenSet = false;
198
199 long long m_size{0};
200 bool m_sizeHasBeenSet = false;
201
203 bool m_storageClassHasBeenSet = false;
204
205 Owner m_owner;
206 bool m_ownerHasBeenSet = false;
207
208 RestoreStatus m_restoreStatus;
209 bool m_restoreStatusHasBeenSet = false;
210 };
211
212} // namespace Model
213} // namespace S3
214} // namespace Aws
Object & WithKey(KeyT &&value)
Definition Object.h:58
bool RestoreStatusHasBeenSet() const
Definition Object.h:176
void SetRestoreStatus(RestoreStatusT &&value)
Definition Object.h:178
Object & WithRestoreStatus(RestoreStatusT &&value)
Definition Object.h:180
AWS_S3_API Object & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool SizeHasBeenSet() const
Definition Object.h:131
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
const Aws::String & GetKey() const
Definition Object.h:53
Object & AddChecksumAlgorithm(ChecksumAlgorithm value)
Definition Object.h:110
void SetKey(KeyT &&value)
Definition Object.h:56
void SetLastModified(LastModifiedT &&value)
Definition Object.h:68
bool KeyHasBeenSet() const
Definition Object.h:54
bool LastModifiedHasBeenSet() const
Definition Object.h:66
const Owner & GetOwner() const
Definition Object.h:155
Object & WithETag(ETagT &&value)
Definition Object.h:97
Object & WithStorageClass(ObjectStorageClass value)
Definition Object.h:147
void SetChecksumType(ChecksumType value)
Definition Object.h:122
Object & WithSize(long long value)
Definition Object.h:133
void SetStorageClass(ObjectStorageClass value)
Definition Object.h:146
ObjectStorageClass GetStorageClass() const
Definition Object.h:144
void SetSize(long long value)
Definition Object.h:132
void SetOwner(OwnerT &&value)
Definition Object.h:158
bool ChecksumAlgorithmHasBeenSet() const
Definition Object.h:105
AWS_S3_API Object()=default
bool StorageClassHasBeenSet() const
Definition Object.h:145
bool ChecksumTypeHasBeenSet() const
Definition Object.h:121
long long GetSize() const
Definition Object.h:130
ChecksumType GetChecksumType() const
Definition Object.h:120
Object & WithChecksumAlgorithm(ChecksumAlgorithmT &&value)
Definition Object.h:109
const RestoreStatus & GetRestoreStatus() const
Definition Object.h:175
Object & WithOwner(OwnerT &&value)
Definition Object.h:160
const Aws::String & GetETag() const
Definition Object.h:92
bool OwnerHasBeenSet() const
Definition Object.h:156
void SetChecksumAlgorithm(ChecksumAlgorithmT &&value)
Definition Object.h:107
const Aws::Vector< ChecksumAlgorithm > & GetChecksumAlgorithm() const
Definition Object.h:104
AWS_S3_API Object(const Aws::Utils::Xml::XmlNode &xmlNode)
Object & WithLastModified(LastModifiedT &&value)
Definition Object.h:70
void SetETag(ETagT &&value)
Definition Object.h:95
bool ETagHasBeenSet() const
Definition Object.h:93
Object & WithChecksumType(ChecksumType value)
Definition Object.h:123
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