AWS SDK for C++  0.12.9
AWS SDK for C++
Object.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  Object();
40  Object(const Aws::Utils::Xml::XmlNode& xmlNode);
41  Object& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
42 
43  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
44 
45 
46  inline const Aws::String& GetKey() const{ return m_key; }
47 
48 
49  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
50 
51 
52  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
53 
54 
55  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
56 
57 
58  inline Object& WithKey(const Aws::String& value) { SetKey(value); return *this;}
59 
60 
61  inline Object& WithKey(Aws::String&& value) { SetKey(value); return *this;}
62 
63 
64  inline Object& WithKey(const char* value) { SetKey(value); return *this;}
65 
66 
67  inline const Aws::Utils::DateTime& GetLastModified() const{ return m_lastModified; }
68 
69 
70  inline void SetLastModified(const Aws::Utils::DateTime& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; }
71 
72 
73  inline void SetLastModified(Aws::Utils::DateTime&& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; }
74 
75 
76  inline Object& WithLastModified(const Aws::Utils::DateTime& value) { SetLastModified(value); return *this;}
77 
78 
79  inline Object& WithLastModified(Aws::Utils::DateTime&& value) { SetLastModified(value); return *this;}
80 
81 
82  inline const Aws::String& GetETag() const{ return m_eTag; }
83 
84 
85  inline void SetETag(const Aws::String& value) { m_eTagHasBeenSet = true; m_eTag = value; }
86 
87 
88  inline void SetETag(Aws::String&& value) { m_eTagHasBeenSet = true; m_eTag = value; }
89 
90 
91  inline void SetETag(const char* value) { m_eTagHasBeenSet = true; m_eTag.assign(value); }
92 
93 
94  inline Object& WithETag(const Aws::String& value) { SetETag(value); return *this;}
95 
96 
97  inline Object& WithETag(Aws::String&& value) { SetETag(value); return *this;}
98 
99 
100  inline Object& WithETag(const char* value) { SetETag(value); return *this;}
101 
102 
103  inline long GetSize() const{ return m_size; }
104 
105 
106  inline void SetSize(long value) { m_sizeHasBeenSet = true; m_size = value; }
107 
108 
109  inline Object& WithSize(long value) { SetSize(value); return *this;}
110 
114  inline const ObjectStorageClass& GetStorageClass() const{ return m_storageClass; }
115 
119  inline void SetStorageClass(const ObjectStorageClass& value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
120 
124  inline void SetStorageClass(ObjectStorageClass&& value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
125 
129  inline Object& WithStorageClass(const ObjectStorageClass& value) { SetStorageClass(value); return *this;}
130 
134  inline Object& WithStorageClass(ObjectStorageClass&& value) { SetStorageClass(value); return *this;}
135 
136 
137  inline const Owner& GetOwner() const{ return m_owner; }
138 
139 
140  inline void SetOwner(const Owner& value) { m_ownerHasBeenSet = true; m_owner = value; }
141 
142 
143  inline void SetOwner(Owner&& value) { m_ownerHasBeenSet = true; m_owner = value; }
144 
145 
146  inline Object& WithOwner(const Owner& value) { SetOwner(value); return *this;}
147 
148 
149  inline Object& WithOwner(Owner&& value) { SetOwner(value); return *this;}
150 
151  private:
152  Aws::String m_key;
153  bool m_keyHasBeenSet;
154  Aws::Utils::DateTime m_lastModified;
155  bool m_lastModifiedHasBeenSet;
156  Aws::String m_eTag;
157  bool m_eTagHasBeenSet;
158  long m_size;
159  bool m_sizeHasBeenSet;
160  ObjectStorageClass m_storageClass;
161  bool m_storageClassHasBeenSet;
162  Owner m_owner;
163  bool m_ownerHasBeenSet;
164  };
165 
166 } // namespace Model
167 } // namespace S3
168 } // namespace Aws
Object & WithSize(long value)
Definition: Object.h:109
Object & WithOwner(Owner &&value)
Definition: Object.h:149
void SetSize(long value)
Definition: Object.h:106
const Owner & GetOwner() const
Definition: Object.h:137
const ObjectStorageClass & GetStorageClass() const
Definition: Object.h:114
void SetKey(const char *value)
Definition: Object.h:55
Object & WithStorageClass(const ObjectStorageClass &value)
Definition: Object.h:129
void SetLastModified(Aws::Utils::DateTime &&value)
Definition: Object.h:73
void SetETag(const Aws::String &value)
Definition: Object.h:85
void SetStorageClass(ObjectStorageClass &&value)
Definition: Object.h:124
void SetOwner(Owner &&value)
Definition: Object.h:143
Object & WithKey(const char *value)
Definition: Object.h:64
#define AWS_S3_API
Definition: S3_EXPORTS.h:34
long GetSize() const
Definition: Object.h:103
void SetKey(const Aws::String &value)
Definition: Object.h:49
const Aws::String & GetETag() const
Definition: Object.h:82
Object & WithETag(Aws::String &&value)
Definition: Object.h:97
void SetETag(const char *value)
Definition: Object.h:91
void SetETag(Aws::String &&value)
Definition: Object.h:88
Object & WithETag(const Aws::String &value)
Definition: Object.h:94
const Aws::Utils::DateTime & GetLastModified() const
Definition: Object.h:67
Object & WithKey(const Aws::String &value)
Definition: Object.h:58
void SetKey(Aws::String &&value)
Definition: Object.h:52
const Aws::String & GetKey() const
Definition: Object.h:46
Object & WithKey(Aws::String &&value)
Definition: Object.h:61
void SetLastModified(const Aws::Utils::DateTime &value)
Definition: Object.h:70
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Object & WithOwner(const Owner &value)
Definition: Object.h:146
Object & WithLastModified(Aws::Utils::DateTime &&value)
Definition: Object.h:79
void SetOwner(const Owner &value)
Definition: Object.h:140
Object & WithLastModified(const Aws::Utils::DateTime &value)
Definition: Object.h:76
Object & WithStorageClass(ObjectStorageClass &&value)
Definition: Object.h:134
Object & WithETag(const char *value)
Definition: Object.h:100
void SetStorageClass(const ObjectStorageClass &value)
Definition: Object.h:119
JSON (JavaScript Object Notation).