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

#pragma once
#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/customer-profiles/CustomerProfilesRequest.h>
#include <aws/customer-profiles/CustomerProfiles_EXPORTS.h>
#include <aws/customer-profiles/model/ObjectTypeField.h>
#include <aws/customer-profiles/model/ObjectTypeKey.h>

#include <utility>

namespace Aws {
namespace CustomerProfiles {
namespace Model {

/**
 */
class PutProfileObjectTypeRequest : public CustomerProfilesRequest {
 public:
  AWS_CUSTOMERPROFILES_API PutProfileObjectTypeRequest() = 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 "PutProfileObjectType"; }

  AWS_CUSTOMERPROFILES_API Aws::String SerializePayload() const override;

  ///@{
  /**
   * <p>The unique name of the domain.</p>
   */
  inline const Aws::String& GetDomainName() const { return m_domainName; }
  inline bool DomainNameHasBeenSet() const { return m_domainNameHasBeenSet; }
  template <typename DomainNameT = Aws::String>
  void SetDomainName(DomainNameT&& value) {
    m_domainNameHasBeenSet = true;
    m_domainName = std::forward<DomainNameT>(value);
  }
  template <typename DomainNameT = Aws::String>
  PutProfileObjectTypeRequest& WithDomainName(DomainNameT&& value) {
    SetDomainName(std::forward<DomainNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The name of the profile object type.</p>
   */
  inline const Aws::String& GetObjectTypeName() const { return m_objectTypeName; }
  inline bool ObjectTypeNameHasBeenSet() const { return m_objectTypeNameHasBeenSet; }
  template <typename ObjectTypeNameT = Aws::String>
  void SetObjectTypeName(ObjectTypeNameT&& value) {
    m_objectTypeNameHasBeenSet = true;
    m_objectTypeName = std::forward<ObjectTypeNameT>(value);
  }
  template <typename ObjectTypeNameT = Aws::String>
  PutProfileObjectTypeRequest& WithObjectTypeName(ObjectTypeNameT&& value) {
    SetObjectTypeName(std::forward<ObjectTypeNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Description of the profile object type.</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>
  PutProfileObjectTypeRequest& WithDescription(DescriptionT&& value) {
    SetDescription(std::forward<DescriptionT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A unique identifier for the object template. For some attributes in the
   * request, the service will use the default value from the object template when
   * TemplateId is present. If these attributes are present in the request, the
   * service may return a <code>BadRequestException</code>. These attributes include:
   * AllowProfileCreation, SourceLastUpdatedTimestampFormat, Fields, and Keys. For
   * example, if AllowProfileCreation is set to true when TemplateId is set, the
   * service may return a <code>BadRequestException</code>.</p>
   */
  inline const Aws::String& GetTemplateId() const { return m_templateId; }
  inline bool TemplateIdHasBeenSet() const { return m_templateIdHasBeenSet; }
  template <typename TemplateIdT = Aws::String>
  void SetTemplateId(TemplateIdT&& value) {
    m_templateIdHasBeenSet = true;
    m_templateId = std::forward<TemplateIdT>(value);
  }
  template <typename TemplateIdT = Aws::String>
  PutProfileObjectTypeRequest& WithTemplateId(TemplateIdT&& value) {
    SetTemplateId(std::forward<TemplateIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The number of days until the data in the object expires.</p>
   */
  inline int GetExpirationDays() const { return m_expirationDays; }
  inline bool ExpirationDaysHasBeenSet() const { return m_expirationDaysHasBeenSet; }
  inline void SetExpirationDays(int value) {
    m_expirationDaysHasBeenSet = true;
    m_expirationDays = value;
  }
  inline PutProfileObjectTypeRequest& WithExpirationDays(int value) {
    SetExpirationDays(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The customer-provided key to encrypt the profile object that will be created
   * in this profile object type.</p>
   */
  inline const Aws::String& GetEncryptionKey() const { return m_encryptionKey; }
  inline bool EncryptionKeyHasBeenSet() const { return m_encryptionKeyHasBeenSet; }
  template <typename EncryptionKeyT = Aws::String>
  void SetEncryptionKey(EncryptionKeyT&& value) {
    m_encryptionKeyHasBeenSet = true;
    m_encryptionKey = std::forward<EncryptionKeyT>(value);
  }
  template <typename EncryptionKeyT = Aws::String>
  PutProfileObjectTypeRequest& WithEncryptionKey(EncryptionKeyT&& value) {
    SetEncryptionKey(std::forward<EncryptionKeyT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Indicates whether a profile should be created when data is received if one
   * doesn’t exist for an object of this type. The default is <code>FALSE</code>. If
   * the AllowProfileCreation flag is set to <code>FALSE</code>, then the service
   * tries to fetch a standard profile and associate this object with the profile. If
   * it is set to <code>TRUE</code>, and if no match is found, then the service
   * creates a new standard profile.</p>
   */
  inline bool GetAllowProfileCreation() const { return m_allowProfileCreation; }
  inline bool AllowProfileCreationHasBeenSet() const { return m_allowProfileCreationHasBeenSet; }
  inline void SetAllowProfileCreation(bool value) {
    m_allowProfileCreationHasBeenSet = true;
    m_allowProfileCreation = value;
  }
  inline PutProfileObjectTypeRequest& WithAllowProfileCreation(bool value) {
    SetAllowProfileCreation(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The format of your <code>sourceLastUpdatedTimestamp</code> that was
   * previously set up. </p>
   */
  inline const Aws::String& GetSourceLastUpdatedTimestampFormat() const { return m_sourceLastUpdatedTimestampFormat; }
  inline bool SourceLastUpdatedTimestampFormatHasBeenSet() const { return m_sourceLastUpdatedTimestampFormatHasBeenSet; }
  template <typename SourceLastUpdatedTimestampFormatT = Aws::String>
  void SetSourceLastUpdatedTimestampFormat(SourceLastUpdatedTimestampFormatT&& value) {
    m_sourceLastUpdatedTimestampFormatHasBeenSet = true;
    m_sourceLastUpdatedTimestampFormat = std::forward<SourceLastUpdatedTimestampFormatT>(value);
  }
  template <typename SourceLastUpdatedTimestampFormatT = Aws::String>
  PutProfileObjectTypeRequest& WithSourceLastUpdatedTimestampFormat(SourceLastUpdatedTimestampFormatT&& value) {
    SetSourceLastUpdatedTimestampFormat(std::forward<SourceLastUpdatedTimestampFormatT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The amount of profile object max count assigned to the object type</p>
   */
  inline int GetMaxProfileObjectCount() const { return m_maxProfileObjectCount; }
  inline bool MaxProfileObjectCountHasBeenSet() const { return m_maxProfileObjectCountHasBeenSet; }
  inline void SetMaxProfileObjectCount(int value) {
    m_maxProfileObjectCountHasBeenSet = true;
    m_maxProfileObjectCount = value;
  }
  inline PutProfileObjectTypeRequest& WithMaxProfileObjectCount(int value) {
    SetMaxProfileObjectCount(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>An integer that determines the priority of this object type when data from
   * multiple sources is ingested. Lower values take priority. Object types without a
   * specified source priority default to the lowest priority.</p>
   */
  inline int GetSourcePriority() const { return m_sourcePriority; }
  inline bool SourcePriorityHasBeenSet() const { return m_sourcePriorityHasBeenSet; }
  inline void SetSourcePriority(int value) {
    m_sourcePriorityHasBeenSet = true;
    m_sourcePriority = value;
  }
  inline PutProfileObjectTypeRequest& WithSourcePriority(int value) {
    SetSourcePriority(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A map of the name and ObjectType field.</p>
   */
  inline const Aws::Map<Aws::String, ObjectTypeField>& GetFields() const { return m_fields; }
  inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
  template <typename FieldsT = Aws::Map<Aws::String, ObjectTypeField>>
  void SetFields(FieldsT&& value) {
    m_fieldsHasBeenSet = true;
    m_fields = std::forward<FieldsT>(value);
  }
  template <typename FieldsT = Aws::Map<Aws::String, ObjectTypeField>>
  PutProfileObjectTypeRequest& WithFields(FieldsT&& value) {
    SetFields(std::forward<FieldsT>(value));
    return *this;
  }
  template <typename FieldsKeyT = Aws::String, typename FieldsValueT = ObjectTypeField>
  PutProfileObjectTypeRequest& AddFields(FieldsKeyT&& key, FieldsValueT&& value) {
    m_fieldsHasBeenSet = true;
    m_fields.emplace(std::forward<FieldsKeyT>(key), std::forward<FieldsValueT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A list of unique keys that can be used to map data to the profile.</p>
   */
  inline const Aws::Map<Aws::String, Aws::Vector<ObjectTypeKey>>& GetKeys() const { return m_keys; }
  inline bool KeysHasBeenSet() const { return m_keysHasBeenSet; }
  template <typename KeysT = Aws::Map<Aws::String, Aws::Vector<ObjectTypeKey>>>
  void SetKeys(KeysT&& value) {
    m_keysHasBeenSet = true;
    m_keys = std::forward<KeysT>(value);
  }
  template <typename KeysT = Aws::Map<Aws::String, Aws::Vector<ObjectTypeKey>>>
  PutProfileObjectTypeRequest& WithKeys(KeysT&& value) {
    SetKeys(std::forward<KeysT>(value));
    return *this;
  }
  template <typename KeysKeyT = Aws::String, typename KeysValueT = Aws::Vector<ObjectTypeKey>>
  PutProfileObjectTypeRequest& AddKeys(KeysKeyT&& key, KeysValueT&& value) {
    m_keysHasBeenSet = true;
    m_keys.emplace(std::forward<KeysKeyT>(key), std::forward<KeysValueT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The tags used to organize, track, or control access for this resource.</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>>
  PutProfileObjectTypeRequest& WithTags(TagsT&& value) {
    SetTags(std::forward<TagsT>(value));
    return *this;
  }
  template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
  PutProfileObjectTypeRequest& 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_domainName;

  Aws::String m_objectTypeName;

  Aws::String m_description;

  Aws::String m_templateId;

  int m_expirationDays{0};

  Aws::String m_encryptionKey;

  bool m_allowProfileCreation{false};

  Aws::String m_sourceLastUpdatedTimestampFormat;

  int m_maxProfileObjectCount{0};

  int m_sourcePriority{0};

  Aws::Map<Aws::String, ObjectTypeField> m_fields;

  Aws::Map<Aws::String, Aws::Vector<ObjectTypeKey>> m_keys;

  Aws::Map<Aws::String, Aws::String> m_tags;
  bool m_domainNameHasBeenSet = false;
  bool m_objectTypeNameHasBeenSet = false;
  bool m_descriptionHasBeenSet = false;
  bool m_templateIdHasBeenSet = false;
  bool m_expirationDaysHasBeenSet = false;
  bool m_encryptionKeyHasBeenSet = false;
  bool m_allowProfileCreationHasBeenSet = false;
  bool m_sourceLastUpdatedTimestampFormatHasBeenSet = false;
  bool m_maxProfileObjectCountHasBeenSet = false;
  bool m_sourcePriorityHasBeenSet = false;
  bool m_fieldsHasBeenSet = false;
  bool m_keysHasBeenSet = false;
  bool m_tagsHasBeenSet = false;
};

}  // namespace Model
}  // namespace CustomerProfiles
}  // namespace Aws
