/**
 * 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/AWSMap.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/textract/TextractRequest.h>
#include <aws/textract/Textract_EXPORTS.h>
#include <aws/textract/model/AutoUpdate.h>
#include <aws/textract/model/FeatureType.h>

#include <utility>

namespace Aws {
namespace Textract {
namespace Model {

/**
 */
class CreateAdapterRequest : public TextractRequest {
 public:
  AWS_TEXTRACT_API CreateAdapterRequest() = 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 "CreateAdapter"; }

  AWS_TEXTRACT_API Aws::String SerializePayload() const override;

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

  ///@{
  /**
   * <p>The name to be assigned to the adapter being created.</p>
   */
  inline const Aws::String& GetAdapterName() const { return m_adapterName; }
  inline bool AdapterNameHasBeenSet() const { return m_adapterNameHasBeenSet; }
  template <typename AdapterNameT = Aws::String>
  void SetAdapterName(AdapterNameT&& value) {
    m_adapterNameHasBeenSet = true;
    m_adapterName = std::forward<AdapterNameT>(value);
  }
  template <typename AdapterNameT = Aws::String>
  CreateAdapterRequest& WithAdapterName(AdapterNameT&& value) {
    SetAdapterName(std::forward<AdapterNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Idempotent token is used to recognize the request. If the same token is used
   * with multiple CreateAdapter requests, the same session is returned. This token
   * is employed to avoid unintentionally creating the same session multiple
   * times.</p>
   */
  inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
  inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
  template <typename ClientRequestTokenT = Aws::String>
  void SetClientRequestToken(ClientRequestTokenT&& value) {
    m_clientRequestTokenHasBeenSet = true;
    m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
  }
  template <typename ClientRequestTokenT = Aws::String>
  CreateAdapterRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
    SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The description to be assigned to the adapter being created.</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>
  CreateAdapterRequest& WithDescription(DescriptionT&& value) {
    SetDescription(std::forward<DescriptionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The type of feature that the adapter is being trained on. Currrenly,
   * supported feature types are: <code>QUERIES</code> </p>
   */
  inline const Aws::Vector<FeatureType>& GetFeatureTypes() const { return m_featureTypes; }
  inline bool FeatureTypesHasBeenSet() const { return m_featureTypesHasBeenSet; }
  template <typename FeatureTypesT = Aws::Vector<FeatureType>>
  void SetFeatureTypes(FeatureTypesT&& value) {
    m_featureTypesHasBeenSet = true;
    m_featureTypes = std::forward<FeatureTypesT>(value);
  }
  template <typename FeatureTypesT = Aws::Vector<FeatureType>>
  CreateAdapterRequest& WithFeatureTypes(FeatureTypesT&& value) {
    SetFeatureTypes(std::forward<FeatureTypesT>(value));
    return *this;
  }
  inline CreateAdapterRequest& AddFeatureTypes(FeatureType value) {
    m_featureTypesHasBeenSet = true;
    m_featureTypes.push_back(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Controls whether or not the adapter should automatically update.</p>
   */
  inline AutoUpdate GetAutoUpdate() const { return m_autoUpdate; }
  inline bool AutoUpdateHasBeenSet() const { return m_autoUpdateHasBeenSet; }
  inline void SetAutoUpdate(AutoUpdate value) {
    m_autoUpdateHasBeenSet = true;
    m_autoUpdate = value;
  }
  inline CreateAdapterRequest& WithAutoUpdate(AutoUpdate value) {
    SetAutoUpdate(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A list of tags to be added to the adapter.</p>
   */
  inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
  template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
  void SetTags(TagsT&& value) {
    m_tagsHasBeenSet = true;
    m_tags = std::forward<TagsT>(value);
  }
  template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
  CreateAdapterRequest& WithTags(TagsT&& value) {
    SetTags(std::forward<TagsT>(value));
    return *this;
  }
  template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
  CreateAdapterRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
    m_tagsHasBeenSet = true;
    m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_adapterName;

  Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};

  Aws::String m_description;

  Aws::Vector<FeatureType> m_featureTypes;

  AutoUpdate m_autoUpdate{AutoUpdate::NOT_SET};

  Aws::Map<Aws::String, Aws::String> m_tags;
  bool m_adapterNameHasBeenSet = false;
  bool m_clientRequestTokenHasBeenSet = true;
  bool m_descriptionHasBeenSet = false;
  bool m_featureTypesHasBeenSet = false;
  bool m_autoUpdateHasBeenSet = false;
  bool m_tagsHasBeenSet = false;
};

}  // namespace Model
}  // namespace Textract
}  // namespace Aws
