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

#pragma once
#include <aws/cleanroomsml/CleanRoomsMLRequest.h>
#include <aws/cleanroomsml/CleanRoomsML_EXPORTS.h>
#include <aws/cleanroomsml/model/AudienceSizeConfig.h>
#include <aws/cleanroomsml/model/ConfiguredAudienceModelOutputConfig.h>
#include <aws/cleanroomsml/model/SharedAudienceMetrics.h>
#include <aws/cleanroomsml/model/TagOnCreatePolicy.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 <utility>

namespace Aws {
namespace CleanRoomsML {
namespace Model {

/**
 */
class CreateConfiguredAudienceModelRequest : public CleanRoomsMLRequest {
 public:
  AWS_CLEANROOMSML_API CreateConfiguredAudienceModelRequest() = 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 "CreateConfiguredAudienceModel"; }

  AWS_CLEANROOMSML_API Aws::String SerializePayload() const override;

  ///@{
  /**
   * <p>The name of the configured audience model.</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>
  CreateConfiguredAudienceModelRequest& WithName(NameT&& value) {
    SetName(std::forward<NameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The Amazon Resource Name (ARN) of the audience model to use for the
   * configured audience model.</p>
   */
  inline const Aws::String& GetAudienceModelArn() const { return m_audienceModelArn; }
  inline bool AudienceModelArnHasBeenSet() const { return m_audienceModelArnHasBeenSet; }
  template <typename AudienceModelArnT = Aws::String>
  void SetAudienceModelArn(AudienceModelArnT&& value) {
    m_audienceModelArnHasBeenSet = true;
    m_audienceModelArn = std::forward<AudienceModelArnT>(value);
  }
  template <typename AudienceModelArnT = Aws::String>
  CreateConfiguredAudienceModelRequest& WithAudienceModelArn(AudienceModelArnT&& value) {
    SetAudienceModelArn(std::forward<AudienceModelArnT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Configure the Amazon S3 location and IAM Role for audiences created using
   * this configured audience model. Each audience will have a unique location. The
   * IAM Role must have <code>s3:PutObject</code> permission on the destination
   * Amazon S3 location. If the destination is protected with Amazon S3 KMS-SSE, then
   * the Role must also have the required KMS permissions.</p>
   */
  inline const ConfiguredAudienceModelOutputConfig& GetOutputConfig() const { return m_outputConfig; }
  inline bool OutputConfigHasBeenSet() const { return m_outputConfigHasBeenSet; }
  template <typename OutputConfigT = ConfiguredAudienceModelOutputConfig>
  void SetOutputConfig(OutputConfigT&& value) {
    m_outputConfigHasBeenSet = true;
    m_outputConfig = std::forward<OutputConfigT>(value);
  }
  template <typename OutputConfigT = ConfiguredAudienceModelOutputConfig>
  CreateConfiguredAudienceModelRequest& WithOutputConfig(OutputConfigT&& value) {
    SetOutputConfig(std::forward<OutputConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The description of the configured audience model.</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>
  CreateConfiguredAudienceModelRequest& WithDescription(DescriptionT&& value) {
    SetDescription(std::forward<DescriptionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Whether audience metrics are shared.</p>
   */
  inline const Aws::Vector<SharedAudienceMetrics>& GetSharedAudienceMetrics() const { return m_sharedAudienceMetrics; }
  inline bool SharedAudienceMetricsHasBeenSet() const { return m_sharedAudienceMetricsHasBeenSet; }
  template <typename SharedAudienceMetricsT = Aws::Vector<SharedAudienceMetrics>>
  void SetSharedAudienceMetrics(SharedAudienceMetricsT&& value) {
    m_sharedAudienceMetricsHasBeenSet = true;
    m_sharedAudienceMetrics = std::forward<SharedAudienceMetricsT>(value);
  }
  template <typename SharedAudienceMetricsT = Aws::Vector<SharedAudienceMetrics>>
  CreateConfiguredAudienceModelRequest& WithSharedAudienceMetrics(SharedAudienceMetricsT&& value) {
    SetSharedAudienceMetrics(std::forward<SharedAudienceMetricsT>(value));
    return *this;
  }
  inline CreateConfiguredAudienceModelRequest& AddSharedAudienceMetrics(SharedAudienceMetrics value) {
    m_sharedAudienceMetricsHasBeenSet = true;
    m_sharedAudienceMetrics.push_back(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The minimum number of users from the seed audience that must match with users
   * in the training data of the audience model. The default value is 500.</p>
   */
  inline int GetMinMatchingSeedSize() const { return m_minMatchingSeedSize; }
  inline bool MinMatchingSeedSizeHasBeenSet() const { return m_minMatchingSeedSizeHasBeenSet; }
  inline void SetMinMatchingSeedSize(int value) {
    m_minMatchingSeedSizeHasBeenSet = true;
    m_minMatchingSeedSize = value;
  }
  inline CreateConfiguredAudienceModelRequest& WithMinMatchingSeedSize(int value) {
    SetMinMatchingSeedSize(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Configure the list of output sizes of audiences that can be created using
   * this configured audience model. A request to <a>StartAudienceGenerationJob</a>
   * that uses this configured audience model must have an <code>audienceSize</code>
   * selected from this list. You can use the <code>ABSOLUTE</code>
   * <a>AudienceSize</a> to configure out audience sizes using the count of
   * identifiers in the output. You can use the <code>Percentage</code>
   * <a>AudienceSize</a> to configure sizes in the range 1-100 percent.</p>
   */
  inline const AudienceSizeConfig& GetAudienceSizeConfig() const { return m_audienceSizeConfig; }
  inline bool AudienceSizeConfigHasBeenSet() const { return m_audienceSizeConfigHasBeenSet; }
  template <typename AudienceSizeConfigT = AudienceSizeConfig>
  void SetAudienceSizeConfig(AudienceSizeConfigT&& value) {
    m_audienceSizeConfigHasBeenSet = true;
    m_audienceSizeConfig = std::forward<AudienceSizeConfigT>(value);
  }
  template <typename AudienceSizeConfigT = AudienceSizeConfig>
  CreateConfiguredAudienceModelRequest& WithAudienceSizeConfig(AudienceSizeConfigT&& value) {
    SetAudienceSizeConfig(std::forward<AudienceSizeConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The optional metadata that you apply to the resource to help you categorize
   * and organize them. Each tag consists of a key and an optional value, both of
   * which you define.</p> <p>The following basic restrictions apply to tags:</p>
   * <ul> <li> <p>Maximum number of tags per resource - 50.</p> </li> <li> <p>For
   * each resource, each tag key must be unique, and each tag key can have only one
   * value.</p> </li> <li> <p>Maximum key length - 128 Unicode characters in
   * UTF-8.</p> </li> <li> <p>Maximum value length - 256 Unicode characters in
   * UTF-8.</p> </li> <li> <p>If your tagging schema is used across multiple services
   * and resources, remember that other services may have restrictions on allowed
   * characters. Generally allowed characters are: letters, numbers, and spaces
   * representable in UTF-8, and the following characters: + - = . _ : / @.</p> </li>
   * <li> <p>Tag keys and values are case sensitive.</p> </li> <li> <p>Do not use
   * aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys
   * as it is reserved for AWS use. You cannot edit or delete tag keys with this
   * prefix. Values can have this prefix. If a tag value has aws as its prefix but
   * the key does not, then Clean Rooms ML considers it to be a user tag and will
   * count against the limit of 50 tags. Tags with only the key prefix of aws do not
   * count against your tags per resource limit.</p> </li> </ul>
   */
  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>>
  CreateConfiguredAudienceModelRequest& WithTags(TagsT&& value) {
    SetTags(std::forward<TagsT>(value));
    return *this;
  }
  template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
  CreateConfiguredAudienceModelRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
    m_tagsHasBeenSet = true;
    m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Configure how the service tags audience generation jobs created using this
   * configured audience model. If you specify <code>NONE</code>, the tags from the
   * <a>StartAudienceGenerationJob</a> request determine the tags of the audience
   * generation job. If you specify <code>FROM_PARENT_RESOURCE</code>, the audience
   * generation job inherits the tags from the configured audience model, by default.
   * Tags in the <a>StartAudienceGenerationJob</a> will override the default.</p>
   * <p>When the client is in a different account than the configured audience model,
   * the tags from the client are never applied to a resource in the caller's
   * account.</p>
   */
  inline TagOnCreatePolicy GetChildResourceTagOnCreatePolicy() const { return m_childResourceTagOnCreatePolicy; }
  inline bool ChildResourceTagOnCreatePolicyHasBeenSet() const { return m_childResourceTagOnCreatePolicyHasBeenSet; }
  inline void SetChildResourceTagOnCreatePolicy(TagOnCreatePolicy value) {
    m_childResourceTagOnCreatePolicyHasBeenSet = true;
    m_childResourceTagOnCreatePolicy = value;
  }
  inline CreateConfiguredAudienceModelRequest& WithChildResourceTagOnCreatePolicy(TagOnCreatePolicy value) {
    SetChildResourceTagOnCreatePolicy(value);
    return *this;
  }
  ///@}
 private:
  Aws::String m_name;

  Aws::String m_audienceModelArn;

  ConfiguredAudienceModelOutputConfig m_outputConfig;

  Aws::String m_description;

  Aws::Vector<SharedAudienceMetrics> m_sharedAudienceMetrics;

  int m_minMatchingSeedSize{0};

  AudienceSizeConfig m_audienceSizeConfig;

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

  TagOnCreatePolicy m_childResourceTagOnCreatePolicy{TagOnCreatePolicy::NOT_SET};
  bool m_nameHasBeenSet = false;
  bool m_audienceModelArnHasBeenSet = false;
  bool m_outputConfigHasBeenSet = false;
  bool m_descriptionHasBeenSet = false;
  bool m_sharedAudienceMetricsHasBeenSet = false;
  bool m_minMatchingSeedSizeHasBeenSet = false;
  bool m_audienceSizeConfigHasBeenSet = false;
  bool m_tagsHasBeenSet = false;
  bool m_childResourceTagOnCreatePolicyHasBeenSet = false;
};

}  // namespace Model
}  // namespace CleanRoomsML
}  // namespace Aws
