AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
StaleIpPermission.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/UserIdGroupPair.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 StaleIpPermission() = default;
32 AWS_EC2_API StaleIpPermission(const Aws::Utils::Xml::XmlNode& xmlNode);
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
43 inline int GetFromPort() const { return m_fromPort; }
44 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
45 inline void SetFromPort(int value) {
46 m_fromPortHasBeenSet = true;
47 m_fromPort = value;
48 }
49 inline StaleIpPermission& WithFromPort(int value) {
50 SetFromPort(value);
51 return *this;
52 }
54
56
62 inline const Aws::String& GetIpProtocol() const { return m_ipProtocol; }
63 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
64 template <typename IpProtocolT = Aws::String>
65 void SetIpProtocol(IpProtocolT&& value) {
66 m_ipProtocolHasBeenSet = true;
67 m_ipProtocol = std::forward<IpProtocolT>(value);
68 }
69 template <typename IpProtocolT = Aws::String>
70 StaleIpPermission& WithIpProtocol(IpProtocolT&& value) {
71 SetIpProtocol(std::forward<IpProtocolT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::Vector<Aws::String>& GetIpRanges() const { return m_ipRanges; }
81 inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
82 template <typename IpRangesT = Aws::Vector<Aws::String>>
83 void SetIpRanges(IpRangesT&& value) {
84 m_ipRangesHasBeenSet = true;
85 m_ipRanges = std::forward<IpRangesT>(value);
86 }
87 template <typename IpRangesT = Aws::Vector<Aws::String>>
88 StaleIpPermission& WithIpRanges(IpRangesT&& value) {
89 SetIpRanges(std::forward<IpRangesT>(value));
90 return *this;
91 }
92 template <typename IpRangesT = Aws::String>
93 StaleIpPermission& AddIpRanges(IpRangesT&& value) {
94 m_ipRangesHasBeenSet = true;
95 m_ipRanges.emplace_back(std::forward<IpRangesT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::Vector<Aws::String>& GetPrefixListIds() const { return m_prefixListIds; }
105 inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
106 template <typename PrefixListIdsT = Aws::Vector<Aws::String>>
107 void SetPrefixListIds(PrefixListIdsT&& value) {
108 m_prefixListIdsHasBeenSet = true;
109 m_prefixListIds = std::forward<PrefixListIdsT>(value);
110 }
111 template <typename PrefixListIdsT = Aws::Vector<Aws::String>>
112 StaleIpPermission& WithPrefixListIds(PrefixListIdsT&& value) {
113 SetPrefixListIds(std::forward<PrefixListIdsT>(value));
114 return *this;
115 }
116 template <typename PrefixListIdsT = Aws::String>
117 StaleIpPermission& AddPrefixListIds(PrefixListIdsT&& value) {
118 m_prefixListIdsHasBeenSet = true;
119 m_prefixListIds.emplace_back(std::forward<PrefixListIdsT>(value));
120 return *this;
121 }
123
125
129 inline int GetToPort() const { return m_toPort; }
130 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
131 inline void SetToPort(int value) {
132 m_toPortHasBeenSet = true;
133 m_toPort = value;
134 }
135 inline StaleIpPermission& WithToPort(int value) {
136 SetToPort(value);
137 return *this;
138 }
140
142
146 inline const Aws::Vector<UserIdGroupPair>& GetUserIdGroupPairs() const { return m_userIdGroupPairs; }
147 inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
148 template <typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
149 void SetUserIdGroupPairs(UserIdGroupPairsT&& value) {
150 m_userIdGroupPairsHasBeenSet = true;
151 m_userIdGroupPairs = std::forward<UserIdGroupPairsT>(value);
152 }
153 template <typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
154 StaleIpPermission& WithUserIdGroupPairs(UserIdGroupPairsT&& value) {
155 SetUserIdGroupPairs(std::forward<UserIdGroupPairsT>(value));
156 return *this;
157 }
158 template <typename UserIdGroupPairsT = UserIdGroupPair>
159 StaleIpPermission& AddUserIdGroupPairs(UserIdGroupPairsT&& value) {
160 m_userIdGroupPairsHasBeenSet = true;
161 m_userIdGroupPairs.emplace_back(std::forward<UserIdGroupPairsT>(value));
162 return *this;
163 }
165 private:
166 int m_fromPort{0};
167
168 Aws::String m_ipProtocol;
169
170 Aws::Vector<Aws::String> m_ipRanges;
171
172 Aws::Vector<Aws::String> m_prefixListIds;
173
174 int m_toPort{0};
175
176 Aws::Vector<UserIdGroupPair> m_userIdGroupPairs;
177 bool m_fromPortHasBeenSet = false;
178 bool m_ipProtocolHasBeenSet = false;
179 bool m_ipRangesHasBeenSet = false;
180 bool m_prefixListIdsHasBeenSet = false;
181 bool m_toPortHasBeenSet = false;
182 bool m_userIdGroupPairsHasBeenSet = false;
183};
184
185} // namespace Model
186} // namespace EC2
187} // namespace Aws
StaleIpPermission & WithPrefixListIds(PrefixListIdsT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::Vector< UserIdGroupPair > & GetUserIdGroupPairs() const
StaleIpPermission & WithIpProtocol(IpProtocolT &&value)
StaleIpPermission & WithToPort(int value)
StaleIpPermission & WithIpRanges(IpRangesT &&value)
AWS_EC2_API StaleIpPermission(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API StaleIpPermission & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetIpRanges(IpRangesT &&value)
const Aws::Vector< Aws::String > & GetPrefixListIds() const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
StaleIpPermission & AddIpRanges(IpRangesT &&value)
AWS_EC2_API StaleIpPermission()=default
StaleIpPermission & AddUserIdGroupPairs(UserIdGroupPairsT &&value)
StaleIpPermission & WithFromPort(int value)
StaleIpPermission & AddPrefixListIds(PrefixListIdsT &&value)
const Aws::String & GetIpProtocol() const
const Aws::Vector< Aws::String > & GetIpRanges() const
void SetUserIdGroupPairs(UserIdGroupPairsT &&value)
StaleIpPermission & WithUserIdGroupPairs(UserIdGroupPairsT &&value)
void SetIpProtocol(IpProtocolT &&value)
void SetPrefixListIds(PrefixListIdsT &&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