AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
LifecycleRule.h
1
6#pragma once
7#include <aws/s3-crt/S3Crt_EXPORTS.h>
8#include <aws/s3-crt/model/LifecycleExpiration.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/s3-crt/model/LifecycleRuleFilter.h>
11#include <aws/s3-crt/model/ExpirationStatus.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/s3-crt/model/NoncurrentVersionExpiration.h>
14#include <aws/s3-crt/model/AbortIncompleteMultipartUpload.h>
15#include <aws/s3-crt/model/Transition.h>
16#include <aws/s3-crt/model/NoncurrentVersionTransition.h>
17#include <utility>
18
19namespace Aws
20{
21namespace Utils
22{
23namespace Xml
24{
25 class XmlNode;
26} // namespace Xml
27} // namespace Utils
28namespace S3Crt
29{
30namespace Model
31{
32
43 {
44 public:
45 AWS_S3CRT_API LifecycleRule();
46 AWS_S3CRT_API LifecycleRule(const Aws::Utils::Xml::XmlNode& xmlNode);
47 AWS_S3CRT_API LifecycleRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
48
49 AWS_S3CRT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
50
51
53
57 inline const LifecycleExpiration& GetExpiration() const{ return m_expiration; }
58 inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; }
59 inline void SetExpiration(const LifecycleExpiration& value) { m_expirationHasBeenSet = true; m_expiration = value; }
60 inline void SetExpiration(LifecycleExpiration&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); }
61 inline LifecycleRule& WithExpiration(const LifecycleExpiration& value) { SetExpiration(value); return *this;}
62 inline LifecycleRule& WithExpiration(LifecycleExpiration&& value) { SetExpiration(std::move(value)); return *this;}
64
66
70 inline const Aws::String& GetID() const{ return m_iD; }
71 inline bool IDHasBeenSet() const { return m_iDHasBeenSet; }
72 inline void SetID(const Aws::String& value) { m_iDHasBeenSet = true; m_iD = value; }
73 inline void SetID(Aws::String&& value) { m_iDHasBeenSet = true; m_iD = std::move(value); }
74 inline void SetID(const char* value) { m_iDHasBeenSet = true; m_iD.assign(value); }
75 inline LifecycleRule& WithID(const Aws::String& value) { SetID(value); return *this;}
76 inline LifecycleRule& WithID(Aws::String&& value) { SetID(std::move(value)); return *this;}
77 inline LifecycleRule& WithID(const char* value) { SetID(value); return *this;}
79
81
88 inline const LifecycleRuleFilter& GetFilter() const{ return m_filter; }
89 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
90 inline void SetFilter(const LifecycleRuleFilter& value) { m_filterHasBeenSet = true; m_filter = value; }
91 inline void SetFilter(LifecycleRuleFilter&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); }
92 inline LifecycleRule& WithFilter(const LifecycleRuleFilter& value) { SetFilter(value); return *this;}
93 inline LifecycleRule& WithFilter(LifecycleRuleFilter&& value) { SetFilter(std::move(value)); return *this;}
95
97
101 inline const ExpirationStatus& GetStatus() const{ return m_status; }
102 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
103 inline void SetStatus(const ExpirationStatus& value) { m_statusHasBeenSet = true; m_status = value; }
104 inline void SetStatus(ExpirationStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
105 inline LifecycleRule& WithStatus(const ExpirationStatus& value) { SetStatus(value); return *this;}
106 inline LifecycleRule& WithStatus(ExpirationStatus&& value) { SetStatus(std::move(value)); return *this;}
108
110
114 inline const Aws::Vector<Transition>& GetTransitions() const{ return m_transitions; }
115 inline bool TransitionsHasBeenSet() const { return m_transitionsHasBeenSet; }
116 inline void SetTransitions(const Aws::Vector<Transition>& value) { m_transitionsHasBeenSet = true; m_transitions = value; }
117 inline void SetTransitions(Aws::Vector<Transition>&& value) { m_transitionsHasBeenSet = true; m_transitions = std::move(value); }
118 inline LifecycleRule& WithTransitions(const Aws::Vector<Transition>& value) { SetTransitions(value); return *this;}
119 inline LifecycleRule& WithTransitions(Aws::Vector<Transition>&& value) { SetTransitions(std::move(value)); return *this;}
120 inline LifecycleRule& AddTransitions(const Transition& value) { m_transitionsHasBeenSet = true; m_transitions.push_back(value); return *this; }
121 inline LifecycleRule& AddTransitions(Transition&& value) { m_transitionsHasBeenSet = true; m_transitions.push_back(std::move(value)); return *this; }
123
125
132 inline const Aws::Vector<NoncurrentVersionTransition>& GetNoncurrentVersionTransitions() const{ return m_noncurrentVersionTransitions; }
133 inline bool NoncurrentVersionTransitionsHasBeenSet() const { return m_noncurrentVersionTransitionsHasBeenSet; }
134 inline void SetNoncurrentVersionTransitions(const Aws::Vector<NoncurrentVersionTransition>& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions = value; }
135 inline void SetNoncurrentVersionTransitions(Aws::Vector<NoncurrentVersionTransition>&& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions = std::move(value); }
138 inline LifecycleRule& AddNoncurrentVersionTransitions(const NoncurrentVersionTransition& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions.push_back(value); return *this; }
139 inline LifecycleRule& AddNoncurrentVersionTransitions(NoncurrentVersionTransition&& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions.push_back(std::move(value)); return *this; }
141
143
144 inline const NoncurrentVersionExpiration& GetNoncurrentVersionExpiration() const{ return m_noncurrentVersionExpiration; }
145 inline bool NoncurrentVersionExpirationHasBeenSet() const { return m_noncurrentVersionExpirationHasBeenSet; }
146 inline void SetNoncurrentVersionExpiration(const NoncurrentVersionExpiration& value) { m_noncurrentVersionExpirationHasBeenSet = true; m_noncurrentVersionExpiration = value; }
147 inline void SetNoncurrentVersionExpiration(NoncurrentVersionExpiration&& value) { m_noncurrentVersionExpirationHasBeenSet = true; m_noncurrentVersionExpiration = std::move(value); }
151
153
154 inline const AbortIncompleteMultipartUpload& GetAbortIncompleteMultipartUpload() const{ return m_abortIncompleteMultipartUpload; }
155 inline bool AbortIncompleteMultipartUploadHasBeenSet() const { return m_abortIncompleteMultipartUploadHasBeenSet; }
156 inline void SetAbortIncompleteMultipartUpload(const AbortIncompleteMultipartUpload& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = value; }
157 inline void SetAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload&& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = std::move(value); }
161 private:
162
163 LifecycleExpiration m_expiration;
164 bool m_expirationHasBeenSet = false;
165
166 Aws::String m_iD;
167 bool m_iDHasBeenSet = false;
168
169 LifecycleRuleFilter m_filter;
170 bool m_filterHasBeenSet = false;
171
172 ExpirationStatus m_status;
173 bool m_statusHasBeenSet = false;
174
175 Aws::Vector<Transition> m_transitions;
176 bool m_transitionsHasBeenSet = false;
177
178 Aws::Vector<NoncurrentVersionTransition> m_noncurrentVersionTransitions;
179 bool m_noncurrentVersionTransitionsHasBeenSet = false;
180
181 NoncurrentVersionExpiration m_noncurrentVersionExpiration;
182 bool m_noncurrentVersionExpirationHasBeenSet = false;
183
184 AbortIncompleteMultipartUpload m_abortIncompleteMultipartUpload;
185 bool m_abortIncompleteMultipartUploadHasBeenSet = false;
186 };
187
188} // namespace Model
189} // namespace S3Crt
190} // namespace Aws
LifecycleRule & WithNoncurrentVersionExpiration(NoncurrentVersionExpiration &&value)
LifecycleRule & WithStatus(const ExpirationStatus &value)
void SetExpiration(const LifecycleExpiration &value)
LifecycleRule & WithStatus(ExpirationStatus &&value)
bool NoncurrentVersionTransitionsHasBeenSet() const
LifecycleRule & WithExpiration(const LifecycleExpiration &value)
LifecycleRule & WithTransitions(Aws::Vector< Transition > &&value)
LifecycleRule & WithFilter(LifecycleRuleFilter &&value)
void SetID(const Aws::String &value)
bool NoncurrentVersionExpirationHasBeenSet() const
const AbortIncompleteMultipartUpload & GetAbortIncompleteMultipartUpload() const
void SetStatus(const ExpirationStatus &value)
const LifecycleRuleFilter & GetFilter() const
LifecycleRule & WithTransitions(const Aws::Vector< Transition > &value)
const LifecycleExpiration & GetExpiration() const
AWS_S3CRT_API LifecycleRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetID(const char *value)
void SetNoncurrentVersionExpiration(NoncurrentVersionExpiration &&value)
LifecycleRule & WithID(const char *value)
void SetFilter(const LifecycleRuleFilter &value)
LifecycleRule & WithNoncurrentVersionTransitions(const Aws::Vector< NoncurrentVersionTransition > &value)
LifecycleRule & AddNoncurrentVersionTransitions(NoncurrentVersionTransition &&value)
void SetNoncurrentVersionTransitions(const Aws::Vector< NoncurrentVersionTransition > &value)
AWS_S3CRT_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
LifecycleRule & WithAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload &&value)
const Aws::Vector< NoncurrentVersionTransition > & GetNoncurrentVersionTransitions() const
void SetAbortIncompleteMultipartUpload(const AbortIncompleteMultipartUpload &value)
AWS_S3CRT_API LifecycleRule(const Aws::Utils::Xml::XmlNode &xmlNode)
LifecycleRule & AddNoncurrentVersionTransitions(const NoncurrentVersionTransition &value)
LifecycleRule & WithFilter(const LifecycleRuleFilter &value)
void SetNoncurrentVersionExpiration(const NoncurrentVersionExpiration &value)
void SetID(Aws::String &&value)
LifecycleRule & AddTransitions(Transition &&value)
LifecycleRule & WithNoncurrentVersionTransitions(Aws::Vector< NoncurrentVersionTransition > &&value)
LifecycleRule & WithID(const Aws::String &value)
LifecycleRule & AddTransitions(const Transition &value)
void SetAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload &&value)
void SetStatus(ExpirationStatus &&value)
const ExpirationStatus & GetStatus() const
const Aws::String & GetID() const
void SetFilter(LifecycleRuleFilter &&value)
LifecycleRule & WithNoncurrentVersionExpiration(const NoncurrentVersionExpiration &value)
void SetTransitions(Aws::Vector< Transition > &&value)
LifecycleRule & WithAbortIncompleteMultipartUpload(const AbortIncompleteMultipartUpload &value)
LifecycleRule & WithID(Aws::String &&value)
void SetNoncurrentVersionTransitions(Aws::Vector< NoncurrentVersionTransition > &&value)
void SetTransitions(const Aws::Vector< Transition > &value)
LifecycleRule & WithExpiration(LifecycleExpiration &&value)
bool AbortIncompleteMultipartUploadHasBeenSet() const
const NoncurrentVersionExpiration & GetNoncurrentVersionExpiration() const
const Aws::Vector< Transition > & GetTransitions() const
void SetExpiration(LifecycleExpiration &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector