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

[AMI policies only] Specifies an AMI deprecation rule for * cross-Region AMI copies created by an AMI policy.

See Also:

AWS * API Reference

*/ class CrossRegionCopyDeprecateRule { public: AWS_DLM_API CrossRegionCopyDeprecateRule(); AWS_DLM_API CrossRegionCopyDeprecateRule(Aws::Utils::Json::JsonView jsonValue); AWS_DLM_API CrossRegionCopyDeprecateRule& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_DLM_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The period after which to deprecate the cross-Region AMI copies. The period * must be less than or equal to the cross-Region AMI copy retention period, and it * can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or * 3650 days.

*/ inline int GetInterval() const{ return m_interval; } /** *

The period after which to deprecate the cross-Region AMI copies. The period * must be less than or equal to the cross-Region AMI copy retention period, and it * can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or * 3650 days.

*/ inline bool IntervalHasBeenSet() const { return m_intervalHasBeenSet; } /** *

The period after which to deprecate the cross-Region AMI copies. The period * must be less than or equal to the cross-Region AMI copy retention period, and it * can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or * 3650 days.

*/ inline void SetInterval(int value) { m_intervalHasBeenSet = true; m_interval = value; } /** *

The period after which to deprecate the cross-Region AMI copies. The period * must be less than or equal to the cross-Region AMI copy retention period, and it * can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or * 3650 days.

*/ inline CrossRegionCopyDeprecateRule& WithInterval(int value) { SetInterval(value); return *this;} /** *

The unit of time in which to measure the Interval. For example, to * deprecate a cross-Region AMI copy after 3 months, specify * Interval=3 and IntervalUnit=MONTHS.

*/ inline const RetentionIntervalUnitValues& GetIntervalUnit() const{ return m_intervalUnit; } /** *

The unit of time in which to measure the Interval. For example, to * deprecate a cross-Region AMI copy after 3 months, specify * Interval=3 and IntervalUnit=MONTHS.

*/ inline bool IntervalUnitHasBeenSet() const { return m_intervalUnitHasBeenSet; } /** *

The unit of time in which to measure the Interval. For example, to * deprecate a cross-Region AMI copy after 3 months, specify * Interval=3 and IntervalUnit=MONTHS.

*/ inline void SetIntervalUnit(const RetentionIntervalUnitValues& value) { m_intervalUnitHasBeenSet = true; m_intervalUnit = value; } /** *

The unit of time in which to measure the Interval. For example, to * deprecate a cross-Region AMI copy after 3 months, specify * Interval=3 and IntervalUnit=MONTHS.

*/ inline void SetIntervalUnit(RetentionIntervalUnitValues&& value) { m_intervalUnitHasBeenSet = true; m_intervalUnit = std::move(value); } /** *

The unit of time in which to measure the Interval. For example, to * deprecate a cross-Region AMI copy after 3 months, specify * Interval=3 and IntervalUnit=MONTHS.

*/ inline CrossRegionCopyDeprecateRule& WithIntervalUnit(const RetentionIntervalUnitValues& value) { SetIntervalUnit(value); return *this;} /** *

The unit of time in which to measure the Interval. For example, to * deprecate a cross-Region AMI copy after 3 months, specify * Interval=3 and IntervalUnit=MONTHS.

*/ inline CrossRegionCopyDeprecateRule& WithIntervalUnit(RetentionIntervalUnitValues&& value) { SetIntervalUnit(std::move(value)); return *this;} private: int m_interval; bool m_intervalHasBeenSet = false; RetentionIntervalUnitValues m_intervalUnit; bool m_intervalUnitHasBeenSet = false; }; } // namespace Model } // namespace DLM } // namespace Aws