/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Specifies lifecycle rules for an Amazon S3 bucket. For more information, see
* Put
* Bucket Lifecycle Configuration in the Amazon S3 API Reference. For
* examples, see Put
* Bucket Lifecycle Configuration Examples.See Also:
AWS API
* Reference
Specifies the expiration for the lifecycle of the object.
*/ inline const LifecycleExpiration& GetExpiration() const{ return m_expiration; } /** *Specifies the expiration for the lifecycle of the object.
*/ inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; } /** *Specifies the expiration for the lifecycle of the object.
*/ inline void SetExpiration(const LifecycleExpiration& value) { m_expirationHasBeenSet = true; m_expiration = value; } /** *Specifies the expiration for the lifecycle of the object.
*/ inline void SetExpiration(LifecycleExpiration&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); } /** *Specifies the expiration for the lifecycle of the object.
*/ inline Rule& WithExpiration(const LifecycleExpiration& value) { SetExpiration(value); return *this;} /** *Specifies the expiration for the lifecycle of the object.
*/ inline Rule& WithExpiration(LifecycleExpiration&& value) { SetExpiration(std::move(value)); return *this;} /** *Unique identifier for the rule. The value can't be longer than 255 * characters.
*/ inline const Aws::String& GetID() const{ return m_iD; } /** *Unique identifier for the rule. The value can't be longer than 255 * characters.
*/ inline bool IDHasBeenSet() const { return m_iDHasBeenSet; } /** *Unique identifier for the rule. The value can't 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 can't 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 can't 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 can't be longer than 255 * characters.
*/ inline Rule& WithID(const Aws::String& value) { SetID(value); return *this;} /** *Unique identifier for the rule. The value can't be longer than 255 * characters.
*/ inline Rule& WithID(Aws::String&& value) { SetID(std::move(value)); return *this;} /** *Unique identifier for the rule. The value can't be longer than 255 * characters.
*/ inline Rule& WithID(const char* value) { SetID(value); return *this;} /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline const Aws::String& GetPrefix() const{ return m_prefix; } /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; } /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; } /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); } /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); } /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline Rule& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;} /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline Rule& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;} /** *Object key prefix that identifies one or more objects to which this rule * applies.
Replacement must be made for object keys containing * special characters (such as carriage returns) when using XML requests. For more * information, see * XML related object key constraints.
*/ inline Rule& WithPrefix(const char* value) { SetPrefix(value); return *this;} /** *If Enabled
, the rule is currently being applied. If
* Disabled
, the rule is not currently being applied.
If Enabled
, the rule is currently being applied. If
* Disabled
, the rule is not currently being applied.
If Enabled
, the rule is currently being applied. If
* Disabled
, the rule is not currently being applied.
If Enabled
, the rule is currently being applied. If
* Disabled
, the rule is not currently being applied.
If Enabled
, the rule is currently being applied. If
* Disabled
, the rule is not currently being applied.
If Enabled
, the rule is currently being applied. If
* Disabled
, the rule is not currently being applied.
Specifies when an object transitions to a specified storage class. For more * information about Amazon S3 lifecycle configuration rules, see Transitioning * Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.
*/ inline const Transition& GetTransition() const{ return m_transition; } /** *Specifies when an object transitions to a specified storage class. For more * information about Amazon S3 lifecycle configuration rules, see Transitioning * Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.
*/ inline bool TransitionHasBeenSet() const { return m_transitionHasBeenSet; } /** *Specifies when an object transitions to a specified storage class. For more * information about Amazon S3 lifecycle configuration rules, see Transitioning * Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.
*/ inline void SetTransition(const Transition& value) { m_transitionHasBeenSet = true; m_transition = value; } /** *Specifies when an object transitions to a specified storage class. For more * information about Amazon S3 lifecycle configuration rules, see Transitioning * Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.
*/ inline void SetTransition(Transition&& value) { m_transitionHasBeenSet = true; m_transition = std::move(value); } /** *Specifies when an object transitions to a specified storage class. For more * information about Amazon S3 lifecycle configuration rules, see Transitioning * Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.
*/ inline Rule& WithTransition(const Transition& value) { SetTransition(value); return *this;} /** *Specifies when an object transitions to a specified storage class. For more * information about Amazon S3 lifecycle configuration rules, see Transitioning * Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.
*/ inline Rule& WithTransition(Transition&& value) { SetTransition(std::move(value)); return *this;} inline const NoncurrentVersionTransition& GetNoncurrentVersionTransition() const{ return m_noncurrentVersionTransition; } inline bool NoncurrentVersionTransitionHasBeenSet() const { return m_noncurrentVersionTransitionHasBeenSet; } inline void SetNoncurrentVersionTransition(const NoncurrentVersionTransition& value) { m_noncurrentVersionTransitionHasBeenSet = true; m_noncurrentVersionTransition = value; } inline void SetNoncurrentVersionTransition(NoncurrentVersionTransition&& value) { m_noncurrentVersionTransitionHasBeenSet = true; m_noncurrentVersionTransition = std::move(value); } inline Rule& WithNoncurrentVersionTransition(const NoncurrentVersionTransition& value) { SetNoncurrentVersionTransition(value); return *this;} inline Rule& WithNoncurrentVersionTransition(NoncurrentVersionTransition&& value) { SetNoncurrentVersionTransition(std::move(value)); return *this;} inline const NoncurrentVersionExpiration& GetNoncurrentVersionExpiration() const{ return m_noncurrentVersionExpiration; } inline bool NoncurrentVersionExpirationHasBeenSet() const { return m_noncurrentVersionExpirationHasBeenSet; } inline void SetNoncurrentVersionExpiration(const NoncurrentVersionExpiration& value) { m_noncurrentVersionExpirationHasBeenSet = true; m_noncurrentVersionExpiration = value; } inline void SetNoncurrentVersionExpiration(NoncurrentVersionExpiration&& value) { m_noncurrentVersionExpirationHasBeenSet = true; m_noncurrentVersionExpiration = std::move(value); } inline Rule& WithNoncurrentVersionExpiration(const NoncurrentVersionExpiration& value) { SetNoncurrentVersionExpiration(value); return *this;} inline Rule& WithNoncurrentVersionExpiration(NoncurrentVersionExpiration&& value) { SetNoncurrentVersionExpiration(std::move(value)); return *this;} inline const AbortIncompleteMultipartUpload& GetAbortIncompleteMultipartUpload() const{ return m_abortIncompleteMultipartUpload; } inline bool AbortIncompleteMultipartUploadHasBeenSet() const { return m_abortIncompleteMultipartUploadHasBeenSet; } inline void SetAbortIncompleteMultipartUpload(const AbortIncompleteMultipartUpload& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = value; } inline void SetAbortIncompleteMultipartUpload(AbortIncompleteMultipartUpload&& value) { m_abortIncompleteMultipartUploadHasBeenSet = true; m_abortIncompleteMultipartUpload = std::move(value); } inline Rule& WithAbortIncompleteMultipartUpload(const AbortIncompleteMultipartUpload& value) { SetAbortIncompleteMultipartUpload(value); return *this;} inline Rule& 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; Aws::String m_prefix; bool m_prefixHasBeenSet = false; ExpirationStatus m_status; bool m_statusHasBeenSet = false; Transition m_transition; bool m_transitionHasBeenSet = false; NoncurrentVersionTransition m_noncurrentVersionTransition; bool m_noncurrentVersionTransitionHasBeenSet = false; NoncurrentVersionExpiration m_noncurrentVersionExpiration; bool m_noncurrentVersionExpirationHasBeenSet = false; AbortIncompleteMultipartUpload m_abortIncompleteMultipartUpload; bool m_abortIncompleteMultipartUploadHasBeenSet = false; }; } // namespace Model } // namespace S3 } // namespace Aws