/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace DLM { namespace Model { /** *

Specifies the configuration of a lifecycle policy.

See Also:

* AWS * API Reference

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

The valid target resource types and actions a policy can manage. The default * is EBS_SNAPSHOT_MANAGEMENT.

*/ inline const PolicyTypeValues& GetPolicyType() const{ return m_policyType; } /** *

The valid target resource types and actions a policy can manage. The default * is EBS_SNAPSHOT_MANAGEMENT.

*/ inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; } /** *

The valid target resource types and actions a policy can manage. The default * is EBS_SNAPSHOT_MANAGEMENT.

*/ inline void SetPolicyType(const PolicyTypeValues& value) { m_policyTypeHasBeenSet = true; m_policyType = value; } /** *

The valid target resource types and actions a policy can manage. The default * is EBS_SNAPSHOT_MANAGEMENT.

*/ inline void SetPolicyType(PolicyTypeValues&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); } /** *

The valid target resource types and actions a policy can manage. The default * is EBS_SNAPSHOT_MANAGEMENT.

*/ inline PolicyDetails& WithPolicyType(const PolicyTypeValues& value) { SetPolicyType(value); return *this;} /** *

The valid target resource types and actions a policy can manage. The default * is EBS_SNAPSHOT_MANAGEMENT.

*/ inline PolicyDetails& WithPolicyType(PolicyTypeValues&& value) { SetPolicyType(std::move(value)); return *this;} /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline const Aws::Vector& GetResourceTypes() const{ return m_resourceTypes; } /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline bool ResourceTypesHasBeenSet() const { return m_resourceTypesHasBeenSet; } /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline void SetResourceTypes(const Aws::Vector& value) { m_resourceTypesHasBeenSet = true; m_resourceTypes = value; } /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline void SetResourceTypes(Aws::Vector&& value) { m_resourceTypesHasBeenSet = true; m_resourceTypes = std::move(value); } /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline PolicyDetails& WithResourceTypes(const Aws::Vector& value) { SetResourceTypes(value); return *this;} /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline PolicyDetails& WithResourceTypes(Aws::Vector&& value) { SetResourceTypes(std::move(value)); return *this;} /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline PolicyDetails& AddResourceTypes(const ResourceTypeValues& value) { m_resourceTypesHasBeenSet = true; m_resourceTypes.push_back(value); return *this; } /** *

The resource type. Use VOLUME to create snapshots of individual volumes or * use INSTANCE to create multi-volume snapshots from the volumes for an * instance.

*/ inline PolicyDetails& AddResourceTypes(ResourceTypeValues&& value) { m_resourceTypesHasBeenSet = true; m_resourceTypes.push_back(std::move(value)); return *this; } /** *

The single tag that identifies targeted resources for this policy.

*/ inline const Aws::Vector& GetTargetTags() const{ return m_targetTags; } /** *

The single tag that identifies targeted resources for this policy.

*/ inline bool TargetTagsHasBeenSet() const { return m_targetTagsHasBeenSet; } /** *

The single tag that identifies targeted resources for this policy.

*/ inline void SetTargetTags(const Aws::Vector& value) { m_targetTagsHasBeenSet = true; m_targetTags = value; } /** *

The single tag that identifies targeted resources for this policy.

*/ inline void SetTargetTags(Aws::Vector&& value) { m_targetTagsHasBeenSet = true; m_targetTags = std::move(value); } /** *

The single tag that identifies targeted resources for this policy.

*/ inline PolicyDetails& WithTargetTags(const Aws::Vector& value) { SetTargetTags(value); return *this;} /** *

The single tag that identifies targeted resources for this policy.

*/ inline PolicyDetails& WithTargetTags(Aws::Vector&& value) { SetTargetTags(std::move(value)); return *this;} /** *

The single tag that identifies targeted resources for this policy.

*/ inline PolicyDetails& AddTargetTags(const Tag& value) { m_targetTagsHasBeenSet = true; m_targetTags.push_back(value); return *this; } /** *

The single tag that identifies targeted resources for this policy.

*/ inline PolicyDetails& AddTargetTags(Tag&& value) { m_targetTagsHasBeenSet = true; m_targetTags.push_back(std::move(value)); return *this; } /** *

The schedule of policy-defined actions.

*/ inline const Aws::Vector& GetSchedules() const{ return m_schedules; } /** *

The schedule of policy-defined actions.

*/ inline bool SchedulesHasBeenSet() const { return m_schedulesHasBeenSet; } /** *

The schedule of policy-defined actions.

*/ inline void SetSchedules(const Aws::Vector& value) { m_schedulesHasBeenSet = true; m_schedules = value; } /** *

The schedule of policy-defined actions.

*/ inline void SetSchedules(Aws::Vector&& value) { m_schedulesHasBeenSet = true; m_schedules = std::move(value); } /** *

The schedule of policy-defined actions.

*/ inline PolicyDetails& WithSchedules(const Aws::Vector& value) { SetSchedules(value); return *this;} /** *

The schedule of policy-defined actions.

*/ inline PolicyDetails& WithSchedules(Aws::Vector&& value) { SetSchedules(std::move(value)); return *this;} /** *

The schedule of policy-defined actions.

*/ inline PolicyDetails& AddSchedules(const Schedule& value) { m_schedulesHasBeenSet = true; m_schedules.push_back(value); return *this; } /** *

The schedule of policy-defined actions.

*/ inline PolicyDetails& AddSchedules(Schedule&& value) { m_schedulesHasBeenSet = true; m_schedules.push_back(std::move(value)); return *this; } /** *

A set of optional parameters for the policy.

*/ inline const Parameters& GetParameters() const{ return m_parameters; } /** *

A set of optional parameters for the policy.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

A set of optional parameters for the policy.

*/ inline void SetParameters(const Parameters& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

A set of optional parameters for the policy.

*/ inline void SetParameters(Parameters&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

A set of optional parameters for the policy.

*/ inline PolicyDetails& WithParameters(const Parameters& value) { SetParameters(value); return *this;} /** *

A set of optional parameters for the policy.

*/ inline PolicyDetails& WithParameters(Parameters&& value) { SetParameters(std::move(value)); return *this;} private: PolicyTypeValues m_policyType; bool m_policyTypeHasBeenSet; Aws::Vector m_resourceTypes; bool m_resourceTypesHasBeenSet; Aws::Vector m_targetTags; bool m_targetTagsHasBeenSet; Aws::Vector m_schedules; bool m_schedulesHasBeenSet; Parameters m_parameters; bool m_parametersHasBeenSet; }; } // namespace Model } // namespace DLM } // namespace Aws