1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/s3/S3_EXPORTS.h> 8 #include <aws/s3/model/TransitionStorageClass.h> 9 #include <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Xml 16 { 17 class XmlNode; 18 } // namespace Xml 19 } // namespace Utils 20 namespace S3 21 { 22 namespace Model 23 { 24 25 /** 26 * <p>Container for the transition rule that describes when noncurrent objects 27 * transition to the <code>STANDARD_IA</code>, <code>ONEZONE_IA</code>, 28 * <code>INTELLIGENT_TIERING</code>, <code>GLACIER</code>, or 29 * <code>DEEP_ARCHIVE</code> storage class. If your bucket is versioning-enabled 30 * (or versioning is suspended), you can set this action to request that Amazon S3 31 * transition noncurrent object versions to the <code>STANDARD_IA</code>, 32 * <code>ONEZONE_IA</code>, <code>INTELLIGENT_TIERING</code>, <code>GLACIER</code>, 33 * or <code>DEEP_ARCHIVE</code> storage class at a specific period in the object's 34 * lifetime.</p><p><h3>See Also:</h3> <a 35 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionTransition">AWS 36 * API Reference</a></p> 37 */ 38 class AWS_S3_API NoncurrentVersionTransition 39 { 40 public: 41 NoncurrentVersionTransition(); 42 NoncurrentVersionTransition(const Aws::Utils::Xml::XmlNode& xmlNode); 43 NoncurrentVersionTransition& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 44 45 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; 46 47 48 /** 49 * <p>Specifies the number of days an object is noncurrent before Amazon S3 can 50 * perform the associated action. For information about the noncurrent days 51 * calculations, see <a 52 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations">How 53 * Amazon S3 Calculates How Long an Object Has Been Noncurrent</a> in the <i>Amazon 54 * S3 User Guide</i>.</p> 55 */ GetNoncurrentDays()56 inline int GetNoncurrentDays() const{ return m_noncurrentDays; } 57 58 /** 59 * <p>Specifies the number of days an object is noncurrent before Amazon S3 can 60 * perform the associated action. For information about the noncurrent days 61 * calculations, see <a 62 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations">How 63 * Amazon S3 Calculates How Long an Object Has Been Noncurrent</a> in the <i>Amazon 64 * S3 User Guide</i>.</p> 65 */ NoncurrentDaysHasBeenSet()66 inline bool NoncurrentDaysHasBeenSet() const { return m_noncurrentDaysHasBeenSet; } 67 68 /** 69 * <p>Specifies the number of days an object is noncurrent before Amazon S3 can 70 * perform the associated action. For information about the noncurrent days 71 * calculations, see <a 72 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations">How 73 * Amazon S3 Calculates How Long an Object Has Been Noncurrent</a> in the <i>Amazon 74 * S3 User Guide</i>.</p> 75 */ SetNoncurrentDays(int value)76 inline void SetNoncurrentDays(int value) { m_noncurrentDaysHasBeenSet = true; m_noncurrentDays = value; } 77 78 /** 79 * <p>Specifies the number of days an object is noncurrent before Amazon S3 can 80 * perform the associated action. For information about the noncurrent days 81 * calculations, see <a 82 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations">How 83 * Amazon S3 Calculates How Long an Object Has Been Noncurrent</a> in the <i>Amazon 84 * S3 User Guide</i>.</p> 85 */ WithNoncurrentDays(int value)86 inline NoncurrentVersionTransition& WithNoncurrentDays(int value) { SetNoncurrentDays(value); return *this;} 87 88 89 /** 90 * <p>The class of storage used to store the object.</p> 91 */ GetStorageClass()92 inline const TransitionStorageClass& GetStorageClass() const{ return m_storageClass; } 93 94 /** 95 * <p>The class of storage used to store the object.</p> 96 */ StorageClassHasBeenSet()97 inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; } 98 99 /** 100 * <p>The class of storage used to store the object.</p> 101 */ SetStorageClass(const TransitionStorageClass & value)102 inline void SetStorageClass(const TransitionStorageClass& value) { m_storageClassHasBeenSet = true; m_storageClass = value; } 103 104 /** 105 * <p>The class of storage used to store the object.</p> 106 */ SetStorageClass(TransitionStorageClass && value)107 inline void SetStorageClass(TransitionStorageClass&& value) { m_storageClassHasBeenSet = true; m_storageClass = std::move(value); } 108 109 /** 110 * <p>The class of storage used to store the object.</p> 111 */ WithStorageClass(const TransitionStorageClass & value)112 inline NoncurrentVersionTransition& WithStorageClass(const TransitionStorageClass& value) { SetStorageClass(value); return *this;} 113 114 /** 115 * <p>The class of storage used to store the object.</p> 116 */ WithStorageClass(TransitionStorageClass && value)117 inline NoncurrentVersionTransition& WithStorageClass(TransitionStorageClass&& value) { SetStorageClass(std::move(value)); return *this;} 118 119 private: 120 121 int m_noncurrentDays; 122 bool m_noncurrentDaysHasBeenSet; 123 124 TransitionStorageClass m_storageClass; 125 bool m_storageClassHasBeenSet; 126 }; 127 128 } // namespace Model 129 } // namespace S3 130 } // namespace Aws 131