/** * 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 { /** *

Information about instance capacity usage for a Capacity * Reservation.

See Also:

AWS * API Reference

*/ class CapacityAllocation { public: AWS_EC2_API CapacityAllocation(); AWS_EC2_API CapacityAllocation(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API CapacityAllocation& 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 usage type. used indicates that the instance capacity is in * use by instances that are running in the Capacity Reservation.

*/ inline const AllocationType& GetAllocationType() const{ return m_allocationType; } /** *

The usage type. used indicates that the instance capacity is in * use by instances that are running in the Capacity Reservation.

*/ inline bool AllocationTypeHasBeenSet() const { return m_allocationTypeHasBeenSet; } /** *

The usage type. used indicates that the instance capacity is in * use by instances that are running in the Capacity Reservation.

*/ inline void SetAllocationType(const AllocationType& value) { m_allocationTypeHasBeenSet = true; m_allocationType = value; } /** *

The usage type. used indicates that the instance capacity is in * use by instances that are running in the Capacity Reservation.

*/ inline void SetAllocationType(AllocationType&& value) { m_allocationTypeHasBeenSet = true; m_allocationType = std::move(value); } /** *

The usage type. used indicates that the instance capacity is in * use by instances that are running in the Capacity Reservation.

*/ inline CapacityAllocation& WithAllocationType(const AllocationType& value) { SetAllocationType(value); return *this;} /** *

The usage type. used indicates that the instance capacity is in * use by instances that are running in the Capacity Reservation.

*/ inline CapacityAllocation& WithAllocationType(AllocationType&& value) { SetAllocationType(std::move(value)); return *this;} /** *

The amount of instance capacity associated with the usage. For example a * value of 4 indicates that instance capacity for 4 instances is * currently in use.

*/ inline int GetCount() const{ return m_count; } /** *

The amount of instance capacity associated with the usage. For example a * value of 4 indicates that instance capacity for 4 instances is * currently in use.

*/ inline bool CountHasBeenSet() const { return m_countHasBeenSet; } /** *

The amount of instance capacity associated with the usage. For example a * value of 4 indicates that instance capacity for 4 instances is * currently in use.

*/ inline void SetCount(int value) { m_countHasBeenSet = true; m_count = value; } /** *

The amount of instance capacity associated with the usage. For example a * value of 4 indicates that instance capacity for 4 instances is * currently in use.

*/ inline CapacityAllocation& WithCount(int value) { SetCount(value); return *this;} private: AllocationType m_allocationType; bool m_allocationTypeHasBeenSet = false; int m_count; bool m_countHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws