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

#pragma once
#include <aws/core/utils/UUID.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/deadline/DeadlineRequest.h>
#include <aws/deadline/Deadline_EXPORTS.h>

#include <utility>

namespace Aws {
namespace deadline {
namespace Model {

/**
 */
class CreateLimitRequest : public DeadlineRequest {
 public:
  AWS_DEADLINE_API CreateLimitRequest() = 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 "CreateLimit"; }

  AWS_DEADLINE_API Aws::String SerializePayload() const override;

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

  ///@{
  /**
   * <p>The unique token which the server uses to recognize retries of the same
   * request.</p>
   */
  inline const Aws::String& GetClientToken() const { return m_clientToken; }
  inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
  template <typename ClientTokenT = Aws::String>
  void SetClientToken(ClientTokenT&& value) {
    m_clientTokenHasBeenSet = true;
    m_clientToken = std::forward<ClientTokenT>(value);
  }
  template <typename ClientTokenT = Aws::String>
  CreateLimitRequest& WithClientToken(ClientTokenT&& value) {
    SetClientToken(std::forward<ClientTokenT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The display name of the limit.</p>  <p>This field can store any
   * content. Escape or encode this content before displaying it on a webpage or any
   * other system that might interpret the content of this field.</p>
   */
  inline const Aws::String& GetDisplayName() const { return m_displayName; }
  inline bool DisplayNameHasBeenSet() const { return m_displayNameHasBeenSet; }
  template <typename DisplayNameT = Aws::String>
  void SetDisplayName(DisplayNameT&& value) {
    m_displayNameHasBeenSet = true;
    m_displayName = std::forward<DisplayNameT>(value);
  }
  template <typename DisplayNameT = Aws::String>
  CreateLimitRequest& WithDisplayName(DisplayNameT&& value) {
    SetDisplayName(std::forward<DisplayNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The value that you specify as the <code>name</code> in the
   * <code>amounts</code> field of the <code>hostRequirements</code> in a step of a
   * job template to declare the limit requirement.</p>
   */
  inline const Aws::String& GetAmountRequirementName() const { return m_amountRequirementName; }
  inline bool AmountRequirementNameHasBeenSet() const { return m_amountRequirementNameHasBeenSet; }
  template <typename AmountRequirementNameT = Aws::String>
  void SetAmountRequirementName(AmountRequirementNameT&& value) {
    m_amountRequirementNameHasBeenSet = true;
    m_amountRequirementName = std::forward<AmountRequirementNameT>(value);
  }
  template <typename AmountRequirementNameT = Aws::String>
  CreateLimitRequest& WithAmountRequirementName(AmountRequirementNameT&& value) {
    SetAmountRequirementName(std::forward<AmountRequirementNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The maximum number of resources constrained by this limit. When all of the
   * resources are in use, steps that require the limit won't be scheduled until the
   * resource is available.</p> <p>The <code>maxCount</code> must not be 0. If the
   * value is -1, there is no restriction on the number of resources that can be
   * acquired for this limit.</p>
   */
  inline int GetMaxCount() const { return m_maxCount; }
  inline bool MaxCountHasBeenSet() const { return m_maxCountHasBeenSet; }
  inline void SetMaxCount(int value) {
    m_maxCountHasBeenSet = true;
    m_maxCount = value;
  }
  inline CreateLimitRequest& WithMaxCount(int value) {
    SetMaxCount(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The farm ID of the farm that contains the limit.</p>
   */
  inline const Aws::String& GetFarmId() const { return m_farmId; }
  inline bool FarmIdHasBeenSet() const { return m_farmIdHasBeenSet; }
  template <typename FarmIdT = Aws::String>
  void SetFarmId(FarmIdT&& value) {
    m_farmIdHasBeenSet = true;
    m_farmId = std::forward<FarmIdT>(value);
  }
  template <typename FarmIdT = Aws::String>
  CreateLimitRequest& WithFarmId(FarmIdT&& value) {
    SetFarmId(std::forward<FarmIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A description of the limit. A description helps you identify the purpose of
   * the limit.</p>  <p>This field can store any content. Escape or encode
   * this content before displaying it on a webpage or any other system that might
   * interpret the content of this field.</p>
   */
  inline const Aws::String& GetDescription() const { return m_description; }
  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
  template <typename DescriptionT = Aws::String>
  void SetDescription(DescriptionT&& value) {
    m_descriptionHasBeenSet = true;
    m_description = std::forward<DescriptionT>(value);
  }
  template <typename DescriptionT = Aws::String>
  CreateLimitRequest& WithDescription(DescriptionT&& value) {
    SetDescription(std::forward<DescriptionT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_clientToken{Aws::Utils::UUID::PseudoRandomUUID()};

  Aws::String m_displayName;

  Aws::String m_amountRequirementName;

  int m_maxCount{0};

  Aws::String m_farmId;

  Aws::String m_description;
  bool m_clientTokenHasBeenSet = true;
  bool m_displayNameHasBeenSet = false;
  bool m_amountRequirementNameHasBeenSet = false;
  bool m_maxCountHasBeenSet = false;
  bool m_farmIdHasBeenSet = false;
  bool m_descriptionHasBeenSet = false;
};

}  // namespace Model
}  // namespace deadline
}  // namespace Aws
