/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Shield { namespace Model { /** *

An object that represents a resource that is under DDoS * protection.

See Also:

AWS * API Reference

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

The unique identifier (ID) of the protection.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The unique identifier (ID) of the protection.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The unique identifier (ID) of the protection.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The unique identifier (ID) of the protection.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The unique identifier (ID) of the protection.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The unique identifier (ID) of the protection.

*/ inline Protection& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The unique identifier (ID) of the protection.

*/ inline Protection& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The unique identifier (ID) of the protection.

*/ inline Protection& WithId(const char* value) { SetId(value); return *this;} /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline Protection& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline Protection& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the protection. For example, My CloudFront * distributions.

*/ inline Protection& WithName(const char* value) { SetName(value); return *this;} /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline Protection& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline Protection& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} /** *

The ARN (Amazon Resource Name) of the Amazon Web Services resource that is * protected.

*/ inline Protection& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline const Aws::Vector& GetHealthCheckIds() const{ return m_healthCheckIds; } /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline bool HealthCheckIdsHasBeenSet() const { return m_healthCheckIdsHasBeenSet; } /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline void SetHealthCheckIds(const Aws::Vector& value) { m_healthCheckIdsHasBeenSet = true; m_healthCheckIds = value; } /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline void SetHealthCheckIds(Aws::Vector&& value) { m_healthCheckIdsHasBeenSet = true; m_healthCheckIds = std::move(value); } /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline Protection& WithHealthCheckIds(const Aws::Vector& value) { SetHealthCheckIds(value); return *this;} /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline Protection& WithHealthCheckIds(Aws::Vector&& value) { SetHealthCheckIds(std::move(value)); return *this;} /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline Protection& AddHealthCheckIds(const Aws::String& value) { m_healthCheckIdsHasBeenSet = true; m_healthCheckIds.push_back(value); return *this; } /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline Protection& AddHealthCheckIds(Aws::String&& value) { m_healthCheckIdsHasBeenSet = true; m_healthCheckIds.push_back(std::move(value)); return *this; } /** *

The unique identifier (ID) for the Route 53 health check that's associated * with the protection.

*/ inline Protection& AddHealthCheckIds(const char* value) { m_healthCheckIdsHasBeenSet = true; m_healthCheckIds.push_back(value); return *this; } /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline const Aws::String& GetProtectionArn() const{ return m_protectionArn; } /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline bool ProtectionArnHasBeenSet() const { return m_protectionArnHasBeenSet; } /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline void SetProtectionArn(const Aws::String& value) { m_protectionArnHasBeenSet = true; m_protectionArn = value; } /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline void SetProtectionArn(Aws::String&& value) { m_protectionArnHasBeenSet = true; m_protectionArn = std::move(value); } /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline void SetProtectionArn(const char* value) { m_protectionArnHasBeenSet = true; m_protectionArn.assign(value); } /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline Protection& WithProtectionArn(const Aws::String& value) { SetProtectionArn(value); return *this;} /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline Protection& WithProtectionArn(Aws::String&& value) { SetProtectionArn(std::move(value)); return *this;} /** *

The ARN (Amazon Resource Name) of the protection.

*/ inline Protection& WithProtectionArn(const char* value) { SetProtectionArn(value); return *this;} /** *

The automatic application layer DDoS mitigation settings for the protection. * This configuration determines whether Shield Advanced automatically manages * rules in the web ACL in order to respond to application layer events that Shield * Advanced determines to be DDoS attacks.

*/ inline const ApplicationLayerAutomaticResponseConfiguration& GetApplicationLayerAutomaticResponseConfiguration() const{ return m_applicationLayerAutomaticResponseConfiguration; } /** *

The automatic application layer DDoS mitigation settings for the protection. * This configuration determines whether Shield Advanced automatically manages * rules in the web ACL in order to respond to application layer events that Shield * Advanced determines to be DDoS attacks.

*/ inline bool ApplicationLayerAutomaticResponseConfigurationHasBeenSet() const { return m_applicationLayerAutomaticResponseConfigurationHasBeenSet; } /** *

The automatic application layer DDoS mitigation settings for the protection. * This configuration determines whether Shield Advanced automatically manages * rules in the web ACL in order to respond to application layer events that Shield * Advanced determines to be DDoS attacks.

*/ inline void SetApplicationLayerAutomaticResponseConfiguration(const ApplicationLayerAutomaticResponseConfiguration& value) { m_applicationLayerAutomaticResponseConfigurationHasBeenSet = true; m_applicationLayerAutomaticResponseConfiguration = value; } /** *

The automatic application layer DDoS mitigation settings for the protection. * This configuration determines whether Shield Advanced automatically manages * rules in the web ACL in order to respond to application layer events that Shield * Advanced determines to be DDoS attacks.

*/ inline void SetApplicationLayerAutomaticResponseConfiguration(ApplicationLayerAutomaticResponseConfiguration&& value) { m_applicationLayerAutomaticResponseConfigurationHasBeenSet = true; m_applicationLayerAutomaticResponseConfiguration = std::move(value); } /** *

The automatic application layer DDoS mitigation settings for the protection. * This configuration determines whether Shield Advanced automatically manages * rules in the web ACL in order to respond to application layer events that Shield * Advanced determines to be DDoS attacks.

*/ inline Protection& WithApplicationLayerAutomaticResponseConfiguration(const ApplicationLayerAutomaticResponseConfiguration& value) { SetApplicationLayerAutomaticResponseConfiguration(value); return *this;} /** *

The automatic application layer DDoS mitigation settings for the protection. * This configuration determines whether Shield Advanced automatically manages * rules in the web ACL in order to respond to application layer events that Shield * Advanced determines to be DDoS attacks.

*/ inline Protection& WithApplicationLayerAutomaticResponseConfiguration(ApplicationLayerAutomaticResponseConfiguration&& value) { SetApplicationLayerAutomaticResponseConfiguration(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; Aws::Vector m_healthCheckIds; bool m_healthCheckIdsHasBeenSet = false; Aws::String m_protectionArn; bool m_protectionArnHasBeenSet = false; ApplicationLayerAutomaticResponseConfiguration m_applicationLayerAutomaticResponseConfiguration; bool m_applicationLayerAutomaticResponseConfigurationHasBeenSet = false; }; } // namespace Model } // namespace Shield } // namespace Aws