/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes the instances that were launched by the fleet.

See * Also:

AWS * API Reference

*/ class CreateFleetInstance { public: AWS_EC2_API CreateFleetInstance(); AWS_EC2_API CreateFleetInstance(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API CreateFleetInstance& 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; /** *

The launch templates and overrides that were used for launching the * instances. The values that you specify in the Overrides replace the values in * the launch template.

*/ inline const LaunchTemplateAndOverridesResponse& GetLaunchTemplateAndOverrides() const{ return m_launchTemplateAndOverrides; } /** *

The launch templates and overrides that were used for launching the * instances. The values that you specify in the Overrides replace the values in * the launch template.

*/ inline bool LaunchTemplateAndOverridesHasBeenSet() const { return m_launchTemplateAndOverridesHasBeenSet; } /** *

The launch templates and overrides that were used for launching the * instances. The values that you specify in the Overrides replace the values in * the launch template.

*/ inline void SetLaunchTemplateAndOverrides(const LaunchTemplateAndOverridesResponse& value) { m_launchTemplateAndOverridesHasBeenSet = true; m_launchTemplateAndOverrides = value; } /** *

The launch templates and overrides that were used for launching the * instances. The values that you specify in the Overrides replace the values in * the launch template.

*/ inline void SetLaunchTemplateAndOverrides(LaunchTemplateAndOverridesResponse&& value) { m_launchTemplateAndOverridesHasBeenSet = true; m_launchTemplateAndOverrides = std::move(value); } /** *

The launch templates and overrides that were used for launching the * instances. The values that you specify in the Overrides replace the values in * the launch template.

*/ inline CreateFleetInstance& WithLaunchTemplateAndOverrides(const LaunchTemplateAndOverridesResponse& value) { SetLaunchTemplateAndOverrides(value); return *this;} /** *

The launch templates and overrides that were used for launching the * instances. The values that you specify in the Overrides replace the values in * the launch template.

*/ inline CreateFleetInstance& WithLaunchTemplateAndOverrides(LaunchTemplateAndOverridesResponse&& value) { SetLaunchTemplateAndOverrides(std::move(value)); return *this;} /** *

Indicates if the instance that was launched is a Spot Instance or On-Demand * Instance.

*/ inline const InstanceLifecycle& GetLifecycle() const{ return m_lifecycle; } /** *

Indicates if the instance that was launched is a Spot Instance or On-Demand * Instance.

*/ inline bool LifecycleHasBeenSet() const { return m_lifecycleHasBeenSet; } /** *

Indicates if the instance that was launched is a Spot Instance or On-Demand * Instance.

*/ inline void SetLifecycle(const InstanceLifecycle& value) { m_lifecycleHasBeenSet = true; m_lifecycle = value; } /** *

Indicates if the instance that was launched is a Spot Instance or On-Demand * Instance.

*/ inline void SetLifecycle(InstanceLifecycle&& value) { m_lifecycleHasBeenSet = true; m_lifecycle = std::move(value); } /** *

Indicates if the instance that was launched is a Spot Instance or On-Demand * Instance.

*/ inline CreateFleetInstance& WithLifecycle(const InstanceLifecycle& value) { SetLifecycle(value); return *this;} /** *

Indicates if the instance that was launched is a Spot Instance or On-Demand * Instance.

*/ inline CreateFleetInstance& WithLifecycle(InstanceLifecycle&& value) { SetLifecycle(std::move(value)); return *this;} /** *

The IDs of the instances.

*/ inline const Aws::Vector& GetInstanceIds() const{ return m_instanceIds; } /** *

The IDs of the instances.

*/ inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; } /** *

The IDs of the instances.

*/ inline void SetInstanceIds(const Aws::Vector& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; } /** *

The IDs of the instances.

*/ inline void SetInstanceIds(Aws::Vector&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); } /** *

The IDs of the instances.

*/ inline CreateFleetInstance& WithInstanceIds(const Aws::Vector& value) { SetInstanceIds(value); return *this;} /** *

The IDs of the instances.

*/ inline CreateFleetInstance& WithInstanceIds(Aws::Vector&& value) { SetInstanceIds(std::move(value)); return *this;} /** *

The IDs of the instances.

*/ inline CreateFleetInstance& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; } /** *

The IDs of the instances.

*/ inline CreateFleetInstance& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; } /** *

The IDs of the instances.

*/ inline CreateFleetInstance& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; } /** *

The instance type.

*/ inline const InstanceType& GetInstanceType() const{ return m_instanceType; } /** *

The instance type.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

The instance type.

*/ inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

The instance type.

*/ inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

The instance type.

*/ inline CreateFleetInstance& WithInstanceType(const InstanceType& value) { SetInstanceType(value); return *this;} /** *

The instance type.

*/ inline CreateFleetInstance& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;} /** *

The value is Windows for Windows instances. Otherwise, the value * is blank.

*/ inline const PlatformValues& GetPlatform() const{ return m_platform; } /** *

The value is Windows for Windows instances. Otherwise, the value * is blank.

*/ inline bool PlatformHasBeenSet() const { return m_platformHasBeenSet; } /** *

The value is Windows for Windows instances. Otherwise, the value * is blank.

*/ inline void SetPlatform(const PlatformValues& value) { m_platformHasBeenSet = true; m_platform = value; } /** *

The value is Windows for Windows instances. Otherwise, the value * is blank.

*/ inline void SetPlatform(PlatformValues&& value) { m_platformHasBeenSet = true; m_platform = std::move(value); } /** *

The value is Windows for Windows instances. Otherwise, the value * is blank.

*/ inline CreateFleetInstance& WithPlatform(const PlatformValues& value) { SetPlatform(value); return *this;} /** *

The value is Windows for Windows instances. Otherwise, the value * is blank.

*/ inline CreateFleetInstance& WithPlatform(PlatformValues&& value) { SetPlatform(std::move(value)); return *this;} private: LaunchTemplateAndOverridesResponse m_launchTemplateAndOverrides; bool m_launchTemplateAndOverridesHasBeenSet = false; InstanceLifecycle m_lifecycle; bool m_lifecycleHasBeenSet = false; Aws::Vector m_instanceIds; bool m_instanceIdsHasBeenSet = false; InstanceType m_instanceType; bool m_instanceTypeHasBeenSet = false; PlatformValues m_platform; bool m_platformHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws