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

Describes the current state of an instance.

See Also:

AWS * API Reference

*/ class InstanceState { public: AWS_EC2_API InstanceState(); AWS_EC2_API InstanceState(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API InstanceState& 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 state of the instance as a 16-bit unsigned integer.

The high byte * is all of the bits between 2^8 and (2^16)-1, which equals decimal values between * 256 and 65,535. These numerical values are used for internal purposes and should * be ignored.

The low byte is all of the bits between 2^0 and (2^8)-1, * which equals decimal values between 0 and 255.

The valid values for * instance-state-code will all be in the range of the low byte and they are:

*
  • 0 : pending

  • * 16 : running

  • 32 : * shutting-down

  • 48 : * terminated

  • 64 : * stopping

  • 80 : stopped *

You can ignore the high byte value by zeroing out all of the * bits above 2^8 or 256 in decimal.

*/ inline int GetCode() const{ return m_code; } /** *

The state of the instance as a 16-bit unsigned integer.

The high byte * is all of the bits between 2^8 and (2^16)-1, which equals decimal values between * 256 and 65,535. These numerical values are used for internal purposes and should * be ignored.

The low byte is all of the bits between 2^0 and (2^8)-1, * which equals decimal values between 0 and 255.

The valid values for * instance-state-code will all be in the range of the low byte and they are:

*
  • 0 : pending

  • * 16 : running

  • 32 : * shutting-down

  • 48 : * terminated

  • 64 : * stopping

  • 80 : stopped *

You can ignore the high byte value by zeroing out all of the * bits above 2^8 or 256 in decimal.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The state of the instance as a 16-bit unsigned integer.

The high byte * is all of the bits between 2^8 and (2^16)-1, which equals decimal values between * 256 and 65,535. These numerical values are used for internal purposes and should * be ignored.

The low byte is all of the bits between 2^0 and (2^8)-1, * which equals decimal values between 0 and 255.

The valid values for * instance-state-code will all be in the range of the low byte and they are:

*
  • 0 : pending

  • * 16 : running

  • 32 : * shutting-down

  • 48 : * terminated

  • 64 : * stopping

  • 80 : stopped *

You can ignore the high byte value by zeroing out all of the * bits above 2^8 or 256 in decimal.

*/ inline void SetCode(int value) { m_codeHasBeenSet = true; m_code = value; } /** *

The state of the instance as a 16-bit unsigned integer.

The high byte * is all of the bits between 2^8 and (2^16)-1, which equals decimal values between * 256 and 65,535. These numerical values are used for internal purposes and should * be ignored.

The low byte is all of the bits between 2^0 and (2^8)-1, * which equals decimal values between 0 and 255.

The valid values for * instance-state-code will all be in the range of the low byte and they are:

*
  • 0 : pending

  • * 16 : running

  • 32 : * shutting-down

  • 48 : * terminated

  • 64 : * stopping

  • 80 : stopped *

You can ignore the high byte value by zeroing out all of the * bits above 2^8 or 256 in decimal.

*/ inline InstanceState& WithCode(int value) { SetCode(value); return *this;} /** *

The current state of the instance.

*/ inline const InstanceStateName& GetName() const{ return m_name; } /** *

The current state of the instance.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The current state of the instance.

*/ inline void SetName(const InstanceStateName& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The current state of the instance.

*/ inline void SetName(InstanceStateName&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The current state of the instance.

*/ inline InstanceState& WithName(const InstanceStateName& value) { SetName(value); return *this;} /** *

The current state of the instance.

*/ inline InstanceState& WithName(InstanceStateName&& value) { SetName(std::move(value)); return *this;} private: int m_code; bool m_codeHasBeenSet = false; InstanceStateName m_name; bool m_nameHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws