/** * 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 namespace Aws { namespace RecycleBin { namespace Model { /** */ class UpdateRuleRequest : public RecycleBinRequest { public: AWS_RECYCLEBIN_API UpdateRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateRule"; } AWS_RECYCLEBIN_API Aws::String SerializePayload() const override; /** *

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 UpdateRuleRequest& WithIdentifier(const Aws::String& value) { SetIdentifier(value); return *this;} /** *

The unique ID of the retention rule.

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

The unique ID of the retention rule.

*/ inline UpdateRuleRequest& WithIdentifier(const char* value) { SetIdentifier(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 UpdateRuleRequest& WithRetentionPeriod(const RetentionPeriod& value) { SetRetentionPeriod(value); return *this;} /** *

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

*/ inline UpdateRuleRequest& WithRetentionPeriod(RetentionPeriod&& value) { SetRetentionPeriod(std::move(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 UpdateRuleRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The retention rule description.

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

The retention rule description.

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

This parameter is currently not supported. You can't update a * retention rule's resource type after creation.

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

This parameter is currently not supported. You can't update a * retention rule's resource type after creation.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

This parameter is currently not supported. You can't update a * retention rule's resource type after creation.

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

This parameter is currently not supported. You can't update a * retention rule's resource type after creation.

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

This parameter is currently not supported. You can't update a * retention rule's resource type after creation.

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

This parameter is currently not supported. You can't update a * retention rule's resource type after creation.

*/ inline UpdateRuleRequest& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

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

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

*/ inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; } /** *

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

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

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

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

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

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

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

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

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

*/ inline UpdateRuleRequest& AddResourceTags(const ResourceTag& value) { m_resourceTagsHasBeenSet = true; m_resourceTags.push_back(value); return *this; } /** *

Specifies the resource tags to use to identify resources that are to be * retained by a tag-level retention rule. For tag-level retention rules, only * deleted resources, of the specified resource type, that have one or more of the * specified tag key and value pairs are retained. If a resource is deleted, but it * does not have any of the specified tag key and value pairs, it is immediately * deleted without being retained by the retention rule.

You can add the * same tag key and value pair to a maximum or five retention rules.

To * create a Region-level retention rule, omit this parameter. A Region-level * retention rule does not have any resource tags specified. It retains all deleted * resources of the specified resource type in the Region in which the rule is * created, even if the resources are not tagged.

*/ inline UpdateRuleRequest& AddResourceTags(ResourceTag&& value) { m_resourceTagsHasBeenSet = true; m_resourceTags.push_back(std::move(value)); return *this; } private: Aws::String m_identifier; bool m_identifierHasBeenSet = false; RetentionPeriod m_retentionPeriod; bool m_retentionPeriodHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; ResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::Vector m_resourceTags; bool m_resourceTagsHasBeenSet = false; }; } // namespace Model } // namespace RecycleBin } // namespace Aws