AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Purchase.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/ec2/model/CurrencyCodeValues.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/ec2/model/PaymentOption.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_EC2_API Purchase();
38 AWS_EC2_API Purchase(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_EC2_API Purchase& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
51 inline const CurrencyCodeValues& GetCurrencyCode() const{ return m_currencyCode; }
52 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
53 inline void SetCurrencyCode(const CurrencyCodeValues& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
54 inline void SetCurrencyCode(CurrencyCodeValues&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
55 inline Purchase& WithCurrencyCode(const CurrencyCodeValues& value) { SetCurrencyCode(value); return *this;}
56 inline Purchase& WithCurrencyCode(CurrencyCodeValues&& value) { SetCurrencyCode(std::move(value)); return *this;}
58
60
63 inline int GetDuration() const{ return m_duration; }
64 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
65 inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
66 inline Purchase& WithDuration(int value) { SetDuration(value); return *this;}
68
70
73 inline const Aws::Vector<Aws::String>& GetHostIdSet() const{ return m_hostIdSet; }
74 inline bool HostIdSetHasBeenSet() const { return m_hostIdSetHasBeenSet; }
75 inline void SetHostIdSet(const Aws::Vector<Aws::String>& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = value; }
76 inline void SetHostIdSet(Aws::Vector<Aws::String>&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = std::move(value); }
77 inline Purchase& WithHostIdSet(const Aws::Vector<Aws::String>& value) { SetHostIdSet(value); return *this;}
78 inline Purchase& WithHostIdSet(Aws::Vector<Aws::String>&& value) { SetHostIdSet(std::move(value)); return *this;}
79 inline Purchase& AddHostIdSet(const Aws::String& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; }
80 inline Purchase& AddHostIdSet(Aws::String&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(std::move(value)); return *this; }
81 inline Purchase& AddHostIdSet(const char* value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; }
83
85
88 inline const Aws::String& GetHostReservationId() const{ return m_hostReservationId; }
89 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
90 inline void SetHostReservationId(const Aws::String& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = value; }
91 inline void SetHostReservationId(Aws::String&& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = std::move(value); }
92 inline void SetHostReservationId(const char* value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId.assign(value); }
93 inline Purchase& WithHostReservationId(const Aws::String& value) { SetHostReservationId(value); return *this;}
94 inline Purchase& WithHostReservationId(Aws::String&& value) { SetHostReservationId(std::move(value)); return *this;}
95 inline Purchase& WithHostReservationId(const char* value) { SetHostReservationId(value); return *this;}
97
99
102 inline const Aws::String& GetHourlyPrice() const{ return m_hourlyPrice; }
103 inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
104 inline void SetHourlyPrice(const Aws::String& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = value; }
105 inline void SetHourlyPrice(Aws::String&& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = std::move(value); }
106 inline void SetHourlyPrice(const char* value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice.assign(value); }
107 inline Purchase& WithHourlyPrice(const Aws::String& value) { SetHourlyPrice(value); return *this;}
108 inline Purchase& WithHourlyPrice(Aws::String&& value) { SetHourlyPrice(std::move(value)); return *this;}
109 inline Purchase& WithHourlyPrice(const char* value) { SetHourlyPrice(value); return *this;}
111
113
117 inline const Aws::String& GetInstanceFamily() const{ return m_instanceFamily; }
118 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
119 inline void SetInstanceFamily(const Aws::String& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = value; }
120 inline void SetInstanceFamily(Aws::String&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::move(value); }
121 inline void SetInstanceFamily(const char* value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily.assign(value); }
122 inline Purchase& WithInstanceFamily(const Aws::String& value) { SetInstanceFamily(value); return *this;}
123 inline Purchase& WithInstanceFamily(Aws::String&& value) { SetInstanceFamily(std::move(value)); return *this;}
124 inline Purchase& WithInstanceFamily(const char* value) { SetInstanceFamily(value); return *this;}
126
128
131 inline const PaymentOption& GetPaymentOption() const{ return m_paymentOption; }
132 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
133 inline void SetPaymentOption(const PaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
134 inline void SetPaymentOption(PaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
135 inline Purchase& WithPaymentOption(const PaymentOption& value) { SetPaymentOption(value); return *this;}
136 inline Purchase& WithPaymentOption(PaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
138
140
143 inline const Aws::String& GetUpfrontPrice() const{ return m_upfrontPrice; }
144 inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
145 inline void SetUpfrontPrice(const Aws::String& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = value; }
146 inline void SetUpfrontPrice(Aws::String&& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = std::move(value); }
147 inline void SetUpfrontPrice(const char* value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice.assign(value); }
148 inline Purchase& WithUpfrontPrice(const Aws::String& value) { SetUpfrontPrice(value); return *this;}
149 inline Purchase& WithUpfrontPrice(Aws::String&& value) { SetUpfrontPrice(std::move(value)); return *this;}
150 inline Purchase& WithUpfrontPrice(const char* value) { SetUpfrontPrice(value); return *this;}
152 private:
153
154 CurrencyCodeValues m_currencyCode;
155 bool m_currencyCodeHasBeenSet = false;
156
157 int m_duration;
158 bool m_durationHasBeenSet = false;
159
160 Aws::Vector<Aws::String> m_hostIdSet;
161 bool m_hostIdSetHasBeenSet = false;
162
163 Aws::String m_hostReservationId;
164 bool m_hostReservationIdHasBeenSet = false;
165
166 Aws::String m_hourlyPrice;
167 bool m_hourlyPriceHasBeenSet = false;
168
169 Aws::String m_instanceFamily;
170 bool m_instanceFamilyHasBeenSet = false;
171
172 PaymentOption m_paymentOption;
173 bool m_paymentOptionHasBeenSet = false;
174
175 Aws::String m_upfrontPrice;
176 bool m_upfrontPriceHasBeenSet = false;
177 };
178
179} // namespace Model
180} // namespace EC2
181} // namespace Aws
bool HourlyPriceHasBeenSet() const
Definition Purchase.h:103
void SetInstanceFamily(const Aws::String &value)
Definition Purchase.h:119
void SetInstanceFamily(Aws::String &&value)
Definition Purchase.h:120
const Aws::String & GetInstanceFamily() const
Definition Purchase.h:117
Purchase & WithCurrencyCode(CurrencyCodeValues &&value)
Definition Purchase.h:56
AWS_EC2_API Purchase & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Purchase & WithHostIdSet(const Aws::Vector< Aws::String > &value)
Definition Purchase.h:77
Purchase & AddHostIdSet(const char *value)
Definition Purchase.h:81
bool HostIdSetHasBeenSet() const
Definition Purchase.h:74
Purchase & WithHourlyPrice(const Aws::String &value)
Definition Purchase.h:107
const Aws::String & GetHostReservationId() const
Definition Purchase.h:88
void SetUpfrontPrice(const Aws::String &value)
Definition Purchase.h:145
Purchase & WithPaymentOption(PaymentOption &&value)
Definition Purchase.h:136
Purchase & WithHostIdSet(Aws::Vector< Aws::String > &&value)
Definition Purchase.h:78
void SetCurrencyCode(const CurrencyCodeValues &value)
Definition Purchase.h:53
void SetHourlyPrice(const char *value)
Definition Purchase.h:106
bool CurrencyCodeHasBeenSet() const
Definition Purchase.h:52
Purchase & WithHostReservationId(const Aws::String &value)
Definition Purchase.h:93
const Aws::Vector< Aws::String > & GetHostIdSet() const
Definition Purchase.h:73
void SetUpfrontPrice(const char *value)
Definition Purchase.h:147
void SetInstanceFamily(const char *value)
Definition Purchase.h:121
Purchase & WithUpfrontPrice(const Aws::String &value)
Definition Purchase.h:148
Purchase & WithPaymentOption(const PaymentOption &value)
Definition Purchase.h:135
void SetUpfrontPrice(Aws::String &&value)
Definition Purchase.h:146
AWS_EC2_API Purchase(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetPaymentOption(PaymentOption &&value)
Definition Purchase.h:134
bool InstanceFamilyHasBeenSet() const
Definition Purchase.h:118
int GetDuration() const
Definition Purchase.h:63
Purchase & WithUpfrontPrice(const char *value)
Definition Purchase.h:150
bool DurationHasBeenSet() const
Definition Purchase.h:64
Purchase & AddHostIdSet(const Aws::String &value)
Definition Purchase.h:79
void SetHostReservationId(const Aws::String &value)
Definition Purchase.h:90
Purchase & WithUpfrontPrice(Aws::String &&value)
Definition Purchase.h:149
Purchase & WithHostReservationId(Aws::String &&value)
Definition Purchase.h:94
void SetHourlyPrice(const Aws::String &value)
Definition Purchase.h:104
void SetHostIdSet(const Aws::Vector< Aws::String > &value)
Definition Purchase.h:75
const PaymentOption & GetPaymentOption() const
Definition Purchase.h:131
void SetCurrencyCode(CurrencyCodeValues &&value)
Definition Purchase.h:54
Purchase & WithInstanceFamily(Aws::String &&value)
Definition Purchase.h:123
Purchase & WithHourlyPrice(Aws::String &&value)
Definition Purchase.h:108
Purchase & WithHourlyPrice(const char *value)
Definition Purchase.h:109
void SetHostReservationId(const char *value)
Definition Purchase.h:92
Purchase & AddHostIdSet(Aws::String &&value)
Definition Purchase.h:80
void SetHostIdSet(Aws::Vector< Aws::String > &&value)
Definition Purchase.h:76
Purchase & WithHostReservationId(const char *value)
Definition Purchase.h:95
void SetHostReservationId(Aws::String &&value)
Definition Purchase.h:91
Purchase & WithInstanceFamily(const Aws::String &value)
Definition Purchase.h:122
bool UpfrontPriceHasBeenSet() const
Definition Purchase.h:144
void SetDuration(int value)
Definition Purchase.h:65
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool HostReservationIdHasBeenSet() const
Definition Purchase.h:89
Purchase & WithDuration(int value)
Definition Purchase.h:66
void SetHourlyPrice(Aws::String &&value)
Definition Purchase.h:105
const Aws::String & GetHourlyPrice() const
Definition Purchase.h:102
Purchase & WithCurrencyCode(const CurrencyCodeValues &value)
Definition Purchase.h:55
const Aws::String & GetUpfrontPrice() const
Definition Purchase.h:143
const CurrencyCodeValues & GetCurrencyCode() const
Definition Purchase.h:51
bool PaymentOptionHasBeenSet() const
Definition Purchase.h:132
void SetPaymentOption(const PaymentOption &value)
Definition Purchase.h:133
Purchase & WithInstanceFamily(const char *value)
Definition Purchase.h:124
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream