AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SavingsPlanOffering.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
10#include <aws/savingsplans/model/CurrencyCode.h>
11#include <aws/savingsplans/model/SavingsPlanOfferingProperty.h>
12#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
13#include <aws/savingsplans/model/SavingsPlanProductType.h>
14#include <aws/savingsplans/model/SavingsPlanType.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace SavingsPlans {
26namespace Model {
27
34 public:
35 AWS_SAVINGSPLANS_API SavingsPlanOffering() = default;
36 AWS_SAVINGSPLANS_API SavingsPlanOffering(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SAVINGSPLANS_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::String& GetOfferingId() const { return m_offeringId; }
45 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
46 template <typename OfferingIdT = Aws::String>
47 void SetOfferingId(OfferingIdT&& value) {
48 m_offeringIdHasBeenSet = true;
49 m_offeringId = std::forward<OfferingIdT>(value);
50 }
51 template <typename OfferingIdT = Aws::String>
52 SavingsPlanOffering& WithOfferingId(OfferingIdT&& value) {
53 SetOfferingId(std::forward<OfferingIdT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::Vector<SavingsPlanProductType>& GetProductTypes() const { return m_productTypes; }
63 inline bool ProductTypesHasBeenSet() const { return m_productTypesHasBeenSet; }
64 template <typename ProductTypesT = Aws::Vector<SavingsPlanProductType>>
65 void SetProductTypes(ProductTypesT&& value) {
66 m_productTypesHasBeenSet = true;
67 m_productTypes = std::forward<ProductTypesT>(value);
68 }
69 template <typename ProductTypesT = Aws::Vector<SavingsPlanProductType>>
70 SavingsPlanOffering& WithProductTypes(ProductTypesT&& value) {
71 SetProductTypes(std::forward<ProductTypesT>(value));
72 return *this;
73 }
75 m_productTypesHasBeenSet = true;
76 m_productTypes.push_back(value);
77 return *this;
78 }
80
82
85 inline SavingsPlanType GetPlanType() const { return m_planType; }
86 inline bool PlanTypeHasBeenSet() const { return m_planTypeHasBeenSet; }
87 inline void SetPlanType(SavingsPlanType value) {
88 m_planTypeHasBeenSet = true;
89 m_planType = value;
90 }
92 SetPlanType(value);
93 return *this;
94 }
96
98
101 inline const Aws::String& GetDescription() const { return m_description; }
102 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
103 template <typename DescriptionT = Aws::String>
104 void SetDescription(DescriptionT&& value) {
105 m_descriptionHasBeenSet = true;
106 m_description = std::forward<DescriptionT>(value);
107 }
108 template <typename DescriptionT = Aws::String>
109 SavingsPlanOffering& WithDescription(DescriptionT&& value) {
110 SetDescription(std::forward<DescriptionT>(value));
111 return *this;
112 }
114
116
119 inline SavingsPlanPaymentOption GetPaymentOption() const { return m_paymentOption; }
120 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
122 m_paymentOptionHasBeenSet = true;
123 m_paymentOption = value;
124 }
126 SetPaymentOption(value);
127 return *this;
128 }
130
132
135 inline long long GetDurationSeconds() const { return m_durationSeconds; }
136 inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
137 inline void SetDurationSeconds(long long value) {
138 m_durationSecondsHasBeenSet = true;
139 m_durationSeconds = value;
140 }
141 inline SavingsPlanOffering& WithDurationSeconds(long long value) {
142 SetDurationSeconds(value);
143 return *this;
144 }
146
148
151 inline CurrencyCode GetCurrency() const { return m_currency; }
152 inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
153 inline void SetCurrency(CurrencyCode value) {
154 m_currencyHasBeenSet = true;
155 m_currency = value;
156 }
158 SetCurrency(value);
159 return *this;
160 }
162
164
167 inline const Aws::String& GetServiceCode() const { return m_serviceCode; }
168 inline bool ServiceCodeHasBeenSet() const { return m_serviceCodeHasBeenSet; }
169 template <typename ServiceCodeT = Aws::String>
170 void SetServiceCode(ServiceCodeT&& value) {
171 m_serviceCodeHasBeenSet = true;
172 m_serviceCode = std::forward<ServiceCodeT>(value);
173 }
174 template <typename ServiceCodeT = Aws::String>
175 SavingsPlanOffering& WithServiceCode(ServiceCodeT&& value) {
176 SetServiceCode(std::forward<ServiceCodeT>(value));
177 return *this;
178 }
180
182
185 inline const Aws::String& GetUsageType() const { return m_usageType; }
186 inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
187 template <typename UsageTypeT = Aws::String>
188 void SetUsageType(UsageTypeT&& value) {
189 m_usageTypeHasBeenSet = true;
190 m_usageType = std::forward<UsageTypeT>(value);
191 }
192 template <typename UsageTypeT = Aws::String>
193 SavingsPlanOffering& WithUsageType(UsageTypeT&& value) {
194 SetUsageType(std::forward<UsageTypeT>(value));
195 return *this;
196 }
198
200
204 inline const Aws::String& GetOperation() const { return m_operation; }
205 inline bool OperationHasBeenSet() const { return m_operationHasBeenSet; }
206 template <typename OperationT = Aws::String>
207 void SetOperation(OperationT&& value) {
208 m_operationHasBeenSet = true;
209 m_operation = std::forward<OperationT>(value);
210 }
211 template <typename OperationT = Aws::String>
212 SavingsPlanOffering& WithOperation(OperationT&& value) {
213 SetOperation(std::forward<OperationT>(value));
214 return *this;
215 }
217
219
222 inline const Aws::Vector<SavingsPlanOfferingProperty>& GetProperties() const { return m_properties; }
223 inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
224 template <typename PropertiesT = Aws::Vector<SavingsPlanOfferingProperty>>
225 void SetProperties(PropertiesT&& value) {
226 m_propertiesHasBeenSet = true;
227 m_properties = std::forward<PropertiesT>(value);
228 }
229 template <typename PropertiesT = Aws::Vector<SavingsPlanOfferingProperty>>
230 SavingsPlanOffering& WithProperties(PropertiesT&& value) {
231 SetProperties(std::forward<PropertiesT>(value));
232 return *this;
233 }
234 template <typename PropertiesT = SavingsPlanOfferingProperty>
235 SavingsPlanOffering& AddProperties(PropertiesT&& value) {
236 m_propertiesHasBeenSet = true;
237 m_properties.emplace_back(std::forward<PropertiesT>(value));
238 return *this;
239 }
241 private:
242 Aws::String m_offeringId;
243
245
247
248 Aws::String m_description;
249
251
252 long long m_durationSeconds{0};
253
255
256 Aws::String m_serviceCode;
257
258 Aws::String m_usageType;
259
260 Aws::String m_operation;
261
263 bool m_offeringIdHasBeenSet = false;
264 bool m_productTypesHasBeenSet = false;
265 bool m_planTypeHasBeenSet = false;
266 bool m_descriptionHasBeenSet = false;
267 bool m_paymentOptionHasBeenSet = false;
268 bool m_durationSecondsHasBeenSet = false;
269 bool m_currencyHasBeenSet = false;
270 bool m_serviceCodeHasBeenSet = false;
271 bool m_usageTypeHasBeenSet = false;
272 bool m_operationHasBeenSet = false;
273 bool m_propertiesHasBeenSet = false;
274};
275
276} // namespace Model
277} // namespace SavingsPlans
278} // namespace Aws
SavingsPlanOffering & WithOperation(OperationT &&value)
SavingsPlanOffering & WithCurrency(CurrencyCode value)
AWS_SAVINGSPLANS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< SavingsPlanProductType > & GetProductTypes() const
AWS_SAVINGSPLANS_API SavingsPlanOffering(Aws::Utils::Json::JsonView jsonValue)
SavingsPlanOffering & WithServiceCode(ServiceCodeT &&value)
SavingsPlanOffering & AddProperties(PropertiesT &&value)
SavingsPlanOffering & WithProductTypes(ProductTypesT &&value)
SavingsPlanOffering & WithDescription(DescriptionT &&value)
SavingsPlanOffering & WithPaymentOption(SavingsPlanPaymentOption value)
SavingsPlanOffering & WithOfferingId(OfferingIdT &&value)
AWS_SAVINGSPLANS_API SavingsPlanOffering()=default
SavingsPlanOffering & WithDurationSeconds(long long value)
void SetPaymentOption(SavingsPlanPaymentOption value)
SavingsPlanOffering & WithProperties(PropertiesT &&value)
const Aws::Vector< SavingsPlanOfferingProperty > & GetProperties() const
SavingsPlanOffering & WithPlanType(SavingsPlanType value)
SavingsPlanOffering & AddProductTypes(SavingsPlanProductType value)
SavingsPlanOffering & WithUsageType(UsageTypeT &&value)
SavingsPlanPaymentOption GetPaymentOption() const
AWS_SAVINGSPLANS_API SavingsPlanOffering & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue