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

Describes a Reserved Instance listing.

See Also:

AWS * API Reference

*/ class ReservedInstancesListing { public: AWS_EC2_API ReservedInstancesListing(); AWS_EC2_API ReservedInstancesListing(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API ReservedInstancesListing& 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; /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline ReservedInstancesListing& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline ReservedInstancesListing& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

A unique, case-sensitive key supplied by the client to ensure that the * request is idempotent. For more information, see Ensuring * Idempotency.

*/ inline ReservedInstancesListing& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

The time the listing was created.

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

The time the listing was created.

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

The time the listing was created.

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

The time the listing was created.

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

The time the listing was created.

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

The time the listing was created.

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

The number of instances in this state.

*/ inline const Aws::Vector& GetInstanceCounts() const{ return m_instanceCounts; } /** *

The number of instances in this state.

*/ inline bool InstanceCountsHasBeenSet() const { return m_instanceCountsHasBeenSet; } /** *

The number of instances in this state.

*/ inline void SetInstanceCounts(const Aws::Vector& value) { m_instanceCountsHasBeenSet = true; m_instanceCounts = value; } /** *

The number of instances in this state.

*/ inline void SetInstanceCounts(Aws::Vector&& value) { m_instanceCountsHasBeenSet = true; m_instanceCounts = std::move(value); } /** *

The number of instances in this state.

*/ inline ReservedInstancesListing& WithInstanceCounts(const Aws::Vector& value) { SetInstanceCounts(value); return *this;} /** *

The number of instances in this state.

*/ inline ReservedInstancesListing& WithInstanceCounts(Aws::Vector&& value) { SetInstanceCounts(std::move(value)); return *this;} /** *

The number of instances in this state.

*/ inline ReservedInstancesListing& AddInstanceCounts(const InstanceCount& value) { m_instanceCountsHasBeenSet = true; m_instanceCounts.push_back(value); return *this; } /** *

The number of instances in this state.

*/ inline ReservedInstancesListing& AddInstanceCounts(InstanceCount&& value) { m_instanceCountsHasBeenSet = true; m_instanceCounts.push_back(std::move(value)); return *this; } /** *

The price of the Reserved Instance listing.

*/ inline const Aws::Vector& GetPriceSchedules() const{ return m_priceSchedules; } /** *

The price of the Reserved Instance listing.

*/ inline bool PriceSchedulesHasBeenSet() const { return m_priceSchedulesHasBeenSet; } /** *

The price of the Reserved Instance listing.

*/ inline void SetPriceSchedules(const Aws::Vector& value) { m_priceSchedulesHasBeenSet = true; m_priceSchedules = value; } /** *

The price of the Reserved Instance listing.

*/ inline void SetPriceSchedules(Aws::Vector&& value) { m_priceSchedulesHasBeenSet = true; m_priceSchedules = std::move(value); } /** *

The price of the Reserved Instance listing.

*/ inline ReservedInstancesListing& WithPriceSchedules(const Aws::Vector& value) { SetPriceSchedules(value); return *this;} /** *

The price of the Reserved Instance listing.

*/ inline ReservedInstancesListing& WithPriceSchedules(Aws::Vector&& value) { SetPriceSchedules(std::move(value)); return *this;} /** *

The price of the Reserved Instance listing.

*/ inline ReservedInstancesListing& AddPriceSchedules(const PriceSchedule& value) { m_priceSchedulesHasBeenSet = true; m_priceSchedules.push_back(value); return *this; } /** *

The price of the Reserved Instance listing.

*/ inline ReservedInstancesListing& AddPriceSchedules(PriceSchedule&& value) { m_priceSchedulesHasBeenSet = true; m_priceSchedules.push_back(std::move(value)); return *this; } /** *

The ID of the Reserved Instance.

*/ inline const Aws::String& GetReservedInstancesId() const{ return m_reservedInstancesId; } /** *

The ID of the Reserved Instance.

*/ inline bool ReservedInstancesIdHasBeenSet() const { return m_reservedInstancesIdHasBeenSet; } /** *

The ID of the Reserved Instance.

*/ inline void SetReservedInstancesId(const Aws::String& value) { m_reservedInstancesIdHasBeenSet = true; m_reservedInstancesId = value; } /** *

The ID of the Reserved Instance.

*/ inline void SetReservedInstancesId(Aws::String&& value) { m_reservedInstancesIdHasBeenSet = true; m_reservedInstancesId = std::move(value); } /** *

The ID of the Reserved Instance.

*/ inline void SetReservedInstancesId(const char* value) { m_reservedInstancesIdHasBeenSet = true; m_reservedInstancesId.assign(value); } /** *

The ID of the Reserved Instance.

*/ inline ReservedInstancesListing& WithReservedInstancesId(const Aws::String& value) { SetReservedInstancesId(value); return *this;} /** *

The ID of the Reserved Instance.

*/ inline ReservedInstancesListing& WithReservedInstancesId(Aws::String&& value) { SetReservedInstancesId(std::move(value)); return *this;} /** *

The ID of the Reserved Instance.

*/ inline ReservedInstancesListing& WithReservedInstancesId(const char* value) { SetReservedInstancesId(value); return *this;} /** *

The ID of the Reserved Instance listing.

*/ inline const Aws::String& GetReservedInstancesListingId() const{ return m_reservedInstancesListingId; } /** *

The ID of the Reserved Instance listing.

*/ inline bool ReservedInstancesListingIdHasBeenSet() const { return m_reservedInstancesListingIdHasBeenSet; } /** *

The ID of the Reserved Instance listing.

*/ inline void SetReservedInstancesListingId(const Aws::String& value) { m_reservedInstancesListingIdHasBeenSet = true; m_reservedInstancesListingId = value; } /** *

The ID of the Reserved Instance listing.

*/ inline void SetReservedInstancesListingId(Aws::String&& value) { m_reservedInstancesListingIdHasBeenSet = true; m_reservedInstancesListingId = std::move(value); } /** *

The ID of the Reserved Instance listing.

*/ inline void SetReservedInstancesListingId(const char* value) { m_reservedInstancesListingIdHasBeenSet = true; m_reservedInstancesListingId.assign(value); } /** *

The ID of the Reserved Instance listing.

*/ inline ReservedInstancesListing& WithReservedInstancesListingId(const Aws::String& value) { SetReservedInstancesListingId(value); return *this;} /** *

The ID of the Reserved Instance listing.

*/ inline ReservedInstancesListing& WithReservedInstancesListingId(Aws::String&& value) { SetReservedInstancesListingId(std::move(value)); return *this;} /** *

The ID of the Reserved Instance listing.

*/ inline ReservedInstancesListing& WithReservedInstancesListingId(const char* value) { SetReservedInstancesListingId(value); return *this;} /** *

The status of the Reserved Instance listing.

*/ inline const ListingStatus& GetStatus() const{ return m_status; } /** *

The status of the Reserved Instance listing.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the Reserved Instance listing.

*/ inline void SetStatus(const ListingStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the Reserved Instance listing.

*/ inline void SetStatus(ListingStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the Reserved Instance listing.

*/ inline ReservedInstancesListing& WithStatus(const ListingStatus& value) { SetStatus(value); return *this;} /** *

The status of the Reserved Instance listing.

*/ inline ReservedInstancesListing& WithStatus(ListingStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; } /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; } /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; } /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); } /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); } /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline ReservedInstancesListing& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;} /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline ReservedInstancesListing& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;} /** *

The reason for the current status of the Reserved Instance listing. The * response can be blank.

*/ inline ReservedInstancesListing& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;} /** *

Any tags assigned to the resource.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Any tags assigned to the resource.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Any tags assigned to the resource.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Any tags assigned to the resource.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Any tags assigned to the resource.

*/ inline ReservedInstancesListing& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Any tags assigned to the resource.

*/ inline ReservedInstancesListing& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Any tags assigned to the resource.

*/ inline ReservedInstancesListing& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Any tags assigned to the resource.

*/ inline ReservedInstancesListing& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The last modified timestamp of the listing.

*/ inline const Aws::Utils::DateTime& GetUpdateDate() const{ return m_updateDate; } /** *

The last modified timestamp of the listing.

*/ inline bool UpdateDateHasBeenSet() const { return m_updateDateHasBeenSet; } /** *

The last modified timestamp of the listing.

*/ inline void SetUpdateDate(const Aws::Utils::DateTime& value) { m_updateDateHasBeenSet = true; m_updateDate = value; } /** *

The last modified timestamp of the listing.

*/ inline void SetUpdateDate(Aws::Utils::DateTime&& value) { m_updateDateHasBeenSet = true; m_updateDate = std::move(value); } /** *

The last modified timestamp of the listing.

*/ inline ReservedInstancesListing& WithUpdateDate(const Aws::Utils::DateTime& value) { SetUpdateDate(value); return *this;} /** *

The last modified timestamp of the listing.

*/ inline ReservedInstancesListing& WithUpdateDate(Aws::Utils::DateTime&& value) { SetUpdateDate(std::move(value)); return *this;} private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::Utils::DateTime m_createDate; bool m_createDateHasBeenSet = false; Aws::Vector m_instanceCounts; bool m_instanceCountsHasBeenSet = false; Aws::Vector m_priceSchedules; bool m_priceSchedulesHasBeenSet = false; Aws::String m_reservedInstancesId; bool m_reservedInstancesIdHasBeenSet = false; Aws::String m_reservedInstancesListingId; bool m_reservedInstancesListingIdHasBeenSet = false; ListingStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_statusMessage; bool m_statusMessageHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::Utils::DateTime m_updateDate; bool m_updateDateHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws