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

Information about a Savings Plan.

See Also:

AWS * API Reference

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

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 SavingsPlan& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;} /** *

The ID of the offering.

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

The ID of the offering.

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

The ID of the Savings Plan.

*/ inline const Aws::String& GetSavingsPlanId() const{ return m_savingsPlanId; } /** *

The ID of the Savings Plan.

*/ inline bool SavingsPlanIdHasBeenSet() const { return m_savingsPlanIdHasBeenSet; } /** *

The ID of the Savings Plan.

*/ inline void SetSavingsPlanId(const Aws::String& value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId = value; } /** *

The ID of the Savings Plan.

*/ inline void SetSavingsPlanId(Aws::String&& value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId = std::move(value); } /** *

The ID of the Savings Plan.

*/ inline void SetSavingsPlanId(const char* value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId.assign(value); } /** *

The ID of the Savings Plan.

*/ inline SavingsPlan& WithSavingsPlanId(const Aws::String& value) { SetSavingsPlanId(value); return *this;} /** *

The ID of the Savings Plan.

*/ inline SavingsPlan& WithSavingsPlanId(Aws::String&& value) { SetSavingsPlanId(std::move(value)); return *this;} /** *

The ID of the Savings Plan.

*/ inline SavingsPlan& WithSavingsPlanId(const char* value) { SetSavingsPlanId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline const Aws::String& GetSavingsPlanArn() const{ return m_savingsPlanArn; } /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline bool SavingsPlanArnHasBeenSet() const { return m_savingsPlanArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline void SetSavingsPlanArn(const Aws::String& value) { m_savingsPlanArnHasBeenSet = true; m_savingsPlanArn = value; } /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline void SetSavingsPlanArn(Aws::String&& value) { m_savingsPlanArnHasBeenSet = true; m_savingsPlanArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline void SetSavingsPlanArn(const char* value) { m_savingsPlanArnHasBeenSet = true; m_savingsPlanArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline SavingsPlan& WithSavingsPlanArn(const Aws::String& value) { SetSavingsPlanArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline SavingsPlan& WithSavingsPlanArn(Aws::String&& value) { SetSavingsPlanArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Savings Plan.

*/ inline SavingsPlan& WithSavingsPlanArn(const char* value) { SetSavingsPlanArn(value); return *this;} /** *

The description.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description.

*/ inline SavingsPlan& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description.

*/ inline SavingsPlan& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description.

*/ inline SavingsPlan& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The start time.

*/ inline const Aws::String& GetStart() const{ return m_start; } /** *

The start time.

*/ inline bool StartHasBeenSet() const { return m_startHasBeenSet; } /** *

The start time.

*/ inline void SetStart(const Aws::String& value) { m_startHasBeenSet = true; m_start = value; } /** *

The start time.

*/ inline void SetStart(Aws::String&& value) { m_startHasBeenSet = true; m_start = std::move(value); } /** *

The start time.

*/ inline void SetStart(const char* value) { m_startHasBeenSet = true; m_start.assign(value); } /** *

The start time.

*/ inline SavingsPlan& WithStart(const Aws::String& value) { SetStart(value); return *this;} /** *

The start time.

*/ inline SavingsPlan& WithStart(Aws::String&& value) { SetStart(std::move(value)); return *this;} /** *

The start time.

*/ inline SavingsPlan& WithStart(const char* value) { SetStart(value); return *this;} /** *

The end time.

*/ inline const Aws::String& GetEnd() const{ return m_end; } /** *

The end time.

*/ inline bool EndHasBeenSet() const { return m_endHasBeenSet; } /** *

The end time.

*/ inline void SetEnd(const Aws::String& value) { m_endHasBeenSet = true; m_end = value; } /** *

The end time.

*/ inline void SetEnd(Aws::String&& value) { m_endHasBeenSet = true; m_end = std::move(value); } /** *

The end time.

*/ inline void SetEnd(const char* value) { m_endHasBeenSet = true; m_end.assign(value); } /** *

The end time.

*/ inline SavingsPlan& WithEnd(const Aws::String& value) { SetEnd(value); return *this;} /** *

The end time.

*/ inline SavingsPlan& WithEnd(Aws::String&& value) { SetEnd(std::move(value)); return *this;} /** *

The end time.

*/ inline SavingsPlan& WithEnd(const char* value) { SetEnd(value); return *this;} /** *

The state.

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

The state.

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

The state.

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

The state.

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

The state.

*/ inline SavingsPlan& WithState(const SavingsPlanState& value) { SetState(value); return *this;} /** *

The state.

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

The AWS Region.

*/ inline const Aws::String& GetRegion() const{ return m_region; } /** *

The AWS Region.

*/ inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; } /** *

The AWS Region.

*/ inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; } /** *

The AWS Region.

*/ inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); } /** *

The AWS Region.

*/ inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); } /** *

The AWS Region.

*/ inline SavingsPlan& WithRegion(const Aws::String& value) { SetRegion(value); return *this;} /** *

The AWS Region.

*/ inline SavingsPlan& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;} /** *

The AWS Region.

*/ inline SavingsPlan& WithRegion(const char* value) { SetRegion(value); return *this;} /** *

The EC2 instance family.

*/ inline const Aws::String& GetEc2InstanceFamily() const{ return m_ec2InstanceFamily; } /** *

The EC2 instance family.

*/ inline bool Ec2InstanceFamilyHasBeenSet() const { return m_ec2InstanceFamilyHasBeenSet; } /** *

The EC2 instance family.

*/ inline void SetEc2InstanceFamily(const Aws::String& value) { m_ec2InstanceFamilyHasBeenSet = true; m_ec2InstanceFamily = value; } /** *

The EC2 instance family.

*/ inline void SetEc2InstanceFamily(Aws::String&& value) { m_ec2InstanceFamilyHasBeenSet = true; m_ec2InstanceFamily = std::move(value); } /** *

The EC2 instance family.

*/ inline void SetEc2InstanceFamily(const char* value) { m_ec2InstanceFamilyHasBeenSet = true; m_ec2InstanceFamily.assign(value); } /** *

The EC2 instance family.

*/ inline SavingsPlan& WithEc2InstanceFamily(const Aws::String& value) { SetEc2InstanceFamily(value); return *this;} /** *

The EC2 instance family.

*/ inline SavingsPlan& WithEc2InstanceFamily(Aws::String&& value) { SetEc2InstanceFamily(std::move(value)); return *this;} /** *

The EC2 instance family.

*/ inline SavingsPlan& WithEc2InstanceFamily(const char* value) { SetEc2InstanceFamily(value); return *this;} /** *

The plan type.

*/ inline const SavingsPlanType& GetSavingsPlanType() const{ return m_savingsPlanType; } /** *

The plan type.

*/ inline bool SavingsPlanTypeHasBeenSet() const { return m_savingsPlanTypeHasBeenSet; } /** *

The plan type.

*/ inline void SetSavingsPlanType(const SavingsPlanType& value) { m_savingsPlanTypeHasBeenSet = true; m_savingsPlanType = value; } /** *

The plan type.

*/ inline void SetSavingsPlanType(SavingsPlanType&& value) { m_savingsPlanTypeHasBeenSet = true; m_savingsPlanType = std::move(value); } /** *

The plan type.

*/ inline SavingsPlan& WithSavingsPlanType(const SavingsPlanType& value) { SetSavingsPlanType(value); return *this;} /** *

The plan type.

*/ inline SavingsPlan& WithSavingsPlanType(SavingsPlanType&& value) { SetSavingsPlanType(std::move(value)); return *this;} /** *

The payment option.

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

The payment option.

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

The payment option.

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

The payment option.

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

The payment option.

*/ inline SavingsPlan& WithPaymentOption(const SavingsPlanPaymentOption& value) { SetPaymentOption(value); return *this;} /** *

The payment option.

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

The product types.

*/ inline const Aws::Vector& GetProductTypes() const{ return m_productTypes; } /** *

The product types.

*/ inline bool ProductTypesHasBeenSet() const { return m_productTypesHasBeenSet; } /** *

The product types.

*/ inline void SetProductTypes(const Aws::Vector& value) { m_productTypesHasBeenSet = true; m_productTypes = value; } /** *

The product types.

*/ inline void SetProductTypes(Aws::Vector&& value) { m_productTypesHasBeenSet = true; m_productTypes = std::move(value); } /** *

The product types.

*/ inline SavingsPlan& WithProductTypes(const Aws::Vector& value) { SetProductTypes(value); return *this;} /** *

The product types.

*/ inline SavingsPlan& WithProductTypes(Aws::Vector&& value) { SetProductTypes(std::move(value)); return *this;} /** *

The product types.

*/ inline SavingsPlan& AddProductTypes(const SavingsPlanProductType& value) { m_productTypesHasBeenSet = true; m_productTypes.push_back(value); return *this; } /** *

The product types.

*/ inline SavingsPlan& AddProductTypes(SavingsPlanProductType&& value) { m_productTypesHasBeenSet = true; m_productTypes.push_back(std::move(value)); return *this; } /** *

The currency.

*/ inline const CurrencyCode& GetCurrency() const{ return m_currency; } /** *

The currency.

*/ inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; } /** *

The currency.

*/ inline void SetCurrency(const CurrencyCode& value) { m_currencyHasBeenSet = true; m_currency = value; } /** *

The currency.

*/ inline void SetCurrency(CurrencyCode&& value) { m_currencyHasBeenSet = true; m_currency = std::move(value); } /** *

The currency.

*/ inline SavingsPlan& WithCurrency(const CurrencyCode& value) { SetCurrency(value); return *this;} /** *

The currency.

*/ inline SavingsPlan& WithCurrency(CurrencyCode&& value) { SetCurrency(std::move(value)); return *this;} /** *

The hourly commitment, in USD.

*/ inline const Aws::String& GetCommitment() const{ return m_commitment; } /** *

The hourly commitment, in USD.

*/ inline bool CommitmentHasBeenSet() const { return m_commitmentHasBeenSet; } /** *

The hourly commitment, in USD.

*/ inline void SetCommitment(const Aws::String& value) { m_commitmentHasBeenSet = true; m_commitment = value; } /** *

The hourly commitment, in USD.

*/ inline void SetCommitment(Aws::String&& value) { m_commitmentHasBeenSet = true; m_commitment = std::move(value); } /** *

The hourly commitment, in USD.

*/ inline void SetCommitment(const char* value) { m_commitmentHasBeenSet = true; m_commitment.assign(value); } /** *

The hourly commitment, in USD.

*/ inline SavingsPlan& WithCommitment(const Aws::String& value) { SetCommitment(value); return *this;} /** *

The hourly commitment, in USD.

*/ inline SavingsPlan& WithCommitment(Aws::String&& value) { SetCommitment(std::move(value)); return *this;} /** *

The hourly commitment, in USD.

*/ inline SavingsPlan& WithCommitment(const char* value) { SetCommitment(value); return *this;} /** *

The up-front payment amount.

*/ inline const Aws::String& GetUpfrontPaymentAmount() const{ return m_upfrontPaymentAmount; } /** *

The up-front payment amount.

*/ inline bool UpfrontPaymentAmountHasBeenSet() const { return m_upfrontPaymentAmountHasBeenSet; } /** *

The up-front payment amount.

*/ inline void SetUpfrontPaymentAmount(const Aws::String& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = value; } /** *

The up-front payment amount.

*/ inline void SetUpfrontPaymentAmount(Aws::String&& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = std::move(value); } /** *

The up-front payment amount.

*/ inline void SetUpfrontPaymentAmount(const char* value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount.assign(value); } /** *

The up-front payment amount.

*/ inline SavingsPlan& WithUpfrontPaymentAmount(const Aws::String& value) { SetUpfrontPaymentAmount(value); return *this;} /** *

The up-front payment amount.

*/ inline SavingsPlan& WithUpfrontPaymentAmount(Aws::String&& value) { SetUpfrontPaymentAmount(std::move(value)); return *this;} /** *

The up-front payment amount.

*/ inline SavingsPlan& WithUpfrontPaymentAmount(const char* value) { SetUpfrontPaymentAmount(value); return *this;} /** *

The recurring payment amount.

*/ inline const Aws::String& GetRecurringPaymentAmount() const{ return m_recurringPaymentAmount; } /** *

The recurring payment amount.

*/ inline bool RecurringPaymentAmountHasBeenSet() const { return m_recurringPaymentAmountHasBeenSet; } /** *

The recurring payment amount.

*/ inline void SetRecurringPaymentAmount(const Aws::String& value) { m_recurringPaymentAmountHasBeenSet = true; m_recurringPaymentAmount = value; } /** *

The recurring payment amount.

*/ inline void SetRecurringPaymentAmount(Aws::String&& value) { m_recurringPaymentAmountHasBeenSet = true; m_recurringPaymentAmount = std::move(value); } /** *

The recurring payment amount.

*/ inline void SetRecurringPaymentAmount(const char* value) { m_recurringPaymentAmountHasBeenSet = true; m_recurringPaymentAmount.assign(value); } /** *

The recurring payment amount.

*/ inline SavingsPlan& WithRecurringPaymentAmount(const Aws::String& value) { SetRecurringPaymentAmount(value); return *this;} /** *

The recurring payment amount.

*/ inline SavingsPlan& WithRecurringPaymentAmount(Aws::String&& value) { SetRecurringPaymentAmount(std::move(value)); return *this;} /** *

The recurring payment amount.

*/ inline SavingsPlan& WithRecurringPaymentAmount(const char* value) { SetRecurringPaymentAmount(value); return *this;} /** *

The duration of the term, in seconds.

*/ inline long long GetTermDurationInSeconds() const{ return m_termDurationInSeconds; } /** *

The duration of the term, in seconds.

*/ inline bool TermDurationInSecondsHasBeenSet() const { return m_termDurationInSecondsHasBeenSet; } /** *

The duration of the term, in seconds.

*/ inline void SetTermDurationInSeconds(long long value) { m_termDurationInSecondsHasBeenSet = true; m_termDurationInSeconds = value; } /** *

The duration of the term, in seconds.

*/ inline SavingsPlan& WithTermDurationInSeconds(long long value) { SetTermDurationInSeconds(value); return *this;} /** *

One or more tags.

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

One or more tags.

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

One or more tags.

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

One or more tags.

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

One or more tags.

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

One or more tags.

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

One or more tags.

*/ inline SavingsPlan& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

One or more tags.

*/ inline SavingsPlan& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

One or more tags.

*/ inline SavingsPlan& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

One or more tags.

*/ inline SavingsPlan& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

One or more tags.

*/ inline SavingsPlan& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

One or more tags.

*/ inline SavingsPlan& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

One or more tags.

*/ inline SavingsPlan& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_offeringId; bool m_offeringIdHasBeenSet = false; Aws::String m_savingsPlanId; bool m_savingsPlanIdHasBeenSet = false; Aws::String m_savingsPlanArn; bool m_savingsPlanArnHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_start; bool m_startHasBeenSet = false; Aws::String m_end; bool m_endHasBeenSet = false; SavingsPlanState m_state; bool m_stateHasBeenSet = false; Aws::String m_region; bool m_regionHasBeenSet = false; Aws::String m_ec2InstanceFamily; bool m_ec2InstanceFamilyHasBeenSet = false; SavingsPlanType m_savingsPlanType; bool m_savingsPlanTypeHasBeenSet = false; SavingsPlanPaymentOption m_paymentOption; bool m_paymentOptionHasBeenSet = false; Aws::Vector m_productTypes; bool m_productTypesHasBeenSet = false; CurrencyCode m_currency; bool m_currencyHasBeenSet = false; Aws::String m_commitment; bool m_commitmentHasBeenSet = false; Aws::String m_upfrontPaymentAmount; bool m_upfrontPaymentAmountHasBeenSet = false; Aws::String m_recurringPaymentAmount; bool m_recurringPaymentAmountHasBeenSet = false; long long m_termDurationInSeconds; bool m_termDurationInSecondsHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace SavingsPlans } // namespace Aws