AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SpotMarketOptions.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/InstanceInterruptionBehavior.h>
12#include <aws/ec2/model/SpotInstanceType.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
31 public:
32 AWS_EC2_API SpotMarketOptions() = default;
33 AWS_EC2_API SpotMarketOptions(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
50 inline const Aws::String& GetMaxPrice() const { return m_maxPrice; }
51 inline bool MaxPriceHasBeenSet() const { return m_maxPriceHasBeenSet; }
52 template <typename MaxPriceT = Aws::String>
53 void SetMaxPrice(MaxPriceT&& value) {
54 m_maxPriceHasBeenSet = true;
55 m_maxPrice = std::forward<MaxPriceT>(value);
56 }
57 template <typename MaxPriceT = Aws::String>
58 SpotMarketOptions& WithMaxPrice(MaxPriceT&& value) {
59 SetMaxPrice(std::forward<MaxPriceT>(value));
60 return *this;
61 }
63
65
71 inline SpotInstanceType GetSpotInstanceType() const { return m_spotInstanceType; }
72 inline bool SpotInstanceTypeHasBeenSet() const { return m_spotInstanceTypeHasBeenSet; }
74 m_spotInstanceTypeHasBeenSet = true;
75 m_spotInstanceType = value;
76 }
79 return *this;
80 }
82
84
87 inline int GetBlockDurationMinutes() const { return m_blockDurationMinutes; }
88 inline bool BlockDurationMinutesHasBeenSet() const { return m_blockDurationMinutesHasBeenSet; }
89 inline void SetBlockDurationMinutes(int value) {
90 m_blockDurationMinutesHasBeenSet = true;
91 m_blockDurationMinutes = value;
92 }
95 return *this;
96 }
98
100
110 inline const Aws::Utils::DateTime& GetValidUntil() const { return m_validUntil; }
111 inline bool ValidUntilHasBeenSet() const { return m_validUntilHasBeenSet; }
112 template <typename ValidUntilT = Aws::Utils::DateTime>
113 void SetValidUntil(ValidUntilT&& value) {
114 m_validUntilHasBeenSet = true;
115 m_validUntil = std::forward<ValidUntilT>(value);
116 }
117 template <typename ValidUntilT = Aws::Utils::DateTime>
118 SpotMarketOptions& WithValidUntil(ValidUntilT&& value) {
119 SetValidUntil(std::forward<ValidUntilT>(value));
120 return *this;
121 }
123
125
142 inline InstanceInterruptionBehavior GetInstanceInterruptionBehavior() const { return m_instanceInterruptionBehavior; }
143 inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
145 m_instanceInterruptionBehaviorHasBeenSet = true;
146 m_instanceInterruptionBehavior = value;
147 }
150 return *this;
151 }
153 private:
154 Aws::String m_maxPrice;
155
157
158 int m_blockDurationMinutes{0};
159
160 Aws::Utils::DateTime m_validUntil{};
161
163 bool m_maxPriceHasBeenSet = false;
164 bool m_spotInstanceTypeHasBeenSet = false;
165 bool m_blockDurationMinutesHasBeenSet = false;
166 bool m_validUntilHasBeenSet = false;
167 bool m_instanceInterruptionBehaviorHasBeenSet = false;
168};
169
170} // namespace Model
171} // namespace EC2
172} // namespace Aws
void SetValidUntil(ValidUntilT &&value)
SpotMarketOptions & WithSpotInstanceType(SpotInstanceType value)
SpotMarketOptions & WithValidUntil(ValidUntilT &&value)
SpotInstanceType GetSpotInstanceType() const
SpotMarketOptions & WithInstanceInterruptionBehavior(InstanceInterruptionBehavior value)
AWS_EC2_API SpotMarketOptions & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
SpotMarketOptions & WithMaxPrice(MaxPriceT &&value)
void SetInstanceInterruptionBehavior(InstanceInterruptionBehavior value)
SpotMarketOptions & WithBlockDurationMinutes(int value)
const Aws::String & GetMaxPrice() const
const Aws::Utils::DateTime & GetValidUntil() const
void SetSpotInstanceType(SpotInstanceType value)
AWS_EC2_API SpotMarketOptions(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API SpotMarketOptions()=default
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
InstanceInterruptionBehavior GetInstanceInterruptionBehavior() const
void SetMaxPrice(MaxPriceT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream