AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CapacityBlock.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/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/CapacityBlockResourceState.h>
13#include <aws/ec2/model/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2 {
24namespace Model {
25
41 public:
42 AWS_EC2_API CapacityBlock() = default;
43 AWS_EC2_API CapacityBlock(const Aws::Utils::Xml::XmlNode& xmlNode);
44 AWS_EC2_API CapacityBlock& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45
46 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
48
50
53 inline const Aws::String& GetCapacityBlockId() const { return m_capacityBlockId; }
54 inline bool CapacityBlockIdHasBeenSet() const { return m_capacityBlockIdHasBeenSet; }
55 template <typename CapacityBlockIdT = Aws::String>
56 void SetCapacityBlockId(CapacityBlockIdT&& value) {
57 m_capacityBlockIdHasBeenSet = true;
58 m_capacityBlockId = std::forward<CapacityBlockIdT>(value);
59 }
60 template <typename CapacityBlockIdT = Aws::String>
61 CapacityBlock& WithCapacityBlockId(CapacityBlockIdT&& value) {
62 SetCapacityBlockId(std::forward<CapacityBlockIdT>(value));
63 return *this;
64 }
66
68
71 inline const Aws::String& GetUltraserverType() const { return m_ultraserverType; }
72 inline bool UltraserverTypeHasBeenSet() const { return m_ultraserverTypeHasBeenSet; }
73 template <typename UltraserverTypeT = Aws::String>
74 void SetUltraserverType(UltraserverTypeT&& value) {
75 m_ultraserverTypeHasBeenSet = true;
76 m_ultraserverType = std::forward<UltraserverTypeT>(value);
77 }
78 template <typename UltraserverTypeT = Aws::String>
79 CapacityBlock& WithUltraserverType(UltraserverTypeT&& value) {
80 SetUltraserverType(std::forward<UltraserverTypeT>(value));
81 return *this;
82 }
84
86
89 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
90 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
91 template <typename AvailabilityZoneT = Aws::String>
92 void SetAvailabilityZone(AvailabilityZoneT&& value) {
93 m_availabilityZoneHasBeenSet = true;
94 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
95 }
96 template <typename AvailabilityZoneT = Aws::String>
97 CapacityBlock& WithAvailabilityZone(AvailabilityZoneT&& value) {
98 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
99 return *this;
100 }
102
104
107 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
108 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
109 template <typename AvailabilityZoneIdT = Aws::String>
110 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
111 m_availabilityZoneIdHasBeenSet = true;
112 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
113 }
114 template <typename AvailabilityZoneIdT = Aws::String>
115 CapacityBlock& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
116 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
117 return *this;
118 }
120
122
125 inline const Aws::Vector<Aws::String>& GetCapacityReservationIds() const { return m_capacityReservationIds; }
126 inline bool CapacityReservationIdsHasBeenSet() const { return m_capacityReservationIdsHasBeenSet; }
127 template <typename CapacityReservationIdsT = Aws::Vector<Aws::String>>
128 void SetCapacityReservationIds(CapacityReservationIdsT&& value) {
129 m_capacityReservationIdsHasBeenSet = true;
130 m_capacityReservationIds = std::forward<CapacityReservationIdsT>(value);
131 }
132 template <typename CapacityReservationIdsT = Aws::Vector<Aws::String>>
133 CapacityBlock& WithCapacityReservationIds(CapacityReservationIdsT&& value) {
134 SetCapacityReservationIds(std::forward<CapacityReservationIdsT>(value));
135 return *this;
136 }
137 template <typename CapacityReservationIdsT = Aws::String>
138 CapacityBlock& AddCapacityReservationIds(CapacityReservationIdsT&& value) {
139 m_capacityReservationIdsHasBeenSet = true;
140 m_capacityReservationIds.emplace_back(std::forward<CapacityReservationIdsT>(value));
141 return *this;
142 }
144
146
149 inline const Aws::Utils::DateTime& GetStartDate() const { return m_startDate; }
150 inline bool StartDateHasBeenSet() const { return m_startDateHasBeenSet; }
151 template <typename StartDateT = Aws::Utils::DateTime>
152 void SetStartDate(StartDateT&& value) {
153 m_startDateHasBeenSet = true;
154 m_startDate = std::forward<StartDateT>(value);
155 }
156 template <typename StartDateT = Aws::Utils::DateTime>
157 CapacityBlock& WithStartDate(StartDateT&& value) {
158 SetStartDate(std::forward<StartDateT>(value));
159 return *this;
160 }
162
164
168 inline const Aws::Utils::DateTime& GetEndDate() const { return m_endDate; }
169 inline bool EndDateHasBeenSet() const { return m_endDateHasBeenSet; }
170 template <typename EndDateT = Aws::Utils::DateTime>
171 void SetEndDate(EndDateT&& value) {
172 m_endDateHasBeenSet = true;
173 m_endDate = std::forward<EndDateT>(value);
174 }
175 template <typename EndDateT = Aws::Utils::DateTime>
176 CapacityBlock& WithEndDate(EndDateT&& value) {
177 SetEndDate(std::forward<EndDateT>(value));
178 return *this;
179 }
181
183
186 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
187 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
188 template <typename CreateDateT = Aws::Utils::DateTime>
189 void SetCreateDate(CreateDateT&& value) {
190 m_createDateHasBeenSet = true;
191 m_createDate = std::forward<CreateDateT>(value);
192 }
193 template <typename CreateDateT = Aws::Utils::DateTime>
194 CapacityBlock& WithCreateDate(CreateDateT&& value) {
195 SetCreateDate(std::forward<CreateDateT>(value));
196 return *this;
197 }
199
201
204 inline CapacityBlockResourceState GetState() const { return m_state; }
205 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
207 m_stateHasBeenSet = true;
208 m_state = value;
209 }
211 SetState(value);
212 return *this;
213 }
215
217
220 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
221 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
222 template <typename TagsT = Aws::Vector<Tag>>
223 void SetTags(TagsT&& value) {
224 m_tagsHasBeenSet = true;
225 m_tags = std::forward<TagsT>(value);
226 }
227 template <typename TagsT = Aws::Vector<Tag>>
228 CapacityBlock& WithTags(TagsT&& value) {
229 SetTags(std::forward<TagsT>(value));
230 return *this;
231 }
232 template <typename TagsT = Tag>
233 CapacityBlock& AddTags(TagsT&& value) {
234 m_tagsHasBeenSet = true;
235 m_tags.emplace_back(std::forward<TagsT>(value));
236 return *this;
237 }
239 private:
240 Aws::String m_capacityBlockId;
241
242 Aws::String m_ultraserverType;
243
244 Aws::String m_availabilityZone;
245
246 Aws::String m_availabilityZoneId;
247
248 Aws::Vector<Aws::String> m_capacityReservationIds;
249
250 Aws::Utils::DateTime m_startDate{};
251
252 Aws::Utils::DateTime m_endDate{};
253
254 Aws::Utils::DateTime m_createDate{};
255
257
258 Aws::Vector<Tag> m_tags;
259 bool m_capacityBlockIdHasBeenSet = false;
260 bool m_ultraserverTypeHasBeenSet = false;
261 bool m_availabilityZoneHasBeenSet = false;
262 bool m_availabilityZoneIdHasBeenSet = false;
263 bool m_capacityReservationIdsHasBeenSet = false;
264 bool m_startDateHasBeenSet = false;
265 bool m_endDateHasBeenSet = false;
266 bool m_createDateHasBeenSet = false;
267 bool m_stateHasBeenSet = false;
268 bool m_tagsHasBeenSet = false;
269};
270
271} // namespace Model
272} // namespace EC2
273} // namespace Aws
void SetUltraserverType(UltraserverTypeT &&value)
const Aws::String & GetUltraserverType() const
CapacityBlock & AddTags(TagsT &&value)
CapacityBlock & WithAvailabilityZone(AvailabilityZoneT &&value)
CapacityBlockResourceState GetState() const
CapacityBlock & WithTags(TagsT &&value)
CapacityBlock & WithCreateDate(CreateDateT &&value)
CapacityBlock & WithStartDate(StartDateT &&value)
bool CapacityReservationIdsHasBeenSet() const
const Aws::String & GetAvailabilityZone() const
const Aws::Utils::DateTime & GetStartDate() const
CapacityBlock & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
CapacityBlock & WithCapacityReservationIds(CapacityReservationIdsT &&value)
void SetState(CapacityBlockResourceState value)
void SetCreateDate(CreateDateT &&value)
const Aws::Utils::DateTime & GetCreateDate() const
void SetCapacityReservationIds(CapacityReservationIdsT &&value)
const Aws::String & GetAvailabilityZoneId() const
const Aws::Utils::DateTime & GetEndDate() const
AWS_EC2_API CapacityBlock & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< Aws::String > & GetCapacityReservationIds() const
CapacityBlock & WithEndDate(EndDateT &&value)
void SetCapacityBlockId(CapacityBlockIdT &&value)
CapacityBlock & WithCapacityBlockId(CapacityBlockIdT &&value)
const Aws::String & GetCapacityBlockId() const
AWS_EC2_API CapacityBlock(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
CapacityBlock & WithState(CapacityBlockResourceState value)
CapacityBlock & WithUltraserverType(UltraserverTypeT &&value)
const Aws::Vector< Tag > & GetTags() const
void SetAvailabilityZone(AvailabilityZoneT &&value)
void SetStartDate(StartDateT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API CapacityBlock()=default
CapacityBlock & AddCapacityReservationIds(CapacityReservationIdsT &&value)
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
void SetEndDate(EndDateT &&value)
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