AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
S3Object.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/macie2/Macie2_EXPORTS.h>
11#include <aws/macie2/model/KeyValuePair.h>
12#include <aws/macie2/model/ServerSideEncryption.h>
13#include <aws/macie2/model/StorageClass.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Macie2 {
25namespace Model {
26
33class S3Object {
34 public:
35 AWS_MACIE2_API S3Object() = default;
36 AWS_MACIE2_API S3Object(Aws::Utils::Json::JsonView jsonValue);
37 AWS_MACIE2_API S3Object& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_MACIE2_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::String& GetBucketArn() const { return m_bucketArn; }
45 inline bool BucketArnHasBeenSet() const { return m_bucketArnHasBeenSet; }
46 template <typename BucketArnT = Aws::String>
47 void SetBucketArn(BucketArnT&& value) {
48 m_bucketArnHasBeenSet = true;
49 m_bucketArn = std::forward<BucketArnT>(value);
50 }
51 template <typename BucketArnT = Aws::String>
52 S3Object& WithBucketArn(BucketArnT&& value) {
53 SetBucketArn(std::forward<BucketArnT>(value));
54 return *this;
55 }
57
59
64 inline const Aws::String& GetETag() const { return m_eTag; }
65 inline bool ETagHasBeenSet() const { return m_eTagHasBeenSet; }
66 template <typename ETagT = Aws::String>
67 void SetETag(ETagT&& value) {
68 m_eTagHasBeenSet = true;
69 m_eTag = std::forward<ETagT>(value);
70 }
71 template <typename ETagT = Aws::String>
72 S3Object& WithETag(ETagT&& value) {
73 SetETag(std::forward<ETagT>(value));
74 return *this;
75 }
77
79
83 inline const Aws::String& GetExtension() const { return m_extension; }
84 inline bool ExtensionHasBeenSet() const { return m_extensionHasBeenSet; }
85 template <typename ExtensionT = Aws::String>
86 void SetExtension(ExtensionT&& value) {
87 m_extensionHasBeenSet = true;
88 m_extension = std::forward<ExtensionT>(value);
89 }
90 template <typename ExtensionT = Aws::String>
91 S3Object& WithExtension(ExtensionT&& value) {
92 SetExtension(std::forward<ExtensionT>(value));
93 return *this;
94 }
96
98
102 inline const Aws::String& GetKey() const { return m_key; }
103 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
104 template <typename KeyT = Aws::String>
105 void SetKey(KeyT&& value) {
106 m_keyHasBeenSet = true;
107 m_key = std::forward<KeyT>(value);
108 }
109 template <typename KeyT = Aws::String>
110 S3Object& WithKey(KeyT&& value) {
111 SetKey(std::forward<KeyT>(value));
112 return *this;
113 }
115
117
121 inline const Aws::Utils::DateTime& GetLastModified() const { return m_lastModified; }
122 inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
123 template <typename LastModifiedT = Aws::Utils::DateTime>
124 void SetLastModified(LastModifiedT&& value) {
125 m_lastModifiedHasBeenSet = true;
126 m_lastModified = std::forward<LastModifiedT>(value);
127 }
128 template <typename LastModifiedT = Aws::Utils::DateTime>
129 S3Object& WithLastModified(LastModifiedT&& value) {
130 SetLastModified(std::forward<LastModifiedT>(value));
131 return *this;
132 }
134
136
140 inline const Aws::String& GetPath() const { return m_path; }
141 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
142 template <typename PathT = Aws::String>
143 void SetPath(PathT&& value) {
144 m_pathHasBeenSet = true;
145 m_path = std::forward<PathT>(value);
146 }
147 template <typename PathT = Aws::String>
148 S3Object& WithPath(PathT&& value) {
149 SetPath(std::forward<PathT>(value));
150 return *this;
151 }
153
155
159 inline bool GetPublicAccess() const { return m_publicAccess; }
160 inline bool PublicAccessHasBeenSet() const { return m_publicAccessHasBeenSet; }
161 inline void SetPublicAccess(bool value) {
162 m_publicAccessHasBeenSet = true;
163 m_publicAccess = value;
164 }
165 inline S3Object& WithPublicAccess(bool value) {
166 SetPublicAccess(value);
167 return *this;
168 }
170
172
175 inline const ServerSideEncryption& GetServerSideEncryption() const { return m_serverSideEncryption; }
176 inline bool ServerSideEncryptionHasBeenSet() const { return m_serverSideEncryptionHasBeenSet; }
177 template <typename ServerSideEncryptionT = ServerSideEncryption>
178 void SetServerSideEncryption(ServerSideEncryptionT&& value) {
179 m_serverSideEncryptionHasBeenSet = true;
180 m_serverSideEncryption = std::forward<ServerSideEncryptionT>(value);
181 }
182 template <typename ServerSideEncryptionT = ServerSideEncryption>
183 S3Object& WithServerSideEncryption(ServerSideEncryptionT&& value) {
184 SetServerSideEncryption(std::forward<ServerSideEncryptionT>(value));
185 return *this;
186 }
188
190
193 inline long long GetSize() const { return m_size; }
194 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
195 inline void SetSize(long long value) {
196 m_sizeHasBeenSet = true;
197 m_size = value;
198 }
199 inline S3Object& WithSize(long long value) {
200 SetSize(value);
201 return *this;
202 }
204
206
209 inline StorageClass GetStorageClass() const { return m_storageClass; }
210 inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; }
211 inline void SetStorageClass(StorageClass value) {
212 m_storageClassHasBeenSet = true;
213 m_storageClass = value;
214 }
216 SetStorageClass(value);
217 return *this;
218 }
220
222
225 inline const Aws::Vector<KeyValuePair>& GetTags() const { return m_tags; }
226 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
227 template <typename TagsT = Aws::Vector<KeyValuePair>>
228 void SetTags(TagsT&& value) {
229 m_tagsHasBeenSet = true;
230 m_tags = std::forward<TagsT>(value);
231 }
232 template <typename TagsT = Aws::Vector<KeyValuePair>>
233 S3Object& WithTags(TagsT&& value) {
234 SetTags(std::forward<TagsT>(value));
235 return *this;
236 }
237 template <typename TagsT = KeyValuePair>
238 S3Object& AddTags(TagsT&& value) {
239 m_tagsHasBeenSet = true;
240 m_tags.emplace_back(std::forward<TagsT>(value));
241 return *this;
242 }
244
246
249 inline const Aws::String& GetVersionId() const { return m_versionId; }
250 inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
251 template <typename VersionIdT = Aws::String>
252 void SetVersionId(VersionIdT&& value) {
253 m_versionIdHasBeenSet = true;
254 m_versionId = std::forward<VersionIdT>(value);
255 }
256 template <typename VersionIdT = Aws::String>
257 S3Object& WithVersionId(VersionIdT&& value) {
258 SetVersionId(std::forward<VersionIdT>(value));
259 return *this;
260 }
262 private:
263 Aws::String m_bucketArn;
264
265 Aws::String m_eTag;
266
267 Aws::String m_extension;
268
269 Aws::String m_key;
270
271 Aws::Utils::DateTime m_lastModified{};
272
273 Aws::String m_path;
274
275 bool m_publicAccess{false};
276
277 ServerSideEncryption m_serverSideEncryption;
278
279 long long m_size{0};
280
281 StorageClass m_storageClass{StorageClass::NOT_SET};
282
284
285 Aws::String m_versionId;
286 bool m_bucketArnHasBeenSet = false;
287 bool m_eTagHasBeenSet = false;
288 bool m_extensionHasBeenSet = false;
289 bool m_keyHasBeenSet = false;
290 bool m_lastModifiedHasBeenSet = false;
291 bool m_pathHasBeenSet = false;
292 bool m_publicAccessHasBeenSet = false;
293 bool m_serverSideEncryptionHasBeenSet = false;
294 bool m_sizeHasBeenSet = false;
295 bool m_storageClassHasBeenSet = false;
296 bool m_tagsHasBeenSet = false;
297 bool m_versionIdHasBeenSet = false;
298};
299
300} // namespace Model
301} // namespace Macie2
302} // namespace Aws
bool PublicAccessHasBeenSet() const
Definition S3Object.h:160
const Aws::String & GetPath() const
Definition S3Object.h:140
bool ServerSideEncryptionHasBeenSet() const
Definition S3Object.h:176
void SetLastModified(LastModifiedT &&value)
Definition S3Object.h:124
S3Object & WithBucketArn(BucketArnT &&value)
Definition S3Object.h:52
void SetKey(KeyT &&value)
Definition S3Object.h:105
void SetExtension(ExtensionT &&value)
Definition S3Object.h:86
const Aws::Vector< KeyValuePair > & GetTags() const
Definition S3Object.h:225
S3Object & WithETag(ETagT &&value)
Definition S3Object.h:72
const ServerSideEncryption & GetServerSideEncryption() const
Definition S3Object.h:175
S3Object & WithPath(PathT &&value)
Definition S3Object.h:148
void SetServerSideEncryption(ServerSideEncryptionT &&value)
Definition S3Object.h:178
void SetTags(TagsT &&value)
Definition S3Object.h:228
S3Object & AddTags(TagsT &&value)
Definition S3Object.h:238
S3Object & WithExtension(ExtensionT &&value)
Definition S3Object.h:91
void SetStorageClass(StorageClass value)
Definition S3Object.h:211
bool VersionIdHasBeenSet() const
Definition S3Object.h:250
AWS_MACIE2_API S3Object & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Utils::DateTime & GetLastModified() const
Definition S3Object.h:121
S3Object & WithLastModified(LastModifiedT &&value)
Definition S3Object.h:129
AWS_MACIE2_API S3Object(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetExtension() const
Definition S3Object.h:83
S3Object & WithKey(KeyT &&value)
Definition S3Object.h:110
S3Object & WithPublicAccess(bool value)
Definition S3Object.h:165
S3Object & WithVersionId(VersionIdT &&value)
Definition S3Object.h:257
const Aws::String & GetVersionId() const
Definition S3Object.h:249
bool ETagHasBeenSet() const
Definition S3Object.h:65
void SetETag(ETagT &&value)
Definition S3Object.h:67
bool BucketArnHasBeenSet() const
Definition S3Object.h:45
AWS_MACIE2_API Aws::Utils::Json::JsonValue Jsonize() const
long long GetSize() const
Definition S3Object.h:193
const Aws::String & GetBucketArn() const
Definition S3Object.h:44
void SetBucketArn(BucketArnT &&value)
Definition S3Object.h:47
void SetPublicAccess(bool value)
Definition S3Object.h:161
bool LastModifiedHasBeenSet() const
Definition S3Object.h:122
S3Object & WithTags(TagsT &&value)
Definition S3Object.h:233
AWS_MACIE2_API S3Object()=default
void SetPath(PathT &&value)
Definition S3Object.h:143
const Aws::String & GetETag() const
Definition S3Object.h:64
void SetSize(long long value)
Definition S3Object.h:195
bool ExtensionHasBeenSet() const
Definition S3Object.h:84
S3Object & WithSize(long long value)
Definition S3Object.h:199
bool StorageClassHasBeenSet() const
Definition S3Object.h:210
S3Object & WithServerSideEncryption(ServerSideEncryptionT &&value)
Definition S3Object.h:183
StorageClass GetStorageClass() const
Definition S3Object.h:209
void SetVersionId(VersionIdT &&value)
Definition S3Object.h:252
const Aws::String & GetKey() const
Definition S3Object.h:102
S3Object & WithStorageClass(StorageClass value)
Definition S3Object.h:215
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue