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

#pragma once
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/rds/RDS_EXPORTS.h>
#include <aws/rds/model/ApplyMethod.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Xml {
class XmlNode;
}  // namespace Xml
}  // namespace Utils
namespace RDS {
namespace Model {

/**
 * <p>This data type is used as a request parameter in the
 * <code>ModifyDBParameterGroup</code> and <code>ResetDBParameterGroup</code>
 * actions.</p> <p>This data type is used as a response element in the
 * <code>DescribeEngineDefaultParameters</code> and
 * <code>DescribeDBParameters</code> actions.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/Parameter">AWS API
 * Reference</a></p>
 */
class Parameter {
 public:
  AWS_RDS_API Parameter() = default;
  AWS_RDS_API Parameter(const Aws::Utils::Xml::XmlNode& xmlNode);
  AWS_RDS_API Parameter& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

  AWS_RDS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
  AWS_RDS_API void OutputToStream(Aws::OStream& oStream, const char* location) const;

  ///@{
  /**
   * <p>The name of the parameter.</p>
   */
  inline const Aws::String& GetParameterName() const { return m_parameterName; }
  inline bool ParameterNameHasBeenSet() const { return m_parameterNameHasBeenSet; }
  template <typename ParameterNameT = Aws::String>
  void SetParameterName(ParameterNameT&& value) {
    m_parameterNameHasBeenSet = true;
    m_parameterName = std::forward<ParameterNameT>(value);
  }
  template <typename ParameterNameT = Aws::String>
  Parameter& WithParameterName(ParameterNameT&& value) {
    SetParameterName(std::forward<ParameterNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The value of the parameter.</p>
   */
  inline const Aws::String& GetParameterValue() const { return m_parameterValue; }
  inline bool ParameterValueHasBeenSet() const { return m_parameterValueHasBeenSet; }
  template <typename ParameterValueT = Aws::String>
  void SetParameterValue(ParameterValueT&& value) {
    m_parameterValueHasBeenSet = true;
    m_parameterValue = std::forward<ParameterValueT>(value);
  }
  template <typename ParameterValueT = Aws::String>
  Parameter& WithParameterValue(ParameterValueT&& value) {
    SetParameterValue(std::forward<ParameterValueT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Provides a description of the parameter.</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>
  Parameter& WithDescription(DescriptionT&& value) {
    SetDescription(std::forward<DescriptionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The source of the parameter value.</p>
   */
  inline const Aws::String& GetSource() const { return m_source; }
  inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }
  template <typename SourceT = Aws::String>
  void SetSource(SourceT&& value) {
    m_sourceHasBeenSet = true;
    m_source = std::forward<SourceT>(value);
  }
  template <typename SourceT = Aws::String>
  Parameter& WithSource(SourceT&& value) {
    SetSource(std::forward<SourceT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the engine specific parameters type.</p>
   */
  inline const Aws::String& GetApplyType() const { return m_applyType; }
  inline bool ApplyTypeHasBeenSet() const { return m_applyTypeHasBeenSet; }
  template <typename ApplyTypeT = Aws::String>
  void SetApplyType(ApplyTypeT&& value) {
    m_applyTypeHasBeenSet = true;
    m_applyType = std::forward<ApplyTypeT>(value);
  }
  template <typename ApplyTypeT = Aws::String>
  Parameter& WithApplyType(ApplyTypeT&& value) {
    SetApplyType(std::forward<ApplyTypeT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the valid data type for the parameter.</p>
   */
  inline const Aws::String& GetDataType() const { return m_dataType; }
  inline bool DataTypeHasBeenSet() const { return m_dataTypeHasBeenSet; }
  template <typename DataTypeT = Aws::String>
  void SetDataType(DataTypeT&& value) {
    m_dataTypeHasBeenSet = true;
    m_dataType = std::forward<DataTypeT>(value);
  }
  template <typename DataTypeT = Aws::String>
  Parameter& WithDataType(DataTypeT&& value) {
    SetDataType(std::forward<DataTypeT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the valid range of values for the parameter.</p>
   */
  inline const Aws::String& GetAllowedValues() const { return m_allowedValues; }
  inline bool AllowedValuesHasBeenSet() const { return m_allowedValuesHasBeenSet; }
  template <typename AllowedValuesT = Aws::String>
  void SetAllowedValues(AllowedValuesT&& value) {
    m_allowedValuesHasBeenSet = true;
    m_allowedValues = std::forward<AllowedValuesT>(value);
  }
  template <typename AllowedValuesT = Aws::String>
  Parameter& WithAllowedValues(AllowedValuesT&& value) {
    SetAllowedValues(std::forward<AllowedValuesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Indicates whether (<code>true</code>) or not (<code>false</code>) the
   * parameter can be modified. Some parameters have security or operational
   * implications that prevent them from being changed.</p>
   */
  inline bool GetIsModifiable() const { return m_isModifiable; }
  inline bool IsModifiableHasBeenSet() const { return m_isModifiableHasBeenSet; }
  inline void SetIsModifiable(bool value) {
    m_isModifiableHasBeenSet = true;
    m_isModifiable = value;
  }
  inline Parameter& WithIsModifiable(bool value) {
    SetIsModifiable(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The earliest engine version to which the parameter can apply.</p>
   */
  inline const Aws::String& GetMinimumEngineVersion() const { return m_minimumEngineVersion; }
  inline bool MinimumEngineVersionHasBeenSet() const { return m_minimumEngineVersionHasBeenSet; }
  template <typename MinimumEngineVersionT = Aws::String>
  void SetMinimumEngineVersion(MinimumEngineVersionT&& value) {
    m_minimumEngineVersionHasBeenSet = true;
    m_minimumEngineVersion = std::forward<MinimumEngineVersionT>(value);
  }
  template <typename MinimumEngineVersionT = Aws::String>
  Parameter& WithMinimumEngineVersion(MinimumEngineVersionT&& value) {
    SetMinimumEngineVersion(std::forward<MinimumEngineVersionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Indicates when to apply parameter updates.</p>
   */
  inline ApplyMethod GetApplyMethod() const { return m_applyMethod; }
  inline bool ApplyMethodHasBeenSet() const { return m_applyMethodHasBeenSet; }
  inline void SetApplyMethod(ApplyMethod value) {
    m_applyMethodHasBeenSet = true;
    m_applyMethod = value;
  }
  inline Parameter& WithApplyMethod(ApplyMethod value) {
    SetApplyMethod(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The valid DB engine modes.</p>
   */
  inline const Aws::Vector<Aws::String>& GetSupportedEngineModes() const { return m_supportedEngineModes; }
  inline bool SupportedEngineModesHasBeenSet() const { return m_supportedEngineModesHasBeenSet; }
  template <typename SupportedEngineModesT = Aws::Vector<Aws::String>>
  void SetSupportedEngineModes(SupportedEngineModesT&& value) {
    m_supportedEngineModesHasBeenSet = true;
    m_supportedEngineModes = std::forward<SupportedEngineModesT>(value);
  }
  template <typename SupportedEngineModesT = Aws::Vector<Aws::String>>
  Parameter& WithSupportedEngineModes(SupportedEngineModesT&& value) {
    SetSupportedEngineModes(std::forward<SupportedEngineModesT>(value));
    return *this;
  }
  template <typename SupportedEngineModesT = Aws::String>
  Parameter& AddSupportedEngineModes(SupportedEngineModesT&& value) {
    m_supportedEngineModesHasBeenSet = true;
    m_supportedEngineModes.emplace_back(std::forward<SupportedEngineModesT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_parameterName;

  Aws::String m_parameterValue;

  Aws::String m_description;

  Aws::String m_source;

  Aws::String m_applyType;

  Aws::String m_dataType;

  Aws::String m_allowedValues;

  bool m_isModifiable{false};

  Aws::String m_minimumEngineVersion;

  ApplyMethod m_applyMethod{ApplyMethod::NOT_SET};

  Aws::Vector<Aws::String> m_supportedEngineModes;
  bool m_parameterNameHasBeenSet = false;
  bool m_parameterValueHasBeenSet = false;
  bool m_descriptionHasBeenSet = false;
  bool m_sourceHasBeenSet = false;
  bool m_applyTypeHasBeenSet = false;
  bool m_dataTypeHasBeenSet = false;
  bool m_allowedValuesHasBeenSet = false;
  bool m_isModifiableHasBeenSet = false;
  bool m_minimumEngineVersionHasBeenSet = false;
  bool m_applyMethodHasBeenSet = false;
  bool m_supportedEngineModesHasBeenSet = false;
};

}  // namespace Model
}  // namespace RDS
}  // namespace Aws
