/**
 * 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/waf-regional/WAFRegionalRequest.h>
#include <aws/waf-regional/WAFRegional_EXPORTS.h>
#include <aws/waf-regional/model/RuleGroupUpdate.h>

#include <utility>

namespace Aws {
namespace WAFRegional {
namespace Model {

/**
 */
class UpdateRuleGroupRequest : public WAFRegionalRequest {
 public:
  AWS_WAFREGIONAL_API UpdateRuleGroupRequest() = default;

  // 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 "UpdateRuleGroup"; }

  AWS_WAFREGIONAL_API Aws::String SerializePayload() const override;

  AWS_WAFREGIONAL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

  ///@{
  /**
   * <p>The <code>RuleGroupId</code> of the <a>RuleGroup</a> that you want to update.
   * <code>RuleGroupId</code> is returned by <a>CreateRuleGroup</a> and by
   * <a>ListRuleGroups</a>.</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>
  UpdateRuleGroupRequest& WithRuleGroupId(RuleGroupIdT&& value) {
    SetRuleGroupId(std::forward<RuleGroupIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>An array of <code>RuleGroupUpdate</code> objects that you want to insert into
   * or delete from a <a>RuleGroup</a>.</p> <p>You can only insert
   * <code>REGULAR</code> rules into a rule group.</p> <p>
   * <code>ActivatedRule|OverrideAction</code> applies only when updating or adding a
   * <code>RuleGroup</code> to a <code>WebACL</code>. In this case you do not use
   * <code>ActivatedRule|Action</code>. For all other update requests,
   * <code>ActivatedRule|Action</code> is used instead of
   * <code>ActivatedRule|OverrideAction</code>.</p>
   */
  inline const Aws::Vector<RuleGroupUpdate>& GetUpdates() const { return m_updates; }
  inline bool UpdatesHasBeenSet() const { return m_updatesHasBeenSet; }
  template <typename UpdatesT = Aws::Vector<RuleGroupUpdate>>
  void SetUpdates(UpdatesT&& value) {
    m_updatesHasBeenSet = true;
    m_updates = std::forward<UpdatesT>(value);
  }
  template <typename UpdatesT = Aws::Vector<RuleGroupUpdate>>
  UpdateRuleGroupRequest& WithUpdates(UpdatesT&& value) {
    SetUpdates(std::forward<UpdatesT>(value));
    return *this;
  }
  template <typename UpdatesT = RuleGroupUpdate>
  UpdateRuleGroupRequest& AddUpdates(UpdatesT&& value) {
    m_updatesHasBeenSet = true;
    m_updates.emplace_back(std::forward<UpdatesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The value returned by the most recent call to <a>GetChangeToken</a>.</p>
   */
  inline const Aws::String& GetChangeToken() const { return m_changeToken; }
  inline bool ChangeTokenHasBeenSet() const { return m_changeTokenHasBeenSet; }
  template <typename ChangeTokenT = Aws::String>
  void SetChangeToken(ChangeTokenT&& value) {
    m_changeTokenHasBeenSet = true;
    m_changeToken = std::forward<ChangeTokenT>(value);
  }
  template <typename ChangeTokenT = Aws::String>
  UpdateRuleGroupRequest& WithChangeToken(ChangeTokenT&& value) {
    SetChangeToken(std::forward<ChangeTokenT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_ruleGroupId;

  Aws::Vector<RuleGroupUpdate> m_updates;

  Aws::String m_changeToken;
  bool m_ruleGroupIdHasBeenSet = false;
  bool m_updatesHasBeenSet = false;
  bool m_changeTokenHasBeenSet = false;
};

}  // namespace Model
}  // namespace WAFRegional
}  // namespace Aws
