AWS SDK for C++  0.14.3
AWS SDK for C++
PrefixList.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>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace EC2
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  PrefixList();
42  PrefixList(const Aws::Utils::Xml::XmlNode& xmlNode);
43  PrefixList& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
51  inline const Aws::String& GetPrefixListId() const{ return m_prefixListId; }
52 
56  inline void SetPrefixListId(const Aws::String& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = value; }
57 
61  inline void SetPrefixListId(Aws::String&& value) { m_prefixListIdHasBeenSet = true; m_prefixListId = value; }
62 
66  inline void SetPrefixListId(const char* value) { m_prefixListIdHasBeenSet = true; m_prefixListId.assign(value); }
67 
71  inline PrefixList& WithPrefixListId(const Aws::String& value) { SetPrefixListId(value); return *this;}
72 
76  inline PrefixList& WithPrefixListId(Aws::String&& value) { SetPrefixListId(value); return *this;}
77 
81  inline PrefixList& WithPrefixListId(const char* value) { SetPrefixListId(value); return *this;}
82 
86  inline const Aws::String& GetPrefixListName() const{ return m_prefixListName; }
87 
91  inline void SetPrefixListName(const Aws::String& value) { m_prefixListNameHasBeenSet = true; m_prefixListName = value; }
92 
96  inline void SetPrefixListName(Aws::String&& value) { m_prefixListNameHasBeenSet = true; m_prefixListName = value; }
97 
101  inline void SetPrefixListName(const char* value) { m_prefixListNameHasBeenSet = true; m_prefixListName.assign(value); }
102 
106  inline PrefixList& WithPrefixListName(const Aws::String& value) { SetPrefixListName(value); return *this;}
107 
111  inline PrefixList& WithPrefixListName(Aws::String&& value) { SetPrefixListName(value); return *this;}
112 
116  inline PrefixList& WithPrefixListName(const char* value) { SetPrefixListName(value); return *this;}
117 
121  inline const Aws::Vector<Aws::String>& GetCidrs() const{ return m_cidrs; }
122 
126  inline void SetCidrs(const Aws::Vector<Aws::String>& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
127 
131  inline void SetCidrs(Aws::Vector<Aws::String>&& value) { m_cidrsHasBeenSet = true; m_cidrs = value; }
132 
136  inline PrefixList& WithCidrs(const Aws::Vector<Aws::String>& value) { SetCidrs(value); return *this;}
137 
141  inline PrefixList& WithCidrs(Aws::Vector<Aws::String>&& value) { SetCidrs(value); return *this;}
142 
146  inline PrefixList& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
147 
151  inline PrefixList& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
152 
156  inline PrefixList& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; }
157 
158  private:
159  Aws::String m_prefixListId;
160  bool m_prefixListIdHasBeenSet;
161  Aws::String m_prefixListName;
162  bool m_prefixListNameHasBeenSet;
163  Aws::Vector<Aws::String> m_cidrs;
164  bool m_cidrsHasBeenSet;
165  };
166 
167 } // namespace Model
168 } // namespace EC2
169 } // namespace Aws
PrefixList & WithPrefixListName(Aws::String &&value)
Definition: PrefixList.h:111
void SetPrefixListId(const Aws::String &value)
Definition: PrefixList.h:56
PrefixList & AddCidrs(Aws::String &&value)
Definition: PrefixList.h:151
PrefixList & WithCidrs(const Aws::Vector< Aws::String > &value)
Definition: PrefixList.h:136
PrefixList & AddCidrs(const char *value)
Definition: PrefixList.h:156
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
PrefixList & WithPrefixListName(const Aws::String &value)
Definition: PrefixList.h:106
PrefixList & WithPrefixListName(const char *value)
Definition: PrefixList.h:116
const Aws::Vector< Aws::String > & GetCidrs() const
Definition: PrefixList.h:121
const Aws::String & GetPrefixListName() const
Definition: PrefixList.h:86
PrefixList & WithCidrs(Aws::Vector< Aws::String > &&value)
Definition: PrefixList.h:141
void SetPrefixListId(const char *value)
Definition: PrefixList.h:66
void SetPrefixListName(const Aws::String &value)
Definition: PrefixList.h:91
void SetCidrs(const Aws::Vector< Aws::String > &value)
Definition: PrefixList.h:126
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
PrefixList & WithPrefixListId(const char *value)
Definition: PrefixList.h:81
PrefixList & WithPrefixListId(Aws::String &&value)
Definition: PrefixList.h:76
const Aws::String & GetPrefixListId() const
Definition: PrefixList.h:51
PrefixList & AddCidrs(const Aws::String &value)
Definition: PrefixList.h:146
void SetPrefixListName(Aws::String &&value)
Definition: PrefixList.h:96
void SetPrefixListId(Aws::String &&value)
Definition: PrefixList.h:61
void SetPrefixListName(const char *value)
Definition: PrefixList.h:101
PrefixList & WithPrefixListId(const Aws::String &value)
Definition: PrefixList.h:71
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetCidrs(Aws::Vector< Aws::String > &&value)
Definition: PrefixList.h:131
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
JSON (JavaScript Object Notation).