AWS SDK for C++  0.12.9
AWS SDK for C++
ObjectVersion.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/s3/S3_EXPORTS.h>
20 #include <aws/s3/model/Owner.h>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace S3
32 {
33 namespace Model
34 {
35 
37  {
38  public:
39  ObjectVersion();
41  ObjectVersion& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
42 
43  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
44 
45 
46  inline const Aws::String& GetETag() const{ return m_eTag; }
47 
48 
49  inline void SetETag(const Aws::String& value) { m_eTagHasBeenSet = true; m_eTag = value; }
50 
51 
52  inline void SetETag(Aws::String&& value) { m_eTagHasBeenSet = true; m_eTag = value; }
53 
54 
55  inline void SetETag(const char* value) { m_eTagHasBeenSet = true; m_eTag.assign(value); }
56 
57 
58  inline ObjectVersion& WithETag(const Aws::String& value) { SetETag(value); return *this;}
59 
60 
61  inline ObjectVersion& WithETag(Aws::String&& value) { SetETag(value); return *this;}
62 
63 
64  inline ObjectVersion& WithETag(const char* value) { SetETag(value); return *this;}
65 
69  inline long GetSize() const{ return m_size; }
70 
74  inline void SetSize(long value) { m_sizeHasBeenSet = true; m_size = value; }
75 
79  inline ObjectVersion& WithSize(long value) { SetSize(value); return *this;}
80 
84  inline const ObjectVersionStorageClass& GetStorageClass() const{ return m_storageClass; }
85 
89  inline void SetStorageClass(const ObjectVersionStorageClass& value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
90 
94  inline void SetStorageClass(ObjectVersionStorageClass&& value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
95 
99  inline ObjectVersion& WithStorageClass(const ObjectVersionStorageClass& value) { SetStorageClass(value); return *this;}
100 
104  inline ObjectVersion& WithStorageClass(ObjectVersionStorageClass&& value) { SetStorageClass(value); return *this;}
105 
109  inline const Aws::String& GetKey() const{ return m_key; }
110 
114  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
115 
119  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
120 
124  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
125 
129  inline ObjectVersion& WithKey(const Aws::String& value) { SetKey(value); return *this;}
130 
134  inline ObjectVersion& WithKey(Aws::String&& value) { SetKey(value); return *this;}
135 
139  inline ObjectVersion& WithKey(const char* value) { SetKey(value); return *this;}
140 
144  inline const Aws::String& GetVersionId() const{ return m_versionId; }
145 
149  inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
150 
154  inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
155 
159  inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
160 
164  inline ObjectVersion& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
165 
169  inline ObjectVersion& WithVersionId(Aws::String&& value) { SetVersionId(value); return *this;}
170 
174  inline ObjectVersion& WithVersionId(const char* value) { SetVersionId(value); return *this;}
175 
180  inline bool GetIsLatest() const{ return m_isLatest; }
181 
186  inline void SetIsLatest(bool value) { m_isLatestHasBeenSet = true; m_isLatest = value; }
187 
192  inline ObjectVersion& WithIsLatest(bool value) { SetIsLatest(value); return *this;}
193 
197  inline const Aws::Utils::DateTime& GetLastModified() const{ return m_lastModified; }
198 
202  inline void SetLastModified(const Aws::Utils::DateTime& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; }
203 
207  inline void SetLastModified(Aws::Utils::DateTime&& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; }
208 
212  inline ObjectVersion& WithLastModified(const Aws::Utils::DateTime& value) { SetLastModified(value); return *this;}
213 
217  inline ObjectVersion& WithLastModified(Aws::Utils::DateTime&& value) { SetLastModified(value); return *this;}
218 
219 
220  inline const Owner& GetOwner() const{ return m_owner; }
221 
222 
223  inline void SetOwner(const Owner& value) { m_ownerHasBeenSet = true; m_owner = value; }
224 
225 
226  inline void SetOwner(Owner&& value) { m_ownerHasBeenSet = true; m_owner = value; }
227 
228 
229  inline ObjectVersion& WithOwner(const Owner& value) { SetOwner(value); return *this;}
230 
231 
232  inline ObjectVersion& WithOwner(Owner&& value) { SetOwner(value); return *this;}
233 
234  private:
235  Aws::String m_eTag;
236  bool m_eTagHasBeenSet;
237  long m_size;
238  bool m_sizeHasBeenSet;
239  ObjectVersionStorageClass m_storageClass;
240  bool m_storageClassHasBeenSet;
241  Aws::String m_key;
242  bool m_keyHasBeenSet;
243  Aws::String m_versionId;
244  bool m_versionIdHasBeenSet;
245  bool m_isLatest;
246  bool m_isLatestHasBeenSet;
247  Aws::Utils::DateTime m_lastModified;
248  bool m_lastModifiedHasBeenSet;
249  Owner m_owner;
250  bool m_ownerHasBeenSet;
251  };
252 
253 } // namespace Model
254 } // namespace S3
255 } // namespace Aws
void SetOwner(const Owner &value)
ObjectVersion & WithETag(const Aws::String &value)
Definition: ObjectVersion.h:58
ObjectVersion & WithKey(const Aws::String &value)
void SetVersionId(const Aws::String &value)
void SetOwner(Owner &&value)
ObjectVersion & WithVersionId(Aws::String &&value)
void SetLastModified(const Aws::Utils::DateTime &value)
ObjectVersion & WithOwner(const Owner &value)
#define AWS_S3_API
Definition: S3_EXPORTS.h:34
void SetStorageClass(const ObjectVersionStorageClass &value)
Definition: ObjectVersion.h:89
ObjectVersion & WithIsLatest(bool value)
ObjectVersion & WithKey(Aws::String &&value)
ObjectVersion & WithVersionId(const char *value)
void SetETag(const Aws::String &value)
Definition: ObjectVersion.h:49
ObjectVersion & WithStorageClass(ObjectVersionStorageClass &&value)
const Aws::String & GetETag() const
Definition: ObjectVersion.h:46
void SetVersionId(Aws::String &&value)
void SetETag(const char *value)
Definition: ObjectVersion.h:55
const Aws::String & GetVersionId() const
ObjectVersion & WithETag(const char *value)
Definition: ObjectVersion.h:64
void SetKey(Aws::String &&value)
ObjectVersion & WithETag(Aws::String &&value)
Definition: ObjectVersion.h:61
void SetKey(const char *value)
ObjectVersion & WithLastModified(Aws::Utils::DateTime &&value)
const Aws::String & GetKey() const
void SetKey(const Aws::String &value)
ObjectVersion & WithVersionId(const Aws::String &value)
const Owner & GetOwner() const
void SetLastModified(Aws::Utils::DateTime &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ObjectVersion & WithSize(long value)
Definition: ObjectVersion.h:79
ObjectVersion & WithLastModified(const Aws::Utils::DateTime &value)
ObjectVersion & WithKey(const char *value)
void SetVersionId(const char *value)
void SetETag(Aws::String &&value)
Definition: ObjectVersion.h:52
void SetStorageClass(ObjectVersionStorageClass &&value)
Definition: ObjectVersion.h:94
const Aws::Utils::DateTime & GetLastModified() const
const ObjectVersionStorageClass & GetStorageClass() const
Definition: ObjectVersion.h:84
JSON (JavaScript Object Notation).
ObjectVersion & WithOwner(Owner &&value)
ObjectVersion & WithStorageClass(const ObjectVersionStorageClass &value)
Definition: ObjectVersion.h:99