AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
PacketHeaderStatement.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/Protocol.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace EC2 {
22namespace Model {
23
30 public:
31 AWS_EC2_API PacketHeaderStatement() = default;
34
35 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
36 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
37
39
42 inline const Aws::Vector<Aws::String>& GetSourceAddresses() const { return m_sourceAddresses; }
43 inline bool SourceAddressesHasBeenSet() const { return m_sourceAddressesHasBeenSet; }
44 template <typename SourceAddressesT = Aws::Vector<Aws::String>>
45 void SetSourceAddresses(SourceAddressesT&& value) {
46 m_sourceAddressesHasBeenSet = true;
47 m_sourceAddresses = std::forward<SourceAddressesT>(value);
48 }
49 template <typename SourceAddressesT = Aws::Vector<Aws::String>>
50 PacketHeaderStatement& WithSourceAddresses(SourceAddressesT&& value) {
51 SetSourceAddresses(std::forward<SourceAddressesT>(value));
52 return *this;
53 }
54 template <typename SourceAddressesT = Aws::String>
55 PacketHeaderStatement& AddSourceAddresses(SourceAddressesT&& value) {
56 m_sourceAddressesHasBeenSet = true;
57 m_sourceAddresses.emplace_back(std::forward<SourceAddressesT>(value));
58 return *this;
59 }
61
63
66 inline const Aws::Vector<Aws::String>& GetDestinationAddresses() const { return m_destinationAddresses; }
67 inline bool DestinationAddressesHasBeenSet() const { return m_destinationAddressesHasBeenSet; }
68 template <typename DestinationAddressesT = Aws::Vector<Aws::String>>
69 void SetDestinationAddresses(DestinationAddressesT&& value) {
70 m_destinationAddressesHasBeenSet = true;
71 m_destinationAddresses = std::forward<DestinationAddressesT>(value);
72 }
73 template <typename DestinationAddressesT = Aws::Vector<Aws::String>>
74 PacketHeaderStatement& WithDestinationAddresses(DestinationAddressesT&& value) {
75 SetDestinationAddresses(std::forward<DestinationAddressesT>(value));
76 return *this;
77 }
78 template <typename DestinationAddressesT = Aws::String>
79 PacketHeaderStatement& AddDestinationAddresses(DestinationAddressesT&& value) {
80 m_destinationAddressesHasBeenSet = true;
81 m_destinationAddresses.emplace_back(std::forward<DestinationAddressesT>(value));
82 return *this;
83 }
85
87
90 inline const Aws::Vector<Aws::String>& GetSourcePorts() const { return m_sourcePorts; }
91 inline bool SourcePortsHasBeenSet() const { return m_sourcePortsHasBeenSet; }
92 template <typename SourcePortsT = Aws::Vector<Aws::String>>
93 void SetSourcePorts(SourcePortsT&& value) {
94 m_sourcePortsHasBeenSet = true;
95 m_sourcePorts = std::forward<SourcePortsT>(value);
96 }
97 template <typename SourcePortsT = Aws::Vector<Aws::String>>
98 PacketHeaderStatement& WithSourcePorts(SourcePortsT&& value) {
99 SetSourcePorts(std::forward<SourcePortsT>(value));
100 return *this;
101 }
102 template <typename SourcePortsT = Aws::String>
103 PacketHeaderStatement& AddSourcePorts(SourcePortsT&& value) {
104 m_sourcePortsHasBeenSet = true;
105 m_sourcePorts.emplace_back(std::forward<SourcePortsT>(value));
106 return *this;
107 }
109
111
114 inline const Aws::Vector<Aws::String>& GetDestinationPorts() const { return m_destinationPorts; }
115 inline bool DestinationPortsHasBeenSet() const { return m_destinationPortsHasBeenSet; }
116 template <typename DestinationPortsT = Aws::Vector<Aws::String>>
117 void SetDestinationPorts(DestinationPortsT&& value) {
118 m_destinationPortsHasBeenSet = true;
119 m_destinationPorts = std::forward<DestinationPortsT>(value);
120 }
121 template <typename DestinationPortsT = Aws::Vector<Aws::String>>
122 PacketHeaderStatement& WithDestinationPorts(DestinationPortsT&& value) {
123 SetDestinationPorts(std::forward<DestinationPortsT>(value));
124 return *this;
125 }
126 template <typename DestinationPortsT = Aws::String>
127 PacketHeaderStatement& AddDestinationPorts(DestinationPortsT&& value) {
128 m_destinationPortsHasBeenSet = true;
129 m_destinationPorts.emplace_back(std::forward<DestinationPortsT>(value));
130 return *this;
131 }
133
135
138 inline const Aws::Vector<Aws::String>& GetSourcePrefixLists() const { return m_sourcePrefixLists; }
139 inline bool SourcePrefixListsHasBeenSet() const { return m_sourcePrefixListsHasBeenSet; }
140 template <typename SourcePrefixListsT = Aws::Vector<Aws::String>>
141 void SetSourcePrefixLists(SourcePrefixListsT&& value) {
142 m_sourcePrefixListsHasBeenSet = true;
143 m_sourcePrefixLists = std::forward<SourcePrefixListsT>(value);
144 }
145 template <typename SourcePrefixListsT = Aws::Vector<Aws::String>>
146 PacketHeaderStatement& WithSourcePrefixLists(SourcePrefixListsT&& value) {
147 SetSourcePrefixLists(std::forward<SourcePrefixListsT>(value));
148 return *this;
149 }
150 template <typename SourcePrefixListsT = Aws::String>
151 PacketHeaderStatement& AddSourcePrefixLists(SourcePrefixListsT&& value) {
152 m_sourcePrefixListsHasBeenSet = true;
153 m_sourcePrefixLists.emplace_back(std::forward<SourcePrefixListsT>(value));
154 return *this;
155 }
157
159
162 inline const Aws::Vector<Aws::String>& GetDestinationPrefixLists() const { return m_destinationPrefixLists; }
163 inline bool DestinationPrefixListsHasBeenSet() const { return m_destinationPrefixListsHasBeenSet; }
164 template <typename DestinationPrefixListsT = Aws::Vector<Aws::String>>
165 void SetDestinationPrefixLists(DestinationPrefixListsT&& value) {
166 m_destinationPrefixListsHasBeenSet = true;
167 m_destinationPrefixLists = std::forward<DestinationPrefixListsT>(value);
168 }
169 template <typename DestinationPrefixListsT = Aws::Vector<Aws::String>>
170 PacketHeaderStatement& WithDestinationPrefixLists(DestinationPrefixListsT&& value) {
171 SetDestinationPrefixLists(std::forward<DestinationPrefixListsT>(value));
172 return *this;
173 }
174 template <typename DestinationPrefixListsT = Aws::String>
175 PacketHeaderStatement& AddDestinationPrefixLists(DestinationPrefixListsT&& value) {
176 m_destinationPrefixListsHasBeenSet = true;
177 m_destinationPrefixLists.emplace_back(std::forward<DestinationPrefixListsT>(value));
178 return *this;
179 }
181
183
186 inline const Aws::Vector<Protocol>& GetProtocols() const { return m_protocols; }
187 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
188 template <typename ProtocolsT = Aws::Vector<Protocol>>
189 void SetProtocols(ProtocolsT&& value) {
190 m_protocolsHasBeenSet = true;
191 m_protocols = std::forward<ProtocolsT>(value);
192 }
193 template <typename ProtocolsT = Aws::Vector<Protocol>>
195 SetProtocols(std::forward<ProtocolsT>(value));
196 return *this;
197 }
199 m_protocolsHasBeenSet = true;
200 m_protocols.push_back(value);
201 return *this;
202 }
204 private:
205 Aws::Vector<Aws::String> m_sourceAddresses;
206
207 Aws::Vector<Aws::String> m_destinationAddresses;
208
209 Aws::Vector<Aws::String> m_sourcePorts;
210
211 Aws::Vector<Aws::String> m_destinationPorts;
212
213 Aws::Vector<Aws::String> m_sourcePrefixLists;
214
215 Aws::Vector<Aws::String> m_destinationPrefixLists;
216
217 Aws::Vector<Protocol> m_protocols;
218 bool m_sourceAddressesHasBeenSet = false;
219 bool m_destinationAddressesHasBeenSet = false;
220 bool m_sourcePortsHasBeenSet = false;
221 bool m_destinationPortsHasBeenSet = false;
222 bool m_sourcePrefixListsHasBeenSet = false;
223 bool m_destinationPrefixListsHasBeenSet = false;
224 bool m_protocolsHasBeenSet = false;
225};
226
227} // namespace Model
228} // namespace EC2
229} // namespace Aws
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< Aws::String > & GetDestinationAddresses() const
void SetDestinationPorts(DestinationPortsT &&value)
void SetDestinationPrefixLists(DestinationPrefixListsT &&value)
void SetSourceAddresses(SourceAddressesT &&value)
PacketHeaderStatement & AddSourceAddresses(SourceAddressesT &&value)
PacketHeaderStatement & WithProtocols(ProtocolsT &&value)
AWS_EC2_API PacketHeaderStatement()=default
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
PacketHeaderStatement & WithSourceAddresses(SourceAddressesT &&value)
const Aws::Vector< Aws::String > & GetDestinationPrefixLists() const
const Aws::Vector< Aws::String > & GetSourcePrefixLists() const
PacketHeaderStatement & AddSourcePorts(SourcePortsT &&value)
PacketHeaderStatement & WithDestinationPorts(DestinationPortsT &&value)
const Aws::Vector< Aws::String > & GetDestinationPorts() const
PacketHeaderStatement & AddSourcePrefixLists(SourcePrefixListsT &&value)
PacketHeaderStatement & AddDestinationAddresses(DestinationAddressesT &&value)
void SetDestinationAddresses(DestinationAddressesT &&value)
AWS_EC2_API PacketHeaderStatement & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
PacketHeaderStatement & AddDestinationPrefixLists(DestinationPrefixListsT &&value)
PacketHeaderStatement & WithSourcePrefixLists(SourcePrefixListsT &&value)
AWS_EC2_API PacketHeaderStatement(const Aws::Utils::Xml::XmlNode &xmlNode)
PacketHeaderStatement & AddProtocols(Protocol value)
PacketHeaderStatement & AddDestinationPorts(DestinationPortsT &&value)
PacketHeaderStatement & WithSourcePorts(SourcePortsT &&value)
PacketHeaderStatement & WithDestinationAddresses(DestinationAddressesT &&value)
const Aws::Vector< Aws::String > & GetSourceAddresses() const
void SetSourcePrefixLists(SourcePrefixListsT &&value)
const Aws::Vector< Aws::String > & GetSourcePorts() const
const Aws::Vector< Protocol > & GetProtocols() const
PacketHeaderStatement & WithDestinationPrefixLists(DestinationPrefixListsT &&value)
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream