/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#pragma once
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/securityhub/SecurityHub_EXPORTS.h>
#include <aws/securityhub/model/AwsWafRuleGroupRulesDetails.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Json {
class JsonValue;
class JsonView;
}  // namespace Json
}  // namespace Utils
namespace SecurityHub {
namespace Model {

/**
 * <p>Provides information about an WAF rule group. A rule group is a collection of
 * rules for inspecting and controlling web requests. </p><p><h3>See Also:</h3>
 * <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/AwsWafRuleGroupDetails">AWS
 * API Reference</a></p>
 */
class AwsWafRuleGroupDetails {
 public:
  AWS_SECURITYHUB_API AwsWafRuleGroupDetails() = default;
  AWS_SECURITYHUB_API AwsWafRuleGroupDetails(Aws::Utils::Json::JsonView jsonValue);
  AWS_SECURITYHUB_API AwsWafRuleGroupDetails& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>The name of the metrics for this rule group. </p>
   */
  inline const Aws::String& GetMetricName() const { return m_metricName; }
  inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
  template <typename MetricNameT = Aws::String>
  void SetMetricName(MetricNameT&& value) {
    m_metricNameHasBeenSet = true;
    m_metricName = std::forward<MetricNameT>(value);
  }
  template <typename MetricNameT = Aws::String>
  AwsWafRuleGroupDetails& WithMetricName(MetricNameT&& value) {
    SetMetricName(std::forward<MetricNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the rule group. </p>
   */
  inline const Aws::String& GetName() const { return m_name; }
  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
  template <typename NameT = Aws::String>
  void SetName(NameT&& value) {
    m_nameHasBeenSet = true;
    m_name = std::forward<NameT>(value);
  }
  template <typename NameT = Aws::String>
  AwsWafRuleGroupDetails& WithName(NameT&& value) {
    SetName(std::forward<NameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The ID of the rule group. </p>
   */
  inline const Aws::String& GetRuleGroupId() const { return m_ruleGroupId; }
  inline bool RuleGroupIdHasBeenSet() const { return m_ruleGroupIdHasBeenSet; }
  template <typename RuleGroupIdT = Aws::String>
  void SetRuleGroupId(RuleGroupIdT&& value) {
    m_ruleGroupIdHasBeenSet = true;
    m_ruleGroupId = std::forward<RuleGroupIdT>(value);
  }
  template <typename RuleGroupIdT = Aws::String>
  AwsWafRuleGroupDetails& WithRuleGroupId(RuleGroupIdT&& value) {
    SetRuleGroupId(std::forward<RuleGroupIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Provides information about the rules attached to the rule group. These rules
   * identify the web requests that you want to allow, block, or count. </p>
   */
  inline const Aws::Vector<AwsWafRuleGroupRulesDetails>& GetRules() const { return m_rules; }
  inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
  template <typename RulesT = Aws::Vector<AwsWafRuleGroupRulesDetails>>
  void SetRules(RulesT&& value) {
    m_rulesHasBeenSet = true;
    m_rules = std::forward<RulesT>(value);
  }
  template <typename RulesT = Aws::Vector<AwsWafRuleGroupRulesDetails>>
  AwsWafRuleGroupDetails& WithRules(RulesT&& value) {
    SetRules(std::forward<RulesT>(value));
    return *this;
  }
  template <typename RulesT = AwsWafRuleGroupRulesDetails>
  AwsWafRuleGroupDetails& AddRules(RulesT&& value) {
    m_rulesHasBeenSet = true;
    m_rules.emplace_back(std::forward<RulesT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_metricName;

  Aws::String m_name;

  Aws::String m_ruleGroupId;

  Aws::Vector<AwsWafRuleGroupRulesDetails> m_rules;
  bool m_metricNameHasBeenSet = false;
  bool m_nameHasBeenSet = false;
  bool m_ruleGroupIdHasBeenSet = false;
  bool m_rulesHasBeenSet = false;
};

}  // namespace Model
}  // namespace SecurityHub
}  // namespace Aws
