/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace RecycleBin { namespace Model { class GetRuleResult { public: AWS_RECYCLEBIN_API GetRuleResult(); AWS_RECYCLEBIN_API GetRuleResult(const Aws::AmazonWebServiceResult& result); AWS_RECYCLEBIN_API GetRuleResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The unique ID of the retention rule.

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

The unique ID of the retention rule.

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

The unique ID of the retention rule.

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

The unique ID of the retention rule.

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

The unique ID of the retention rule.

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

The unique ID of the retention rule.

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

The unique ID of the retention rule.

*/ inline GetRuleResult& 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 void SetDescription(const Aws::String& value) { m_description = value; } /** *

The retention rule description.

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

The retention rule description.

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

The retention rule description.

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

The retention rule description.

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

The retention rule description.

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

The resource type retained by the retention rule.

*/ inline const ResourceType& GetResourceType() const{ return m_resourceType; } /** *

The resource type retained by the retention rule.

*/ inline void SetResourceType(const ResourceType& value) { m_resourceType = value; } /** *

The resource type retained by the retention rule.

*/ inline void SetResourceType(ResourceType&& value) { m_resourceType = std::move(value); } /** *

The resource type retained by the retention rule.

*/ inline GetRuleResult& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;} /** *

The resource type retained by the retention rule.

*/ inline GetRuleResult& WithResourceType(ResourceType&& value) { SetResourceType(std::move(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 void SetRetentionPeriod(const RetentionPeriod& value) { m_retentionPeriod = value; } /** *

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

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

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

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

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

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

Information about the resource tags used to identify resources that are * retained by the retention rule.

*/ inline const Aws::Vector& GetResourceTags() const{ return m_resourceTags; } /** *

Information about the resource tags used to identify resources that are * retained by the retention rule.

*/ inline void SetResourceTags(const Aws::Vector& value) { m_resourceTags = value; } /** *

Information about the resource tags used to identify resources that are * retained by the retention rule.

*/ inline void SetResourceTags(Aws::Vector&& value) { m_resourceTags = std::move(value); } /** *

Information about the resource tags used to identify resources that are * retained by the retention rule.

*/ inline GetRuleResult& WithResourceTags(const Aws::Vector& value) { SetResourceTags(value); return *this;} /** *

Information about the resource tags used to identify resources that are * retained by the retention rule.

*/ inline GetRuleResult& WithResourceTags(Aws::Vector&& value) { SetResourceTags(std::move(value)); return *this;} /** *

Information about the resource tags used to identify resources that are * retained by the retention rule.

*/ inline GetRuleResult& AddResourceTags(const ResourceTag& value) { m_resourceTags.push_back(value); return *this; } /** *

Information about the resource tags used to identify resources that are * retained by the retention rule.

*/ inline GetRuleResult& AddResourceTags(ResourceTag&& value) { m_resourceTags.push_back(std::move(value)); return *this; } /** *

The state of the retention rule. Only retention rules that are in the * available state retain resources.

*/ inline const RuleStatus& GetStatus() const{ return m_status; } /** *

The state of the retention rule. Only retention rules that are in the * available state retain resources.

*/ inline void SetStatus(const RuleStatus& value) { m_status = value; } /** *

The state of the retention rule. Only retention rules that are in the * available state retain resources.

*/ inline void SetStatus(RuleStatus&& value) { m_status = std::move(value); } /** *

The state of the retention rule. Only retention rules that are in the * available state retain resources.

*/ inline GetRuleResult& WithStatus(const RuleStatus& value) { SetStatus(value); return *this;} /** *

The state of the retention rule. Only retention rules that are in the * available state retain resources.

*/ inline GetRuleResult& WithStatus(RuleStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

Information about the retention rule lock configuration.

*/ inline const LockConfiguration& GetLockConfiguration() const{ return m_lockConfiguration; } /** *

Information about the retention rule lock configuration.

*/ inline void SetLockConfiguration(const LockConfiguration& value) { m_lockConfiguration = value; } /** *

Information about the retention rule lock configuration.

*/ inline void SetLockConfiguration(LockConfiguration&& value) { m_lockConfiguration = std::move(value); } /** *

Information about the retention rule lock configuration.

*/ inline GetRuleResult& WithLockConfiguration(const LockConfiguration& value) { SetLockConfiguration(value); return *this;} /** *

Information about the retention rule lock configuration.

*/ inline GetRuleResult& WithLockConfiguration(LockConfiguration&& value) { SetLockConfiguration(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 void SetLockState(const LockState& value) { 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_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 GetRuleResult& 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 GetRuleResult& WithLockState(LockState&& value) { SetLockState(std::move(value)); return *this;} /** *

The date and time at which the unlock delay is set to expire. Only returned * for retention rules that have been unlocked and that are still within the unlock * delay period.

*/ inline const Aws::Utils::DateTime& GetLockEndTime() const{ return m_lockEndTime; } /** *

The date and time at which the unlock delay is set to expire. Only returned * for retention rules that have been unlocked and that are still within the unlock * delay period.

*/ inline void SetLockEndTime(const Aws::Utils::DateTime& value) { m_lockEndTime = value; } /** *

The date and time at which the unlock delay is set to expire. Only returned * for retention rules that have been unlocked and that are still within the unlock * delay period.

*/ inline void SetLockEndTime(Aws::Utils::DateTime&& value) { m_lockEndTime = std::move(value); } /** *

The date and time at which the unlock delay is set to expire. Only returned * for retention rules that have been unlocked and that are still within the unlock * delay period.

*/ inline GetRuleResult& WithLockEndTime(const Aws::Utils::DateTime& value) { SetLockEndTime(value); return *this;} /** *

The date and time at which the unlock delay is set to expire. Only returned * for retention rules that have been unlocked and that are still within the unlock * delay period.

*/ inline GetRuleResult& WithLockEndTime(Aws::Utils::DateTime&& value) { SetLockEndTime(std::move(value)); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline GetRuleResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GetRuleResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GetRuleResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_identifier; Aws::String m_description; ResourceType m_resourceType; RetentionPeriod m_retentionPeriod; Aws::Vector m_resourceTags; RuleStatus m_status; LockConfiguration m_lockConfiguration; LockState m_lockState; Aws::Utils::DateTime m_lockEndTime; Aws::String m_requestId; }; } // namespace Model } // namespace RecycleBin } // namespace Aws