/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #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 could not be launched by the * fleet.

See Also:

AWS * API Reference

*/ class CreateFleetError { public: AWS_EC2_API CreateFleetError(); AWS_EC2_API CreateFleetError(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API CreateFleetError& 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 CreateFleetError& 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 CreateFleetError& WithLaunchTemplateAndOverrides(LaunchTemplateAndOverridesResponse&& value) { SetLaunchTemplateAndOverrides(std::move(value)); return *this;} /** *

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

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

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

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

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

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

Indicates if the instance that could not be launched was 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 could not be launched was a Spot Instance or * On-Demand Instance.

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

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

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

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline const Aws::String& GetErrorCode() const{ return m_errorCode; } /** *

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; } /** *

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline void SetErrorCode(const Aws::String& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; } /** *

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline void SetErrorCode(Aws::String&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); } /** *

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline void SetErrorCode(const char* value) { m_errorCodeHasBeenSet = true; m_errorCode.assign(value); } /** *

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline CreateFleetError& WithErrorCode(const Aws::String& value) { SetErrorCode(value); return *this;} /** *

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline CreateFleetError& WithErrorCode(Aws::String&& value) { SetErrorCode(std::move(value)); return *this;} /** *

The error code that indicates why the instance could not be launched. For * more information about error codes, see Error * codes.

*/ inline CreateFleetError& WithErrorCode(const char* value) { SetErrorCode(value); return *this;} /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; } /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; } /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; } /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); } /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); } /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline CreateFleetError& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;} /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline CreateFleetError& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;} /** *

The error message that describes why the instance could not be launched. For * more information about error messages, see Error * codes.

*/ inline CreateFleetError& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} private: LaunchTemplateAndOverridesResponse m_launchTemplateAndOverrides; bool m_launchTemplateAndOverridesHasBeenSet = false; InstanceLifecycle m_lifecycle; bool m_lifecycleHasBeenSet = false; Aws::String m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws