AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
StaleIpPermission.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 <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Xml
19{
20 class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2
24{
25namespace Model
26{
27
34 {
35 public:
36 AWS_EC2_API StaleIpPermission() = default;
37 AWS_EC2_API StaleIpPermission(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
43
45
49 inline int GetFromPort() const { return m_fromPort; }
50 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
51 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
52 inline StaleIpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
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) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::forward<IpProtocolT>(value); }
66 template<typename IpProtocolT = Aws::String>
67 StaleIpPermission& WithIpProtocol(IpProtocolT&& value) { SetIpProtocol(std::forward<IpProtocolT>(value)); return *this;}
69
71
74 inline const Aws::Vector<Aws::String>& GetIpRanges() const { return m_ipRanges; }
75 inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
76 template<typename IpRangesT = Aws::Vector<Aws::String>>
77 void SetIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::forward<IpRangesT>(value); }
78 template<typename IpRangesT = Aws::Vector<Aws::String>>
79 StaleIpPermission& WithIpRanges(IpRangesT&& value) { SetIpRanges(std::forward<IpRangesT>(value)); return *this;}
80 template<typename IpRangesT = Aws::String>
81 StaleIpPermission& AddIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.emplace_back(std::forward<IpRangesT>(value)); return *this; }
83
85
88 inline const Aws::Vector<Aws::String>& GetPrefixListIds() const { return m_prefixListIds; }
89 inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
90 template<typename PrefixListIdsT = Aws::Vector<Aws::String>>
91 void SetPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::forward<PrefixListIdsT>(value); }
92 template<typename PrefixListIdsT = Aws::Vector<Aws::String>>
93 StaleIpPermission& WithPrefixListIds(PrefixListIdsT&& value) { SetPrefixListIds(std::forward<PrefixListIdsT>(value)); return *this;}
94 template<typename PrefixListIdsT = Aws::String>
95 StaleIpPermission& AddPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.emplace_back(std::forward<PrefixListIdsT>(value)); return *this; }
97
99
103 inline int GetToPort() const { return m_toPort; }
104 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
105 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
106 inline StaleIpPermission& WithToPort(int value) { SetToPort(value); return *this;}
108
110
114 inline const Aws::Vector<UserIdGroupPair>& GetUserIdGroupPairs() const { return m_userIdGroupPairs; }
115 inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
116 template<typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
117 void SetUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::forward<UserIdGroupPairsT>(value); }
118 template<typename UserIdGroupPairsT = Aws::Vector<UserIdGroupPair>>
119 StaleIpPermission& WithUserIdGroupPairs(UserIdGroupPairsT&& value) { SetUserIdGroupPairs(std::forward<UserIdGroupPairsT>(value)); return *this;}
120 template<typename UserIdGroupPairsT = UserIdGroupPair>
121 StaleIpPermission& AddUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.emplace_back(std::forward<UserIdGroupPairsT>(value)); return *this; }
123 private:
124
125 int m_fromPort{0};
126 bool m_fromPortHasBeenSet = false;
127
128 Aws::String m_ipProtocol;
129 bool m_ipProtocolHasBeenSet = false;
130
131 Aws::Vector<Aws::String> m_ipRanges;
132 bool m_ipRangesHasBeenSet = false;
133
134 Aws::Vector<Aws::String> m_prefixListIds;
135 bool m_prefixListIdsHasBeenSet = false;
136
137 int m_toPort{0};
138 bool m_toPortHasBeenSet = false;
139
140 Aws::Vector<UserIdGroupPair> m_userIdGroupPairs;
141 bool m_userIdGroupPairsHasBeenSet = false;
142 };
143
144} // namespace Model
145} // namespace EC2
146} // 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