AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
60 inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); }
61 inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); }
62 inline AwsEc2SecurityGroupIpPermission& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;}
63 inline AwsEc2SecurityGroupIpPermission& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;}
64 inline AwsEc2SecurityGroupIpPermission& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;}
66
68
73 inline int GetFromPort() const{ return m_fromPort; }
74 inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; }
75 inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
76 inline AwsEc2SecurityGroupIpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
78
80
85 inline int GetToPort() const{ return m_toPort; }
86 inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; }
87 inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
88 inline AwsEc2SecurityGroupIpPermission& WithToPort(int value) { SetToPort(value); return *this;}
90
92
95 inline const Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>& GetUserIdGroupPairs() const{ return m_userIdGroupPairs; }
96 inline bool UserIdGroupPairsHasBeenSet() const { return m_userIdGroupPairsHasBeenSet; }
97 inline void SetUserIdGroupPairs(const Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = value; }
98 inline void SetUserIdGroupPairs(Aws::Vector<AwsEc2SecurityGroupUserIdGroupPair>&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = std::move(value); }
101 inline AwsEc2SecurityGroupIpPermission& AddUserIdGroupPairs(const AwsEc2SecurityGroupUserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; }
102 inline AwsEc2SecurityGroupIpPermission& AddUserIdGroupPairs(AwsEc2SecurityGroupUserIdGroupPair&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(std::move(value)); return *this; }
104
106
109 inline const Aws::Vector<AwsEc2SecurityGroupIpRange>& GetIpRanges() const{ return m_ipRanges; }
110 inline bool IpRangesHasBeenSet() const { return m_ipRangesHasBeenSet; }
111 inline void SetIpRanges(const Aws::Vector<AwsEc2SecurityGroupIpRange>& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; }
112 inline void SetIpRanges(Aws::Vector<AwsEc2SecurityGroupIpRange>&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = std::move(value); }
115 inline AwsEc2SecurityGroupIpPermission& AddIpRanges(const AwsEc2SecurityGroupIpRange& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; }
116 inline AwsEc2SecurityGroupIpPermission& AddIpRanges(AwsEc2SecurityGroupIpRange&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(std::move(value)); return *this; }
118
120
123 inline const Aws::Vector<AwsEc2SecurityGroupIpv6Range>& GetIpv6Ranges() const{ return m_ipv6Ranges; }
124 inline bool Ipv6RangesHasBeenSet() const { return m_ipv6RangesHasBeenSet; }
125 inline void SetIpv6Ranges(const Aws::Vector<AwsEc2SecurityGroupIpv6Range>& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = value; }
126 inline void SetIpv6Ranges(Aws::Vector<AwsEc2SecurityGroupIpv6Range>&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges = std::move(value); }
129 inline AwsEc2SecurityGroupIpPermission& AddIpv6Ranges(const AwsEc2SecurityGroupIpv6Range& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(value); return *this; }
130 inline AwsEc2SecurityGroupIpPermission& AddIpv6Ranges(AwsEc2SecurityGroupIpv6Range&& value) { m_ipv6RangesHasBeenSet = true; m_ipv6Ranges.push_back(std::move(value)); return *this; }
132
134
139 inline const Aws::Vector<AwsEc2SecurityGroupPrefixListId>& GetPrefixListIds() const{ return m_prefixListIds; }
140 inline bool PrefixListIdsHasBeenSet() const { return m_prefixListIdsHasBeenSet; }
141 inline void SetPrefixListIds(const Aws::Vector<AwsEc2SecurityGroupPrefixListId>& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = value; }
142 inline void SetPrefixListIds(Aws::Vector<AwsEc2SecurityGroupPrefixListId>&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = std::move(value); }
145 inline AwsEc2SecurityGroupIpPermission& AddPrefixListIds(const AwsEc2SecurityGroupPrefixListId& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; }
146 inline AwsEc2SecurityGroupIpPermission& AddPrefixListIds(AwsEc2SecurityGroupPrefixListId&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(std::move(value)); return *this; }
148 private:
149
150 Aws::String m_ipProtocol;
151 bool m_ipProtocolHasBeenSet = false;
152
153 int m_fromPort;
154 bool m_fromPortHasBeenSet = false;
155
156 int m_toPort;
157 bool m_toPortHasBeenSet = false;
158
160 bool m_userIdGroupPairsHasBeenSet = false;
161
163 bool m_ipRangesHasBeenSet = false;
164
166 bool m_ipv6RangesHasBeenSet = false;
167
169 bool m_prefixListIdsHasBeenSet = false;
170 };
171
172} // namespace Model
173} // namespace SecurityHub
174} // namespace Aws
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
AwsEc2SecurityGroupIpPermission & WithIpRanges(Aws::Vector< AwsEc2SecurityGroupIpRange > &&value)
AwsEc2SecurityGroupIpPermission & AddPrefixListIds(const AwsEc2SecurityGroupPrefixListId &value)
AWS_SECURITYHUB_API AwsEc2SecurityGroupIpPermission(Aws::Utils::Json::JsonView jsonValue)
AwsEc2SecurityGroupIpPermission & WithPrefixListIds(const Aws::Vector< AwsEc2SecurityGroupPrefixListId > &value)
AwsEc2SecurityGroupIpPermission & WithIpProtocol(const char *value)
void SetIpv6Ranges(const Aws::Vector< AwsEc2SecurityGroupIpv6Range > &value)
AwsEc2SecurityGroupIpPermission & WithIpProtocol(Aws::String &&value)
const Aws::Vector< AwsEc2SecurityGroupIpv6Range > & GetIpv6Ranges() const
AWS_SECURITYHUB_API AwsEc2SecurityGroupIpPermission & operator=(Aws::Utils::Json::JsonView jsonValue)
AwsEc2SecurityGroupIpPermission & WithUserIdGroupPairs(Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &&value)
AwsEc2SecurityGroupIpPermission & WithIpv6Ranges(Aws::Vector< AwsEc2SecurityGroupIpv6Range > &&value)
AwsEc2SecurityGroupIpPermission & AddUserIdGroupPairs(const AwsEc2SecurityGroupUserIdGroupPair &value)
void SetUserIdGroupPairs(Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &&value)
const Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > & GetUserIdGroupPairs() const
AwsEc2SecurityGroupIpPermission & AddIpv6Ranges(const AwsEc2SecurityGroupIpv6Range &value)
void SetPrefixListIds(Aws::Vector< AwsEc2SecurityGroupPrefixListId > &&value)
void SetUserIdGroupPairs(const Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &value)
AwsEc2SecurityGroupIpPermission & AddIpRanges(const AwsEc2SecurityGroupIpRange &value)
void SetIpRanges(Aws::Vector< AwsEc2SecurityGroupIpRange > &&value)
AwsEc2SecurityGroupIpPermission & AddUserIdGroupPairs(AwsEc2SecurityGroupUserIdGroupPair &&value)
void SetPrefixListIds(const Aws::Vector< AwsEc2SecurityGroupPrefixListId > &value)
AwsEc2SecurityGroupIpPermission & WithPrefixListIds(Aws::Vector< AwsEc2SecurityGroupPrefixListId > &&value)
const Aws::Vector< AwsEc2SecurityGroupIpRange > & GetIpRanges() const
AwsEc2SecurityGroupIpPermission & WithIpv6Ranges(const Aws::Vector< AwsEc2SecurityGroupIpv6Range > &value)
const Aws::Vector< AwsEc2SecurityGroupPrefixListId > & GetPrefixListIds() const
void SetIpv6Ranges(Aws::Vector< AwsEc2SecurityGroupIpv6Range > &&value)
AwsEc2SecurityGroupIpPermission & AddPrefixListIds(AwsEc2SecurityGroupPrefixListId &&value)
AwsEc2SecurityGroupIpPermission & WithIpProtocol(const Aws::String &value)
AwsEc2SecurityGroupIpPermission & AddIpv6Ranges(AwsEc2SecurityGroupIpv6Range &&value)
AwsEc2SecurityGroupIpPermission & WithUserIdGroupPairs(const Aws::Vector< AwsEc2SecurityGroupUserIdGroupPair > &value)
AwsEc2SecurityGroupIpPermission & AddIpRanges(AwsEc2SecurityGroupIpRange &&value)
AwsEc2SecurityGroupIpPermission & WithIpRanges(const Aws::Vector< AwsEc2SecurityGroupIpRange > &value)
void SetIpRanges(const Aws::Vector< AwsEc2SecurityGroupIpRange > &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