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

A lifecycle rule that deletes application versions after the specified number * of days.

See Also:

AWS * API Reference

*/ class MaxAgeRule { public: AWS_ELASTICBEANSTALK_API MaxAgeRule(); AWS_ELASTICBEANSTALK_API MaxAgeRule(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICBEANSTALK_API MaxAgeRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICBEANSTALK_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICBEANSTALK_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

Specify true to apply the rule, or false to disable * it.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Specify true to apply the rule, or false to disable * it.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Specify true to apply the rule, or false to disable * it.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Specify true to apply the rule, or false to disable * it.

*/ inline MaxAgeRule& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

Specify the number of days to retain an application versions.

*/ inline int GetMaxAgeInDays() const{ return m_maxAgeInDays; } /** *

Specify the number of days to retain an application versions.

*/ inline bool MaxAgeInDaysHasBeenSet() const { return m_maxAgeInDaysHasBeenSet; } /** *

Specify the number of days to retain an application versions.

*/ inline void SetMaxAgeInDays(int value) { m_maxAgeInDaysHasBeenSet = true; m_maxAgeInDays = value; } /** *

Specify the number of days to retain an application versions.

*/ inline MaxAgeRule& WithMaxAgeInDays(int value) { SetMaxAgeInDays(value); return *this;} /** *

Set to true to delete a version's source bundle from Amazon S3 * when Elastic Beanstalk deletes the application version.

*/ inline bool GetDeleteSourceFromS3() const{ return m_deleteSourceFromS3; } /** *

Set to true to delete a version's source bundle from Amazon S3 * when Elastic Beanstalk deletes the application version.

*/ inline bool DeleteSourceFromS3HasBeenSet() const { return m_deleteSourceFromS3HasBeenSet; } /** *

Set to true to delete a version's source bundle from Amazon S3 * when Elastic Beanstalk deletes the application version.

*/ inline void SetDeleteSourceFromS3(bool value) { m_deleteSourceFromS3HasBeenSet = true; m_deleteSourceFromS3 = value; } /** *

Set to true to delete a version's source bundle from Amazon S3 * when Elastic Beanstalk deletes the application version.

*/ inline MaxAgeRule& WithDeleteSourceFromS3(bool value) { SetDeleteSourceFromS3(value); return *this;} private: bool m_enabled; bool m_enabledHasBeenSet = false; int m_maxAgeInDays; bool m_maxAgeInDaysHasBeenSet = false; bool m_deleteSourceFromS3; bool m_deleteSourceFromS3HasBeenSet = false; }; } // namespace Model } // namespace ElasticBeanstalk } // namespace Aws