1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18   class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace EC2
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>An entry for a prefix list.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AddPrefixListEntry">AWS
29    * API Reference</a></p>
30    */
31   class AWS_EC2_API AddPrefixListEntry
32   {
33   public:
34     AddPrefixListEntry();
35     AddPrefixListEntry(const Aws::Utils::Xml::XmlNode& xmlNode);
36     AddPrefixListEntry& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37 
38     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39     void OutputToStream(Aws::OStream& oStream, const char* location) const;
40 
41 
42     /**
43      * <p>The CIDR block.</p>
44      */
GetCidr()45     inline const Aws::String& GetCidr() const{ return m_cidr; }
46 
47     /**
48      * <p>The CIDR block.</p>
49      */
CidrHasBeenSet()50     inline bool CidrHasBeenSet() const { return m_cidrHasBeenSet; }
51 
52     /**
53      * <p>The CIDR block.</p>
54      */
SetCidr(const Aws::String & value)55     inline void SetCidr(const Aws::String& value) { m_cidrHasBeenSet = true; m_cidr = value; }
56 
57     /**
58      * <p>The CIDR block.</p>
59      */
SetCidr(Aws::String && value)60     inline void SetCidr(Aws::String&& value) { m_cidrHasBeenSet = true; m_cidr = std::move(value); }
61 
62     /**
63      * <p>The CIDR block.</p>
64      */
SetCidr(const char * value)65     inline void SetCidr(const char* value) { m_cidrHasBeenSet = true; m_cidr.assign(value); }
66 
67     /**
68      * <p>The CIDR block.</p>
69      */
WithCidr(const Aws::String & value)70     inline AddPrefixListEntry& WithCidr(const Aws::String& value) { SetCidr(value); return *this;}
71 
72     /**
73      * <p>The CIDR block.</p>
74      */
WithCidr(Aws::String && value)75     inline AddPrefixListEntry& WithCidr(Aws::String&& value) { SetCidr(std::move(value)); return *this;}
76 
77     /**
78      * <p>The CIDR block.</p>
79      */
WithCidr(const char * value)80     inline AddPrefixListEntry& WithCidr(const char* value) { SetCidr(value); return *this;}
81 
82 
83     /**
84      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
85      * length.</p>
86      */
GetDescription()87     inline const Aws::String& GetDescription() const{ return m_description; }
88 
89     /**
90      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
91      * length.</p>
92      */
DescriptionHasBeenSet()93     inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
94 
95     /**
96      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
97      * length.</p>
98      */
SetDescription(const Aws::String & value)99     inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
100 
101     /**
102      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
103      * length.</p>
104      */
SetDescription(Aws::String && value)105     inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
106 
107     /**
108      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
109      * length.</p>
110      */
SetDescription(const char * value)111     inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
112 
113     /**
114      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
115      * length.</p>
116      */
WithDescription(const Aws::String & value)117     inline AddPrefixListEntry& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
118 
119     /**
120      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
121      * length.</p>
122      */
WithDescription(Aws::String && value)123     inline AddPrefixListEntry& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
124 
125     /**
126      * <p>A description for the entry.</p> <p>Constraints: Up to 255 characters in
127      * length.</p>
128      */
WithDescription(const char * value)129     inline AddPrefixListEntry& WithDescription(const char* value) { SetDescription(value); return *this;}
130 
131   private:
132 
133     Aws::String m_cidr;
134     bool m_cidrHasBeenSet;
135 
136     Aws::String m_description;
137     bool m_descriptionHasBeenSet;
138   };
139 
140 } // namespace Model
141 } // namespace EC2
142 } // namespace Aws
143