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

#pragma once
#include <aws/appconfig/AppConfigRequest.h>
#include <aws/appconfig/AppConfig_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

#include <utility>

namespace Aws {
namespace AppConfig {
namespace Model {

/**
 */
class StopDeploymentRequest : public AppConfigRequest {
 public:
  AWS_APPCONFIG_API StopDeploymentRequest() = 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 "StopDeployment"; }

  AWS_APPCONFIG_API Aws::String SerializePayload() const override;

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

  ///@{
  /**
   * <p>The application ID.</p>
   */
  inline const Aws::String& GetApplicationId() const { return m_applicationId; }
  inline bool ApplicationIdHasBeenSet() const { return m_applicationIdHasBeenSet; }
  template <typename ApplicationIdT = Aws::String>
  void SetApplicationId(ApplicationIdT&& value) {
    m_applicationIdHasBeenSet = true;
    m_applicationId = std::forward<ApplicationIdT>(value);
  }
  template <typename ApplicationIdT = Aws::String>
  StopDeploymentRequest& WithApplicationId(ApplicationIdT&& value) {
    SetApplicationId(std::forward<ApplicationIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The environment ID.</p>
   */
  inline const Aws::String& GetEnvironmentId() const { return m_environmentId; }
  inline bool EnvironmentIdHasBeenSet() const { return m_environmentIdHasBeenSet; }
  template <typename EnvironmentIdT = Aws::String>
  void SetEnvironmentId(EnvironmentIdT&& value) {
    m_environmentIdHasBeenSet = true;
    m_environmentId = std::forward<EnvironmentIdT>(value);
  }
  template <typename EnvironmentIdT = Aws::String>
  StopDeploymentRequest& WithEnvironmentId(EnvironmentIdT&& value) {
    SetEnvironmentId(std::forward<EnvironmentIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The sequence number of the deployment.</p>
   */
  inline int GetDeploymentNumber() const { return m_deploymentNumber; }
  inline bool DeploymentNumberHasBeenSet() const { return m_deploymentNumberHasBeenSet; }
  inline void SetDeploymentNumber(int value) {
    m_deploymentNumberHasBeenSet = true;
    m_deploymentNumber = value;
  }
  inline StopDeploymentRequest& WithDeploymentNumber(int value) {
    SetDeploymentNumber(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A Boolean that enables AppConfig to rollback a <code>COMPLETED</code>
   * deployment to the previous configuration version. This action moves the
   * deployment to a status of <code>REVERTED</code>.</p>
   */
  inline bool GetAllowRevert() const { return m_allowRevert; }
  inline bool AllowRevertHasBeenSet() const { return m_allowRevertHasBeenSet; }
  inline void SetAllowRevert(bool value) {
    m_allowRevertHasBeenSet = true;
    m_allowRevert = value;
  }
  inline StopDeploymentRequest& WithAllowRevert(bool value) {
    SetAllowRevert(value);
    return *this;
  }
  ///@}
 private:
  Aws::String m_applicationId;

  Aws::String m_environmentId;

  int m_deploymentNumber{0};

  bool m_allowRevert{false};
  bool m_applicationIdHasBeenSet = false;
  bool m_environmentIdHasBeenSet = false;
  bool m_deploymentNumberHasBeenSet = false;
  bool m_allowRevertHasBeenSet = false;
};

}  // namespace Model
}  // namespace AppConfig
}  // namespace Aws
