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

#pragma once
#include <aws/core/utils/Array.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/datasync/DataSyncRequest.h>
#include <aws/datasync/DataSync_EXPORTS.h>
#include <aws/datasync/model/CmkSecretConfig.h>
#include <aws/datasync/model/CustomSecretConfig.h>
#include <aws/datasync/model/SmbAuthenticationType.h>
#include <aws/datasync/model/SmbMountOptions.h>
#include <aws/datasync/model/TagListEntry.h>

#include <utility>

namespace Aws {
namespace DataSync {
namespace Model {

/**
 * <p>CreateLocationSmbRequest</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationSmbRequest">AWS
 * API Reference</a></p>
 */
class CreateLocationSmbRequest : public DataSyncRequest {
 public:
  AWS_DATASYNC_API CreateLocationSmbRequest() = 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 "CreateLocationSmb"; }

  AWS_DATASYNC_API Aws::String SerializePayload() const override;

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

  ///@{
  /**
   * <p>Specifies the name of the share exported by your SMB file server where
   * DataSync will read or write data. You can include a subdirectory in the share
   * path (for example, <code>/path/to/subdirectory</code>). Make sure that other SMB
   * clients in your network can also mount this path.</p> <p>To copy all data in the
   * subdirectory, DataSync must be able to mount the SMB share and access all of its
   * data. For more information, see <a
   * href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing
   * DataSync access to SMB file servers</a>.</p>
   */
  inline const Aws::String& GetSubdirectory() const { return m_subdirectory; }
  inline bool SubdirectoryHasBeenSet() const { return m_subdirectoryHasBeenSet; }
  template <typename SubdirectoryT = Aws::String>
  void SetSubdirectory(SubdirectoryT&& value) {
    m_subdirectoryHasBeenSet = true;
    m_subdirectory = std::forward<SubdirectoryT>(value);
  }
  template <typename SubdirectoryT = Aws::String>
  CreateLocationSmbRequest& WithSubdirectory(SubdirectoryT&& value) {
    SetSubdirectory(std::forward<SubdirectoryT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the domain name or IP address (IPv4 or IPv6) of the SMB file server
   * that your DataSync agent connects to.</p>  <p>If you're using Kerberos
   * authentication, you must specify a domain name.</p>
   */
  inline const Aws::String& GetServerHostname() const { return m_serverHostname; }
  inline bool ServerHostnameHasBeenSet() const { return m_serverHostnameHasBeenSet; }
  template <typename ServerHostnameT = Aws::String>
  void SetServerHostname(ServerHostnameT&& value) {
    m_serverHostnameHasBeenSet = true;
    m_serverHostname = std::forward<ServerHostnameT>(value);
  }
  template <typename ServerHostnameT = Aws::String>
  CreateLocationSmbRequest& WithServerHostname(ServerHostnameT&& value) {
    SetServerHostname(std::forward<ServerHostnameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the user that can mount and access the files, folders, and file
   * metadata in your SMB file server. This parameter applies only if
   * <code>AuthenticationType</code> is set to <code>NTLM</code>.</p> <p>For
   * information about choosing a user with the right level of access for your
   * transfer, see <a
   * href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing
   * DataSync access to SMB file servers</a>.</p>
   */
  inline const Aws::String& GetUser() const { return m_user; }
  inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
  template <typename UserT = Aws::String>
  void SetUser(UserT&& value) {
    m_userHasBeenSet = true;
    m_user = std::forward<UserT>(value);
  }
  template <typename UserT = Aws::String>
  CreateLocationSmbRequest& WithUser(UserT&& value) {
    SetUser(std::forward<UserT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the Windows domain name that your SMB file server belongs to. This
   * parameter applies only if <code>AuthenticationType</code> is set to
   * <code>NTLM</code>.</p> <p>If you have multiple domains in your environment,
   * configuring this parameter makes sure that DataSync connects to the right file
   * server.</p>
   */
  inline const Aws::String& GetDomain() const { return m_domain; }
  inline bool DomainHasBeenSet() const { return m_domainHasBeenSet; }
  template <typename DomainT = Aws::String>
  void SetDomain(DomainT&& value) {
    m_domainHasBeenSet = true;
    m_domain = std::forward<DomainT>(value);
  }
  template <typename DomainT = Aws::String>
  CreateLocationSmbRequest& WithDomain(DomainT&& value) {
    SetDomain(std::forward<DomainT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the password of the user who can mount your SMB file server and has
   * permission to access the files and folders involved in your transfer. This
   * parameter applies only if <code>AuthenticationType</code> is set to
   * <code>NTLM</code>.</p>
   */
  inline const Aws::String& GetPassword() const { return m_password; }
  inline bool PasswordHasBeenSet() const { return m_passwordHasBeenSet; }
  template <typename PasswordT = Aws::String>
  void SetPassword(PasswordT&& value) {
    m_passwordHasBeenSet = true;
    m_password = std::forward<PasswordT>(value);
  }
  template <typename PasswordT = Aws::String>
  CreateLocationSmbRequest& WithPassword(PasswordT&& value) {
    SetPassword(std::forward<PasswordT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies configuration information for a DataSync-managed secret, either a
   * <code>Password</code> or <code>KerberosKeytab</code> (for <code>NTLM</code>
   * (default) and <code>KERBEROS</code> authentication types, respectively) that
   * DataSync uses to access a specific SMB storage location, with a customer-managed
   * KMS key.</p> <p>When you include this parameter as part of a
   * <code>CreateLocationSmbRequest</code> request, you provide only the KMS key ARN.
   * DataSync uses this KMS key together with either the <code>Password</code> or
   * <code>KerberosKeytab</code> you specify to create a DataSync-managed secret to
   * store the location access credentials.</p> <p>Make sure that DataSync has
   * permission to access the KMS key that you specify. For more information, see <a
   * href="https://docs.aws.amazon.com/datasync/latest/userguide/location-credentials.html#service-secret-custom-key">
   * Using a service-managed secret encrypted with a custom KMS key</a>.</p>
   * <p>You can use either <code>CmkSecretConfig</code> (with either
   * <code>Password</code> or <code>KerberosKeytab</code>) or
   * <code>CustomSecretConfig</code> (without any <code>Password</code> and
   * <code>KerberosKeytab</code>) to provide credentials for a
   * <code>CreateLocationSmbRequest</code> request. Do not provide both
   * <code>CmkSecretConfig</code> and <code>CustomSecretConfig</code> parameters for
   * the same request.</p>
   */
  inline const CmkSecretConfig& GetCmkSecretConfig() const { return m_cmkSecretConfig; }
  inline bool CmkSecretConfigHasBeenSet() const { return m_cmkSecretConfigHasBeenSet; }
  template <typename CmkSecretConfigT = CmkSecretConfig>
  void SetCmkSecretConfig(CmkSecretConfigT&& value) {
    m_cmkSecretConfigHasBeenSet = true;
    m_cmkSecretConfig = std::forward<CmkSecretConfigT>(value);
  }
  template <typename CmkSecretConfigT = CmkSecretConfig>
  CreateLocationSmbRequest& WithCmkSecretConfig(CmkSecretConfigT&& value) {
    SetCmkSecretConfig(std::forward<CmkSecretConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies configuration information for a customer-managed Secrets Manager
   * secret where the SMB storage location credentials is stored in Secrets Manager
   * as plain text (for <code>Password</code>) or binary (for
   * <code>KerberosKeytab</code>). This configuration includes the secret ARN, and
   * the ARN for an IAM role that provides access to the secret. For more
   * information, see <a
   * href="https://docs.aws.amazon.com/datasync/latest/userguide/location-credentials.html#custom-secret-custom-key">
   * Using a secret that you manage</a>.</p>  <p>You can use either
   * <code>CmkSecretConfig</code> (with <code>SasConfiguration</code>) or
   * <code>CustomSecretConfig</code> (without <code>SasConfiguration</code>) to
   * provide credentials for a <code>CreateLocationSmbRequest</code> request. Do not
   * provide both parameters for the same request.</p>
   */
  inline const CustomSecretConfig& GetCustomSecretConfig() const { return m_customSecretConfig; }
  inline bool CustomSecretConfigHasBeenSet() const { return m_customSecretConfigHasBeenSet; }
  template <typename CustomSecretConfigT = CustomSecretConfig>
  void SetCustomSecretConfig(CustomSecretConfigT&& value) {
    m_customSecretConfigHasBeenSet = true;
    m_customSecretConfig = std::forward<CustomSecretConfigT>(value);
  }
  template <typename CustomSecretConfigT = CustomSecretConfig>
  CreateLocationSmbRequest& WithCustomSecretConfig(CustomSecretConfigT&& value) {
    SetCustomSecretConfig(std::forward<CustomSecretConfigT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the DataSync agent (or agents) that can connect to your SMB file
   * server. You specify an agent by using its Amazon Resource Name (ARN).</p>
   */
  inline const Aws::Vector<Aws::String>& GetAgentArns() const { return m_agentArns; }
  inline bool AgentArnsHasBeenSet() const { return m_agentArnsHasBeenSet; }
  template <typename AgentArnsT = Aws::Vector<Aws::String>>
  void SetAgentArns(AgentArnsT&& value) {
    m_agentArnsHasBeenSet = true;
    m_agentArns = std::forward<AgentArnsT>(value);
  }
  template <typename AgentArnsT = Aws::Vector<Aws::String>>
  CreateLocationSmbRequest& WithAgentArns(AgentArnsT&& value) {
    SetAgentArns(std::forward<AgentArnsT>(value));
    return *this;
  }
  template <typename AgentArnsT = Aws::String>
  CreateLocationSmbRequest& AddAgentArns(AgentArnsT&& value) {
    m_agentArnsHasBeenSet = true;
    m_agentArns.emplace_back(std::forward<AgentArnsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the version of the SMB protocol that DataSync uses to access your
   * SMB file server.</p>
   */
  inline const SmbMountOptions& GetMountOptions() const { return m_mountOptions; }
  inline bool MountOptionsHasBeenSet() const { return m_mountOptionsHasBeenSet; }
  template <typename MountOptionsT = SmbMountOptions>
  void SetMountOptions(MountOptionsT&& value) {
    m_mountOptionsHasBeenSet = true;
    m_mountOptions = std::forward<MountOptionsT>(value);
  }
  template <typename MountOptionsT = SmbMountOptions>
  CreateLocationSmbRequest& WithMountOptions(MountOptionsT&& value) {
    SetMountOptions(std::forward<MountOptionsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies labels that help you categorize, filter, and search for your Amazon
   * Web Services resources. We recommend creating at least a name tag for your
   * location.</p>
   */
  inline const Aws::Vector<TagListEntry>& GetTags() const { return m_tags; }
  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
  template <typename TagsT = Aws::Vector<TagListEntry>>
  void SetTags(TagsT&& value) {
    m_tagsHasBeenSet = true;
    m_tags = std::forward<TagsT>(value);
  }
  template <typename TagsT = Aws::Vector<TagListEntry>>
  CreateLocationSmbRequest& WithTags(TagsT&& value) {
    SetTags(std::forward<TagsT>(value));
    return *this;
  }
  template <typename TagsT = TagListEntry>
  CreateLocationSmbRequest& AddTags(TagsT&& value) {
    m_tagsHasBeenSet = true;
    m_tags.emplace_back(std::forward<TagsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the authentication protocol that DataSync uses to connect to your
   * SMB file server. DataSync supports <code>NTLM</code> (default) and
   * <code>KERBEROS</code> authentication.</p> <p>For more information, see <a
   * href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing
   * DataSync access to SMB file servers</a>.</p>
   */
  inline SmbAuthenticationType GetAuthenticationType() const { return m_authenticationType; }
  inline bool AuthenticationTypeHasBeenSet() const { return m_authenticationTypeHasBeenSet; }
  inline void SetAuthenticationType(SmbAuthenticationType value) {
    m_authenticationTypeHasBeenSet = true;
    m_authenticationType = value;
  }
  inline CreateLocationSmbRequest& WithAuthenticationType(SmbAuthenticationType value) {
    SetAuthenticationType(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies the IPv4 or IPv6 addresses for the DNS servers that your SMB file
   * server belongs to. This parameter applies only if
   * <code>AuthenticationType</code> is set to <code>KERBEROS</code>.</p> <p>If you
   * have multiple domains in your environment, configuring this parameter makes sure
   * that DataSync connects to the right SMB file server.</p>
   */
  inline const Aws::Vector<Aws::String>& GetDnsIpAddresses() const { return m_dnsIpAddresses; }
  inline bool DnsIpAddressesHasBeenSet() const { return m_dnsIpAddressesHasBeenSet; }
  template <typename DnsIpAddressesT = Aws::Vector<Aws::String>>
  void SetDnsIpAddresses(DnsIpAddressesT&& value) {
    m_dnsIpAddressesHasBeenSet = true;
    m_dnsIpAddresses = std::forward<DnsIpAddressesT>(value);
  }
  template <typename DnsIpAddressesT = Aws::Vector<Aws::String>>
  CreateLocationSmbRequest& WithDnsIpAddresses(DnsIpAddressesT&& value) {
    SetDnsIpAddresses(std::forward<DnsIpAddressesT>(value));
    return *this;
  }
  template <typename DnsIpAddressesT = Aws::String>
  CreateLocationSmbRequest& AddDnsIpAddresses(DnsIpAddressesT&& value) {
    m_dnsIpAddressesHasBeenSet = true;
    m_dnsIpAddresses.emplace_back(std::forward<DnsIpAddressesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies a Kerberos principal, which is an identity in your Kerberos realm
   * that has permission to access the files, folders, and file metadata in your SMB
   * file server.</p> <p>A Kerberos principal might look like
   * <code>HOST/kerberosuser@MYDOMAIN.ORG</code>.</p> <p>Principal names are case
   * sensitive. Your DataSync task execution will fail if the principal that you
   * specify for this parameter doesn’t exactly match the principal that you use to
   * create the keytab file.</p>
   */
  inline const Aws::String& GetKerberosPrincipal() const { return m_kerberosPrincipal; }
  inline bool KerberosPrincipalHasBeenSet() const { return m_kerberosPrincipalHasBeenSet; }
  template <typename KerberosPrincipalT = Aws::String>
  void SetKerberosPrincipal(KerberosPrincipalT&& value) {
    m_kerberosPrincipalHasBeenSet = true;
    m_kerberosPrincipal = std::forward<KerberosPrincipalT>(value);
  }
  template <typename KerberosPrincipalT = Aws::String>
  CreateLocationSmbRequest& WithKerberosPrincipal(KerberosPrincipalT&& value) {
    SetKerberosPrincipal(std::forward<KerberosPrincipalT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies your Kerberos key table (keytab) file, which includes mappings
   * between your Kerberos principal and encryption keys.</p> <p>To avoid task
   * execution errors, make sure that the Kerberos principal that you use to create
   * the keytab file matches exactly what you specify for
   * <code>KerberosPrincipal</code>. </p>
   */
  inline const Aws::Utils::ByteBuffer& GetKerberosKeytab() const { return m_kerberosKeytab; }
  inline bool KerberosKeytabHasBeenSet() const { return m_kerberosKeytabHasBeenSet; }
  template <typename KerberosKeytabT = Aws::Utils::ByteBuffer>
  void SetKerberosKeytab(KerberosKeytabT&& value) {
    m_kerberosKeytabHasBeenSet = true;
    m_kerberosKeytab = std::forward<KerberosKeytabT>(value);
  }
  template <typename KerberosKeytabT = Aws::Utils::ByteBuffer>
  CreateLocationSmbRequest& WithKerberosKeytab(KerberosKeytabT&& value) {
    SetKerberosKeytab(std::forward<KerberosKeytabT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Specifies a Kerberos configuration file (<code>krb5.conf</code>) that defines
   * your Kerberos realm configuration.</p> <p>The file must be base64 encoded. If
   * you're using the CLI, the encoding is done for you.</p>
   */
  inline const Aws::Utils::ByteBuffer& GetKerberosKrb5Conf() const { return m_kerberosKrb5Conf; }
  inline bool KerberosKrb5ConfHasBeenSet() const { return m_kerberosKrb5ConfHasBeenSet; }
  template <typename KerberosKrb5ConfT = Aws::Utils::ByteBuffer>
  void SetKerberosKrb5Conf(KerberosKrb5ConfT&& value) {
    m_kerberosKrb5ConfHasBeenSet = true;
    m_kerberosKrb5Conf = std::forward<KerberosKrb5ConfT>(value);
  }
  template <typename KerberosKrb5ConfT = Aws::Utils::ByteBuffer>
  CreateLocationSmbRequest& WithKerberosKrb5Conf(KerberosKrb5ConfT&& value) {
    SetKerberosKrb5Conf(std::forward<KerberosKrb5ConfT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_subdirectory;

  Aws::String m_serverHostname;

  Aws::String m_user;

  Aws::String m_domain;

  Aws::String m_password;

  CmkSecretConfig m_cmkSecretConfig;

  CustomSecretConfig m_customSecretConfig;

  Aws::Vector<Aws::String> m_agentArns;

  SmbMountOptions m_mountOptions;

  Aws::Vector<TagListEntry> m_tags;

  SmbAuthenticationType m_authenticationType{SmbAuthenticationType::NOT_SET};

  Aws::Vector<Aws::String> m_dnsIpAddresses;

  Aws::String m_kerberosPrincipal;

  Aws::Utils::ByteBuffer m_kerberosKeytab{};

  Aws::Utils::ByteBuffer m_kerberosKrb5Conf{};
  bool m_subdirectoryHasBeenSet = false;
  bool m_serverHostnameHasBeenSet = false;
  bool m_userHasBeenSet = false;
  bool m_domainHasBeenSet = false;
  bool m_passwordHasBeenSet = false;
  bool m_cmkSecretConfigHasBeenSet = false;
  bool m_customSecretConfigHasBeenSet = false;
  bool m_agentArnsHasBeenSet = false;
  bool m_mountOptionsHasBeenSet = false;
  bool m_tagsHasBeenSet = false;
  bool m_authenticationTypeHasBeenSet = false;
  bool m_dnsIpAddressesHasBeenSet = false;
  bool m_kerberosPrincipalHasBeenSet = false;
  bool m_kerberosKeytabHasBeenSet = false;
  bool m_kerberosKrb5ConfHasBeenSet = false;
};

}  // namespace Model
}  // namespace DataSync
}  // namespace Aws
