AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
IpPermission.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/UserIdGroupPair.h>
12#include <aws/ec2/model/IpRange.h>
13#include <aws/ec2/model/Ipv6Range.h>
14#include <aws/ec2/model/PrefixListId.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Xml
22{
23 class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace EC2
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_EC2_API IpPermission();
40 AWS_EC2_API IpPermission(const Aws::Utils::Xml::XmlNode& xmlNode);
41 AWS_EC2_API IpPermission& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
42
43 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
44 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
45
46
48
60 inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; }
61 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
62 inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
63 inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); }
64 inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); }
65 inline IpPermission& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;}
66 inline IpPermission& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;}
67 inline IpPermission& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;}
69
71
75 inline int GetFromPort() const{ return m_fromPort; }
76 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
77 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
78 inline IpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
80
82
88 inline int GetToPort() const{ return m_toPort; }
89 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
90 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
91 inline IpPermission& WithToPort(int value) { SetToPort(value); return *this;}
93
95
98 inline const Aws::Vector<UserIdGroupPair>& GetUserIdGroupPairs() const{ return m_userIdGroupPairs; }
99 inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
100 inline void SetUserIdGroupPairs(const Aws::Vector<UserIdGroupPair>& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = value; }
101 inline void SetUserIdGroupPairs(Aws::Vector<UserIdGroupPair>&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::move(value); }
103 inline IpPermission& WithUserIdGroupPairs(Aws::Vector<UserIdGroupPair>&& value) { SetUserIdGroupPairs(std::move(value)); return *this;}
104 inline IpPermission& AddUserIdGroupPairs(const UserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; }
105 inline IpPermission& AddUserIdGroupPairs(UserIdGroupPair&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(std::move(value)); return *this; }
107
109
112 inline const Aws::Vector<IpRange>& GetIpRanges() const{ return m_ipRanges; }
113 inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
114 inline void SetIpRanges(const Aws::Vector<IpRange>& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; }
115 inline void SetIpRanges(Aws::Vector<IpRange>&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::move(value); }
116 inline IpPermission& WithIpRanges(const Aws::Vector<IpRange>& value) { SetIpRanges(value); return *this;}
117 inline IpPermission& WithIpRanges(Aws::Vector<IpRange>&& value) { SetIpRanges(std::move(value)); return *this;}
118 inline IpPermission& AddIpRanges(const IpRange& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; }
119 inline IpPermission& AddIpRanges(IpRange&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(std::move(value)); return *this; }
121
123
126 inline const Aws::Vector<Ipv6Range>& GetIpv6Ranges() const{ return m_ipv6Ranges; }
127 inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; }
128 inline void SetIpv6Ranges(const Aws::Vector<Ipv6Range>& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = value; }
129 inline void SetIpv6Ranges(Aws::Vector<Ipv6Range>&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = std::move(value); }
130 inline IpPermission& WithIpv6Ranges(const Aws::Vector<Ipv6Range>& value) { SetIpv6Ranges(value); return *this;}
131 inline IpPermission& WithIpv6Ranges(Aws::Vector<Ipv6Range>&& value) { SetIpv6Ranges(std::move(value)); return *this;}
132 inline IpPermission& AddIpv6Ranges(const Ipv6Range& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(value); return *this; }
133 inline IpPermission& AddIpv6Ranges(Ipv6Range&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(std::move(value)); return *this; }
135
137
140 inline const Aws::Vector<PrefixListId>& GetPrefixListIds() const{ return m_prefixListIds; }
141 inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
142 inline void SetPrefixListIds(const Aws::Vector<PrefixListId>& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = value; }
143 inline void SetPrefixListIds(Aws::Vector<PrefixListId>&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::move(value); }
144 inline IpPermission& WithPrefixListIds(const Aws::Vector<PrefixListId>& value) { SetPrefixListIds(value); return *this;}
145 inline IpPermission& WithPrefixListIds(Aws::Vector<PrefixListId>&& value) { SetPrefixListIds(std::move(value)); return *this;}
146 inline IpPermission& AddPrefixListIds(const PrefixListId& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; }
147 inline IpPermission& AddPrefixListIds(PrefixListId&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(std::move(value)); return *this; }
149 private:
150
151 Aws::String m_ipProtocol;
152 bool m_ipProtocolHasBeenSet = false;
153
154 int m_fromPort;
155 bool m_fromPortHasBeenSet = false;
156
157 int m_toPort;
158 bool m_toPortHasBeenSet = false;
159
160 Aws::Vector<UserIdGroupPair> m_userIdGroupPairs;
161 bool m_userIdGroupPairsHasBeenSet = false;
162
163 Aws::Vector<IpRange> m_ipRanges;
164 bool m_ipRangesHasBeenSet = false;
165
166 Aws::Vector<Ipv6Range> m_ipv6Ranges;
167 bool m_ipv6RangesHasBeenSet = false;
168
169 Aws::Vector<PrefixListId> m_prefixListIds;
170 bool m_prefixListIdsHasBeenSet = false;
171 };
172
173} // namespace Model
174} // namespace EC2
175} // namespace Aws
IpPermission & WithPrefixListIds(const Aws::Vector< PrefixListId > &value)
IpPermission & AddIpv6Ranges(Ipv6Range &&value)
void SetIpv6Ranges(const Aws::Vector< Ipv6Range > &value)
IpPermission & WithUserIdGroupPairs(Aws::Vector< UserIdGroupPair > &&value)
const Aws::Vector< IpRange > & GetIpRanges() const
IpPermission & WithIpRanges(Aws::Vector< IpRange > &&value)
void SetIpProtocol(const char *value)
const Aws::Vector< Ipv6Range > & GetIpv6Ranges() const
IpPermission & AddPrefixListIds(PrefixListId &&value)
IpPermission & WithFromPort(int value)
IpPermission & WithUserIdGroupPairs(const Aws::Vector< UserIdGroupPair > &value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetUserIdGroupPairs(const Aws::Vector< UserIdGroupPair > &value)
IpPermission & WithPrefixListIds(Aws::Vector< PrefixListId > &&value)
const Aws::String & GetIpProtocol() const
IpPermission & AddIpRanges(IpRange &&value)
IpPermission & WithToPort(int value)
void SetIpProtocol(const Aws::String &value)
IpPermission & WithIpProtocol(const Aws::String &value)
IpPermission & AddUserIdGroupPairs(UserIdGroupPair &&value)
AWS_EC2_API IpPermission & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
IpPermission & AddIpRanges(const IpRange &value)
bool UserIdGroupPairsHasBeenSet() const
IpPermission & WithIpv6Ranges(const Aws::Vector< Ipv6Range > &value)
IpPermission & AddPrefixListIds(const PrefixListId &value)
const Aws::Vector< UserIdGroupPair > & GetUserIdGroupPairs() const
void SetPrefixListIds(Aws::Vector< PrefixListId > &&value)
void SetUserIdGroupPairs(Aws::Vector< UserIdGroupPair > &&value)
void SetIpRanges(const Aws::Vector< IpRange > &value)
void SetPrefixListIds(const Aws::Vector< PrefixListId > &value)
void SetIpRanges(Aws::Vector< IpRange > &&value)
IpPermission & AddIpv6Ranges(const Ipv6Range &value)
IpPermission & AddUserIdGroupPairs(const UserIdGroupPair &value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetIpv6Ranges(Aws::Vector< Ipv6Range > &&value)
IpPermission & WithIpRanges(const Aws::Vector< IpRange > &value)
AWS_EC2_API IpPermission(const Aws::Utils::Xml::XmlNode &xmlNode)
IpPermission & WithIpv6Ranges(Aws::Vector< Ipv6Range > &&value)
const Aws::Vector< PrefixListId > & GetPrefixListIds() const
IpPermission & WithIpProtocol(const char *value)
IpPermission & WithIpProtocol(Aws::String &&value)
void SetIpProtocol(Aws::String &&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