AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Reservation.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.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/model/ResponseMetadata.h>
12#include <aws/ec2/model/GroupIdentifier.h>
13#include <aws/ec2/model/Instance.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Xml
21{
22 class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace EC2
26{
27namespace Model
28{
29
38 {
39 public:
40 AWS_EC2_API Reservation();
41 AWS_EC2_API Reservation(const Aws::Utils::Xml::XmlNode& xmlNode);
42 AWS_EC2_API Reservation& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43
44 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
46
47
49
52 inline const Aws::String& GetReservationId() const{ return m_reservationId; }
53 inline bool ReservationIdHasBeenSet() const { return m_reservationIdHasBeenSet; }
54 inline void SetReservationId(const Aws::String& value) { m_reservationIdHasBeenSet = true; m_reservationId = value; }
55 inline void SetReservationId(Aws::String&& value) { m_reservationIdHasBeenSet = true; m_reservationId = std::move(value); }
56 inline void SetReservationId(const char* value) { m_reservationIdHasBeenSet = true; m_reservationId.assign(value); }
57 inline Reservation& WithReservationId(const Aws::String& value) { SetReservationId(value); return *this;}
58 inline Reservation& WithReservationId(Aws::String&& value) { SetReservationId(std::move(value)); return *this;}
59 inline Reservation& WithReservationId(const char* value) { SetReservationId(value); return *this;}
61
63
66 inline const Aws::String& GetOwnerId() const{ return m_ownerId; }
67 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
68 inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; }
69 inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); }
70 inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); }
71 inline Reservation& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;}
72 inline Reservation& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;}
73 inline Reservation& WithOwnerId(const char* value) { SetOwnerId(value); return *this;}
75
77
81 inline const Aws::String& GetRequesterId() const{ return m_requesterId; }
82 inline bool RequesterIdHasBeenSet() const { return m_requesterIdHasBeenSet; }
83 inline void SetRequesterId(const Aws::String& value) { m_requesterIdHasBeenSet = true; m_requesterId = value; }
84 inline void SetRequesterId(Aws::String&& value) { m_requesterIdHasBeenSet = true; m_requesterId = std::move(value); }
85 inline void SetRequesterId(const char* value) { m_requesterIdHasBeenSet = true; m_requesterId.assign(value); }
86 inline Reservation& WithRequesterId(const Aws::String& value) { SetRequesterId(value); return *this;}
87 inline Reservation& WithRequesterId(Aws::String&& value) { SetRequesterId(std::move(value)); return *this;}
88 inline Reservation& WithRequesterId(const char* value) { SetRequesterId(value); return *this;}
90
92
95 inline const Aws::Vector<GroupIdentifier>& GetGroups() const{ return m_groups; }
96 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
97 inline void SetGroups(const Aws::Vector<GroupIdentifier>& value) { m_groupsHasBeenSet = true; m_groups = value; }
98 inline void SetGroups(Aws::Vector<GroupIdentifier>&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); }
99 inline Reservation& WithGroups(const Aws::Vector<GroupIdentifier>& value) { SetGroups(value); return *this;}
100 inline Reservation& WithGroups(Aws::Vector<GroupIdentifier>&& value) { SetGroups(std::move(value)); return *this;}
101 inline Reservation& AddGroups(const GroupIdentifier& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; }
102 inline Reservation& AddGroups(GroupIdentifier&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; }
104
106
109 inline const Aws::Vector<Instance>& GetInstances() const{ return m_instances; }
110 inline bool InstancesHasBeenSet() const { return m_instancesHasBeenSet; }
111 inline void SetInstances(const Aws::Vector<Instance>& value) { m_instancesHasBeenSet = true; m_instances = value; }
112 inline void SetInstances(Aws::Vector<Instance>&& value) { m_instancesHasBeenSet = true; m_instances = std::move(value); }
113 inline Reservation& WithInstances(const Aws::Vector<Instance>& value) { SetInstances(value); return *this;}
114 inline Reservation& WithInstances(Aws::Vector<Instance>&& value) { SetInstances(std::move(value)); return *this;}
115 inline Reservation& AddInstances(const Instance& value) { m_instancesHasBeenSet = true; m_instances.push_back(value); return *this; }
116 inline Reservation& AddInstances(Instance&& value) { m_instancesHasBeenSet = true; m_instances.push_back(std::move(value)); return *this; }
118
120
121 inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
122 inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }
123 inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); }
124 inline Reservation& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
125 inline Reservation& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}
127 private:
128
129 Aws::String m_reservationId;
130 bool m_reservationIdHasBeenSet = false;
131
132 Aws::String m_ownerId;
133 bool m_ownerIdHasBeenSet = false;
134
135 Aws::String m_requesterId;
136 bool m_requesterIdHasBeenSet = false;
137
139 bool m_groupsHasBeenSet = false;
140
141 Aws::Vector<Instance> m_instances;
142 bool m_instancesHasBeenSet = false;
143
144 ResponseMetadata m_responseMetadata;
145 };
146
147} // namespace Model
148} // namespace EC2
149} // namespace Aws
const Aws::String & GetRequesterId() const
Definition Reservation.h:81
Reservation & WithReservationId(const char *value)
Definition Reservation.h:59
const Aws::String & GetReservationId() const
Definition Reservation.h:52
Reservation & WithInstances(Aws::Vector< Instance > &&value)
Reservation & WithOwnerId(Aws::String &&value)
Definition Reservation.h:72
void SetOwnerId(const Aws::String &value)
Definition Reservation.h:68
Reservation & WithRequesterId(const char *value)
Definition Reservation.h:88
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
Reservation & AddGroups(const GroupIdentifier &value)
const Aws::Vector< Instance > & GetInstances() const
void SetGroups(const Aws::Vector< GroupIdentifier > &value)
Definition Reservation.h:97
void SetResponseMetadata(const ResponseMetadata &value)
void SetReservationId(Aws::String &&value)
Definition Reservation.h:55
Reservation & WithOwnerId(const char *value)
Definition Reservation.h:73
bool RequesterIdHasBeenSet() const
Definition Reservation.h:82
Reservation & WithResponseMetadata(const ResponseMetadata &value)
void SetResponseMetadata(ResponseMetadata &&value)
void SetReservationId(const Aws::String &value)
Definition Reservation.h:54
Reservation & WithResponseMetadata(ResponseMetadata &&value)
void SetInstances(Aws::Vector< Instance > &&value)
void SetOwnerId(const char *value)
Definition Reservation.h:70
void SetInstances(const Aws::Vector< Instance > &value)
void SetOwnerId(Aws::String &&value)
Definition Reservation.h:69
void SetRequesterId(Aws::String &&value)
Definition Reservation.h:84
const ResponseMetadata & GetResponseMetadata() const
Reservation & WithRequesterId(Aws::String &&value)
Definition Reservation.h:87
void SetRequesterId(const char *value)
Definition Reservation.h:85
Reservation & AddInstances(const Instance &value)
bool ReservationIdHasBeenSet() const
Definition Reservation.h:53
const Aws::String & GetOwnerId() const
Definition Reservation.h:66
Reservation & AddGroups(GroupIdentifier &&value)
const Aws::Vector< GroupIdentifier > & GetGroups() const
Definition Reservation.h:95
Reservation & WithOwnerId(const Aws::String &value)
Definition Reservation.h:71
Reservation & WithReservationId(Aws::String &&value)
Definition Reservation.h:58
Reservation & WithInstances(const Aws::Vector< Instance > &value)
Reservation & WithGroups(Aws::Vector< GroupIdentifier > &&value)
Reservation & AddInstances(Instance &&value)
Reservation & WithRequesterId(const Aws::String &value)
Definition Reservation.h:86
Reservation & WithGroups(const Aws::Vector< GroupIdentifier > &value)
Definition Reservation.h:99
AWS_EC2_API Reservation & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Reservation & WithReservationId(const Aws::String &value)
Definition Reservation.h:57
AWS_EC2_API Reservation(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetGroups(Aws::Vector< GroupIdentifier > &&value)
Definition Reservation.h:98
void SetRequesterId(const Aws::String &value)
Definition Reservation.h:83
void SetReservationId(const char *value)
Definition Reservation.h:56
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