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/UserIdGroupPair.h>
12#include <aws/ec2/model/IpRange.h>
13#include <aws/ec2/model/Ipv6Range.h>
14#include <aws/ec2/model/PrefixListId.h>
62 template<
typename IpProtocolT = Aws::String>
63 void SetIpProtocol(IpProtocolT&& value) { m_ipProtocolHasBeenSet =
true; m_ipProtocol = std::forward<IpProtocolT>(value); }
64 template<
typename IpProtocolT = Aws::String>
75 inline void SetFromPort(
int value) { m_fromPortHasBeenSet =
true; m_fromPort = value; }
88 inline void SetToPort(
int value) { m_toPortHasBeenSet =
true; m_toPort = value; }
98 template<
typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
99 void SetUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet =
true; m_userIdGroupPairs = std::forward<UserIdGroupPairsT>(value); }
100 template<
typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
102 template<
typename UserIdGroupPairsT = UserIdGroupPair>
103 IpPermission&
AddUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet =
true; m_userIdGroupPairs.emplace_back(std::forward<UserIdGroupPairsT>(value));
return *
this; }
112 template<
typename IpRangesT = Aws::Vector<IpRange>>
113 void SetIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet =
true; m_ipRanges = std::forward<IpRangesT>(value); }
114 template<
typename IpRangesT = Aws::Vector<IpRange>>
116 template<
typename IpRangesT = IpRange>
117 IpPermission&
AddIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet =
true; m_ipRanges.emplace_back(std::forward<IpRangesT>(value));
return *
this; }
126 template<
typename Ipv6RangesT = Aws::Vector<Ipv6Range>>
127 void SetIpv6Ranges(Ipv6RangesT&& value) { m_ipv6RangesHasBeenSet =
true; m_ipv6Ranges = std::forward<Ipv6RangesT>(value); }
128 template<
typename Ipv6RangesT = Aws::Vector<Ipv6Range>>
130 template<
typename Ipv6RangesT = Ipv6Range>
131 IpPermission&
AddIpv6Ranges(Ipv6RangesT&& value) { m_ipv6RangesHasBeenSet =
true; m_ipv6Ranges.emplace_back(std::forward<Ipv6RangesT>(value));
return *
this; }
140 template<
typename PrefixListIdsT = Aws::Vector<PrefixListId>>
141 void SetPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet =
true; m_prefixListIds = std::forward<PrefixListIdsT>(value); }
142 template<
typename PrefixListIdsT = Aws::Vector<PrefixListId>>
144 template<
typename PrefixListIdsT = PrefixListId>
145 IpPermission&
AddPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet =
true; m_prefixListIds.emplace_back(std::forward<PrefixListIdsT>(value));
return *
this; }
150 bool m_ipProtocolHasBeenSet =
false;
153 bool m_fromPortHasBeenSet =
false;
156 bool m_toPortHasBeenSet =
false;
159 bool m_userIdGroupPairsHasBeenSet =
false;
162 bool m_ipRangesHasBeenSet =
false;
165 bool m_ipv6RangesHasBeenSet =
false;
168 bool m_prefixListIdsHasBeenSet =
false;
IpPermission & AddUserIdGroupPairs(UserIdGroupPairsT &&value)
void SetIpv6Ranges(Ipv6RangesT &&value)
const Aws::Vector< IpRange > & GetIpRanges() const
IpPermission & AddIpRanges(IpRangesT &&value)
void SetIpRanges(IpRangesT &&value)
IpPermission & WithPrefixListIds(PrefixListIdsT &&value)
bool ToPortHasBeenSet() const
const Aws::Vector< Ipv6Range > & GetIpv6Ranges() const
IpPermission & WithFromPort(int value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
bool IpRangesHasBeenSet() const
IpPermission & AddIpv6Ranges(Ipv6RangesT &&value)
const Aws::String & GetIpProtocol() const
void SetUserIdGroupPairs(UserIdGroupPairsT &&value)
IpPermission & WithIpv6Ranges(Ipv6RangesT &&value)
IpPermission & WithToPort(int value)
IpPermission & WithUserIdGroupPairs(UserIdGroupPairsT &&value)
bool IpProtocolHasBeenSet() const
bool FromPortHasBeenSet() const
void SetToPort(int value)
AWS_EC2_API IpPermission & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool UserIdGroupPairsHasBeenSet() const
void SetIpProtocol(IpProtocolT &&value)
bool PrefixListIdsHasBeenSet() const
IpPermission & WithIpProtocol(IpProtocolT &&value)
const Aws::Vector< UserIdGroupPair > & GetUserIdGroupPairs() const
IpPermission & WithIpRanges(IpRangesT &&value)
void SetFromPort(int value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API IpPermission()=default
void SetPrefixListIds(PrefixListIdsT &&value)
AWS_EC2_API IpPermission(const Aws::Utils::Xml::XmlNode &xmlNode)
IpPermission & AddPrefixListIds(PrefixListIdsT &&value)
const Aws::Vector< PrefixListId > & GetPrefixListIds() const
bool Ipv6RangesHasBeenSet() const
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