/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace S3Control { namespace Model { /** *

The container for the Outposts bucket lifecycle rule.

See * Also:

AWS * API Reference

*/ class LifecycleRule { public: AWS_S3CONTROL_API LifecycleRule(); AWS_S3CONTROL_API LifecycleRule(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_S3CONTROL_API LifecycleRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_S3CONTROL_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

Specifies the expiration for the lifecycle of the object in the form of date, * days and, whether the object has a delete marker.

*/ inline const LifecycleExpiration& GetExpiration() const{ return m_expiration; } /** *

Specifies the expiration for the lifecycle of the object in the form of date, * days and, whether the object has a delete marker.

*/ inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; } /** *

Specifies the expiration for the lifecycle of the object in the form of date, * days and, whether the object has a delete marker.

*/ inline void SetExpiration(const LifecycleExpiration& value) { m_expirationHasBeenSet = true; m_expiration = value; } /** *

Specifies the expiration for the lifecycle of the object in the form of date, * days and, whether the object has a delete marker.

*/ inline void SetExpiration(LifecycleExpiration&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); } /** *

Specifies the expiration for the lifecycle of the object in the form of date, * days and, whether the object has a delete marker.

*/ inline LifecycleRule& WithExpiration(const LifecycleExpiration& value) { SetExpiration(value); return *this;} /** *

Specifies the expiration for the lifecycle of the object in the form of date, * days and, whether the object has a delete marker.

*/ inline LifecycleRule& WithExpiration(LifecycleExpiration&& value) { SetExpiration(std::move(value)); return *this;} /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline const Aws::String& GetID() const{ return m_iD; } /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline bool IDHasBeenSet() const { return m_iDHasBeenSet; } /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline void SetID(const Aws::String& value) { m_iDHasBeenSet = true; m_iD = value; } /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline void SetID(Aws::String&& value) { m_iDHasBeenSet = true; m_iD = std::move(value); } /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline void SetID(const char* value) { m_iDHasBeenSet = true; m_iD.assign(value); } /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline LifecycleRule& WithID(const Aws::String& value) { SetID(value); return *this;} /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline LifecycleRule& WithID(Aws::String&& value) { SetID(std::move(value)); return *this;} /** *

Unique identifier for the rule. The value cannot be longer than 255 * characters.

*/ inline LifecycleRule& WithID(const char* value) { SetID(value); return *this;} /** *

The container for the filter of lifecycle rule.

*/ inline const LifecycleRuleFilter& GetFilter() const{ return m_filter; } /** *

The container for the filter of lifecycle rule.

*/ inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; } /** *

The container for the filter of lifecycle rule.

*/ inline void SetFilter(const LifecycleRuleFilter& value) { m_filterHasBeenSet = true; m_filter = value; } /** *

The container for the filter of lifecycle rule.

*/ inline void SetFilter(LifecycleRuleFilter&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); } /** *

The container for the filter of lifecycle rule.

*/ inline LifecycleRule& WithFilter(const LifecycleRuleFilter& value) { SetFilter(value); return *this;} /** *

The container for the filter of lifecycle rule.

*/ inline LifecycleRule& WithFilter(LifecycleRuleFilter&& value) { SetFilter(std::move(value)); return *this;} /** *

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is * not currently being applied.

*/ inline const ExpirationStatus& GetStatus() const{ return m_status; } /** *

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is * not currently being applied.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is * not currently being applied.

*/ inline void SetStatus(const ExpirationStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is * not currently being applied.

*/ inline void SetStatus(ExpirationStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is * not currently being applied.

*/ inline LifecycleRule& WithStatus(const ExpirationStatus& value) { SetStatus(value); return *this;} /** *

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is * not currently being applied.

*/ inline LifecycleRule& WithStatus(ExpirationStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline const Aws::Vector& GetTransitions() const{ return m_transitions; } /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline bool TransitionsHasBeenSet() const { return m_transitionsHasBeenSet; } /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline void SetTransitions(const Aws::Vector& value) { m_transitionsHasBeenSet = true; m_transitions = value; } /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline void SetTransitions(Aws::Vector&& value) { m_transitionsHasBeenSet = true; m_transitions = std::move(value); } /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline LifecycleRule& WithTransitions(const Aws::Vector& value) { SetTransitions(value); return *this;} /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline LifecycleRule& WithTransitions(Aws::Vector&& value) { SetTransitions(std::move(value)); return *this;} /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline LifecycleRule& AddTransitions(const Transition& value) { m_transitionsHasBeenSet = true; m_transitions.push_back(value); return *this; } /** *

Specifies when an Amazon S3 object transitions to a specified storage * class.

This is not supported by Amazon S3 on Outposts buckets.

* */ inline LifecycleRule& AddTransitions(Transition&& value) { m_transitionsHasBeenSet = true; m_transitions.push_back(std::move(value)); return *this; } /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline const Aws::Vector& GetNoncurrentVersionTransitions() const{ return m_noncurrentVersionTransitions; } /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline bool NoncurrentVersionTransitionsHasBeenSet() const { return m_noncurrentVersionTransitionsHasBeenSet; } /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline void SetNoncurrentVersionTransitions(const Aws::Vector& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions = value; } /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline void SetNoncurrentVersionTransitions(Aws::Vector&& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions = std::move(value); } /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline LifecycleRule& WithNoncurrentVersionTransitions(const Aws::Vector& value) { SetNoncurrentVersionTransitions(value); return *this;} /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline LifecycleRule& WithNoncurrentVersionTransitions(Aws::Vector&& value) { SetNoncurrentVersionTransitions(std::move(value)); return *this;} /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline LifecycleRule& AddNoncurrentVersionTransitions(const NoncurrentVersionTransition& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions.push_back(value); return *this; } /** *

Specifies the transition rule for the lifecycle rule that describes when * noncurrent objects transition to a specific storage class. If your bucket is * versioning-enabled (or versioning is suspended), you can set this action to * request that Amazon S3 transition noncurrent object versions to a specific * storage class at a set period in the object's lifetime.

This is * not supported by Amazon S3 on Outposts buckets.

*/ inline LifecycleRule& AddNoncurrentVersionTransitions(NoncurrentVersionTransition&& value) { m_noncurrentVersionTransitionsHasBeenSet = true; m_noncurrentVersionTransitions.push_back(std::move(value)); return *this; } /** *

The noncurrent version expiration of the lifecycle rule.

*/ inline const NoncurrentVersionExpiration& GetNoncurrentVersionExpiration() const{ return m_noncurrentVersionExpiration; } /** *

The noncurrent version expiration of the lifecycle rule.

*/ inline bool NoncurrentVersionExpirationHasBeenSet() const { return m_noncurrentVersionExpirationHasBeenSet; } /** *

The noncurrent version expiration of the lifecycle rule.

*/ inline void SetNoncurrentVersionExpiration(const NoncurrentVersionExpiration& value) { m_noncurrentVersionExpirationHasBeenSet = true; m_noncurrentVersionExpiration = value; } /** *

The noncurrent version expiration of the lifecycle rule.

*/ inline void SetNoncurrentVersionExpiration(NoncurrentVersionExpiration&& value) { m_noncurrentVersionExpirationHasBeenSet = true; m_noncurrentVersionExpiration = std::move(value); } /** *

The noncurrent version expiration of the lifecycle rule.

*/ inline LifecycleRule& WithNoncurrentVersionExpiration(const NoncurrentVersionExpiration& value) { SetNoncurrentVersionExpiration(value); return *this;} /** *

The noncurrent version expiration of the lifecycle rule.

*/ inline LifecycleRule& WithNoncurrentVersionExpiration(NoncurrentVersionExpiration&& value) { SetNoncurrentVersionExpiration(std::move(value)); return *this;} /** *

Specifies the days since the initiation of an incomplete multipart upload * that Amazon S3 waits before permanently removing all parts of the upload. For * more information, see * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration * in the Amazon S3 User Guide.

*/ inline const AbortIncompleteMultipartUpload& GetAbortIncompleteMultipartUpload() const{ return m_abortIncompleteMultipartUpload; } /** *

Specifies the days since the initiation of an incomplete multipart upload * that Amazon S3 waits before permanently removing all parts of the upload. For * more information, see * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration * in the Amazon S3 User Guide.

*/ inline bool AbortIncompleteMultipartUploadHasBeenSet() const { return m_abortIncompleteMultipartUploadHasBeenSet; } /** *

Specifies the days since the initiation of an incomplete multipart upload * that Amazon S3 waits before permanently removing all parts of the upload. For * more information, see * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration * in the Amazon S3 User Guide.

*/ inline void SetAbortIncompleteMultipartUpload(const AbortIncompleteMultipartUpload& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = value; } /** *

Specifies the days since the initiation of an incomplete multipart upload * that Amazon S3 waits before permanently removing all parts of the upload. For * more information, see * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration * in the Amazon S3 User Guide.

*/ inline void SetAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload&& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = std::move(value); } /** *

Specifies the days since the initiation of an incomplete multipart upload * that Amazon S3 waits before permanently removing all parts of the upload. For * more information, see * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration * in the Amazon S3 User Guide.

*/ inline LifecycleRule& WithAbortIncompleteMultipartUpload(const AbortIncompleteMultipartUpload& value) { SetAbortIncompleteMultipartUpload(value); return *this;} /** *

Specifies the days since the initiation of an incomplete multipart upload * that Amazon S3 waits before permanently removing all parts of the upload. For * more information, see * Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration * in the Amazon S3 User Guide.

*/ inline LifecycleRule& WithAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload&& value) { SetAbortIncompleteMultipartUpload(std::move(value)); return *this;} private: LifecycleExpiration m_expiration; bool m_expirationHasBeenSet = false; Aws::String m_iD; bool m_iDHasBeenSet = false; LifecycleRuleFilter m_filter; bool m_filterHasBeenSet = false; ExpirationStatus m_status; bool m_statusHasBeenSet = false; Aws::Vector m_transitions; bool m_transitionsHasBeenSet = false; Aws::Vector m_noncurrentVersionTransitions; bool m_noncurrentVersionTransitionsHasBeenSet = false; NoncurrentVersionExpiration m_noncurrentVersionExpiration; bool m_noncurrentVersionExpirationHasBeenSet = false; AbortIncompleteMultipartUpload m_abortIncompleteMultipartUpload; bool m_abortIncompleteMultipartUploadHasBeenSet = false; }; } // namespace Model } // namespace S3Control } // namespace Aws