/**
 * 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/supplychain/SupplyChainRequest.h>
#include <aws/supplychain/SupplyChain_EXPORTS.h>

#include <utility>

namespace Aws {
namespace SupplyChain {
namespace Model {

/**
 * <p>The request parameters for CreateInstance.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/supplychain-2024-01-01/CreateInstanceRequest">AWS
 * API Reference</a></p>
 */
class CreateInstanceRequest : public SupplyChainRequest {
 public:
  AWS_SUPPLYCHAIN_API CreateInstanceRequest() = 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 "CreateInstance"; }

  AWS_SUPPLYCHAIN_API Aws::String SerializePayload() const override;

  ///@{
  /**
   * <p>The AWS Supply Chain instance name.</p>
   */
  inline const Aws::String& GetInstanceName() const { return m_instanceName; }
  inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; }
  template <typename InstanceNameT = Aws::String>
  void SetInstanceName(InstanceNameT&& value) {
    m_instanceNameHasBeenSet = true;
    m_instanceName = std::forward<InstanceNameT>(value);
  }
  template <typename InstanceNameT = Aws::String>
  CreateInstanceRequest& WithInstanceName(InstanceNameT&& value) {
    SetInstanceName(std::forward<InstanceNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The AWS Supply Chain instance description.</p>
   */
  inline const Aws::String& GetInstanceDescription() const { return m_instanceDescription; }
  inline bool InstanceDescriptionHasBeenSet() const { return m_instanceDescriptionHasBeenSet; }
  template <typename InstanceDescriptionT = Aws::String>
  void SetInstanceDescription(InstanceDescriptionT&& value) {
    m_instanceDescriptionHasBeenSet = true;
    m_instanceDescription = std::forward<InstanceDescriptionT>(value);
  }
  template <typename InstanceDescriptionT = Aws::String>
  CreateInstanceRequest& WithInstanceDescription(InstanceDescriptionT&& value) {
    SetInstanceDescription(std::forward<InstanceDescriptionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you
   * provide for encryption. This is required if you do not want to use the Amazon
   * Web Services owned KMS key. If you don't provide anything here, AWS Supply Chain
   * uses the Amazon Web Services owned KMS key.</p>
   */
  inline const Aws::String& GetKmsKeyArn() const { return m_kmsKeyArn; }
  inline bool KmsKeyArnHasBeenSet() const { return m_kmsKeyArnHasBeenSet; }
  template <typename KmsKeyArnT = Aws::String>
  void SetKmsKeyArn(KmsKeyArnT&& value) {
    m_kmsKeyArnHasBeenSet = true;
    m_kmsKeyArn = std::forward<KmsKeyArnT>(value);
  }
  template <typename KmsKeyArnT = Aws::String>
  CreateInstanceRequest& WithKmsKeyArn(KmsKeyArnT&& value) {
    SetKmsKeyArn(std::forward<KmsKeyArnT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The DNS subdomain of the web app. This would be "example" in the URL
   * "example.scn.global.on.aws". You can set this to a custom value, as long as the
   * domain isn't already being used by someone else. The name may only include
   * alphanumeric characters and hyphens.</p>
   */
  inline const Aws::String& GetWebAppDnsDomain() const { return m_webAppDnsDomain; }
  inline bool WebAppDnsDomainHasBeenSet() const { return m_webAppDnsDomainHasBeenSet; }
  template <typename WebAppDnsDomainT = Aws::String>
  void SetWebAppDnsDomain(WebAppDnsDomainT&& value) {
    m_webAppDnsDomainHasBeenSet = true;
    m_webAppDnsDomain = std::forward<WebAppDnsDomainT>(value);
  }
  template <typename WebAppDnsDomainT = Aws::String>
  CreateInstanceRequest& WithWebAppDnsDomain(WebAppDnsDomainT&& value) {
    SetWebAppDnsDomain(std::forward<WebAppDnsDomainT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The Amazon Web Services tags of an instance to be created.</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>>
  CreateInstanceRequest& WithTags(TagsT&& value) {
    SetTags(std::forward<TagsT>(value));
    return *this;
  }
  template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
  CreateInstanceRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
    m_tagsHasBeenSet = true;
    m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The client token for idempotency.</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>
  CreateInstanceRequest& WithClientToken(ClientTokenT&& value) {
    SetClientToken(std::forward<ClientTokenT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_instanceName;

  Aws::String m_instanceDescription;

  Aws::String m_kmsKeyArn;

  Aws::String m_webAppDnsDomain;

  Aws::Map<Aws::String, Aws::String> m_tags;

  Aws::String m_clientToken{Aws::Utils::UUID::PseudoRandomUUID()};
  bool m_instanceNameHasBeenSet = false;
  bool m_instanceDescriptionHasBeenSet = false;
  bool m_kmsKeyArnHasBeenSet = false;
  bool m_webAppDnsDomainHasBeenSet = false;
  bool m_tagsHasBeenSet = false;
  bool m_clientTokenHasBeenSet = true;
};

}  // namespace Model
}  // namespace SupplyChain
}  // namespace Aws
