AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateSavingsPlanRequest.h
1
6#pragma once
7#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
8#include <aws/savingsplans/SavingsPlansRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <utility>
13#include <aws/core/utils/UUID.h>
14
15namespace Aws
16{
17namespace SavingsPlans
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_SAVINGSPLANS_API CreateSavingsPlanRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateSavingsPlan"; }
34
35 AWS_SAVINGSPLANS_API Aws::String SerializePayload() const override;
36
37
39
42 inline const Aws::String& GetSavingsPlanOfferingId() const { return m_savingsPlanOfferingId; }
43 inline bool SavingsPlanOfferingIdHasBeenSet() const { return m_savingsPlanOfferingIdHasBeenSet; }
44 template<typename SavingsPlanOfferingIdT = Aws::String>
45 void SetSavingsPlanOfferingId(SavingsPlanOfferingIdT&& value) { m_savingsPlanOfferingIdHasBeenSet = true; m_savingsPlanOfferingId = std::forward<SavingsPlanOfferingIdT>(value); }
46 template<typename SavingsPlanOfferingIdT = Aws::String>
47 CreateSavingsPlanRequest& WithSavingsPlanOfferingId(SavingsPlanOfferingIdT&& value) { SetSavingsPlanOfferingId(std::forward<SavingsPlanOfferingIdT>(value)); return *this;}
49
51
56 inline const Aws::String& GetCommitment() const { return m_commitment; }
57 inline bool CommitmentHasBeenSet() const { return m_commitmentHasBeenSet; }
58 template<typename CommitmentT = Aws::String>
59 void SetCommitment(CommitmentT&& value) { m_commitmentHasBeenSet = true; m_commitment = std::forward<CommitmentT>(value); }
60 template<typename CommitmentT = Aws::String>
61 CreateSavingsPlanRequest& WithCommitment(CommitmentT&& value) { SetCommitment(std::forward<CommitmentT>(value)); return *this;}
63
65
70 inline const Aws::String& GetUpfrontPaymentAmount() const { return m_upfrontPaymentAmount; }
71 inline bool UpfrontPaymentAmountHasBeenSet() const { return m_upfrontPaymentAmountHasBeenSet; }
72 template<typename UpfrontPaymentAmountT = Aws::String>
73 void SetUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = std::forward<UpfrontPaymentAmountT>(value); }
74 template<typename UpfrontPaymentAmountT = Aws::String>
75 CreateSavingsPlanRequest& WithUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) { SetUpfrontPaymentAmount(std::forward<UpfrontPaymentAmountT>(value)); return *this;}
77
79
83 inline const Aws::Utils::DateTime& GetPurchaseTime() const { return m_purchaseTime; }
84 inline bool PurchaseTimeHasBeenSet() const { return m_purchaseTimeHasBeenSet; }
85 template<typename PurchaseTimeT = Aws::Utils::DateTime>
86 void SetPurchaseTime(PurchaseTimeT&& value) { m_purchaseTimeHasBeenSet = true; m_purchaseTime = std::forward<PurchaseTimeT>(value); }
87 template<typename PurchaseTimeT = Aws::Utils::DateTime>
88 CreateSavingsPlanRequest& WithPurchaseTime(PurchaseTimeT&& value) { SetPurchaseTime(std::forward<PurchaseTimeT>(value)); return *this;}
90
92
96 inline const Aws::String& GetClientToken() const { return m_clientToken; }
97 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
98 template<typename ClientTokenT = Aws::String>
99 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
100 template<typename ClientTokenT = Aws::String>
101 CreateSavingsPlanRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
103
105
108 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
109 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
110 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
111 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
112 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
113 CreateSavingsPlanRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
114 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
115 CreateSavingsPlanRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
116 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
117 }
119 private:
120
121 Aws::String m_savingsPlanOfferingId;
122 bool m_savingsPlanOfferingIdHasBeenSet = false;
123
124 Aws::String m_commitment;
125 bool m_commitmentHasBeenSet = false;
126
127 Aws::String m_upfrontPaymentAmount;
128 bool m_upfrontPaymentAmountHasBeenSet = false;
129
130 Aws::Utils::DateTime m_purchaseTime{};
131 bool m_purchaseTimeHasBeenSet = false;
132
134 bool m_clientTokenHasBeenSet = true;
135
137 bool m_tagsHasBeenSet = false;
138 };
139
140} // namespace Model
141} // namespace SavingsPlans
142} // namespace Aws
AWS_SAVINGSPLANS_API CreateSavingsPlanRequest()=default
void SetSavingsPlanOfferingId(SavingsPlanOfferingIdT &&value)
CreateSavingsPlanRequest & WithUpfrontPaymentAmount(UpfrontPaymentAmountT &&value)
AWS_SAVINGSPLANS_API Aws::String SerializePayload() const override
CreateSavingsPlanRequest & WithPurchaseTime(PurchaseTimeT &&value)
CreateSavingsPlanRequest & WithCommitment(CommitmentT &&value)
CreateSavingsPlanRequest & WithSavingsPlanOfferingId(SavingsPlanOfferingIdT &&value)
CreateSavingsPlanRequest & WithClientToken(ClientTokenT &&value)
virtual const char * GetServiceRequestName() const override
CreateSavingsPlanRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
void SetUpfrontPaymentAmount(UpfrontPaymentAmountT &&value)
CreateSavingsPlanRequest & WithTags(TagsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
static Aws::Utils::UUID PseudoRandomUUID()
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String