/** * 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 SavingsPlans { namespace Model { /** */ class CreateSavingsPlanRequest : public SavingsPlansRequest { public: AWS_SAVINGSPLANS_API CreateSavingsPlanRequest(); // 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 "CreateSavingsPlan"; } AWS_SAVINGSPLANS_API Aws::String SerializePayload() const override; /** *

The ID of the offering.

*/ inline const Aws::String& GetSavingsPlanOfferingId() const{ return m_savingsPlanOfferingId; } /** *

The ID of the offering.

*/ inline bool SavingsPlanOfferingIdHasBeenSet() const { return m_savingsPlanOfferingIdHasBeenSet; } /** *

The ID of the offering.

*/ inline void SetSavingsPlanOfferingId(const Aws::String& value) { m_savingsPlanOfferingIdHasBeenSet = true; m_savingsPlanOfferingId = value; } /** *

The ID of the offering.

*/ inline void SetSavingsPlanOfferingId(Aws::String&& value) { m_savingsPlanOfferingIdHasBeenSet = true; m_savingsPlanOfferingId = std::move(value); } /** *

The ID of the offering.

*/ inline void SetSavingsPlanOfferingId(const char* value) { m_savingsPlanOfferingIdHasBeenSet = true; m_savingsPlanOfferingId.assign(value); } /** *

The ID of the offering.

*/ inline CreateSavingsPlanRequest& WithSavingsPlanOfferingId(const Aws::String& value) { SetSavingsPlanOfferingId(value); return *this;} /** *

The ID of the offering.

*/ inline CreateSavingsPlanRequest& WithSavingsPlanOfferingId(Aws::String&& value) { SetSavingsPlanOfferingId(std::move(value)); return *this;} /** *

The ID of the offering.

*/ inline CreateSavingsPlanRequest& WithSavingsPlanOfferingId(const char* value) { SetSavingsPlanOfferingId(value); return *this;} /** *

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The hourly commitment, in USD. This is a value between 0.001 and 1 million. * You cannot specify more than five digits after the decimal point.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The up-front payment amount. This is a whole number between 50 and 99 percent * of the total value of the Savings Plan. This parameter is supported only if the * payment option is Partial Upfront.

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

The time at which to purchase the Savings Plan, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

*/ inline const Aws::Utils::DateTime& GetPurchaseTime() const{ return m_purchaseTime; } /** *

The time at which to purchase the Savings Plan, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

*/ inline bool PurchaseTimeHasBeenSet() const { return m_purchaseTimeHasBeenSet; } /** *

The time at which to purchase the Savings Plan, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

*/ inline void SetPurchaseTime(const Aws::Utils::DateTime& value) { m_purchaseTimeHasBeenSet = true; m_purchaseTime = value; } /** *

The time at which to purchase the Savings Plan, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

*/ inline void SetPurchaseTime(Aws::Utils::DateTime&& value) { m_purchaseTimeHasBeenSet = true; m_purchaseTime = std::move(value); } /** *

The time at which to purchase the Savings Plan, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

*/ inline CreateSavingsPlanRequest& WithPurchaseTime(const Aws::Utils::DateTime& value) { SetPurchaseTime(value); return *this;} /** *

The time at which to purchase the Savings Plan, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

*/ inline CreateSavingsPlanRequest& WithPurchaseTime(Aws::Utils::DateTime&& value) { SetPurchaseTime(std::move(value)); return *this;} /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

*/ 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.

*/ 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.

*/ 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.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request.

*/ inline CreateSavingsPlanRequest& WithClientToken(const char* value) { SetClientToken(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 CreateSavingsPlanRequest& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

One or more tags.

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

One or more tags.

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

One or more tags.

*/ inline CreateSavingsPlanRequest& 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 CreateSavingsPlanRequest& 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 CreateSavingsPlanRequest& 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 CreateSavingsPlanRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

One or more tags.

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

One or more tags.

*/ inline CreateSavingsPlanRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_savingsPlanOfferingId; bool m_savingsPlanOfferingIdHasBeenSet = false; Aws::String m_commitment; bool m_commitmentHasBeenSet = false; Aws::String m_upfrontPaymentAmount; bool m_upfrontPaymentAmountHasBeenSet = false; Aws::Utils::DateTime m_purchaseTime; bool m_purchaseTimeHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace SavingsPlans } // namespace Aws