/**
 * 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/AwsWafWebAclRule.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 web access control list (web
 * ACL).</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/AwsWafWebAclDetails">AWS
 * API Reference</a></p>
 */
class AwsWafWebAclDetails {
 public:
  AWS_SECURITYHUB_API AwsWafWebAclDetails() = default;
  AWS_SECURITYHUB_API AwsWafWebAclDetails(Aws::Utils::Json::JsonView jsonValue);
  AWS_SECURITYHUB_API AwsWafWebAclDetails& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>A friendly name or description of the web ACL. You can't change the name of a
   * web ACL after you create it.</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>
  AwsWafWebAclDetails& WithName(NameT&& value) {
    SetName(std::forward<NameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The action to perform if none of the rules contained in the web ACL
   * match.</p>
   */
  inline const Aws::String& GetDefaultAction() const { return m_defaultAction; }
  inline bool DefaultActionHasBeenSet() const { return m_defaultActionHasBeenSet; }
  template <typename DefaultActionT = Aws::String>
  void SetDefaultAction(DefaultActionT&& value) {
    m_defaultActionHasBeenSet = true;
    m_defaultAction = std::forward<DefaultActionT>(value);
  }
  template <typename DefaultActionT = Aws::String>
  AwsWafWebAclDetails& WithDefaultAction(DefaultActionT&& value) {
    SetDefaultAction(std::forward<DefaultActionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>An array that contains the action for each rule in a web ACL, the priority of
   * the rule, and the ID of the rule.</p>
   */
  inline const Aws::Vector<AwsWafWebAclRule>& GetRules() const { return m_rules; }
  inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
  template <typename RulesT = Aws::Vector<AwsWafWebAclRule>>
  void SetRules(RulesT&& value) {
    m_rulesHasBeenSet = true;
    m_rules = std::forward<RulesT>(value);
  }
  template <typename RulesT = Aws::Vector<AwsWafWebAclRule>>
  AwsWafWebAclDetails& WithRules(RulesT&& value) {
    SetRules(std::forward<RulesT>(value));
    return *this;
  }
  template <typename RulesT = AwsWafWebAclRule>
  AwsWafWebAclDetails& AddRules(RulesT&& value) {
    m_rulesHasBeenSet = true;
    m_rules.emplace_back(std::forward<RulesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A unique identifier for a web ACL.</p>
   */
  inline const Aws::String& GetWebAclId() const { return m_webAclId; }
  inline bool WebAclIdHasBeenSet() const { return m_webAclIdHasBeenSet; }
  template <typename WebAclIdT = Aws::String>
  void SetWebAclId(WebAclIdT&& value) {
    m_webAclIdHasBeenSet = true;
    m_webAclId = std::forward<WebAclIdT>(value);
  }
  template <typename WebAclIdT = Aws::String>
  AwsWafWebAclDetails& WithWebAclId(WebAclIdT&& value) {
    SetWebAclId(std::forward<WebAclIdT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_name;

  Aws::String m_defaultAction;

  Aws::Vector<AwsWafWebAclRule> m_rules;

  Aws::String m_webAclId;
  bool m_nameHasBeenSet = false;
  bool m_defaultActionHasBeenSet = false;
  bool m_rulesHasBeenSet = false;
  bool m_webAclIdHasBeenSet = false;
};

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