/**
 * 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/core/utils/memory/stl/AWSVector.h>
#include <aws/datazone/DataZoneRequest.h>
#include <aws/datazone/DataZone_EXPORTS.h>
#include <aws/datazone/model/SubscriptionGrantCreationMode.h>
#include <aws/datazone/model/SubscriptionTargetForm.h>

#include <utility>

namespace Aws {
namespace DataZone {
namespace Model {

/**
 */
class CreateSubscriptionTargetRequest : public DataZoneRequest {
 public:
  AWS_DATAZONE_API CreateSubscriptionTargetRequest() = 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 "CreateSubscriptionTarget"; }

  AWS_DATAZONE_API Aws::String SerializePayload() const override;

  ///@{
  /**
   * <p>The ID of the Amazon DataZone domain in which subscription target is
   * created.</p>
   */
  inline const Aws::String& GetDomainIdentifier() const { return m_domainIdentifier; }
  inline bool DomainIdentifierHasBeenSet() const { return m_domainIdentifierHasBeenSet; }
  template <typename DomainIdentifierT = Aws::String>
  void SetDomainIdentifier(DomainIdentifierT&& value) {
    m_domainIdentifierHasBeenSet = true;
    m_domainIdentifier = std::forward<DomainIdentifierT>(value);
  }
  template <typename DomainIdentifierT = Aws::String>
  CreateSubscriptionTargetRequest& WithDomainIdentifier(DomainIdentifierT&& value) {
    SetDomainIdentifier(std::forward<DomainIdentifierT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The ID of the environment in which subscription target is created.</p>
   */
  inline const Aws::String& GetEnvironmentIdentifier() const { return m_environmentIdentifier; }
  inline bool EnvironmentIdentifierHasBeenSet() const { return m_environmentIdentifierHasBeenSet; }
  template <typename EnvironmentIdentifierT = Aws::String>
  void SetEnvironmentIdentifier(EnvironmentIdentifierT&& value) {
    m_environmentIdentifierHasBeenSet = true;
    m_environmentIdentifier = std::forward<EnvironmentIdentifierT>(value);
  }
  template <typename EnvironmentIdentifierT = Aws::String>
  CreateSubscriptionTargetRequest& WithEnvironmentIdentifier(EnvironmentIdentifierT&& value) {
    SetEnvironmentIdentifier(std::forward<EnvironmentIdentifierT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the subscription target.</p>
   */
  inline const Aws::String& GetName() const { return m_name; }
  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
  template <typename NameT = Aws::String>
  void SetName(NameT&& value) {
    m_nameHasBeenSet = true;
    m_name = std::forward<NameT>(value);
  }
  template <typename NameT = Aws::String>
  CreateSubscriptionTargetRequest& WithName(NameT&& value) {
    SetName(std::forward<NameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The type of the subscription target.</p>
   */
  inline const Aws::String& GetType() const { return m_type; }
  inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
  template <typename TypeT = Aws::String>
  void SetType(TypeT&& value) {
    m_typeHasBeenSet = true;
    m_type = std::forward<TypeT>(value);
  }
  template <typename TypeT = Aws::String>
  CreateSubscriptionTargetRequest& WithType(TypeT&& value) {
    SetType(std::forward<TypeT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The configuration of the subscription target.</p>
   */
  inline const Aws::Vector<SubscriptionTargetForm>& GetSubscriptionTargetConfig() const { return m_subscriptionTargetConfig; }
  inline bool SubscriptionTargetConfigHasBeenSet() const { return m_subscriptionTargetConfigHasBeenSet; }
  template <typename SubscriptionTargetConfigT = Aws::Vector<SubscriptionTargetForm>>
  void SetSubscriptionTargetConfig(SubscriptionTargetConfigT&& value) {
    m_subscriptionTargetConfigHasBeenSet = true;
    m_subscriptionTargetConfig = std::forward<SubscriptionTargetConfigT>(value);
  }
  template <typename SubscriptionTargetConfigT = Aws::Vector<SubscriptionTargetForm>>
  CreateSubscriptionTargetRequest& WithSubscriptionTargetConfig(SubscriptionTargetConfigT&& value) {
    SetSubscriptionTargetConfig(std::forward<SubscriptionTargetConfigT>(value));
    return *this;
  }
  template <typename SubscriptionTargetConfigT = SubscriptionTargetForm>
  CreateSubscriptionTargetRequest& AddSubscriptionTargetConfig(SubscriptionTargetConfigT&& value) {
    m_subscriptionTargetConfigHasBeenSet = true;
    m_subscriptionTargetConfig.emplace_back(std::forward<SubscriptionTargetConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The authorized principals of the subscription target.</p>
   */
  inline const Aws::Vector<Aws::String>& GetAuthorizedPrincipals() const { return m_authorizedPrincipals; }
  inline bool AuthorizedPrincipalsHasBeenSet() const { return m_authorizedPrincipalsHasBeenSet; }
  template <typename AuthorizedPrincipalsT = Aws::Vector<Aws::String>>
  void SetAuthorizedPrincipals(AuthorizedPrincipalsT&& value) {
    m_authorizedPrincipalsHasBeenSet = true;
    m_authorizedPrincipals = std::forward<AuthorizedPrincipalsT>(value);
  }
  template <typename AuthorizedPrincipalsT = Aws::Vector<Aws::String>>
  CreateSubscriptionTargetRequest& WithAuthorizedPrincipals(AuthorizedPrincipalsT&& value) {
    SetAuthorizedPrincipals(std::forward<AuthorizedPrincipalsT>(value));
    return *this;
  }
  template <typename AuthorizedPrincipalsT = Aws::String>
  CreateSubscriptionTargetRequest& AddAuthorizedPrincipals(AuthorizedPrincipalsT&& value) {
    m_authorizedPrincipalsHasBeenSet = true;
    m_authorizedPrincipals.emplace_back(std::forward<AuthorizedPrincipalsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The manage access role that is used to create the subscription target.</p>
   */
  inline const Aws::String& GetManageAccessRole() const { return m_manageAccessRole; }
  inline bool ManageAccessRoleHasBeenSet() const { return m_manageAccessRoleHasBeenSet; }
  template <typename ManageAccessRoleT = Aws::String>
  void SetManageAccessRole(ManageAccessRoleT&& value) {
    m_manageAccessRoleHasBeenSet = true;
    m_manageAccessRole = std::forward<ManageAccessRoleT>(value);
  }
  template <typename ManageAccessRoleT = Aws::String>
  CreateSubscriptionTargetRequest& WithManageAccessRole(ManageAccessRoleT&& value) {
    SetManageAccessRole(std::forward<ManageAccessRoleT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The asset types that can be included in the subscription target.</p>
   */
  inline const Aws::Vector<Aws::String>& GetApplicableAssetTypes() const { return m_applicableAssetTypes; }
  inline bool ApplicableAssetTypesHasBeenSet() const { return m_applicableAssetTypesHasBeenSet; }
  template <typename ApplicableAssetTypesT = Aws::Vector<Aws::String>>
  void SetApplicableAssetTypes(ApplicableAssetTypesT&& value) {
    m_applicableAssetTypesHasBeenSet = true;
    m_applicableAssetTypes = std::forward<ApplicableAssetTypesT>(value);
  }
  template <typename ApplicableAssetTypesT = Aws::Vector<Aws::String>>
  CreateSubscriptionTargetRequest& WithApplicableAssetTypes(ApplicableAssetTypesT&& value) {
    SetApplicableAssetTypes(std::forward<ApplicableAssetTypesT>(value));
    return *this;
  }
  template <typename ApplicableAssetTypesT = Aws::String>
  CreateSubscriptionTargetRequest& AddApplicableAssetTypes(ApplicableAssetTypesT&& value) {
    m_applicableAssetTypesHasBeenSet = true;
    m_applicableAssetTypes.emplace_back(std::forward<ApplicableAssetTypesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The provider of the subscription target.</p>
   */
  inline const Aws::String& GetProvider() const { return m_provider; }
  inline bool ProviderHasBeenSet() const { return m_providerHasBeenSet; }
  template <typename ProviderT = Aws::String>
  void SetProvider(ProviderT&& value) {
    m_providerHasBeenSet = true;
    m_provider = std::forward<ProviderT>(value);
  }
  template <typename ProviderT = Aws::String>
  CreateSubscriptionTargetRequest& WithProvider(ProviderT&& value) {
    SetProvider(std::forward<ProviderT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A unique, case-sensitive identifier that is provided to ensure the
   * idempotency of the 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>
  CreateSubscriptionTargetRequest& WithClientToken(ClientTokenT&& value) {
    SetClientToken(std::forward<ClientTokenT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p> Determines the subscription grant creation mode for this target, defining if
   * grants are auto-created upon subscription approval or managed manually. </p>
   */
  inline SubscriptionGrantCreationMode GetSubscriptionGrantCreationMode() const { return m_subscriptionGrantCreationMode; }
  inline bool SubscriptionGrantCreationModeHasBeenSet() const { return m_subscriptionGrantCreationModeHasBeenSet; }
  inline void SetSubscriptionGrantCreationMode(SubscriptionGrantCreationMode value) {
    m_subscriptionGrantCreationModeHasBeenSet = true;
    m_subscriptionGrantCreationMode = value;
  }
  inline CreateSubscriptionTargetRequest& WithSubscriptionGrantCreationMode(SubscriptionGrantCreationMode value) {
    SetSubscriptionGrantCreationMode(value);
    return *this;
  }
  ///@}
 private:
  Aws::String m_domainIdentifier;

  Aws::String m_environmentIdentifier;

  Aws::String m_name;

  Aws::String m_type;

  Aws::Vector<SubscriptionTargetForm> m_subscriptionTargetConfig;

  Aws::Vector<Aws::String> m_authorizedPrincipals;

  Aws::String m_manageAccessRole;

  Aws::Vector<Aws::String> m_applicableAssetTypes;

  Aws::String m_provider;

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

  SubscriptionGrantCreationMode m_subscriptionGrantCreationMode{SubscriptionGrantCreationMode::NOT_SET};
  bool m_domainIdentifierHasBeenSet = false;
  bool m_environmentIdentifierHasBeenSet = false;
  bool m_nameHasBeenSet = false;
  bool m_typeHasBeenSet = false;
  bool m_subscriptionTargetConfigHasBeenSet = false;
  bool m_authorizedPrincipalsHasBeenSet = false;
  bool m_manageAccessRoleHasBeenSet = false;
  bool m_applicableAssetTypesHasBeenSet = false;
  bool m_providerHasBeenSet = false;
  bool m_clientTokenHasBeenSet = true;
  bool m_subscriptionGrantCreationModeHasBeenSet = false;
};

}  // namespace Model
}  // namespace DataZone
}  // namespace Aws
