1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/redshift/Redshift_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/redshift/model/ReservedNodeOfferingType.h> 12 #include <aws/redshift/model/RecurringCharge.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace Utils 18 { 19 namespace Xml 20 { 21 class XmlNode; 22 } // namespace Xml 23 } // namespace Utils 24 namespace Redshift 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>Describes a reserved node offering.</p><p><h3>See Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ReservedNodeOffering">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_REDSHIFT_API ReservedNodeOffering 35 { 36 public: 37 ReservedNodeOffering(); 38 ReservedNodeOffering(const Aws::Utils::Xml::XmlNode& xmlNode); 39 ReservedNodeOffering& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 40 41 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 42 void OutputToStream(Aws::OStream& oStream, const char* location) const; 43 44 45 /** 46 * <p>The offering identifier.</p> 47 */ GetReservedNodeOfferingId()48 inline const Aws::String& GetReservedNodeOfferingId() const{ return m_reservedNodeOfferingId; } 49 50 /** 51 * <p>The offering identifier.</p> 52 */ ReservedNodeOfferingIdHasBeenSet()53 inline bool ReservedNodeOfferingIdHasBeenSet() const { return m_reservedNodeOfferingIdHasBeenSet; } 54 55 /** 56 * <p>The offering identifier.</p> 57 */ SetReservedNodeOfferingId(const Aws::String & value)58 inline void SetReservedNodeOfferingId(const Aws::String& value) { m_reservedNodeOfferingIdHasBeenSet = true; m_reservedNodeOfferingId = value; } 59 60 /** 61 * <p>The offering identifier.</p> 62 */ SetReservedNodeOfferingId(Aws::String && value)63 inline void SetReservedNodeOfferingId(Aws::String&& value) { m_reservedNodeOfferingIdHasBeenSet = true; m_reservedNodeOfferingId = std::move(value); } 64 65 /** 66 * <p>The offering identifier.</p> 67 */ SetReservedNodeOfferingId(const char * value)68 inline void SetReservedNodeOfferingId(const char* value) { m_reservedNodeOfferingIdHasBeenSet = true; m_reservedNodeOfferingId.assign(value); } 69 70 /** 71 * <p>The offering identifier.</p> 72 */ WithReservedNodeOfferingId(const Aws::String & value)73 inline ReservedNodeOffering& WithReservedNodeOfferingId(const Aws::String& value) { SetReservedNodeOfferingId(value); return *this;} 74 75 /** 76 * <p>The offering identifier.</p> 77 */ WithReservedNodeOfferingId(Aws::String && value)78 inline ReservedNodeOffering& WithReservedNodeOfferingId(Aws::String&& value) { SetReservedNodeOfferingId(std::move(value)); return *this;} 79 80 /** 81 * <p>The offering identifier.</p> 82 */ WithReservedNodeOfferingId(const char * value)83 inline ReservedNodeOffering& WithReservedNodeOfferingId(const char* value) { SetReservedNodeOfferingId(value); return *this;} 84 85 86 /** 87 * <p>The node type offered by the reserved node offering.</p> 88 */ GetNodeType()89 inline const Aws::String& GetNodeType() const{ return m_nodeType; } 90 91 /** 92 * <p>The node type offered by the reserved node offering.</p> 93 */ NodeTypeHasBeenSet()94 inline bool NodeTypeHasBeenSet() const { return m_nodeTypeHasBeenSet; } 95 96 /** 97 * <p>The node type offered by the reserved node offering.</p> 98 */ SetNodeType(const Aws::String & value)99 inline void SetNodeType(const Aws::String& value) { m_nodeTypeHasBeenSet = true; m_nodeType = value; } 100 101 /** 102 * <p>The node type offered by the reserved node offering.</p> 103 */ SetNodeType(Aws::String && value)104 inline void SetNodeType(Aws::String&& value) { m_nodeTypeHasBeenSet = true; m_nodeType = std::move(value); } 105 106 /** 107 * <p>The node type offered by the reserved node offering.</p> 108 */ SetNodeType(const char * value)109 inline void SetNodeType(const char* value) { m_nodeTypeHasBeenSet = true; m_nodeType.assign(value); } 110 111 /** 112 * <p>The node type offered by the reserved node offering.</p> 113 */ WithNodeType(const Aws::String & value)114 inline ReservedNodeOffering& WithNodeType(const Aws::String& value) { SetNodeType(value); return *this;} 115 116 /** 117 * <p>The node type offered by the reserved node offering.</p> 118 */ WithNodeType(Aws::String && value)119 inline ReservedNodeOffering& WithNodeType(Aws::String&& value) { SetNodeType(std::move(value)); return *this;} 120 121 /** 122 * <p>The node type offered by the reserved node offering.</p> 123 */ WithNodeType(const char * value)124 inline ReservedNodeOffering& WithNodeType(const char* value) { SetNodeType(value); return *this;} 125 126 127 /** 128 * <p>The duration, in seconds, for which the offering will reserve the node.</p> 129 */ GetDuration()130 inline int GetDuration() const{ return m_duration; } 131 132 /** 133 * <p>The duration, in seconds, for which the offering will reserve the node.</p> 134 */ DurationHasBeenSet()135 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; } 136 137 /** 138 * <p>The duration, in seconds, for which the offering will reserve the node.</p> 139 */ SetDuration(int value)140 inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; } 141 142 /** 143 * <p>The duration, in seconds, for which the offering will reserve the node.</p> 144 */ WithDuration(int value)145 inline ReservedNodeOffering& WithDuration(int value) { SetDuration(value); return *this;} 146 147 148 /** 149 * <p>The upfront fixed charge you will pay to purchase the specific reserved node 150 * offering.</p> 151 */ GetFixedPrice()152 inline double GetFixedPrice() const{ return m_fixedPrice; } 153 154 /** 155 * <p>The upfront fixed charge you will pay to purchase the specific reserved node 156 * offering.</p> 157 */ FixedPriceHasBeenSet()158 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; } 159 160 /** 161 * <p>The upfront fixed charge you will pay to purchase the specific reserved node 162 * offering.</p> 163 */ SetFixedPrice(double value)164 inline void SetFixedPrice(double value) { m_fixedPriceHasBeenSet = true; m_fixedPrice = value; } 165 166 /** 167 * <p>The upfront fixed charge you will pay to purchase the specific reserved node 168 * offering.</p> 169 */ WithFixedPrice(double value)170 inline ReservedNodeOffering& WithFixedPrice(double value) { SetFixedPrice(value); return *this;} 171 172 173 /** 174 * <p>The rate you are charged for each hour the cluster that is using the offering 175 * is running.</p> 176 */ GetUsagePrice()177 inline double GetUsagePrice() const{ return m_usagePrice; } 178 179 /** 180 * <p>The rate you are charged for each hour the cluster that is using the offering 181 * is running.</p> 182 */ UsagePriceHasBeenSet()183 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; } 184 185 /** 186 * <p>The rate you are charged for each hour the cluster that is using the offering 187 * is running.</p> 188 */ SetUsagePrice(double value)189 inline void SetUsagePrice(double value) { m_usagePriceHasBeenSet = true; m_usagePrice = value; } 190 191 /** 192 * <p>The rate you are charged for each hour the cluster that is using the offering 193 * is running.</p> 194 */ WithUsagePrice(double value)195 inline ReservedNodeOffering& WithUsagePrice(double value) { SetUsagePrice(value); return *this;} 196 197 198 /** 199 * <p>The currency code for the compute nodes offering.</p> 200 */ GetCurrencyCode()201 inline const Aws::String& GetCurrencyCode() const{ return m_currencyCode; } 202 203 /** 204 * <p>The currency code for the compute nodes offering.</p> 205 */ CurrencyCodeHasBeenSet()206 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; } 207 208 /** 209 * <p>The currency code for the compute nodes offering.</p> 210 */ SetCurrencyCode(const Aws::String & value)211 inline void SetCurrencyCode(const Aws::String& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; } 212 213 /** 214 * <p>The currency code for the compute nodes offering.</p> 215 */ SetCurrencyCode(Aws::String && value)216 inline void SetCurrencyCode(Aws::String&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); } 217 218 /** 219 * <p>The currency code for the compute nodes offering.</p> 220 */ SetCurrencyCode(const char * value)221 inline void SetCurrencyCode(const char* value) { m_currencyCodeHasBeenSet = true; m_currencyCode.assign(value); } 222 223 /** 224 * <p>The currency code for the compute nodes offering.</p> 225 */ WithCurrencyCode(const Aws::String & value)226 inline ReservedNodeOffering& WithCurrencyCode(const Aws::String& value) { SetCurrencyCode(value); return *this;} 227 228 /** 229 * <p>The currency code for the compute nodes offering.</p> 230 */ WithCurrencyCode(Aws::String && value)231 inline ReservedNodeOffering& WithCurrencyCode(Aws::String&& value) { SetCurrencyCode(std::move(value)); return *this;} 232 233 /** 234 * <p>The currency code for the compute nodes offering.</p> 235 */ WithCurrencyCode(const char * value)236 inline ReservedNodeOffering& WithCurrencyCode(const char* value) { SetCurrencyCode(value); return *this;} 237 238 239 /** 240 * <p>The anticipated utilization of the reserved node, as defined in the reserved 241 * node offering.</p> 242 */ GetOfferingType()243 inline const Aws::String& GetOfferingType() const{ return m_offeringType; } 244 245 /** 246 * <p>The anticipated utilization of the reserved node, as defined in the reserved 247 * node offering.</p> 248 */ OfferingTypeHasBeenSet()249 inline bool OfferingTypeHasBeenSet() const { return m_offeringTypeHasBeenSet; } 250 251 /** 252 * <p>The anticipated utilization of the reserved node, as defined in the reserved 253 * node offering.</p> 254 */ SetOfferingType(const Aws::String & value)255 inline void SetOfferingType(const Aws::String& value) { m_offeringTypeHasBeenSet = true; m_offeringType = value; } 256 257 /** 258 * <p>The anticipated utilization of the reserved node, as defined in the reserved 259 * node offering.</p> 260 */ SetOfferingType(Aws::String && value)261 inline void SetOfferingType(Aws::String&& value) { m_offeringTypeHasBeenSet = true; m_offeringType = std::move(value); } 262 263 /** 264 * <p>The anticipated utilization of the reserved node, as defined in the reserved 265 * node offering.</p> 266 */ SetOfferingType(const char * value)267 inline void SetOfferingType(const char* value) { m_offeringTypeHasBeenSet = true; m_offeringType.assign(value); } 268 269 /** 270 * <p>The anticipated utilization of the reserved node, as defined in the reserved 271 * node offering.</p> 272 */ WithOfferingType(const Aws::String & value)273 inline ReservedNodeOffering& WithOfferingType(const Aws::String& value) { SetOfferingType(value); return *this;} 274 275 /** 276 * <p>The anticipated utilization of the reserved node, as defined in the reserved 277 * node offering.</p> 278 */ WithOfferingType(Aws::String && value)279 inline ReservedNodeOffering& WithOfferingType(Aws::String&& value) { SetOfferingType(std::move(value)); return *this;} 280 281 /** 282 * <p>The anticipated utilization of the reserved node, as defined in the reserved 283 * node offering.</p> 284 */ WithOfferingType(const char * value)285 inline ReservedNodeOffering& WithOfferingType(const char* value) { SetOfferingType(value); return *this;} 286 287 288 /** 289 * <p>The charge to your account regardless of whether you are creating any 290 * clusters using the node offering. Recurring charges are only in effect for 291 * heavy-utilization reserved nodes.</p> 292 */ GetRecurringCharges()293 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const{ return m_recurringCharges; } 294 295 /** 296 * <p>The charge to your account regardless of whether you are creating any 297 * clusters using the node offering. Recurring charges are only in effect for 298 * heavy-utilization reserved nodes.</p> 299 */ RecurringChargesHasBeenSet()300 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; } 301 302 /** 303 * <p>The charge to your account regardless of whether you are creating any 304 * clusters using the node offering. Recurring charges are only in effect for 305 * heavy-utilization reserved nodes.</p> 306 */ SetRecurringCharges(const Aws::Vector<RecurringCharge> & value)307 inline void SetRecurringCharges(const Aws::Vector<RecurringCharge>& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = value; } 308 309 /** 310 * <p>The charge to your account regardless of whether you are creating any 311 * clusters using the node offering. Recurring charges are only in effect for 312 * heavy-utilization reserved nodes.</p> 313 */ SetRecurringCharges(Aws::Vector<RecurringCharge> && value)314 inline void SetRecurringCharges(Aws::Vector<RecurringCharge>&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = std::move(value); } 315 316 /** 317 * <p>The charge to your account regardless of whether you are creating any 318 * clusters using the node offering. Recurring charges are only in effect for 319 * heavy-utilization reserved nodes.</p> 320 */ WithRecurringCharges(const Aws::Vector<RecurringCharge> & value)321 inline ReservedNodeOffering& WithRecurringCharges(const Aws::Vector<RecurringCharge>& value) { SetRecurringCharges(value); return *this;} 322 323 /** 324 * <p>The charge to your account regardless of whether you are creating any 325 * clusters using the node offering. Recurring charges are only in effect for 326 * heavy-utilization reserved nodes.</p> 327 */ WithRecurringCharges(Aws::Vector<RecurringCharge> && value)328 inline ReservedNodeOffering& WithRecurringCharges(Aws::Vector<RecurringCharge>&& value) { SetRecurringCharges(std::move(value)); return *this;} 329 330 /** 331 * <p>The charge to your account regardless of whether you are creating any 332 * clusters using the node offering. Recurring charges are only in effect for 333 * heavy-utilization reserved nodes.</p> 334 */ AddRecurringCharges(const RecurringCharge & value)335 inline ReservedNodeOffering& AddRecurringCharges(const RecurringCharge& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(value); return *this; } 336 337 /** 338 * <p>The charge to your account regardless of whether you are creating any 339 * clusters using the node offering. Recurring charges are only in effect for 340 * heavy-utilization reserved nodes.</p> 341 */ AddRecurringCharges(RecurringCharge && value)342 inline ReservedNodeOffering& AddRecurringCharges(RecurringCharge&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(std::move(value)); return *this; } 343 344 345 /** 346 * <p/> 347 */ GetReservedNodeOfferingType()348 inline const ReservedNodeOfferingType& GetReservedNodeOfferingType() const{ return m_reservedNodeOfferingType; } 349 350 /** 351 * <p/> 352 */ ReservedNodeOfferingTypeHasBeenSet()353 inline bool ReservedNodeOfferingTypeHasBeenSet() const { return m_reservedNodeOfferingTypeHasBeenSet; } 354 355 /** 356 * <p/> 357 */ SetReservedNodeOfferingType(const ReservedNodeOfferingType & value)358 inline void SetReservedNodeOfferingType(const ReservedNodeOfferingType& value) { m_reservedNodeOfferingTypeHasBeenSet = true; m_reservedNodeOfferingType = value; } 359 360 /** 361 * <p/> 362 */ SetReservedNodeOfferingType(ReservedNodeOfferingType && value)363 inline void SetReservedNodeOfferingType(ReservedNodeOfferingType&& value) { m_reservedNodeOfferingTypeHasBeenSet = true; m_reservedNodeOfferingType = std::move(value); } 364 365 /** 366 * <p/> 367 */ WithReservedNodeOfferingType(const ReservedNodeOfferingType & value)368 inline ReservedNodeOffering& WithReservedNodeOfferingType(const ReservedNodeOfferingType& value) { SetReservedNodeOfferingType(value); return *this;} 369 370 /** 371 * <p/> 372 */ WithReservedNodeOfferingType(ReservedNodeOfferingType && value)373 inline ReservedNodeOffering& WithReservedNodeOfferingType(ReservedNodeOfferingType&& value) { SetReservedNodeOfferingType(std::move(value)); return *this;} 374 375 private: 376 377 Aws::String m_reservedNodeOfferingId; 378 bool m_reservedNodeOfferingIdHasBeenSet; 379 380 Aws::String m_nodeType; 381 bool m_nodeTypeHasBeenSet; 382 383 int m_duration; 384 bool m_durationHasBeenSet; 385 386 double m_fixedPrice; 387 bool m_fixedPriceHasBeenSet; 388 389 double m_usagePrice; 390 bool m_usagePriceHasBeenSet; 391 392 Aws::String m_currencyCode; 393 bool m_currencyCodeHasBeenSet; 394 395 Aws::String m_offeringType; 396 bool m_offeringTypeHasBeenSet; 397 398 Aws::Vector<RecurringCharge> m_recurringCharges; 399 bool m_recurringChargesHasBeenSet; 400 401 ReservedNodeOfferingType m_reservedNodeOfferingType; 402 bool m_reservedNodeOfferingTypeHasBeenSet; 403 }; 404 405 } // namespace Model 406 } // namespace Redshift 407 } // namespace Aws 408