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-crt/S3Crt_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/s3-crt/model/LifecycleRule.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Xml 17 { 18 class XmlNode; 19 } // namespace Xml 20 } // namespace Utils 21 namespace S3Crt 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For 28 * more information, see <a 29 * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html">Object 30 * Lifecycle Management</a> in the <i>Amazon S3 User Guide</i>.</p><p><h3>See 31 * Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLifecycleConfiguration">AWS 33 * API Reference</a></p> 34 */ 35 class AWS_S3CRT_API BucketLifecycleConfiguration 36 { 37 public: 38 BucketLifecycleConfiguration(); 39 BucketLifecycleConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); 40 BucketLifecycleConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 41 42 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; 43 44 45 /** 46 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 47 */ GetRules()48 inline const Aws::Vector<LifecycleRule>& GetRules() const{ return m_rules; } 49 50 /** 51 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 52 */ RulesHasBeenSet()53 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; } 54 55 /** 56 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 57 */ SetRules(const Aws::Vector<LifecycleRule> & value)58 inline void SetRules(const Aws::Vector<LifecycleRule>& value) { m_rulesHasBeenSet = true; m_rules = value; } 59 60 /** 61 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 62 */ SetRules(Aws::Vector<LifecycleRule> && value)63 inline void SetRules(Aws::Vector<LifecycleRule>&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); } 64 65 /** 66 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 67 */ WithRules(const Aws::Vector<LifecycleRule> & value)68 inline BucketLifecycleConfiguration& WithRules(const Aws::Vector<LifecycleRule>& value) { SetRules(value); return *this;} 69 70 /** 71 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 72 */ WithRules(Aws::Vector<LifecycleRule> && value)73 inline BucketLifecycleConfiguration& WithRules(Aws::Vector<LifecycleRule>&& value) { SetRules(std::move(value)); return *this;} 74 75 /** 76 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 77 */ AddRules(const LifecycleRule & value)78 inline BucketLifecycleConfiguration& AddRules(const LifecycleRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; } 79 80 /** 81 * <p>A lifecycle rule for individual objects in an Amazon S3 bucket.</p> 82 */ AddRules(LifecycleRule && value)83 inline BucketLifecycleConfiguration& AddRules(LifecycleRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; } 84 85 private: 86 87 Aws::Vector<LifecycleRule> m_rules; 88 bool m_rulesHasBeenSet; 89 }; 90 91 } // namespace Model 92 } // namespace S3Crt 93 } // namespace Aws 94