/** * 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 FSx { namespace Model { /** *

The configuration to set the retention period of an FSx for ONTAP SnapLock * volume. The retention period includes default, maximum, and minimum settings. * For more information, see Working * with the retention period in SnapLock.

See Also:

AWS * API Reference

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

The retention period assigned to a write once, read many (WORM) file by * default if an explicit retention period is not set for an FSx for ONTAP SnapLock * volume. The default retention period must be greater than or equal to the * minimum retention period and less than or equal to the maximum retention period. *

*/ inline const RetentionPeriod& GetDefaultRetention() const{ return m_defaultRetention; } /** *

The retention period assigned to a write once, read many (WORM) file by * default if an explicit retention period is not set for an FSx for ONTAP SnapLock * volume. The default retention period must be greater than or equal to the * minimum retention period and less than or equal to the maximum retention period. *

*/ inline bool DefaultRetentionHasBeenSet() const { return m_defaultRetentionHasBeenSet; } /** *

The retention period assigned to a write once, read many (WORM) file by * default if an explicit retention period is not set for an FSx for ONTAP SnapLock * volume. The default retention period must be greater than or equal to the * minimum retention period and less than or equal to the maximum retention period. *

*/ inline void SetDefaultRetention(const RetentionPeriod& value) { m_defaultRetentionHasBeenSet = true; m_defaultRetention = value; } /** *

The retention period assigned to a write once, read many (WORM) file by * default if an explicit retention period is not set for an FSx for ONTAP SnapLock * volume. The default retention period must be greater than or equal to the * minimum retention period and less than or equal to the maximum retention period. *

*/ inline void SetDefaultRetention(RetentionPeriod&& value) { m_defaultRetentionHasBeenSet = true; m_defaultRetention = std::move(value); } /** *

The retention period assigned to a write once, read many (WORM) file by * default if an explicit retention period is not set for an FSx for ONTAP SnapLock * volume. The default retention period must be greater than or equal to the * minimum retention period and less than or equal to the maximum retention period. *

*/ inline SnaplockRetentionPeriod& WithDefaultRetention(const RetentionPeriod& value) { SetDefaultRetention(value); return *this;} /** *

The retention period assigned to a write once, read many (WORM) file by * default if an explicit retention period is not set for an FSx for ONTAP SnapLock * volume. The default retention period must be greater than or equal to the * minimum retention period and less than or equal to the maximum retention period. *

*/ inline SnaplockRetentionPeriod& WithDefaultRetention(RetentionPeriod&& value) { SetDefaultRetention(std::move(value)); return *this;} /** *

The shortest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline const RetentionPeriod& GetMinimumRetention() const{ return m_minimumRetention; } /** *

The shortest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline bool MinimumRetentionHasBeenSet() const { return m_minimumRetentionHasBeenSet; } /** *

The shortest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline void SetMinimumRetention(const RetentionPeriod& value) { m_minimumRetentionHasBeenSet = true; m_minimumRetention = value; } /** *

The shortest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline void SetMinimumRetention(RetentionPeriod&& value) { m_minimumRetentionHasBeenSet = true; m_minimumRetention = std::move(value); } /** *

The shortest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline SnaplockRetentionPeriod& WithMinimumRetention(const RetentionPeriod& value) { SetMinimumRetention(value); return *this;} /** *

The shortest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline SnaplockRetentionPeriod& WithMinimumRetention(RetentionPeriod&& value) { SetMinimumRetention(std::move(value)); return *this;} /** *

The longest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline const RetentionPeriod& GetMaximumRetention() const{ return m_maximumRetention; } /** *

The longest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline bool MaximumRetentionHasBeenSet() const { return m_maximumRetentionHasBeenSet; } /** *

The longest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline void SetMaximumRetention(const RetentionPeriod& value) { m_maximumRetentionHasBeenSet = true; m_maximumRetention = value; } /** *

The longest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline void SetMaximumRetention(RetentionPeriod&& value) { m_maximumRetentionHasBeenSet = true; m_maximumRetention = std::move(value); } /** *

The longest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline SnaplockRetentionPeriod& WithMaximumRetention(const RetentionPeriod& value) { SetMaximumRetention(value); return *this;} /** *

The longest retention period that can be assigned to a WORM file on an FSx * for ONTAP SnapLock volume.

*/ inline SnaplockRetentionPeriod& WithMaximumRetention(RetentionPeriod&& value) { SetMaximumRetention(std::move(value)); return *this;} private: RetentionPeriod m_defaultRetention; bool m_defaultRetentionHasBeenSet = false; RetentionPeriod m_minimumRetention; bool m_minimumRetentionHasBeenSet = false; RetentionPeriod m_maximumRetention; bool m_maximumRetentionHasBeenSet = false; }; } // namespace Model } // namespace FSx } // namespace Aws