AWS SDK for C++

AWS SDK for C++ Version 1.11.944

Loading...
Searching...
No Matches
Header.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/network-firewall/NetworkFirewall_EXPORTS.h>
10#include <aws/network-firewall/model/StatefulRuleDirection.h>
11#include <aws/network-firewall/model/StatefulRuleProtocol.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Cbor {
18class CborValue;
19} // namespace Cbor
20} // namespace Utils
21namespace NetworkFirewall {
22namespace Model {
23
31class Header {
32 public:
33 AWS_NETWORKFIREWALL_API Header() = default;
34 AWS_NETWORKFIREWALL_API Header(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_NETWORKFIREWALL_API Header& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
37
39
43 inline StatefulRuleProtocol GetProtocol() const { return m_protocol; }
44 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
45 inline void SetProtocol(StatefulRuleProtocol value) {
46 m_protocolHasBeenSet = true;
47 m_protocol = value;
48 }
50 SetProtocol(value);
51 return *this;
52 }
54
56
76 inline const Aws::String& GetSource() const { return m_source; }
77 inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }
78 template <typename SourceT = Aws::String>
79 void SetSource(SourceT&& value) {
80 m_sourceHasBeenSet = true;
81 m_source = std::forward<SourceT>(value);
82 }
83 template <typename SourceT = Aws::String>
84 Header& WithSource(SourceT&& value) {
85 SetSource(std::forward<SourceT>(value));
86 return *this;
87 }
89
91
96 inline const Aws::String& GetSourcePort() const { return m_sourcePort; }
97 inline bool SourcePortHasBeenSet() const { return m_sourcePortHasBeenSet; }
98 template <typename SourcePortT = Aws::String>
99 void SetSourcePort(SourcePortT&& value) {
100 m_sourcePortHasBeenSet = true;
101 m_sourcePort = std::forward<SourcePortT>(value);
102 }
103 template <typename SourcePortT = Aws::String>
104 Header& WithSourcePort(SourcePortT&& value) {
105 SetSourcePort(std::forward<SourcePortT>(value));
106 return *this;
107 }
109
111
118 inline StatefulRuleDirection GetDirection() const { return m_direction; }
119 inline bool DirectionHasBeenSet() const { return m_directionHasBeenSet; }
121 m_directionHasBeenSet = true;
122 m_direction = value;
123 }
125 SetDirection(value);
126 return *this;
127 }
129
131
151 inline const Aws::String& GetDestination() const { return m_destination; }
152 inline bool DestinationHasBeenSet() const { return m_destinationHasBeenSet; }
153 template <typename DestinationT = Aws::String>
154 void SetDestination(DestinationT&& value) {
155 m_destinationHasBeenSet = true;
156 m_destination = std::forward<DestinationT>(value);
157 }
158 template <typename DestinationT = Aws::String>
159 Header& WithDestination(DestinationT&& value) {
160 SetDestination(std::forward<DestinationT>(value));
161 return *this;
162 }
164
166
171 inline const Aws::String& GetDestinationPort() const { return m_destinationPort; }
172 inline bool DestinationPortHasBeenSet() const { return m_destinationPortHasBeenSet; }
173 template <typename DestinationPortT = Aws::String>
174 void SetDestinationPort(DestinationPortT&& value) {
175 m_destinationPortHasBeenSet = true;
176 m_destinationPort = std::forward<DestinationPortT>(value);
177 }
178 template <typename DestinationPortT = Aws::String>
179 Header& WithDestinationPort(DestinationPortT&& value) {
180 SetDestinationPort(std::forward<DestinationPortT>(value));
181 return *this;
182 }
184 private:
186
187 Aws::String m_source;
188
189 Aws::String m_sourcePort;
190
192
193 Aws::String m_destination;
194
195 Aws::String m_destinationPort;
196 bool m_protocolHasBeenSet = false;
197 bool m_sourceHasBeenSet = false;
198 bool m_sourcePortHasBeenSet = false;
199 bool m_directionHasBeenSet = false;
200 bool m_destinationHasBeenSet = false;
201 bool m_destinationPortHasBeenSet = false;
202};
203
204} // namespace Model
205} // namespace NetworkFirewall
206} // namespace Aws
AWS_NETWORKFIREWALL_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::String & GetSourcePort() const
Definition Header.h:96
StatefulRuleDirection GetDirection() const
Definition Header.h:118
AWS_NETWORKFIREWALL_API Header & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::String & GetSource() const
Definition Header.h:76
void SetSource(SourceT &&value)
Definition Header.h:79
void SetSourcePort(SourcePortT &&value)
Definition Header.h:99
AWS_NETWORKFIREWALL_API Header(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
Header & WithProtocol(StatefulRuleProtocol value)
Definition Header.h:49
void SetProtocol(StatefulRuleProtocol value)
Definition Header.h:45
void SetDestination(DestinationT &&value)
Definition Header.h:154
const Aws::String & GetDestinationPort() const
Definition Header.h:171
Header & WithDestination(DestinationT &&value)
Definition Header.h:159
const Aws::String & GetDestination() const
Definition Header.h:151
Header & WithDirection(StatefulRuleDirection value)
Definition Header.h:124
Header & WithSource(SourceT &&value)
Definition Header.h:84
AWS_NETWORKFIREWALL_API Header()=default
void SetDestinationPort(DestinationPortT &&value)
Definition Header.h:174
StatefulRuleProtocol GetProtocol() const
Definition Header.h:43
void SetDirection(StatefulRuleDirection value)
Definition Header.h:120
Header & WithDestinationPort(DestinationPortT &&value)
Definition Header.h:179
Header & WithSourcePort(SourcePortT &&value)
Definition Header.h:104
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String