AWS SDK for C++  0.12.9
AWS SDK for C++
StaleIpPermission.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>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace EC2
32 {
33 namespace Model
34 {
35 
40  {
41  public:
44  StaleIpPermission& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
53  inline long GetFromPort() const{ return m_fromPort; }
54 
59  inline void SetFromPort(long value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
60 
65  inline StaleIpPermission& WithFromPort(long value) { SetFromPort(value); return *this;}
66 
73  inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; }
74 
81  inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
82 
89  inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; }
90 
97  inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); }
98 
105  inline StaleIpPermission& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;}
106 
113  inline StaleIpPermission& WithIpProtocol(Aws::String&& value) { SetIpProtocol(value); return *this;}
114 
121  inline StaleIpPermission& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;}
122 
126  inline const Aws::Vector<Aws::String>& GetIpRanges() const{ return m_ipRanges; }
127 
131  inline void SetIpRanges(const Aws::Vector<Aws::String>& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; }
132 
136  inline void SetIpRanges(Aws::Vector<Aws::String>&& value) { m_ipRangesHasBeenSet = true; m_ipRanges = value; }
137 
141  inline StaleIpPermission& WithIpRanges(const Aws::Vector<Aws::String>& value) { SetIpRanges(value); return *this;}
142 
146  inline StaleIpPermission& WithIpRanges(Aws::Vector<Aws::String>&& value) { SetIpRanges(value); return *this;}
147 
151  inline StaleIpPermission& AddIpRanges(const Aws::String& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; }
152 
156  inline StaleIpPermission& AddIpRanges(Aws::String&& value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; }
157 
161  inline StaleIpPermission& AddIpRanges(const char* value) { m_ipRangesHasBeenSet = true; m_ipRanges.push_back(value); return *this; }
162 
167  inline const Aws::Vector<Aws::String>& GetPrefixListIds() const{ return m_prefixListIds; }
168 
173  inline void SetPrefixListIds(const Aws::Vector<Aws::String>& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = value; }
174 
179  inline void SetPrefixListIds(Aws::Vector<Aws::String>&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds = value; }
180 
185  inline StaleIpPermission& WithPrefixListIds(const Aws::Vector<Aws::String>& value) { SetPrefixListIds(value); return *this;}
186 
191  inline StaleIpPermission& WithPrefixListIds(Aws::Vector<Aws::String>&& value) { SetPrefixListIds(value); return *this;}
192 
197  inline StaleIpPermission& AddPrefixListIds(const Aws::String& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; }
198 
203  inline StaleIpPermission& AddPrefixListIds(Aws::String&& value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; }
204 
209  inline StaleIpPermission& AddPrefixListIds(const char* value) { m_prefixListIdsHasBeenSet = true; m_prefixListIds.push_back(value); return *this; }
210 
215  inline long GetToPort() const{ return m_toPort; }
216 
221  inline void SetToPort(long value) { m_toPortHasBeenSet = true; m_toPort = value; }
222 
227  inline StaleIpPermission& WithToPort(long value) { SetToPort(value); return *this;}
228 
233  inline const Aws::Vector<UserIdGroupPair>& GetUserIdGroupPairs() const{ return m_userIdGroupPairs; }
234 
239  inline void SetUserIdGroupPairs(const Aws::Vector<UserIdGroupPair>& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = value; }
240 
245  inline void SetUserIdGroupPairs(Aws::Vector<UserIdGroupPair>&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs = value; }
246 
251  inline StaleIpPermission& WithUserIdGroupPairs(const Aws::Vector<UserIdGroupPair>& value) { SetUserIdGroupPairs(value); return *this;}
252 
257  inline StaleIpPermission& WithUserIdGroupPairs(Aws::Vector<UserIdGroupPair>&& value) { SetUserIdGroupPairs(value); return *this;}
258 
263  inline StaleIpPermission& AddUserIdGroupPairs(const UserIdGroupPair& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; }
264 
269  inline StaleIpPermission& AddUserIdGroupPairs(UserIdGroupPair&& value) { m_userIdGroupPairsHasBeenSet = true; m_userIdGroupPairs.push_back(value); return *this; }
270 
271  private:
272  long m_fromPort;
273  bool m_fromPortHasBeenSet;
274  Aws::String m_ipProtocol;
275  bool m_ipProtocolHasBeenSet;
276  Aws::Vector<Aws::String> m_ipRanges;
277  bool m_ipRangesHasBeenSet;
278  Aws::Vector<Aws::String> m_prefixListIds;
279  bool m_prefixListIdsHasBeenSet;
280  long m_toPort;
281  bool m_toPortHasBeenSet;
282  Aws::Vector<UserIdGroupPair> m_userIdGroupPairs;
283  bool m_userIdGroupPairsHasBeenSet;
284  };
285 
286 } // namespace Model
287 } // namespace EC2
288 } // namespace Aws
StaleIpPermission & AddUserIdGroupPairs(const UserIdGroupPair &value)
StaleIpPermission & WithUserIdGroupPairs(const Aws::Vector< UserIdGroupPair > &value)
void SetIpRanges(const Aws::Vector< Aws::String > &value)
StaleIpPermission & WithIpProtocol(const Aws::String &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::Vector< Aws::String > & GetPrefixListIds() const
void SetIpProtocol(const char *value)
StaleIpPermission & WithToPort(long value)
StaleIpPermission & WithFromPort(long value)
StaleIpPermission & WithPrefixListIds(Aws::Vector< Aws::String > &&value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
StaleIpPermission & AddIpRanges(Aws::String &&value)
StaleIpPermission & AddPrefixListIds(const Aws::String &value)
StaleIpPermission & AddIpRanges(const Aws::String &value)
StaleIpPermission & WithPrefixListIds(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetIpRanges() const
StaleIpPermission & AddUserIdGroupPairs(UserIdGroupPair &&value)
StaleIpPermission & WithIpProtocol(Aws::String &&value)
StaleIpPermission & WithUserIdGroupPairs(Aws::Vector< UserIdGroupPair > &&value)
void SetIpProtocol(Aws::String &&value)
StaleIpPermission & WithIpRanges(const Aws::Vector< Aws::String > &value)
void SetPrefixListIds(const Aws::Vector< Aws::String > &value)
void SetIpProtocol(const Aws::String &value)
StaleIpPermission & AddPrefixListIds(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::Vector< UserIdGroupPair > & GetUserIdGroupPairs() const
const Aws::String & GetIpProtocol() const
void SetPrefixListIds(Aws::Vector< Aws::String > &&value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
void SetUserIdGroupPairs(const Aws::Vector< UserIdGroupPair > &value)
StaleIpPermission & AddIpRanges(const char *value)
StaleIpPermission & AddPrefixListIds(Aws::String &&value)
void SetUserIdGroupPairs(Aws::Vector< UserIdGroupPair > &&value)
JSON (JavaScript Object Notation).
StaleIpPermission & WithIpRanges(Aws::Vector< Aws::String > &&value)
StaleIpPermission & WithIpProtocol(const char *value)
void SetIpRanges(Aws::Vector< Aws::String > &&value)