AWS SDK for C++  1.9.70
AWS SDK for C++
Reservation.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
13 #include <aws/ec2/model/Instance.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace Utils
19 {
20 namespace Xml
21 {
22  class XmlNode;
23 } // namespace Xml
24 } // namespace Utils
25 namespace EC2
26 {
27 namespace Model
28 {
29 
38  {
39  public:
43 
44  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45  void OutputToStream(Aws::OStream& oStream, const char* location) const;
46 
47 
51  inline const Aws::Vector<GroupIdentifier>& GetGroups() const{ return m_groups; }
52 
56  inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
57 
61  inline void SetGroups(const Aws::Vector<GroupIdentifier>& value) { m_groupsHasBeenSet = true; m_groups = value; }
62 
66  inline void SetGroups(Aws::Vector<GroupIdentifier>&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); }
67 
71  inline Reservation& WithGroups(const Aws::Vector<GroupIdentifier>& value) { SetGroups(value); return *this;}
72 
76  inline Reservation& WithGroups(Aws::Vector<GroupIdentifier>&& value) { SetGroups(std::move(value)); return *this;}
77 
81  inline Reservation& AddGroups(const GroupIdentifier& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; }
82 
86  inline Reservation& AddGroups(GroupIdentifier&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; }
87 
88 
92  inline const Aws::Vector<Instance>& GetInstances() const{ return m_instances; }
93 
97  inline bool InstancesHasBeenSet() const { return m_instancesHasBeenSet; }
98 
102  inline void SetInstances(const Aws::Vector<Instance>& value) { m_instancesHasBeenSet = true; m_instances = value; }
103 
107  inline void SetInstances(Aws::Vector<Instance>&& value) { m_instancesHasBeenSet = true; m_instances = std::move(value); }
108 
112  inline Reservation& WithInstances(const Aws::Vector<Instance>& value) { SetInstances(value); return *this;}
113 
117  inline Reservation& WithInstances(Aws::Vector<Instance>&& value) { SetInstances(std::move(value)); return *this;}
118 
122  inline Reservation& AddInstances(const Instance& value) { m_instancesHasBeenSet = true; m_instances.push_back(value); return *this; }
123 
127  inline Reservation& AddInstances(Instance&& value) { m_instancesHasBeenSet = true; m_instances.push_back(std::move(value)); return *this; }
128 
129 
133  inline const Aws::String& GetOwnerId() const{ return m_ownerId; }
134 
138  inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
139 
143  inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; }
144 
148  inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); }
149 
153  inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); }
154 
158  inline Reservation& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;}
159 
163  inline Reservation& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;}
164 
168  inline Reservation& WithOwnerId(const char* value) { SetOwnerId(value); return *this;}
169 
170 
175  inline const Aws::String& GetRequesterId() const{ return m_requesterId; }
176 
181  inline bool RequesterIdHasBeenSet() const { return m_requesterIdHasBeenSet; }
182 
187  inline void SetRequesterId(const Aws::String& value) { m_requesterIdHasBeenSet = true; m_requesterId = value; }
188 
193  inline void SetRequesterId(Aws::String&& value) { m_requesterIdHasBeenSet = true; m_requesterId = std::move(value); }
194 
199  inline void SetRequesterId(const char* value) { m_requesterIdHasBeenSet = true; m_requesterId.assign(value); }
200 
205  inline Reservation& WithRequesterId(const Aws::String& value) { SetRequesterId(value); return *this;}
206 
211  inline Reservation& WithRequesterId(Aws::String&& value) { SetRequesterId(std::move(value)); return *this;}
212 
217  inline Reservation& WithRequesterId(const char* value) { SetRequesterId(value); return *this;}
218 
219 
223  inline const Aws::String& GetReservationId() const{ return m_reservationId; }
224 
228  inline bool ReservationIdHasBeenSet() const { return m_reservationIdHasBeenSet; }
229 
233  inline void SetReservationId(const Aws::String& value) { m_reservationIdHasBeenSet = true; m_reservationId = value; }
234 
238  inline void SetReservationId(Aws::String&& value) { m_reservationIdHasBeenSet = true; m_reservationId = std::move(value); }
239 
243  inline void SetReservationId(const char* value) { m_reservationIdHasBeenSet = true; m_reservationId.assign(value); }
244 
248  inline Reservation& WithReservationId(const Aws::String& value) { SetReservationId(value); return *this;}
249 
253  inline Reservation& WithReservationId(Aws::String&& value) { SetReservationId(std::move(value)); return *this;}
254 
258  inline Reservation& WithReservationId(const char* value) { SetReservationId(value); return *this;}
259 
260 
261 
262  inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
263 
264 
265  inline bool ResponseMetadataHasBeenSet() const { return m_responseMetadataHasBeenSet; }
266 
267 
268  inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = value; }
269 
270 
271  inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = std::move(value); }
272 
273 
274  inline Reservation& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
275 
276 
277  inline Reservation& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}
278 
279  private:
280 
282  bool m_groupsHasBeenSet;
283 
284  Aws::Vector<Instance> m_instances;
285  bool m_instancesHasBeenSet;
286 
287  Aws::String m_ownerId;
288  bool m_ownerIdHasBeenSet;
289 
290  Aws::String m_requesterId;
291  bool m_requesterIdHasBeenSet;
292 
293  Aws::String m_reservationId;
294  bool m_reservationIdHasBeenSet;
295 
296  ResponseMetadata m_responseMetadata;
297  bool m_responseMetadataHasBeenSet;
298  };
299 
300 } // namespace Model
301 } // namespace EC2
302 } // namespace Aws
Aws::EC2::Model::Reservation::Reservation
Reservation(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::Reservation::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::Reservation::WithOwnerId
Reservation & WithOwnerId(Aws::String &&value)
Definition: Reservation.h:163
Aws::EC2::Model::Reservation::WithRequesterId
Reservation & WithRequesterId(const char *value)
Definition: Reservation.h:217
Aws::EC2::Model::Reservation::SetRequesterId
void SetRequesterId(const Aws::String &value)
Definition: Reservation.h:187
Aws::EC2::Model::Reservation::GetInstances
const Aws::Vector< Instance > & GetInstances() const
Definition: Reservation.h:92
Aws::EC2::Model::Reservation::GetGroups
const Aws::Vector< GroupIdentifier > & GetGroups() const
Definition: Reservation.h:51
Aws::EC2::Model::Reservation::WithRequesterId
Reservation & WithRequesterId(const Aws::String &value)
Definition: Reservation.h:205
Aws::EC2::Model::Reservation::WithResponseMetadata
Reservation & WithResponseMetadata(ResponseMetadata &&value)
Definition: Reservation.h:277
Aws::EC2::Model::Reservation::SetResponseMetadata
void SetResponseMetadata(const ResponseMetadata &value)
Definition: Reservation.h:268
Aws::EC2::Model::Reservation::InstancesHasBeenSet
bool InstancesHasBeenSet() const
Definition: Reservation.h:97
Aws::EC2::Model::Reservation::SetResponseMetadata
void SetResponseMetadata(ResponseMetadata &&value)
Definition: Reservation.h:271
Aws::EC2::Model::Reservation::SetInstances
void SetInstances(Aws::Vector< Instance > &&value)
Definition: Reservation.h:107
Aws::EC2::Model::Reservation::WithResponseMetadata
Reservation & WithResponseMetadata(const ResponseMetadata &value)
Definition: Reservation.h:274
Aws::EC2::Model::Reservation::GetResponseMetadata
const ResponseMetadata & GetResponseMetadata() const
Definition: Reservation.h:262
Aws::EC2::Model::Reservation::SetReservationId
void SetReservationId(const char *value)
Definition: Reservation.h:243
GroupIdentifier.h
Aws::EC2::Model::Reservation::SetGroups
void SetGroups(const Aws::Vector< GroupIdentifier > &value)
Definition: Reservation.h:61
Aws::EC2::Model::Reservation::SetGroups
void SetGroups(Aws::Vector< GroupIdentifier > &&value)
Definition: Reservation.h:66
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
ResponseMetadata.h
Aws::EC2::Model::Reservation::SetOwnerId
void SetOwnerId(Aws::String &&value)
Definition: Reservation.h:148
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSStreamFwd.h
Aws::EC2::Model::Reservation::WithRequesterId
Reservation & WithRequesterId(Aws::String &&value)
Definition: Reservation.h:211
AWSVector.h
Aws::EC2::Model::Reservation::WithOwnerId
Reservation & WithOwnerId(const Aws::String &value)
Definition: Reservation.h:158
Aws::EC2::Model::Reservation::SetInstances
void SetInstances(const Aws::Vector< Instance > &value)
Definition: Reservation.h:102
Aws::EC2::Model::Reservation::WithReservationId
Reservation & WithReservationId(Aws::String &&value)
Definition: Reservation.h:253
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::Reservation::ReservationIdHasBeenSet
bool ReservationIdHasBeenSet() const
Definition: Reservation.h:228
Aws::EC2::Model::Reservation::SetReservationId
void SetReservationId(Aws::String &&value)
Definition: Reservation.h:238
Aws::EC2::Model::Reservation::AddInstances
Reservation & AddInstances(const Instance &value)
Definition: Reservation.h:122
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::Reservation::GetOwnerId
const Aws::String & GetOwnerId() const
Definition: Reservation.h:133
Aws::EC2::Model::Reservation::WithGroups
Reservation & WithGroups(Aws::Vector< GroupIdentifier > &&value)
Definition: Reservation.h:76
Aws::EC2::Model::Reservation::SetRequesterId
void SetRequesterId(const char *value)
Definition: Reservation.h:199
Aws::EC2::Model::Reservation::AddGroups
Reservation & AddGroups(GroupIdentifier &&value)
Definition: Reservation.h:86
Aws::EC2::Model::ResponseMetadata
Definition: ResponseMetadata.h:27
Aws::EC2::Model::Reservation::WithReservationId
Reservation & WithReservationId(const Aws::String &value)
Definition: Reservation.h:248
AWSString.h
Aws::EC2::Model::Reservation::WithOwnerId
Reservation & WithOwnerId(const char *value)
Definition: Reservation.h:168
Aws::EC2::Model::Reservation
Definition: Reservation.h:38
Aws::EC2::Model::Reservation::GroupsHasBeenSet
bool GroupsHasBeenSet() const
Definition: Reservation.h:56
Aws::EC2::Model::GroupIdentifier
Definition: GroupIdentifier.h:32
Aws::EC2::Model::Reservation::AddInstances
Reservation & AddInstances(Instance &&value)
Definition: Reservation.h:127
Aws::EC2::Model::Instance
Definition: Instance.h:60
Aws::EC2::Model::Reservation::RequesterIdHasBeenSet
bool RequesterIdHasBeenSet() const
Definition: Reservation.h:181
Aws::EC2::Model::Reservation::SetOwnerId
void SetOwnerId(const char *value)
Definition: Reservation.h:153
Aws::EC2::Model::Reservation::SetOwnerId
void SetOwnerId(const Aws::String &value)
Definition: Reservation.h:143
Aws::EC2::Model::Reservation::WithInstances
Reservation & WithInstances(const Aws::Vector< Instance > &value)
Definition: Reservation.h:112
Aws::EC2::Model::Reservation::SetReservationId
void SetReservationId(const Aws::String &value)
Definition: Reservation.h:233
Aws::EC2::Model::Reservation::Reservation
Reservation()
Aws::EC2::Model::Reservation::WithGroups
Reservation & WithGroups(const Aws::Vector< GroupIdentifier > &value)
Definition: Reservation.h:71
Aws::EC2::Model::Reservation::ResponseMetadataHasBeenSet
bool ResponseMetadataHasBeenSet() const
Definition: Reservation.h:265
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::Reservation::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::Reservation::GetRequesterId
const Aws::String & GetRequesterId() const
Definition: Reservation.h:175
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::Reservation::operator=
Reservation & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Instance.h
Aws::EC2::Model::Reservation::SetRequesterId
void SetRequesterId(Aws::String &&value)
Definition: Reservation.h:193
Aws::EC2::Model::Reservation::WithInstances
Reservation & WithInstances(Aws::Vector< Instance > &&value)
Definition: Reservation.h:117
index
int index
Definition: cJSON.h:181
EC2_EXPORTS.h
Aws::EC2::Model::Reservation::WithReservationId
Reservation & WithReservationId(const char *value)
Definition: Reservation.h:258
Aws::EC2::Model::Reservation::AddGroups
Reservation & AddGroups(const GroupIdentifier &value)
Definition: Reservation.h:81
Aws::EC2::Model::Reservation::GetReservationId
const Aws::String & GetReservationId() const
Definition: Reservation.h:223
Aws::EC2::Model::Reservation::OwnerIdHasBeenSet
bool OwnerIdHasBeenSet() const
Definition: Reservation.h:138