/** * 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 { template class AmazonWebServiceResult; namespace Utils { namespace Xml { class XmlDocument; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { class GetCapacityReservationUsageResponse { public: AWS_EC2_API GetCapacityReservationUsageResponse(); AWS_EC2_API GetCapacityReservationUsageResponse(const Aws::AmazonWebServiceResult& result); AWS_EC2_API GetCapacityReservationUsageResponse& operator=(const Aws::AmazonWebServiceResult& result); /** *

The token to use to retrieve the next page of results. This value is * null when there are no more results to return.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token to use to retrieve the next page of results. This value is * null when there are no more results to return.

*/ inline void SetNextToken(const Aws::String& value) { m_nextToken = value; } /** *

The token to use to retrieve the next page of results. This value is * null when there are no more results to return.

*/ inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); } /** *

The token to use to retrieve the next page of results. This value is * null when there are no more results to return.

*/ inline void SetNextToken(const char* value) { m_nextToken.assign(value); } /** *

The token to use to retrieve the next page of results. This value is * null when there are no more results to return.

*/ inline GetCapacityReservationUsageResponse& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token to use to retrieve the next page of results. This value is * null when there are no more results to return.

*/ inline GetCapacityReservationUsageResponse& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token to use to retrieve the next page of results. This value is * null when there are no more results to return.

*/ inline GetCapacityReservationUsageResponse& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

The ID of the Capacity Reservation.

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

The ID of the Capacity Reservation.

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

The ID of the Capacity Reservation.

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

The ID of the Capacity Reservation.

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

The ID of the Capacity Reservation.

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

The ID of the Capacity Reservation.

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

The ID of the Capacity Reservation.

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

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

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

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

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceType = value; } /** *

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

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceType = std::move(value); } /** *

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

*/ inline void SetInstanceType(const char* value) { m_instanceType.assign(value); } /** *

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

*/ inline GetCapacityReservationUsageResponse& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

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

*/ inline GetCapacityReservationUsageResponse& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

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

*/ inline GetCapacityReservationUsageResponse& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

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

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

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

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

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

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

The remaining capacity. Indicates the number of instances that can be * launched in the Capacity Reservation.

*/ inline int GetAvailableInstanceCount() const{ return m_availableInstanceCount; } /** *

The remaining capacity. Indicates the number of instances that can be * launched in the Capacity Reservation.

*/ inline void SetAvailableInstanceCount(int value) { m_availableInstanceCount = value; } /** *

The remaining capacity. Indicates the number of instances that can be * launched in the Capacity Reservation.

*/ inline GetCapacityReservationUsageResponse& WithAvailableInstanceCount(int value) { SetAvailableInstanceCount(value); return *this;} /** *

The current state of the Capacity Reservation. A Capacity Reservation can be * in one of the following states:

  • active - The * Capacity Reservation is active and the capacity is available for your use.

    *
  • expired - The Capacity Reservation expired * automatically at the date and time specified in your request. The reserved * capacity is no longer available for your use.

  • * cancelled - The Capacity Reservation was cancelled. The reserved * capacity is no longer available for your use.

  • * pending - The Capacity Reservation request was successful but the * capacity provisioning is still pending.

  • failed - * The Capacity Reservation request has failed. A request might fail due to invalid * request parameters, capacity constraints, or instance limit constraints. Failed * requests are retained for 60 minutes.

*/ inline const CapacityReservationState& GetState() const{ return m_state; } /** *

The current state of the Capacity Reservation. A Capacity Reservation can be * in one of the following states:

  • active - The * Capacity Reservation is active and the capacity is available for your use.

    *
  • expired - The Capacity Reservation expired * automatically at the date and time specified in your request. The reserved * capacity is no longer available for your use.

  • * cancelled - The Capacity Reservation was cancelled. The reserved * capacity is no longer available for your use.

  • * pending - The Capacity Reservation request was successful but the * capacity provisioning is still pending.

  • failed - * The Capacity Reservation request has failed. A request might fail due to invalid * request parameters, capacity constraints, or instance limit constraints. Failed * requests are retained for 60 minutes.

*/ inline void SetState(const CapacityReservationState& value) { m_state = value; } /** *

The current state of the Capacity Reservation. A Capacity Reservation can be * in one of the following states:

  • active - The * Capacity Reservation is active and the capacity is available for your use.

    *
  • expired - The Capacity Reservation expired * automatically at the date and time specified in your request. The reserved * capacity is no longer available for your use.

  • * cancelled - The Capacity Reservation was cancelled. The reserved * capacity is no longer available for your use.

  • * pending - The Capacity Reservation request was successful but the * capacity provisioning is still pending.

  • failed - * The Capacity Reservation request has failed. A request might fail due to invalid * request parameters, capacity constraints, or instance limit constraints. Failed * requests are retained for 60 minutes.

*/ inline void SetState(CapacityReservationState&& value) { m_state = std::move(value); } /** *

The current state of the Capacity Reservation. A Capacity Reservation can be * in one of the following states:

  • active - The * Capacity Reservation is active and the capacity is available for your use.

    *
  • expired - The Capacity Reservation expired * automatically at the date and time specified in your request. The reserved * capacity is no longer available for your use.

  • * cancelled - The Capacity Reservation was cancelled. The reserved * capacity is no longer available for your use.

  • * pending - The Capacity Reservation request was successful but the * capacity provisioning is still pending.

  • failed - * The Capacity Reservation request has failed. A request might fail due to invalid * request parameters, capacity constraints, or instance limit constraints. Failed * requests are retained for 60 minutes.

*/ inline GetCapacityReservationUsageResponse& WithState(const CapacityReservationState& value) { SetState(value); return *this;} /** *

The current state of the Capacity Reservation. A Capacity Reservation can be * in one of the following states:

  • active - The * Capacity Reservation is active and the capacity is available for your use.

    *
  • expired - The Capacity Reservation expired * automatically at the date and time specified in your request. The reserved * capacity is no longer available for your use.

  • * cancelled - The Capacity Reservation was cancelled. The reserved * capacity is no longer available for your use.

  • * pending - The Capacity Reservation request was successful but the * capacity provisioning is still pending.

  • failed - * The Capacity Reservation request has failed. A request might fail due to invalid * request parameters, capacity constraints, or instance limit constraints. Failed * requests are retained for 60 minutes.

*/ inline GetCapacityReservationUsageResponse& WithState(CapacityReservationState&& value) { SetState(std::move(value)); return *this;} /** *

Information about the Capacity Reservation usage.

*/ inline const Aws::Vector& GetInstanceUsages() const{ return m_instanceUsages; } /** *

Information about the Capacity Reservation usage.

*/ inline void SetInstanceUsages(const Aws::Vector& value) { m_instanceUsages = value; } /** *

Information about the Capacity Reservation usage.

*/ inline void SetInstanceUsages(Aws::Vector&& value) { m_instanceUsages = std::move(value); } /** *

Information about the Capacity Reservation usage.

*/ inline GetCapacityReservationUsageResponse& WithInstanceUsages(const Aws::Vector& value) { SetInstanceUsages(value); return *this;} /** *

Information about the Capacity Reservation usage.

*/ inline GetCapacityReservationUsageResponse& WithInstanceUsages(Aws::Vector&& value) { SetInstanceUsages(std::move(value)); return *this;} /** *

Information about the Capacity Reservation usage.

*/ inline GetCapacityReservationUsageResponse& AddInstanceUsages(const InstanceUsage& value) { m_instanceUsages.push_back(value); return *this; } /** *

Information about the Capacity Reservation usage.

*/ inline GetCapacityReservationUsageResponse& AddInstanceUsages(InstanceUsage&& value) { m_instanceUsages.push_back(std::move(value)); return *this; } inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } inline GetCapacityReservationUsageResponse& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline GetCapacityReservationUsageResponse& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::String m_nextToken; Aws::String m_capacityReservationId; Aws::String m_instanceType; int m_totalInstanceCount; int m_availableInstanceCount; CapacityReservationState m_state; Aws::Vector m_instanceUsages; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace EC2 } // namespace Aws