/** * 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 EC2 { namespace Model { /** */ class PurchaseHostReservationRequest : public EC2Request { public: AWS_EC2_API PurchaseHostReservationRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PurchaseHostReservation"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensuring * Idempotency.

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

The currency in which the totalUpfrontPrice, * LimitPrice, and totalHourlyPrice amounts are * specified. At this time, the only supported currency is USD.

*/ inline const CurrencyCodeValues& GetCurrencyCode() const{ return m_currencyCode; } /** *

The currency in which the totalUpfrontPrice, * LimitPrice, and totalHourlyPrice amounts are * specified. At this time, the only supported currency is USD.

*/ inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; } /** *

The currency in which the totalUpfrontPrice, * LimitPrice, and totalHourlyPrice amounts are * specified. At this time, the only supported currency is USD.

*/ inline void SetCurrencyCode(const CurrencyCodeValues& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; } /** *

The currency in which the totalUpfrontPrice, * LimitPrice, and totalHourlyPrice amounts are * specified. At this time, the only supported currency is USD.

*/ inline void SetCurrencyCode(CurrencyCodeValues&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); } /** *

The currency in which the totalUpfrontPrice, * LimitPrice, and totalHourlyPrice amounts are * specified. At this time, the only supported currency is USD.

*/ inline PurchaseHostReservationRequest& WithCurrencyCode(const CurrencyCodeValues& value) { SetCurrencyCode(value); return *this;} /** *

The currency in which the totalUpfrontPrice, * LimitPrice, and totalHourlyPrice amounts are * specified. At this time, the only supported currency is USD.

*/ inline PurchaseHostReservationRequest& WithCurrencyCode(CurrencyCodeValues&& value) { SetCurrencyCode(std::move(value)); return *this;} /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline const Aws::Vector& GetHostIdSet() const{ return m_hostIdSet; } /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline bool HostIdSetHasBeenSet() const { return m_hostIdSetHasBeenSet; } /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline void SetHostIdSet(const Aws::Vector& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = value; } /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline void SetHostIdSet(Aws::Vector&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = std::move(value); } /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline PurchaseHostReservationRequest& WithHostIdSet(const Aws::Vector& value) { SetHostIdSet(value); return *this;} /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline PurchaseHostReservationRequest& WithHostIdSet(Aws::Vector&& value) { SetHostIdSet(std::move(value)); return *this;} /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline PurchaseHostReservationRequest& AddHostIdSet(const Aws::String& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; } /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline PurchaseHostReservationRequest& AddHostIdSet(Aws::String&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(std::move(value)); return *this; } /** *

The IDs of the Dedicated Hosts with which the reservation will be * associated.

*/ inline PurchaseHostReservationRequest& AddHostIdSet(const char* value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; } /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline const Aws::String& GetLimitPrice() const{ return m_limitPrice; } /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline bool LimitPriceHasBeenSet() const { return m_limitPriceHasBeenSet; } /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline void SetLimitPrice(const Aws::String& value) { m_limitPriceHasBeenSet = true; m_limitPrice = value; } /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline void SetLimitPrice(Aws::String&& value) { m_limitPriceHasBeenSet = true; m_limitPrice = std::move(value); } /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline void SetLimitPrice(const char* value) { m_limitPriceHasBeenSet = true; m_limitPrice.assign(value); } /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline PurchaseHostReservationRequest& WithLimitPrice(const Aws::String& value) { SetLimitPrice(value); return *this;} /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline PurchaseHostReservationRequest& WithLimitPrice(Aws::String&& value) { SetLimitPrice(std::move(value)); return *this;} /** *

The specified limit is checked against the total upfront cost of the * reservation (calculated as the offering's upfront cost multiplied by the host * count). If the total upfront cost is greater than the specified price limit, the * request fails. This is used to ensure that the purchase does not exceed the * expected upfront cost of the purchase. At this time, the only supported currency * is USD. For example, to indicate a limit price of USD 100, specify * 100.00.

*/ inline PurchaseHostReservationRequest& WithLimitPrice(const char* value) { SetLimitPrice(value); return *this;} /** *

The ID of the offering.

*/ inline const Aws::String& GetOfferingId() const{ return m_offeringId; } /** *

The ID of the offering.

*/ inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; } /** *

The ID of the offering.

*/ inline void SetOfferingId(const Aws::String& value) { m_offeringIdHasBeenSet = true; m_offeringId = value; } /** *

The ID of the offering.

*/ inline void SetOfferingId(Aws::String&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::move(value); } /** *

The ID of the offering.

*/ inline void SetOfferingId(const char* value) { m_offeringIdHasBeenSet = true; m_offeringId.assign(value); } /** *

The ID of the offering.

*/ inline PurchaseHostReservationRequest& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;} /** *

The ID of the offering.

*/ inline PurchaseHostReservationRequest& WithOfferingId(Aws::String&& value) { SetOfferingId(std::move(value)); return *this;} /** *

The ID of the offering.

*/ inline PurchaseHostReservationRequest& WithOfferingId(const char* value) { SetOfferingId(value); return *this;} /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline PurchaseHostReservationRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline PurchaseHostReservationRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline PurchaseHostReservationRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to apply to the Dedicated Host Reservation during purchase.

*/ inline PurchaseHostReservationRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; CurrencyCodeValues m_currencyCode; bool m_currencyCodeHasBeenSet = false; Aws::Vector m_hostIdSet; bool m_hostIdSetHasBeenSet = false; Aws::String m_limitPrice; bool m_limitPriceHasBeenSet = false; Aws::String m_offeringId; bool m_offeringIdHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws