/** * 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 ResilienceHub { namespace Model { /** */ class CreateResiliencyPolicyRequest : public ResilienceHubRequest { public: AWS_RESILIENCEHUB_API CreateResiliencyPolicyRequest(); // 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 "CreateResiliencyPolicy"; } AWS_RESILIENCEHUB_API Aws::String SerializePayload() const override; /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline CreateResiliencyPolicyRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline CreateResiliencyPolicyRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Used for an idempotency token. A client token is a unique, case-sensitive * string of up to 64 ASCII characters. You should not reuse the same client token * for other API requests.

*/ inline CreateResiliencyPolicyRequest& WithClientToken(const char* value) { SetClientToken(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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& WithDataLocationConstraint(DataLocationConstraint&& value) { SetDataLocationConstraint(std::move(value)); return *this;} /** *

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

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

The type of resiliency policy to be created, including the recovery time * objective (RTO) and recovery point objective (RPO) in seconds.

*/ inline CreateResiliencyPolicyRequest& AddPolicy(DisruptionType&& key, FailurePolicy&& value) { m_policyHasBeenSet = true; m_policy.emplace(std::move(key), std::move(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 CreateResiliencyPolicyRequest& WithPolicyDescription(const Aws::String& value) { SetPolicyDescription(value); return *this;} /** *

The description for the policy.

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

The description for the policy.

*/ inline CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the policy

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

The name of the policy

*/ inline CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& 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 CreateResiliencyPolicyRequest& WithTier(const ResiliencyPolicyTier& value) { SetTier(value); return *this;} /** *

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

*/ inline CreateResiliencyPolicyRequest& WithTier(ResiliencyPolicyTier&& value) { SetTier(std::move(value)); return *this;} private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; DataLocationConstraint m_dataLocationConstraint; bool m_dataLocationConstraintHasBeenSet = false; Aws::Map m_policy; bool m_policyHasBeenSet = 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