/** * 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 namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Information about a Capacity Reservation in a Capacity Reservation * Fleet.

See Also:

AWS * API Reference

*/ class FleetCapacityReservation { public: AWS_EC2_API FleetCapacityReservation(); AWS_EC2_API FleetCapacityReservation(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API FleetCapacityReservation& 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 ID of the Capacity Reservation.

*/ inline const Aws::String& GetCapacityReservationId() const{ return m_capacityReservationId; } /** *

The ID of the Capacity Reservation.

*/ inline bool CapacityReservationIdHasBeenSet() const { return m_capacityReservationIdHasBeenSet; } /** *

The ID of the Capacity Reservation.

*/ inline void SetCapacityReservationId(const Aws::String& value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId = value; } /** *

The ID of the Capacity Reservation.

*/ inline void SetCapacityReservationId(Aws::String&& value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId = std::move(value); } /** *

The ID of the Capacity Reservation.

*/ inline void SetCapacityReservationId(const char* value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId.assign(value); } /** *

The ID of the Capacity Reservation.

*/ inline FleetCapacityReservation& WithCapacityReservationId(const Aws::String& value) { SetCapacityReservationId(value); return *this;} /** *

The ID of the Capacity Reservation.

*/ inline FleetCapacityReservation& WithCapacityReservationId(Aws::String&& value) { SetCapacityReservationId(std::move(value)); return *this;} /** *

The ID of the Capacity Reservation.

*/ inline FleetCapacityReservation& WithCapacityReservationId(const char* value) { SetCapacityReservationId(value); return *this;} /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; } /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; } /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; } /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); } /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); } /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithAvailabilityZoneId(const Aws::String& value) { SetAvailabilityZoneId(value); return *this;} /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithAvailabilityZoneId(Aws::String&& value) { SetAvailabilityZoneId(std::move(value)); return *this;} /** *

The ID of the Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); return *this;} /** *

The instance type for which the Capacity Reservation reserves capacity.

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

The instance type for which the Capacity Reservation reserves capacity.

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

The instance type for which the Capacity Reservation reserves capacity.

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

The instance type for which the Capacity Reservation reserves capacity.

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

The instance type for which the Capacity Reservation reserves capacity.

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

The instance type for which the Capacity Reservation reserves capacity.

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

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline const CapacityReservationInstancePlatform& GetInstancePlatform() const{ return m_instancePlatform; } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline void SetInstancePlatform(const CapacityReservationInstancePlatform& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = value; } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline void SetInstancePlatform(CapacityReservationInstancePlatform&& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = std::move(value); } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithInstancePlatform(const CapacityReservationInstancePlatform& value) { SetInstancePlatform(value); return *this;} /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithInstancePlatform(CapacityReservationInstancePlatform&& value) { SetInstancePlatform(std::move(value)); return *this;} /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone in which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline int GetTotalInstanceCount() const{ return m_totalInstanceCount; } /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline bool TotalInstanceCountHasBeenSet() const { return m_totalInstanceCountHasBeenSet; } /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline void SetTotalInstanceCount(int value) { m_totalInstanceCountHasBeenSet = true; m_totalInstanceCount = value; } /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline FleetCapacityReservation& WithTotalInstanceCount(int value) { SetTotalInstanceCount(value); return *this;} /** *

The number of capacity units fulfilled by the Capacity Reservation. For more * information, see * Total target capacity in the Amazon EC2 User Guide.

*/ inline double GetFulfilledCapacity() const{ return m_fulfilledCapacity; } /** *

The number of capacity units fulfilled by the Capacity Reservation. For more * information, see * Total target capacity in the Amazon EC2 User Guide.

*/ inline bool FulfilledCapacityHasBeenSet() const { return m_fulfilledCapacityHasBeenSet; } /** *

The number of capacity units fulfilled by the Capacity Reservation. For more * information, see * Total target capacity in the Amazon EC2 User Guide.

*/ inline void SetFulfilledCapacity(double value) { m_fulfilledCapacityHasBeenSet = true; m_fulfilledCapacity = value; } /** *

The number of capacity units fulfilled by the Capacity Reservation. For more * information, see * Total target capacity in the Amazon EC2 User Guide.

*/ inline FleetCapacityReservation& WithFulfilledCapacity(double value) { SetFulfilledCapacity(value); return *this;} /** *

Indicates whether the Capacity Reservation reserves capacity for * EBS-optimized instance types.

*/ inline bool GetEbsOptimized() const{ return m_ebsOptimized; } /** *

Indicates whether the Capacity Reservation reserves capacity for * EBS-optimized instance types.

*/ inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; } /** *

Indicates whether the Capacity Reservation reserves capacity for * EBS-optimized instance types.

*/ inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; } /** *

Indicates whether the Capacity Reservation reserves capacity for * EBS-optimized instance types.

*/ inline FleetCapacityReservation& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;} /** *

The date and time at which the Capacity Reservation was created.

*/ inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; } /** *

The date and time at which the Capacity Reservation was created.

*/ inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; } /** *

The date and time at which the Capacity Reservation was created.

*/ inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; } /** *

The date and time at which the Capacity Reservation was created.

*/ inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); } /** *

The date and time at which the Capacity Reservation was created.

*/ inline FleetCapacityReservation& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;} /** *

The date and time at which the Capacity Reservation was created.

*/ inline FleetCapacityReservation& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;} /** *

The weight of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type weight in the Amazon EC2 User Guide.

*/ inline double GetWeight() const{ return m_weight; } /** *

The weight of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type weight in the Amazon EC2 User Guide.

*/ inline bool WeightHasBeenSet() const { return m_weightHasBeenSet; } /** *

The weight of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type weight in the Amazon EC2 User Guide.

*/ inline void SetWeight(double value) { m_weightHasBeenSet = true; m_weight = value; } /** *

The weight of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type weight in the Amazon EC2 User Guide.

*/ inline FleetCapacityReservation& WithWeight(double value) { SetWeight(value); return *this;} /** *

The priority of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type priority in the Amazon EC2 User Guide.

*/ inline int GetPriority() const{ return m_priority; } /** *

The priority of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type priority in the Amazon EC2 User Guide.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

The priority of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type priority in the Amazon EC2 User Guide.

*/ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

The priority of the instance type in the Capacity Reservation Fleet. For more * information, see * Instance type priority in the Amazon EC2 User Guide.

*/ inline FleetCapacityReservation& WithPriority(int value) { SetPriority(value); return *this;} private: Aws::String m_capacityReservationId; bool m_capacityReservationIdHasBeenSet = false; Aws::String m_availabilityZoneId; bool m_availabilityZoneIdHasBeenSet = false; InstanceType m_instanceType; bool m_instanceTypeHasBeenSet = false; CapacityReservationInstancePlatform m_instancePlatform; bool m_instancePlatformHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; int m_totalInstanceCount; bool m_totalInstanceCountHasBeenSet = false; double m_fulfilledCapacity; bool m_fulfilledCapacityHasBeenSet = false; bool m_ebsOptimized; bool m_ebsOptimizedHasBeenSet = false; Aws::Utils::DateTime m_createDate; bool m_createDateHasBeenSet = false; double m_weight; bool m_weightHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws