AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
CreateSavingsPlanRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/UUID.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/savingsplans/SavingsPlansRequest.h>
12#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
13
14#include <utility>
15
16namespace Aws {
17namespace SavingsPlans {
18namespace Model {
19
23 public:
24 AWS_SAVINGSPLANS_API CreateSavingsPlanRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "CreateSavingsPlan"; }
31
32 AWS_SAVINGSPLANS_API Aws::String SerializePayload() const override;
33
35
38 inline const Aws::String& GetSavingsPlanOfferingId() const { return m_savingsPlanOfferingId; }
39 inline bool SavingsPlanOfferingIdHasBeenSet() const { return m_savingsPlanOfferingIdHasBeenSet; }
40 template <typename SavingsPlanOfferingIdT = Aws::String>
41 void SetSavingsPlanOfferingId(SavingsPlanOfferingIdT&& value) {
42 m_savingsPlanOfferingIdHasBeenSet = true;
43 m_savingsPlanOfferingId = std::forward<SavingsPlanOfferingIdT>(value);
44 }
45 template <typename SavingsPlanOfferingIdT = Aws::String>
46 CreateSavingsPlanRequest& WithSavingsPlanOfferingId(SavingsPlanOfferingIdT&& value) {
47 SetSavingsPlanOfferingId(std::forward<SavingsPlanOfferingIdT>(value));
48 return *this;
49 }
51
53
58 inline const Aws::String& GetCommitment() const { return m_commitment; }
59 inline bool CommitmentHasBeenSet() const { return m_commitmentHasBeenSet; }
60 template <typename CommitmentT = Aws::String>
61 void SetCommitment(CommitmentT&& value) {
62 m_commitmentHasBeenSet = true;
63 m_commitment = std::forward<CommitmentT>(value);
64 }
65 template <typename CommitmentT = Aws::String>
67 SetCommitment(std::forward<CommitmentT>(value));
68 return *this;
69 }
71
73
78 inline const Aws::String& GetUpfrontPaymentAmount() const { return m_upfrontPaymentAmount; }
79 inline bool UpfrontPaymentAmountHasBeenSet() const { return m_upfrontPaymentAmountHasBeenSet; }
80 template <typename UpfrontPaymentAmountT = Aws::String>
81 void SetUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) {
82 m_upfrontPaymentAmountHasBeenSet = true;
83 m_upfrontPaymentAmount = std::forward<UpfrontPaymentAmountT>(value);
84 }
85 template <typename UpfrontPaymentAmountT = Aws::String>
86 CreateSavingsPlanRequest& WithUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) {
87 SetUpfrontPaymentAmount(std::forward<UpfrontPaymentAmountT>(value));
88 return *this;
89 }
91
93
97 inline const Aws::Utils::DateTime& GetPurchaseTime() const { return m_purchaseTime; }
98 inline bool PurchaseTimeHasBeenSet() const { return m_purchaseTimeHasBeenSet; }
99 template <typename PurchaseTimeT = Aws::Utils::DateTime>
100 void SetPurchaseTime(PurchaseTimeT&& value) {
101 m_purchaseTimeHasBeenSet = true;
102 m_purchaseTime = std::forward<PurchaseTimeT>(value);
103 }
104 template <typename PurchaseTimeT = Aws::Utils::DateTime>
106 SetPurchaseTime(std::forward<PurchaseTimeT>(value));
107 return *this;
108 }
110
112
116 inline const Aws::String& GetClientToken() const { return m_clientToken; }
117 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
118 template <typename ClientTokenT = Aws::String>
119 void SetClientToken(ClientTokenT&& value) {
120 m_clientTokenHasBeenSet = true;
121 m_clientToken = std::forward<ClientTokenT>(value);
122 }
123 template <typename ClientTokenT = Aws::String>
125 SetClientToken(std::forward<ClientTokenT>(value));
126 return *this;
127 }
129
131
134 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
135 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
136 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
137 void SetTags(TagsT&& value) {
138 m_tagsHasBeenSet = true;
139 m_tags = std::forward<TagsT>(value);
140 }
141 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
143 SetTags(std::forward<TagsT>(value));
144 return *this;
145 }
146 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
147 CreateSavingsPlanRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
148 m_tagsHasBeenSet = true;
149 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
150 return *this;
151 }
153 private:
154 Aws::String m_savingsPlanOfferingId;
155 bool m_savingsPlanOfferingIdHasBeenSet = false;
156
157 Aws::String m_commitment;
158 bool m_commitmentHasBeenSet = false;
159
160 Aws::String m_upfrontPaymentAmount;
161 bool m_upfrontPaymentAmountHasBeenSet = false;
162
163 Aws::Utils::DateTime m_purchaseTime{};
164 bool m_purchaseTimeHasBeenSet = false;
165
167 bool m_clientTokenHasBeenSet = true;
168
170 bool m_tagsHasBeenSet = false;
171};
172
173} // namespace Model
174} // namespace SavingsPlans
175} // 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