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

#pragma once
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/ec2/EC2_EXPORTS.h>
#include <aws/ec2/model/ArchitectureValues.h>
#include <aws/ec2/model/InstanceType.h>
#include <aws/ec2/model/Placement.h>
#include <aws/ec2/model/ShutdownBehavior.h>
#include <aws/ec2/model/UserData.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Xml {
class XmlNode;
}  // namespace Xml
}  // namespace Utils
namespace EC2 {
namespace Model {

/**
 * <p>Describes the launch specification for VM import.</p><p><h3>See Also:</h3>
 * <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceLaunchSpecification">AWS
 * API Reference</a></p>
 */
class ImportInstanceLaunchSpecification {
 public:
  AWS_EC2_API ImportInstanceLaunchSpecification() = default;
  AWS_EC2_API ImportInstanceLaunchSpecification(const Aws::Utils::Xml::XmlNode& xmlNode);
  AWS_EC2_API ImportInstanceLaunchSpecification& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

  AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
  AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;

  ///@{
  /**
   * <p>The architecture of the instance.</p>
   */
  inline ArchitectureValues GetArchitecture() const { return m_architecture; }
  inline bool ArchitectureHasBeenSet() const { return m_architectureHasBeenSet; }
  inline void SetArchitecture(ArchitectureValues value) {
    m_architectureHasBeenSet = true;
    m_architecture = value;
  }
  inline ImportInstanceLaunchSpecification& WithArchitecture(ArchitectureValues value) {
    SetArchitecture(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The security group names.</p>
   */
  inline const Aws::Vector<Aws::String>& GetGroupNames() const { return m_groupNames; }
  inline bool GroupNamesHasBeenSet() const { return m_groupNamesHasBeenSet; }
  template <typename GroupNamesT = Aws::Vector<Aws::String>>
  void SetGroupNames(GroupNamesT&& value) {
    m_groupNamesHasBeenSet = true;
    m_groupNames = std::forward<GroupNamesT>(value);
  }
  template <typename GroupNamesT = Aws::Vector<Aws::String>>
  ImportInstanceLaunchSpecification& WithGroupNames(GroupNamesT&& value) {
    SetGroupNames(std::forward<GroupNamesT>(value));
    return *this;
  }
  template <typename GroupNamesT = Aws::String>
  ImportInstanceLaunchSpecification& AddGroupNames(GroupNamesT&& value) {
    m_groupNamesHasBeenSet = true;
    m_groupNames.emplace_back(std::forward<GroupNamesT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The security group IDs.</p>
   */
  inline const Aws::Vector<Aws::String>& GetGroupIds() const { return m_groupIds; }
  inline bool GroupIdsHasBeenSet() const { return m_groupIdsHasBeenSet; }
  template <typename GroupIdsT = Aws::Vector<Aws::String>>
  void SetGroupIds(GroupIdsT&& value) {
    m_groupIdsHasBeenSet = true;
    m_groupIds = std::forward<GroupIdsT>(value);
  }
  template <typename GroupIdsT = Aws::Vector<Aws::String>>
  ImportInstanceLaunchSpecification& WithGroupIds(GroupIdsT&& value) {
    SetGroupIds(std::forward<GroupIdsT>(value));
    return *this;
  }
  template <typename GroupIdsT = Aws::String>
  ImportInstanceLaunchSpecification& AddGroupIds(GroupIdsT&& value) {
    m_groupIdsHasBeenSet = true;
    m_groupIds.emplace_back(std::forward<GroupIdsT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Reserved.</p>
   */
  inline const Aws::String& GetAdditionalInfo() const { return m_additionalInfo; }
  inline bool AdditionalInfoHasBeenSet() const { return m_additionalInfoHasBeenSet; }
  template <typename AdditionalInfoT = Aws::String>
  void SetAdditionalInfo(AdditionalInfoT&& value) {
    m_additionalInfoHasBeenSet = true;
    m_additionalInfo = std::forward<AdditionalInfoT>(value);
  }
  template <typename AdditionalInfoT = Aws::String>
  ImportInstanceLaunchSpecification& WithAdditionalInfo(AdditionalInfoT&& value) {
    SetAdditionalInfo(std::forward<AdditionalInfoT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The Base64-encoded user data to make available to the instance.</p>
   */
  inline const UserData& GetUserData() const { return m_userData; }
  inline bool UserDataHasBeenSet() const { return m_userDataHasBeenSet; }
  template <typename UserDataT = UserData>
  void SetUserData(UserDataT&& value) {
    m_userDataHasBeenSet = true;
    m_userData = std::forward<UserDataT>(value);
  }
  template <typename UserDataT = UserData>
  ImportInstanceLaunchSpecification& WithUserData(UserDataT&& value) {
    SetUserData(std::forward<UserDataT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The instance type. For more information about the instance types that you can
   * import, see <a
   * href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types">Instance
   * Types</a> in the VM Import/Export User Guide.</p>
   */
  inline InstanceType GetInstanceType() const { return m_instanceType; }
  inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
  inline void SetInstanceType(InstanceType value) {
    m_instanceTypeHasBeenSet = true;
    m_instanceType = value;
  }
  inline ImportInstanceLaunchSpecification& WithInstanceType(InstanceType value) {
    SetInstanceType(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>The placement information for the instance.</p>
   */
  inline const Placement& GetPlacement() const { return m_placement; }
  inline bool PlacementHasBeenSet() const { return m_placementHasBeenSet; }
  template <typename PlacementT = Placement>
  void SetPlacement(PlacementT&& value) {
    m_placementHasBeenSet = true;
    m_placement = std::forward<PlacementT>(value);
  }
  template <typename PlacementT = Placement>
  ImportInstanceLaunchSpecification& WithPlacement(PlacementT&& value) {
    SetPlacement(std::forward<PlacementT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Indicates whether monitoring is enabled.</p>
   */
  inline bool GetMonitoring() const { return m_monitoring; }
  inline bool MonitoringHasBeenSet() const { return m_monitoringHasBeenSet; }
  inline void SetMonitoring(bool value) {
    m_monitoringHasBeenSet = true;
    m_monitoring = value;
  }
  inline ImportInstanceLaunchSpecification& WithMonitoring(bool value) {
    SetMonitoring(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>[EC2-VPC] The ID of the subnet in which to launch the instance.</p>
   */
  inline const Aws::String& GetSubnetId() const { return m_subnetId; }
  inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
  template <typename SubnetIdT = Aws::String>
  void SetSubnetId(SubnetIdT&& value) {
    m_subnetIdHasBeenSet = true;
    m_subnetId = std::forward<SubnetIdT>(value);
  }
  template <typename SubnetIdT = Aws::String>
  ImportInstanceLaunchSpecification& WithSubnetId(SubnetIdT&& value) {
    SetSubnetId(std::forward<SubnetIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Indicates whether an instance stops or terminates when you initiate shutdown
   * from the instance (using the operating system command for system shutdown).</p>
   */
  inline ShutdownBehavior GetInstanceInitiatedShutdownBehavior() const { return m_instanceInitiatedShutdownBehavior; }
  inline bool InstanceInitiatedShutdownBehaviorHasBeenSet() const { return m_instanceInitiatedShutdownBehaviorHasBeenSet; }
  inline void SetInstanceInitiatedShutdownBehavior(ShutdownBehavior value) {
    m_instanceInitiatedShutdownBehaviorHasBeenSet = true;
    m_instanceInitiatedShutdownBehavior = value;
  }
  inline ImportInstanceLaunchSpecification& WithInstanceInitiatedShutdownBehavior(ShutdownBehavior value) {
    SetInstanceInitiatedShutdownBehavior(value);
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>[EC2-VPC] An available IP address from the IP address range of the
   * subnet.</p>
   */
  inline const Aws::String& GetPrivateIpAddress() const { return m_privateIpAddress; }
  inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; }
  template <typename PrivateIpAddressT = Aws::String>
  void SetPrivateIpAddress(PrivateIpAddressT&& value) {
    m_privateIpAddressHasBeenSet = true;
    m_privateIpAddress = std::forward<PrivateIpAddressT>(value);
  }
  template <typename PrivateIpAddressT = Aws::String>
  ImportInstanceLaunchSpecification& WithPrivateIpAddress(PrivateIpAddressT&& value) {
    SetPrivateIpAddress(std::forward<PrivateIpAddressT>(value));
    return *this;
  }
  ///@}
 private:
  ArchitectureValues m_architecture{ArchitectureValues::NOT_SET};

  Aws::Vector<Aws::String> m_groupNames;

  Aws::Vector<Aws::String> m_groupIds;

  Aws::String m_additionalInfo;

  UserData m_userData;

  InstanceType m_instanceType{InstanceType::NOT_SET};

  Placement m_placement;

  bool m_monitoring{false};

  Aws::String m_subnetId;

  ShutdownBehavior m_instanceInitiatedShutdownBehavior{ShutdownBehavior::NOT_SET};

  Aws::String m_privateIpAddress;
  bool m_architectureHasBeenSet = false;
  bool m_groupNamesHasBeenSet = false;
  bool m_groupIdsHasBeenSet = false;
  bool m_additionalInfoHasBeenSet = false;
  bool m_userDataHasBeenSet = false;
  bool m_instanceTypeHasBeenSet = false;
  bool m_placementHasBeenSet = false;
  bool m_monitoringHasBeenSet = false;
  bool m_subnetIdHasBeenSet = false;
  bool m_instanceInitiatedShutdownBehaviorHasBeenSet = false;
  bool m_privateIpAddressHasBeenSet = false;
};

}  // namespace Model
}  // namespace EC2
}  // namespace Aws
