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

Information about a Recycle Bin retention rule.

See Also:

AWS * API Reference

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

The unique ID of the retention rule.

*/ inline const Aws::String& GetIdentifier() const{ return m_identifier; } /** *

The unique ID of the retention rule.

*/ inline bool IdentifierHasBeenSet() const { return m_identifierHasBeenSet; } /** *

The unique ID of the retention rule.

*/ inline void SetIdentifier(const Aws::String& value) { m_identifierHasBeenSet = true; m_identifier = value; } /** *

The unique ID of the retention rule.

*/ inline void SetIdentifier(Aws::String&& value) { m_identifierHasBeenSet = true; m_identifier = std::move(value); } /** *

The unique ID of the retention rule.

*/ inline void SetIdentifier(const char* value) { m_identifierHasBeenSet = true; m_identifier.assign(value); } /** *

The unique ID of the retention rule.

*/ inline RuleSummary& WithIdentifier(const Aws::String& value) { SetIdentifier(value); return *this;} /** *

The unique ID of the retention rule.

*/ inline RuleSummary& WithIdentifier(Aws::String&& value) { SetIdentifier(std::move(value)); return *this;} /** *

The unique ID of the retention rule.

*/ inline RuleSummary& WithIdentifier(const char* value) { SetIdentifier(value); return *this;} /** *

The retention rule description.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The retention rule description.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The retention rule description.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The retention rule description.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The retention rule description.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The retention rule description.

*/ inline RuleSummary& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The retention rule description.

*/ inline RuleSummary& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The retention rule description.

*/ inline RuleSummary& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Information about the retention period for which the retention rule is to * retain resources.

*/ inline const RetentionPeriod& GetRetentionPeriod() const{ return m_retentionPeriod; } /** *

Information about the retention period for which the retention rule is to * retain resources.

*/ inline bool RetentionPeriodHasBeenSet() const { return m_retentionPeriodHasBeenSet; } /** *

Information about the retention period for which the retention rule is to * retain resources.

*/ inline void SetRetentionPeriod(const RetentionPeriod& value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = value; } /** *

Information about the retention period for which the retention rule is to * retain resources.

*/ inline void SetRetentionPeriod(RetentionPeriod&& value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = std::move(value); } /** *

Information about the retention period for which the retention rule is to * retain resources.

*/ inline RuleSummary& WithRetentionPeriod(const RetentionPeriod& value) { SetRetentionPeriod(value); return *this;} /** *

Information about the retention period for which the retention rule is to * retain resources.

*/ inline RuleSummary& WithRetentionPeriod(RetentionPeriod&& value) { SetRetentionPeriod(std::move(value)); return *this;} /** *

The lock state for the retention rule.

  • locked * - The retention rule is locked and can't be modified or deleted.

  • *

    pending_unlock - The retention rule has been unlocked but it is * still within the unlock delay period. The retention rule can be modified or * deleted only after the unlock delay period has expired.

  • * unlocked - The retention rule is unlocked and it can be modified or * deleted by any user with the required permissions.

  • * null - The retention rule has never been locked. Once a retention * rule has been locked, it can transition between the locked and * unlocked states only; it can never transition back to * null.

*/ inline const LockState& GetLockState() const{ return m_lockState; } /** *

The lock state for the retention rule.

  • locked * - The retention rule is locked and can't be modified or deleted.

  • *

    pending_unlock - The retention rule has been unlocked but it is * still within the unlock delay period. The retention rule can be modified or * deleted only after the unlock delay period has expired.

  • * unlocked - The retention rule is unlocked and it can be modified or * deleted by any user with the required permissions.

  • * null - The retention rule has never been locked. Once a retention * rule has been locked, it can transition between the locked and * unlocked states only; it can never transition back to * null.

*/ inline bool LockStateHasBeenSet() const { return m_lockStateHasBeenSet; } /** *

The lock state for the retention rule.

  • locked * - The retention rule is locked and can't be modified or deleted.

  • *

    pending_unlock - The retention rule has been unlocked but it is * still within the unlock delay period. The retention rule can be modified or * deleted only after the unlock delay period has expired.

  • * unlocked - The retention rule is unlocked and it can be modified or * deleted by any user with the required permissions.

  • * null - The retention rule has never been locked. Once a retention * rule has been locked, it can transition between the locked and * unlocked states only; it can never transition back to * null.

*/ inline void SetLockState(const LockState& value) { m_lockStateHasBeenSet = true; m_lockState = value; } /** *

The lock state for the retention rule.

  • locked * - The retention rule is locked and can't be modified or deleted.

  • *

    pending_unlock - The retention rule has been unlocked but it is * still within the unlock delay period. The retention rule can be modified or * deleted only after the unlock delay period has expired.

  • * unlocked - The retention rule is unlocked and it can be modified or * deleted by any user with the required permissions.

  • * null - The retention rule has never been locked. Once a retention * rule has been locked, it can transition between the locked and * unlocked states only; it can never transition back to * null.

*/ inline void SetLockState(LockState&& value) { m_lockStateHasBeenSet = true; m_lockState = std::move(value); } /** *

The lock state for the retention rule.

  • locked * - The retention rule is locked and can't be modified or deleted.

  • *

    pending_unlock - The retention rule has been unlocked but it is * still within the unlock delay period. The retention rule can be modified or * deleted only after the unlock delay period has expired.

  • * unlocked - The retention rule is unlocked and it can be modified or * deleted by any user with the required permissions.

  • * null - The retention rule has never been locked. Once a retention * rule has been locked, it can transition between the locked and * unlocked states only; it can never transition back to * null.

*/ inline RuleSummary& WithLockState(const LockState& value) { SetLockState(value); return *this;} /** *

The lock state for the retention rule.

  • locked * - The retention rule is locked and can't be modified or deleted.

  • *

    pending_unlock - The retention rule has been unlocked but it is * still within the unlock delay period. The retention rule can be modified or * deleted only after the unlock delay period has expired.

  • * unlocked - The retention rule is unlocked and it can be modified or * deleted by any user with the required permissions.

  • * null - The retention rule has never been locked. Once a retention * rule has been locked, it can transition between the locked and * unlocked states only; it can never transition back to * null.

*/ inline RuleSummary& WithLockState(LockState&& value) { SetLockState(std::move(value)); return *this;} private: Aws::String m_identifier; bool m_identifierHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; RetentionPeriod m_retentionPeriod; bool m_retentionPeriodHasBeenSet = false; LockState m_lockState; bool m_lockStateHasBeenSet = false; }; } // namespace Model } // namespace RecycleBin } // namespace Aws