AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
AwsEc2SecurityGroupIpPermission.h
1
6#pragma once
7#include <aws/securityhub/SecurityHub_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/securityhub/model/AwsEc2SecurityGroupUserIdGroupPair.h>
11#include <aws/securityhub/model/AwsEc2SecurityGroupIpRange.h>
12#include <aws/securityhub/model/AwsEc2SecurityGroupIpv6Range.h>
13#include <aws/securityhub/model/AwsEc2SecurityGroupPrefixListId.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace SecurityHub
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_SECURITYHUB_API AwsEc2SecurityGroupIpPermission() = default;
42 AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
57 inline const Aws::String& GetIpProtocol() const { return m_ipProtocol; }
58 inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; }
59 template<typename IpProtocolT = Aws::String>
60 void SetIpProtocol(IpProtocolT&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::forward<IpProtocolT>(value); }
61 template<typename IpProtocolT = Aws::String>
62 AwsEc2SecurityGroupIpPermission& WithIpProtocol(IpProtocolT&& value) { SetIpProtocol(std::forward<IpProtocolT>(value)); return *this;}
64
66
71 inline int GetFromPort() const { return m_fromPort; }
72 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
73 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
74 inline AwsEc2SecurityGroupIpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
76
78
83 inline int GetToPort() const { return m_toPort; }
84 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
85 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
86 inline AwsEc2SecurityGroupIpPermission& WithToPort(int value) { SetToPort(value); return *this;}
88
90
93 inline const Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>& GetUserIdGroupPairs() const { return m_userIdGroupPairs; }
94 inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
95 template<typename UserIdGroupPairsT = Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>>
96 void SetUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::forward<UserIdGroupPairsT>(value); }
97 template<typename UserIdGroupPairsT = Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>>
98 AwsEc2SecurityGroupIpPermission& WithUserIdGroupPairs(UserIdGroupPairsT&& value) { SetUserIdGroupPairs(std::forward<UserIdGroupPairsT>(value)); return *this;}
99 template<typename UserIdGroupPairsT = AwsEc2SecurityGroupUserIdGroupPair>
100 AwsEc2SecurityGroupIpPermission& AddUserIdGroupPairs(UserIdGroupPairsT&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.emplace_back(std::forward<UserIdGroupPairsT>(value)); return *this; }
102
104
107 inline const Aws::Vector<AwsEc2SecurityGroupIpRange>& GetIpRanges() const { return m_ipRanges; }
108 inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
109 template<typename IpRangesT = Aws::Vector<AwsEc2SecurityGroupIpRange>>
110 void SetIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::forward<IpRangesT>(value); }
111 template<typename IpRangesT = Aws::Vector<AwsEc2SecurityGroupIpRange>>
112 AwsEc2SecurityGroupIpPermission& WithIpRanges(IpRangesT&& value) { SetIpRanges(std::forward<IpRangesT>(value)); return *this;}
113 template<typename IpRangesT = AwsEc2SecurityGroupIpRange>
114 AwsEc2SecurityGroupIpPermission& AddIpRanges(IpRangesT&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.emplace_back(std::forward<IpRangesT>(value)); return *this; }
116
118
121 inline const Aws::Vector<AwsEc2SecurityGroupIpv6Range>& GetIpv6Ranges() const { return m_ipv6Ranges; }
122 inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; }
123 template<typename Ipv6RangesT = Aws::Vector<AwsEc2SecurityGroupIpv6Range>>
124 void SetIpv6Ranges(Ipv6RangesT&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = std::forward<Ipv6RangesT>(value); }
125 template<typename Ipv6RangesT = Aws::Vector<AwsEc2SecurityGroupIpv6Range>>
126 AwsEc2SecurityGroupIpPermission& WithIpv6Ranges(Ipv6RangesT&& value) { SetIpv6Ranges(std::forward<Ipv6RangesT>(value)); return *this;}
127 template<typename Ipv6RangesT = AwsEc2SecurityGroupIpv6Range>
128 AwsEc2SecurityGroupIpPermission& AddIpv6Ranges(Ipv6RangesT&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.emplace_back(std::forward<Ipv6RangesT>(value)); return *this; }
130
132
137 inline const Aws::Vector<AwsEc2SecurityGroupPrefixListId>& GetPrefixListIds() const { return m_prefixListIds; }
138 inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
139 template<typename PrefixListIdsT = Aws::Vector<AwsEc2SecurityGroupPrefixListId>>
140 void SetPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::forward<PrefixListIdsT>(value); }
141 template<typename PrefixListIdsT = Aws::Vector<AwsEc2SecurityGroupPrefixListId>>
142 AwsEc2SecurityGroupIpPermission& WithPrefixListIds(PrefixListIdsT&& value) { SetPrefixListIds(std::forward<PrefixListIdsT>(value)); return *this;}
143 template<typename PrefixListIdsT = AwsEc2SecurityGroupPrefixListId>
144 AwsEc2SecurityGroupIpPermission& AddPrefixListIds(PrefixListIdsT&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.emplace_back(std::forward<PrefixListIdsT>(value)); return *this; }
146 private:
147
148 Aws::String m_ipProtocol;
149 bool m_ipProtocolHasBeenSet = false;
150
151 int m_fromPort{0};
152 bool m_fromPortHasBeenSet = false;
153
154 int m_toPort{0};
155 bool m_toPortHasBeenSet = false;
156
158 bool m_userIdGroupPairsHasBeenSet = false;
159
161 bool m_ipRangesHasBeenSet = false;
162
164 bool m_ipv6RangesHasBeenSet = false;
165
167 bool m_prefixListIdsHasBeenSet = false;
168 };
169
170} // namespace Model
171} // namespace SecurityHub
172} // namespace Aws
AwsEc2SecurityGroupIpPermission & AddIpv6Ranges(Ipv6RangesT &&value)
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
AwsEc2SecurityGroupIpPermission & WithUserIdGroupPairs(UserIdGroupPairsT &&value)
AWS_SECURITYHUB_API AwsEc2SecurityGroupIpPermission(Aws::Utils::Json::JsonView jsonValue)
AwsEc2SecurityGroupIpPermission & WithIpProtocol(IpProtocolT &&value)
AwsEc2SecurityGroupIpPermission & WithIpRanges(IpRangesT &&value)
const Aws::Vector< AwsEc2SecurityGroupIpv6Range > & GetIpv6Ranges() const
AWS_SECURITYHUB_API AwsEc2SecurityGroupIpPermission & operator=(Aws::Utils::Json::JsonView jsonValue)
AwsEc2SecurityGroupIpPermission & WithPrefixListIds(PrefixListIdsT &&value)
AWS_SECURITYHUB_API AwsEc2SecurityGroupIpPermission()=default
const Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > & GetUserIdGroupPairs() const
AwsEc2SecurityGroupIpPermission & WithIpv6Ranges(Ipv6RangesT &&value)
AwsEc2SecurityGroupIpPermission & AddIpRanges(IpRangesT &&value)
const Aws::Vector< AwsEc2SecurityGroupIpRange > & GetIpRanges() const
AwsEc2SecurityGroupIpPermission & AddUserIdGroupPairs(UserIdGroupPairsT &&value)
const Aws::Vector< AwsEc2SecurityGroupPrefixListId > & GetPrefixListIds() const
AwsEc2SecurityGroupIpPermission & AddPrefixListIds(PrefixListIdsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue