AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SpotPrice.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/InstanceType.h>
12#include <aws/ec2/model/RIProductDescription.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2 {
23namespace Model {
24
35class SpotPrice {
36 public:
37 AWS_EC2_API SpotPrice() = default;
38 AWS_EC2_API SpotPrice(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_EC2_API SpotPrice& 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
45
48 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
49 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
50 template <typename AvailabilityZoneT = Aws::String>
51 void SetAvailabilityZone(AvailabilityZoneT&& value) {
52 m_availabilityZoneHasBeenSet = true;
53 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
54 }
55 template <typename AvailabilityZoneT = Aws::String>
56 SpotPrice& WithAvailabilityZone(AvailabilityZoneT&& value) {
57 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
58 return *this;
59 }
61
63
66 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
67 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
68 template <typename AvailabilityZoneIdT = Aws::String>
69 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
70 m_availabilityZoneIdHasBeenSet = true;
71 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
72 }
73 template <typename AvailabilityZoneIdT = Aws::String>
74 SpotPrice& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
75 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
76 return *this;
77 }
79
81
84 inline InstanceType GetInstanceType() const { return m_instanceType; }
85 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
86 inline void SetInstanceType(InstanceType value) {
87 m_instanceTypeHasBeenSet = true;
88 m_instanceType = value;
89 }
91 SetInstanceType(value);
92 return *this;
93 }
95
97
100 inline RIProductDescription GetProductDescription() const { return m_productDescription; }
101 inline bool ProductDescriptionHasBeenSet() const { return m_productDescriptionHasBeenSet; }
103 m_productDescriptionHasBeenSet = true;
104 m_productDescription = value;
105 }
108 return *this;
109 }
111
113
121 inline const Aws::String& GetSpotPrice() const { return m_spotPrice; }
122 inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; }
123 template <typename SpotPriceT = Aws::String>
124 void SetSpotPrice(SpotPriceT&& value) {
125 m_spotPriceHasBeenSet = true;
126 m_spotPrice = std::forward<SpotPriceT>(value);
127 }
128 template <typename SpotPriceT = Aws::String>
129 SpotPrice& WithSpotPrice(SpotPriceT&& value) {
130 SetSpotPrice(std::forward<SpotPriceT>(value));
131 return *this;
132 }
134
136
140 inline const Aws::Utils::DateTime& GetTimestamp() const { return m_timestamp; }
141 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
142 template <typename TimestampT = Aws::Utils::DateTime>
143 void SetTimestamp(TimestampT&& value) {
144 m_timestampHasBeenSet = true;
145 m_timestamp = std::forward<TimestampT>(value);
146 }
147 template <typename TimestampT = Aws::Utils::DateTime>
148 SpotPrice& WithTimestamp(TimestampT&& value) {
149 SetTimestamp(std::forward<TimestampT>(value));
150 return *this;
151 }
153 private:
154 Aws::String m_availabilityZone;
155
156 Aws::String m_availabilityZoneId;
157
158 InstanceType m_instanceType{InstanceType::NOT_SET};
159
161
162 Aws::String m_spotPrice;
163
164 Aws::Utils::DateTime m_timestamp{};
165 bool m_availabilityZoneHasBeenSet = false;
166 bool m_availabilityZoneIdHasBeenSet = false;
167 bool m_instanceTypeHasBeenSet = false;
168 bool m_productDescriptionHasBeenSet = false;
169 bool m_spotPriceHasBeenSet = false;
170 bool m_timestampHasBeenSet = false;
171};
172
173} // namespace Model
174} // namespace EC2
175} // namespace Aws
void SetInstanceType(InstanceType value)
Definition SpotPrice.h:86
const Aws::String & GetAvailabilityZone() const
Definition SpotPrice.h:48
bool ProductDescriptionHasBeenSet() const
Definition SpotPrice.h:101
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition SpotPrice.h:51
AWS_EC2_API SpotPrice(const Aws::Utils::Xml::XmlNode &xmlNode)
bool AvailabilityZoneHasBeenSet() const
Definition SpotPrice.h:49
AWS_EC2_API SpotPrice & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool SpotPriceHasBeenSet() const
Definition SpotPrice.h:122
InstanceType GetInstanceType() const
Definition SpotPrice.h:84
bool InstanceTypeHasBeenSet() const
Definition SpotPrice.h:85
void SetSpotPrice(SpotPriceT &&value)
Definition SpotPrice.h:124
SpotPrice & WithTimestamp(TimestampT &&value)
Definition SpotPrice.h:148
const Aws::String & GetAvailabilityZoneId() const
Definition SpotPrice.h:66
SpotPrice & WithSpotPrice(SpotPriceT &&value)
Definition SpotPrice.h:129
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
SpotPrice & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition SpotPrice.h:74
void SetProductDescription(RIProductDescription value)
Definition SpotPrice.h:102
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition SpotPrice.h:69
const Aws::String & GetSpotPrice() const
Definition SpotPrice.h:121
bool TimestampHasBeenSet() const
Definition SpotPrice.h:141
SpotPrice & WithInstanceType(InstanceType value)
Definition SpotPrice.h:90
SpotPrice & WithProductDescription(RIProductDescription value)
Definition SpotPrice.h:106
RIProductDescription GetProductDescription() const
Definition SpotPrice.h:100
void SetTimestamp(TimestampT &&value)
Definition SpotPrice.h:143
SpotPrice & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition SpotPrice.h:56
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API SpotPrice()=default
bool AvailabilityZoneIdHasBeenSet() const
Definition SpotPrice.h:67
const Aws::Utils::DateTime & GetTimestamp() const
Definition SpotPrice.h:140
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream