/** * 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 the oldest application version when the maximum * count is exceeded.

See Also:

AWS * API Reference

*/ class MaxCountRule { public: AWS_ELASTICBEANSTALK_API MaxCountRule(); AWS_ELASTICBEANSTALK_API MaxCountRule(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICBEANSTALK_API MaxCountRule& 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 MaxCountRule& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

Specify the maximum number of application versions to retain.

*/ inline int GetMaxCount() const{ return m_maxCount; } /** *

Specify the maximum number of application versions to retain.

*/ inline bool MaxCountHasBeenSet() const { return m_maxCountHasBeenSet; } /** *

Specify the maximum number of application versions to retain.

*/ inline void SetMaxCount(int value) { m_maxCountHasBeenSet = true; m_maxCount = value; } /** *

Specify the maximum number of application versions to retain.

*/ inline MaxCountRule& WithMaxCount(int value) { SetMaxCount(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 MaxCountRule& WithDeleteSourceFromS3(bool value) { SetDeleteSourceFromS3(value); return *this;} private: bool m_enabled; bool m_enabledHasBeenSet = false; int m_maxCount; bool m_maxCountHasBeenSet = false; bool m_deleteSourceFromS3; bool m_deleteSourceFromS3HasBeenSet = false; }; } // namespace Model } // namespace ElasticBeanstalk } // namespace Aws