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

Defines and enables Amazon CloudWatch metrics and web request sample * collection.

See Also:

AWS * API Reference

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

A boolean indicating whether the associated resource sends metrics to Amazon * CloudWatch. For the list of available metrics, see WAF * metrics and dimensions in the WAF Developer Guide.

*/ inline bool GetCloudWatchMetricsEnabled() const{ return m_cloudWatchMetricsEnabled; } /** *

A boolean indicating whether the associated resource sends metrics to Amazon * CloudWatch. For the list of available metrics, see WAF * metrics and dimensions in the WAF Developer Guide.

*/ inline bool CloudWatchMetricsEnabledHasBeenSet() const { return m_cloudWatchMetricsEnabledHasBeenSet; } /** *

A boolean indicating whether the associated resource sends metrics to Amazon * CloudWatch. For the list of available metrics, see WAF * metrics and dimensions in the WAF Developer Guide.

*/ inline void SetCloudWatchMetricsEnabled(bool value) { m_cloudWatchMetricsEnabledHasBeenSet = true; m_cloudWatchMetricsEnabled = value; } /** *

A boolean indicating whether the associated resource sends metrics to Amazon * CloudWatch. For the list of available metrics, see WAF * metrics and dimensions in the WAF Developer Guide.

*/ inline AwsWafv2VisibilityConfigDetails& WithCloudWatchMetricsEnabled(bool value) { SetCloudWatchMetricsEnabled(value); return *this;} /** *

A name of the Amazon CloudWatch metric.

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

A name of the Amazon CloudWatch metric.

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

A name of the Amazon CloudWatch metric.

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

A name of the Amazon CloudWatch metric.

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

A name of the Amazon CloudWatch metric.

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

A name of the Amazon CloudWatch metric.

*/ inline AwsWafv2VisibilityConfigDetails& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

A name of the Amazon CloudWatch metric.

*/ inline AwsWafv2VisibilityConfigDetails& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

A name of the Amazon CloudWatch metric.

*/ inline AwsWafv2VisibilityConfigDetails& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *

A boolean indicating whether WAF should store a sampling of the web requests * that match the rules. You can view the sampled requests through the WAF console. *

*/ inline bool GetSampledRequestsEnabled() const{ return m_sampledRequestsEnabled; } /** *

A boolean indicating whether WAF should store a sampling of the web requests * that match the rules. You can view the sampled requests through the WAF console. *

*/ inline bool SampledRequestsEnabledHasBeenSet() const { return m_sampledRequestsEnabledHasBeenSet; } /** *

A boolean indicating whether WAF should store a sampling of the web requests * that match the rules. You can view the sampled requests through the WAF console. *

*/ inline void SetSampledRequestsEnabled(bool value) { m_sampledRequestsEnabledHasBeenSet = true; m_sampledRequestsEnabled = value; } /** *

A boolean indicating whether WAF should store a sampling of the web requests * that match the rules. You can view the sampled requests through the WAF console. *

*/ inline AwsWafv2VisibilityConfigDetails& WithSampledRequestsEnabled(bool value) { SetSampledRequestsEnabled(value); return *this;} private: bool m_cloudWatchMetricsEnabled; bool m_cloudWatchMetricsEnabledHasBeenSet = false; Aws::String m_metricName; bool m_metricNameHasBeenSet = false; bool m_sampledRequestsEnabled; bool m_sampledRequestsEnabledHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws