/** * 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 namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace OpenSearchService { namespace Model { /** *

Details of an OpenSearch Reserved Instance.

See Also:

AWS * API Reference

*/ class ReservedInstance { public: AWS_OPENSEARCHSERVICE_API ReservedInstance(); AWS_OPENSEARCHSERVICE_API ReservedInstance(Aws::Utils::Json::JsonView jsonValue); AWS_OPENSEARCHSERVICE_API ReservedInstance& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The customer-specified identifier to track this reservation.

*/ inline const Aws::String& GetReservationName() const{ return m_reservationName; } /** *

The customer-specified identifier to track this reservation.

*/ inline bool ReservationNameHasBeenSet() const { return m_reservationNameHasBeenSet; } /** *

The customer-specified identifier to track this reservation.

*/ inline void SetReservationName(const Aws::String& value) { m_reservationNameHasBeenSet = true; m_reservationName = value; } /** *

The customer-specified identifier to track this reservation.

*/ inline void SetReservationName(Aws::String&& value) { m_reservationNameHasBeenSet = true; m_reservationName = std::move(value); } /** *

The customer-specified identifier to track this reservation.

*/ inline void SetReservationName(const char* value) { m_reservationNameHasBeenSet = true; m_reservationName.assign(value); } /** *

The customer-specified identifier to track this reservation.

*/ inline ReservedInstance& WithReservationName(const Aws::String& value) { SetReservationName(value); return *this;} /** *

The customer-specified identifier to track this reservation.

*/ inline ReservedInstance& WithReservationName(Aws::String&& value) { SetReservationName(std::move(value)); return *this;} /** *

The customer-specified identifier to track this reservation.

*/ inline ReservedInstance& WithReservationName(const char* value) { SetReservationName(value); return *this;} /** *

The unique identifier for the reservation.

*/ inline const Aws::String& GetReservedInstanceId() const{ return m_reservedInstanceId; } /** *

The unique identifier for the reservation.

*/ inline bool ReservedInstanceIdHasBeenSet() const { return m_reservedInstanceIdHasBeenSet; } /** *

The unique identifier for the reservation.

*/ inline void SetReservedInstanceId(const Aws::String& value) { m_reservedInstanceIdHasBeenSet = true; m_reservedInstanceId = value; } /** *

The unique identifier for the reservation.

*/ inline void SetReservedInstanceId(Aws::String&& value) { m_reservedInstanceIdHasBeenSet = true; m_reservedInstanceId = std::move(value); } /** *

The unique identifier for the reservation.

*/ inline void SetReservedInstanceId(const char* value) { m_reservedInstanceIdHasBeenSet = true; m_reservedInstanceId.assign(value); } /** *

The unique identifier for the reservation.

*/ inline ReservedInstance& WithReservedInstanceId(const Aws::String& value) { SetReservedInstanceId(value); return *this;} /** *

The unique identifier for the reservation.

*/ inline ReservedInstance& WithReservedInstanceId(Aws::String&& value) { SetReservedInstanceId(std::move(value)); return *this;} /** *

The unique identifier for the reservation.

*/ inline ReservedInstance& WithReservedInstanceId(const char* value) { SetReservedInstanceId(value); return *this;} /** *

The unique identifier of the billing subscription.

*/ inline long long GetBillingSubscriptionId() const{ return m_billingSubscriptionId; } /** *

The unique identifier of the billing subscription.

*/ inline bool BillingSubscriptionIdHasBeenSet() const { return m_billingSubscriptionIdHasBeenSet; } /** *

The unique identifier of the billing subscription.

*/ inline void SetBillingSubscriptionId(long long value) { m_billingSubscriptionIdHasBeenSet = true; m_billingSubscriptionId = value; } /** *

The unique identifier of the billing subscription.

*/ inline ReservedInstance& WithBillingSubscriptionId(long long value) { SetBillingSubscriptionId(value); return *this;} /** *

The unique identifier of the Reserved Instance offering.

*/ inline const Aws::String& GetReservedInstanceOfferingId() const{ return m_reservedInstanceOfferingId; } /** *

The unique identifier of the Reserved Instance offering.

*/ inline bool ReservedInstanceOfferingIdHasBeenSet() const { return m_reservedInstanceOfferingIdHasBeenSet; } /** *

The unique identifier of the Reserved Instance offering.

*/ inline void SetReservedInstanceOfferingId(const Aws::String& value) { m_reservedInstanceOfferingIdHasBeenSet = true; m_reservedInstanceOfferingId = value; } /** *

The unique identifier of the Reserved Instance offering.

*/ inline void SetReservedInstanceOfferingId(Aws::String&& value) { m_reservedInstanceOfferingIdHasBeenSet = true; m_reservedInstanceOfferingId = std::move(value); } /** *

The unique identifier of the Reserved Instance offering.

*/ inline void SetReservedInstanceOfferingId(const char* value) { m_reservedInstanceOfferingIdHasBeenSet = true; m_reservedInstanceOfferingId.assign(value); } /** *

The unique identifier of the Reserved Instance offering.

*/ inline ReservedInstance& WithReservedInstanceOfferingId(const Aws::String& value) { SetReservedInstanceOfferingId(value); return *this;} /** *

The unique identifier of the Reserved Instance offering.

*/ inline ReservedInstance& WithReservedInstanceOfferingId(Aws::String&& value) { SetReservedInstanceOfferingId(std::move(value)); return *this;} /** *

The unique identifier of the Reserved Instance offering.

*/ inline ReservedInstance& WithReservedInstanceOfferingId(const char* value) { SetReservedInstanceOfferingId(value); return *this;} /** *

The OpenSearch instance type offered by theReserved Instance offering.

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

The OpenSearch instance type offered by theReserved Instance offering.

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

The OpenSearch instance type offered by theReserved Instance offering.

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

The OpenSearch instance type offered by theReserved Instance offering.

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

The OpenSearch instance type offered by theReserved Instance offering.

*/ inline ReservedInstance& WithInstanceType(const OpenSearchPartitionInstanceType& value) { SetInstanceType(value); return *this;} /** *

The OpenSearch instance type offered by theReserved Instance offering.

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

The date and time when the reservation was purchased.

*/ inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; } /** *

The date and time when the reservation was purchased.

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

The date and time when the reservation was purchased.

*/ inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

The date and time when the reservation was purchased.

*/ inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

The date and time when the reservation was purchased.

*/ inline ReservedInstance& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} /** *

The date and time when the reservation was purchased.

*/ inline ReservedInstance& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} /** *

The duration, in seconds, for which the OpenSearch instance is reserved.

*/ inline int GetDuration() const{ return m_duration; } /** *

The duration, in seconds, for which the OpenSearch instance is reserved.

*/ inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; } /** *

The duration, in seconds, for which the OpenSearch instance is reserved.

*/ inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; } /** *

The duration, in seconds, for which the OpenSearch instance is reserved.

*/ inline ReservedInstance& WithDuration(int value) { SetDuration(value); return *this;} /** *

The upfront fixed charge you will paid to purchase the specific Reserved * Instance offering.

*/ inline double GetFixedPrice() const{ return m_fixedPrice; } /** *

The upfront fixed charge you will paid to purchase the specific Reserved * Instance offering.

*/ inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; } /** *

The upfront fixed charge you will paid to purchase the specific Reserved * Instance offering.

*/ inline void SetFixedPrice(double value) { m_fixedPriceHasBeenSet = true; m_fixedPrice = value; } /** *

The upfront fixed charge you will paid to purchase the specific Reserved * Instance offering.

*/ inline ReservedInstance& WithFixedPrice(double value) { SetFixedPrice(value); return *this;} /** *

The hourly rate at which you're charged for the domain using this Reserved * Instance.

*/ inline double GetUsagePrice() const{ return m_usagePrice; } /** *

The hourly rate at which you're charged for the domain using this Reserved * Instance.

*/ inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; } /** *

The hourly rate at which you're charged for the domain using this Reserved * Instance.

*/ inline void SetUsagePrice(double value) { m_usagePriceHasBeenSet = true; m_usagePrice = value; } /** *

The hourly rate at which you're charged for the domain using this Reserved * Instance.

*/ inline ReservedInstance& WithUsagePrice(double value) { SetUsagePrice(value); return *this;} /** *

The currency code for the offering.

*/ inline const Aws::String& GetCurrencyCode() const{ return m_currencyCode; } /** *

The currency code for the offering.

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

The currency code for the offering.

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

The currency code for the offering.

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

The currency code for the offering.

*/ inline void SetCurrencyCode(const char* value) { m_currencyCodeHasBeenSet = true; m_currencyCode.assign(value); } /** *

The currency code for the offering.

*/ inline ReservedInstance& WithCurrencyCode(const Aws::String& value) { SetCurrencyCode(value); return *this;} /** *

The currency code for the offering.

*/ inline ReservedInstance& WithCurrencyCode(Aws::String&& value) { SetCurrencyCode(std::move(value)); return *this;} /** *

The currency code for the offering.

*/ inline ReservedInstance& WithCurrencyCode(const char* value) { SetCurrencyCode(value); return *this;} /** *

The number of OpenSearch instances that have been reserved.

*/ inline int GetInstanceCount() const{ return m_instanceCount; } /** *

The number of OpenSearch instances that have been reserved.

*/ inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; } /** *

The number of OpenSearch instances that have been reserved.

*/ inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; } /** *

The number of OpenSearch instances that have been reserved.

*/ inline ReservedInstance& WithInstanceCount(int value) { SetInstanceCount(value); return *this;} /** *

The state of the Reserved Instance.

*/ inline const Aws::String& GetState() const{ return m_state; } /** *

The state of the Reserved Instance.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the Reserved Instance.

*/ inline void SetState(const Aws::String& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the Reserved Instance.

*/ inline void SetState(Aws::String&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the Reserved Instance.

*/ inline void SetState(const char* value) { m_stateHasBeenSet = true; m_state.assign(value); } /** *

The state of the Reserved Instance.

*/ inline ReservedInstance& WithState(const Aws::String& value) { SetState(value); return *this;} /** *

The state of the Reserved Instance.

*/ inline ReservedInstance& WithState(Aws::String&& value) { SetState(std::move(value)); return *this;} /** *

The state of the Reserved Instance.

*/ inline ReservedInstance& WithState(const char* value) { SetState(value); return *this;} /** *

The payment option as defined in the Reserved Instance offering.

*/ inline const ReservedInstancePaymentOption& GetPaymentOption() const{ return m_paymentOption; } /** *

The payment option as defined in the Reserved Instance offering.

*/ inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; } /** *

The payment option as defined in the Reserved Instance offering.

*/ inline void SetPaymentOption(const ReservedInstancePaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; } /** *

The payment option as defined in the Reserved Instance offering.

*/ inline void SetPaymentOption(ReservedInstancePaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); } /** *

The payment option as defined in the Reserved Instance offering.

*/ inline ReservedInstance& WithPaymentOption(const ReservedInstancePaymentOption& value) { SetPaymentOption(value); return *this;} /** *

The payment option as defined in the Reserved Instance offering.

*/ inline ReservedInstance& WithPaymentOption(ReservedInstancePaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;} /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline const Aws::Vector& GetRecurringCharges() const{ return m_recurringCharges; } /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; } /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline void SetRecurringCharges(const Aws::Vector& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = value; } /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline void SetRecurringCharges(Aws::Vector&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = std::move(value); } /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline ReservedInstance& WithRecurringCharges(const Aws::Vector& value) { SetRecurringCharges(value); return *this;} /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline ReservedInstance& WithRecurringCharges(Aws::Vector&& value) { SetRecurringCharges(std::move(value)); return *this;} /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline ReservedInstance& AddRecurringCharges(const RecurringCharge& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(value); return *this; } /** *

The recurring charge to your account, regardless of whether you create any * domains using the Reserved Instance offering.

*/ inline ReservedInstance& AddRecurringCharges(RecurringCharge&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(std::move(value)); return *this; } private: Aws::String m_reservationName; bool m_reservationNameHasBeenSet = false; Aws::String m_reservedInstanceId; bool m_reservedInstanceIdHasBeenSet = false; long long m_billingSubscriptionId; bool m_billingSubscriptionIdHasBeenSet = false; Aws::String m_reservedInstanceOfferingId; bool m_reservedInstanceOfferingIdHasBeenSet = false; OpenSearchPartitionInstanceType m_instanceType; bool m_instanceTypeHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; int m_duration; bool m_durationHasBeenSet = false; double m_fixedPrice; bool m_fixedPriceHasBeenSet = false; double m_usagePrice; bool m_usagePriceHasBeenSet = false; Aws::String m_currencyCode; bool m_currencyCodeHasBeenSet = false; int m_instanceCount; bool m_instanceCountHasBeenSet = false; Aws::String m_state; bool m_stateHasBeenSet = false; ReservedInstancePaymentOption m_paymentOption; bool m_paymentOptionHasBeenSet = false; Aws::Vector m_recurringCharges; bool m_recurringChargesHasBeenSet = false; }; } // namespace Model } // namespace OpenSearchService } // namespace Aws