AWS SDK for C++  0.12.9
AWS SDK for C++
NetworkAclEntry.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace EC2
33 {
34 namespace Model
35 {
36 
41  {
42  public:
45  NetworkAclEntry& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
54  inline long GetRuleNumber() const{ return m_ruleNumber; }
55 
60  inline void SetRuleNumber(long value) { m_ruleNumberHasBeenSet = true; m_ruleNumber = value; }
61 
66  inline NetworkAclEntry& WithRuleNumber(long value) { SetRuleNumber(value); return *this;}
67 
71  inline const Aws::String& GetProtocol() const{ return m_protocol; }
72 
76  inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; }
77 
81  inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = value; }
82 
86  inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); }
87 
91  inline NetworkAclEntry& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;}
92 
96  inline NetworkAclEntry& WithProtocol(Aws::String&& value) { SetProtocol(value); return *this;}
97 
101  inline NetworkAclEntry& WithProtocol(const char* value) { SetProtocol(value); return *this;}
102 
106  inline const RuleAction& GetRuleAction() const{ return m_ruleAction; }
107 
111  inline void SetRuleAction(const RuleAction& value) { m_ruleActionHasBeenSet = true; m_ruleAction = value; }
112 
116  inline void SetRuleAction(RuleAction&& value) { m_ruleActionHasBeenSet = true; m_ruleAction = value; }
117 
121  inline NetworkAclEntry& WithRuleAction(const RuleAction& value) { SetRuleAction(value); return *this;}
122 
126  inline NetworkAclEntry& WithRuleAction(RuleAction&& value) { SetRuleAction(value); return *this;}
127 
132  inline bool GetEgress() const{ return m_egress; }
133 
138  inline void SetEgress(bool value) { m_egressHasBeenSet = true; m_egress = value; }
139 
144  inline NetworkAclEntry& WithEgress(bool value) { SetEgress(value); return *this;}
145 
149  inline const Aws::String& GetCidrBlock() const{ return m_cidrBlock; }
150 
154  inline void SetCidrBlock(const Aws::String& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = value; }
155 
159  inline void SetCidrBlock(Aws::String&& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = value; }
160 
164  inline void SetCidrBlock(const char* value) { m_cidrBlockHasBeenSet = true; m_cidrBlock.assign(value); }
165 
169  inline NetworkAclEntry& WithCidrBlock(const Aws::String& value) { SetCidrBlock(value); return *this;}
170 
174  inline NetworkAclEntry& WithCidrBlock(Aws::String&& value) { SetCidrBlock(value); return *this;}
175 
179  inline NetworkAclEntry& WithCidrBlock(const char* value) { SetCidrBlock(value); return *this;}
180 
184  inline const IcmpTypeCode& GetIcmpTypeCode() const{ return m_icmpTypeCode; }
185 
189  inline void SetIcmpTypeCode(const IcmpTypeCode& value) { m_icmpTypeCodeHasBeenSet = true; m_icmpTypeCode = value; }
190 
194  inline void SetIcmpTypeCode(IcmpTypeCode&& value) { m_icmpTypeCodeHasBeenSet = true; m_icmpTypeCode = value; }
195 
199  inline NetworkAclEntry& WithIcmpTypeCode(const IcmpTypeCode& value) { SetIcmpTypeCode(value); return *this;}
200 
204  inline NetworkAclEntry& WithIcmpTypeCode(IcmpTypeCode&& value) { SetIcmpTypeCode(value); return *this;}
205 
209  inline const PortRange& GetPortRange() const{ return m_portRange; }
210 
214  inline void SetPortRange(const PortRange& value) { m_portRangeHasBeenSet = true; m_portRange = value; }
215 
219  inline void SetPortRange(PortRange&& value) { m_portRangeHasBeenSet = true; m_portRange = value; }
220 
224  inline NetworkAclEntry& WithPortRange(const PortRange& value) { SetPortRange(value); return *this;}
225 
229  inline NetworkAclEntry& WithPortRange(PortRange&& value) { SetPortRange(value); return *this;}
230 
231  private:
232  long m_ruleNumber;
233  bool m_ruleNumberHasBeenSet;
234  Aws::String m_protocol;
235  bool m_protocolHasBeenSet;
236  RuleAction m_ruleAction;
237  bool m_ruleActionHasBeenSet;
238  bool m_egress;
239  bool m_egressHasBeenSet;
240  Aws::String m_cidrBlock;
241  bool m_cidrBlockHasBeenSet;
242  IcmpTypeCode m_icmpTypeCode;
243  bool m_icmpTypeCodeHasBeenSet;
244  PortRange m_portRange;
245  bool m_portRangeHasBeenSet;
246  };
247 
248 } // namespace Model
249 } // namespace EC2
250 } // namespace Aws
NetworkAclEntry & WithEgress(bool value)
const RuleAction & GetRuleAction() const
NetworkAclEntry & WithCidrBlock(const char *value)
void SetCidrBlock(const char *value)
void SetRuleAction(const RuleAction &value)
const Aws::String & GetProtocol() const
bool GetEgress() const
const IcmpTypeCode & GetIcmpTypeCode() const
NetworkAclEntry & WithPortRange(PortRange &&value)
NetworkAclEntry & WithRuleAction(const RuleAction &value)
void SetIcmpTypeCode(const IcmpTypeCode &value)
void SetCidrBlock(const Aws::String &value)
void SetEgress(bool value)
void SetPortRange(PortRange &&value)
const Aws::String & GetCidrBlock() const
NetworkAclEntry & WithIcmpTypeCode(const IcmpTypeCode &value)
void SetCidrBlock(Aws::String &&value)
void SetProtocol(const Aws::String &value)
void SetIcmpTypeCode(IcmpTypeCode &&value)
void SetProtocol(Aws::String &&value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
NetworkAclEntry & WithRuleAction(RuleAction &&value)
void SetProtocol(const char *value)
NetworkAclEntry & WithProtocol(const Aws::String &value)
NetworkAclEntry & WithPortRange(const PortRange &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
NetworkAclEntry & WithProtocol(Aws::String &&value)
long GetRuleNumber() const
const PortRange & GetPortRange() const
void SetRuleAction(RuleAction &&value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
NetworkAclEntry & WithRuleNumber(long value)
NetworkAclEntry & WithIcmpTypeCode(IcmpTypeCode &&value)
void SetPortRange(const PortRange &value)
NetworkAclEntry & WithCidrBlock(Aws::String &&value)
NetworkAclEntry & WithProtocol(const char *value)
void SetRuleNumber(long value)
NetworkAclEntry & WithCidrBlock(const Aws::String &value)
JSON (JavaScript Object Notation).