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

Defines a resiliency policy.

See Also:

AWS * API Reference

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

The timestamp for when the resiliency policy was created.

*/ inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } /** *

The timestamp for when the resiliency policy was created.

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

The timestamp for when the resiliency policy was created.

*/ inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

The timestamp for when the resiliency policy was created.

*/ inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

The timestamp for when the resiliency policy was created.

*/ inline ResiliencyPolicy& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} /** *

The timestamp for when the resiliency policy was created.

*/ inline ResiliencyPolicy& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} /** *

Specifies a high-level geographical location constraint for where your * resilience policy data can be stored.

*/ inline const DataLocationConstraint& GetDataLocationConstraint() const{ return m_dataLocationConstraint; } /** *

Specifies a high-level geographical location constraint for where your * resilience policy data can be stored.

*/ inline bool DataLocationConstraintHasBeenSet() const { return m_dataLocationConstraintHasBeenSet; } /** *

Specifies a high-level geographical location constraint for where your * resilience policy data can be stored.

*/ inline void SetDataLocationConstraint(const DataLocationConstraint& value) { m_dataLocationConstraintHasBeenSet = true; m_dataLocationConstraint = value; } /** *

Specifies a high-level geographical location constraint for where your * resilience policy data can be stored.

*/ inline void SetDataLocationConstraint(DataLocationConstraint&& value) { m_dataLocationConstraintHasBeenSet = true; m_dataLocationConstraint = std::move(value); } /** *

Specifies a high-level geographical location constraint for where your * resilience policy data can be stored.

*/ inline ResiliencyPolicy& WithDataLocationConstraint(const DataLocationConstraint& value) { SetDataLocationConstraint(value); return *this;} /** *

Specifies a high-level geographical location constraint for where your * resilience policy data can be stored.

*/ inline ResiliencyPolicy& WithDataLocationConstraint(DataLocationConstraint&& value) { SetDataLocationConstraint(std::move(value)); return *this;} /** *

Specifies the estimated cost tier of the resiliency policy.

*/ inline const EstimatedCostTier& GetEstimatedCostTier() const{ return m_estimatedCostTier; } /** *

Specifies the estimated cost tier of the resiliency policy.

*/ inline bool EstimatedCostTierHasBeenSet() const { return m_estimatedCostTierHasBeenSet; } /** *

Specifies the estimated cost tier of the resiliency policy.

*/ inline void SetEstimatedCostTier(const EstimatedCostTier& value) { m_estimatedCostTierHasBeenSet = true; m_estimatedCostTier = value; } /** *

Specifies the estimated cost tier of the resiliency policy.

*/ inline void SetEstimatedCostTier(EstimatedCostTier&& value) { m_estimatedCostTierHasBeenSet = true; m_estimatedCostTier = std::move(value); } /** *

Specifies the estimated cost tier of the resiliency policy.

*/ inline ResiliencyPolicy& WithEstimatedCostTier(const EstimatedCostTier& value) { SetEstimatedCostTier(value); return *this;} /** *

Specifies the estimated cost tier of the resiliency policy.

*/ inline ResiliencyPolicy& WithEstimatedCostTier(EstimatedCostTier&& value) { SetEstimatedCostTier(std::move(value)); return *this;} /** *

The resiliency policy.

*/ inline const Aws::Map& GetPolicy() const{ return m_policy; } /** *

The resiliency policy.

*/ inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; } /** *

The resiliency policy.

*/ inline void SetPolicy(const Aws::Map& value) { m_policyHasBeenSet = true; m_policy = value; } /** *

The resiliency policy.

*/ inline void SetPolicy(Aws::Map&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); } /** *

The resiliency policy.

*/ inline ResiliencyPolicy& WithPolicy(const Aws::Map& value) { SetPolicy(value); return *this;} /** *

The resiliency policy.

*/ inline ResiliencyPolicy& WithPolicy(Aws::Map&& value) { SetPolicy(std::move(value)); return *this;} /** *

The resiliency policy.

*/ inline ResiliencyPolicy& AddPolicy(const DisruptionType& key, const FailurePolicy& value) { m_policyHasBeenSet = true; m_policy.emplace(key, value); return *this; } /** *

The resiliency policy.

*/ inline ResiliencyPolicy& AddPolicy(DisruptionType&& key, const FailurePolicy& value) { m_policyHasBeenSet = true; m_policy.emplace(std::move(key), value); return *this; } /** *

The resiliency policy.

*/ inline ResiliencyPolicy& AddPolicy(const DisruptionType& key, FailurePolicy&& value) { m_policyHasBeenSet = true; m_policy.emplace(key, std::move(value)); return *this; } /** *

The resiliency policy.

*/ inline ResiliencyPolicy& AddPolicy(DisruptionType&& key, FailurePolicy&& value) { m_policyHasBeenSet = true; m_policy.emplace(std::move(key), std::move(value)); return *this; } /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline ResiliencyPolicy& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline ResiliencyPolicy& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the resiliency policy. The format for this * ARN is: * arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. * For more information about ARNs, see * Amazon Resource Names (ARNs) in the AWS General Reference guide.

*/ inline ResiliencyPolicy& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} /** *

The description for the policy.

*/ inline const Aws::String& GetPolicyDescription() const{ return m_policyDescription; } /** *

The description for the policy.

*/ inline bool PolicyDescriptionHasBeenSet() const { return m_policyDescriptionHasBeenSet; } /** *

The description for the policy.

*/ inline void SetPolicyDescription(const Aws::String& value) { m_policyDescriptionHasBeenSet = true; m_policyDescription = value; } /** *

The description for the policy.

*/ inline void SetPolicyDescription(Aws::String&& value) { m_policyDescriptionHasBeenSet = true; m_policyDescription = std::move(value); } /** *

The description for the policy.

*/ inline void SetPolicyDescription(const char* value) { m_policyDescriptionHasBeenSet = true; m_policyDescription.assign(value); } /** *

The description for the policy.

*/ inline ResiliencyPolicy& WithPolicyDescription(const Aws::String& value) { SetPolicyDescription(value); return *this;} /** *

The description for the policy.

*/ inline ResiliencyPolicy& WithPolicyDescription(Aws::String&& value) { SetPolicyDescription(std::move(value)); return *this;} /** *

The description for the policy.

*/ inline ResiliencyPolicy& WithPolicyDescription(const char* value) { SetPolicyDescription(value); return *this;} /** *

The name of the policy

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name of the policy

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name of the policy

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name of the policy

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name of the policy

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name of the policy

*/ inline ResiliencyPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the policy

*/ inline ResiliencyPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name of the policy

*/ inline ResiliencyPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

The tags assigned to the resource. A tag is a label that you assign to an * Amazon Web Services resource. Each tag consists of a key/value pair.

*/ inline ResiliencyPolicy& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The tier for this resiliency policy, ranging from the highest severity * (MissionCritical) to lowest (NonCritical).

*/ inline const ResiliencyPolicyTier& GetTier() const{ return m_tier; } /** *

The tier for this resiliency policy, ranging from the highest severity * (MissionCritical) to lowest (NonCritical).

*/ inline bool TierHasBeenSet() const { return m_tierHasBeenSet; } /** *

The tier for this resiliency policy, ranging from the highest severity * (MissionCritical) to lowest (NonCritical).

*/ inline void SetTier(const ResiliencyPolicyTier& value) { m_tierHasBeenSet = true; m_tier = value; } /** *

The tier for this resiliency policy, ranging from the highest severity * (MissionCritical) to lowest (NonCritical).

*/ inline void SetTier(ResiliencyPolicyTier&& value) { m_tierHasBeenSet = true; m_tier = std::move(value); } /** *

The tier for this resiliency policy, ranging from the highest severity * (MissionCritical) to lowest (NonCritical).

*/ inline ResiliencyPolicy& WithTier(const ResiliencyPolicyTier& value) { SetTier(value); return *this;} /** *

The tier for this resiliency policy, ranging from the highest severity * (MissionCritical) to lowest (NonCritical).

*/ inline ResiliencyPolicy& WithTier(ResiliencyPolicyTier&& value) { SetTier(std::move(value)); return *this;} private: Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet = false; DataLocationConstraint m_dataLocationConstraint; bool m_dataLocationConstraintHasBeenSet = false; EstimatedCostTier m_estimatedCostTier; bool m_estimatedCostTierHasBeenSet = false; Aws::Map m_policy; bool m_policyHasBeenSet = false; Aws::String m_policyArn; bool m_policyArnHasBeenSet = false; Aws::String m_policyDescription; bool m_policyDescriptionHasBeenSet = false; Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; ResiliencyPolicyTier m_tier; bool m_tierHasBeenSet = false; }; } // namespace Model } // namespace ResilienceHub } // namespace Aws