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

#pragma once
#include <aws/appstream/AppStreamRequest.h>
#include <aws/appstream/AppStream_EXPORTS.h>
#include <aws/appstream/model/AuthenticationType.h>
#include <aws/appstream/model/MessageAction.h>
#include <aws/core/utils/memory/stl/AWSString.h>

#include <utility>

namespace Aws {
namespace AppStream {
namespace Model {

/**
 */
class CreateUserRequest : public AppStreamRequest {
 public:
  AWS_APPSTREAM_API CreateUserRequest() = 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 "CreateUser"; }

  AWS_APPSTREAM_API Aws::String SerializePayload() const override;

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

  ///@{
  /**
   * <p>The email address of the user.</p>  <p>Users' email addresses are
   * case-sensitive. During login, if they specify an email address that doesn't use
   * the same capitalization as the email address specified when their user pool
   * account was created, a "user does not exist" error message displays.</p>
   */
  inline const Aws::String& GetUserName() const { return m_userName; }
  inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; }
  template <typename UserNameT = Aws::String>
  void SetUserName(UserNameT&& value) {
    m_userNameHasBeenSet = true;
    m_userName = std::forward<UserNameT>(value);
  }
  template <typename UserNameT = Aws::String>
  CreateUserRequest& WithUserName(UserNameT&& value) {
    SetUserName(std::forward<UserNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The action to take for the welcome email that is sent to a user after the
   * user is created in the user pool. If you specify SUPPRESS, no email is sent. If
   * you specify RESEND, do not specify the first name or last name of the user. If
   * the value is null, the email is sent. </p>  <p>The temporary password in
   * the welcome email is valid for only 7 days. If users don’t set their passwords
   * within 7 days, you must send them a new welcome email.</p>
   */
  inline MessageAction GetMessageAction() const { return m_messageAction; }
  inline bool MessageActionHasBeenSet() const { return m_messageActionHasBeenSet; }
  inline void SetMessageAction(MessageAction value) {
    m_messageActionHasBeenSet = true;
    m_messageAction = value;
  }
  inline CreateUserRequest& WithMessageAction(MessageAction value) {
    SetMessageAction(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The first name, or given name, of the user.</p>
   */
  inline const Aws::String& GetFirstName() const { return m_firstName; }
  inline bool FirstNameHasBeenSet() const { return m_firstNameHasBeenSet; }
  template <typename FirstNameT = Aws::String>
  void SetFirstName(FirstNameT&& value) {
    m_firstNameHasBeenSet = true;
    m_firstName = std::forward<FirstNameT>(value);
  }
  template <typename FirstNameT = Aws::String>
  CreateUserRequest& WithFirstName(FirstNameT&& value) {
    SetFirstName(std::forward<FirstNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The last name, or surname, of the user.</p>
   */
  inline const Aws::String& GetLastName() const { return m_lastName; }
  inline bool LastNameHasBeenSet() const { return m_lastNameHasBeenSet; }
  template <typename LastNameT = Aws::String>
  void SetLastName(LastNameT&& value) {
    m_lastNameHasBeenSet = true;
    m_lastName = std::forward<LastNameT>(value);
  }
  template <typename LastNameT = Aws::String>
  CreateUserRequest& WithLastName(LastNameT&& value) {
    SetLastName(std::forward<LastNameT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The authentication type for the user. You must specify USERPOOL. </p>
   */
  inline AuthenticationType GetAuthenticationType() const { return m_authenticationType; }
  inline bool AuthenticationTypeHasBeenSet() const { return m_authenticationTypeHasBeenSet; }
  inline void SetAuthenticationType(AuthenticationType value) {
    m_authenticationTypeHasBeenSet = true;
    m_authenticationType = value;
  }
  inline CreateUserRequest& WithAuthenticationType(AuthenticationType value) {
    SetAuthenticationType(value);
    return *this;
  }
  ///@}
 private:
  Aws::String m_userName;

  MessageAction m_messageAction{MessageAction::NOT_SET};

  Aws::String m_firstName;

  Aws::String m_lastName;

  AuthenticationType m_authenticationType{AuthenticationType::NOT_SET};
  bool m_userNameHasBeenSet = false;
  bool m_messageActionHasBeenSet = false;
  bool m_firstNameHasBeenSet = false;
  bool m_lastNameHasBeenSet = false;
  bool m_authenticationTypeHasBeenSet = false;
};

}  // namespace Model
}  // namespace AppStream
}  // namespace Aws
