AWS SDK for C++  0.12.9
AWS SDK for C++
DhcpOptions.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 #include <aws/ec2/model/Tag.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:
43  DhcpOptions();
44  DhcpOptions(const Aws::Utils::Xml::XmlNode& xmlNode);
45  DhcpOptions& 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 
53  inline const Aws::String& GetDhcpOptionsId() const{ return m_dhcpOptionsId; }
54 
58  inline void SetDhcpOptionsId(const Aws::String& value) { m_dhcpOptionsIdHasBeenSet = true; m_dhcpOptionsId = value; }
59 
63  inline void SetDhcpOptionsId(Aws::String&& value) { m_dhcpOptionsIdHasBeenSet = true; m_dhcpOptionsId = value; }
64 
68  inline void SetDhcpOptionsId(const char* value) { m_dhcpOptionsIdHasBeenSet = true; m_dhcpOptionsId.assign(value); }
69 
73  inline DhcpOptions& WithDhcpOptionsId(const Aws::String& value) { SetDhcpOptionsId(value); return *this;}
74 
78  inline DhcpOptions& WithDhcpOptionsId(Aws::String&& value) { SetDhcpOptionsId(value); return *this;}
79 
83  inline DhcpOptions& WithDhcpOptionsId(const char* value) { SetDhcpOptionsId(value); return *this;}
84 
88  inline const Aws::Vector<DhcpConfiguration>& GetDhcpConfigurations() const{ return m_dhcpConfigurations; }
89 
93  inline void SetDhcpConfigurations(const Aws::Vector<DhcpConfiguration>& value) { m_dhcpConfigurationsHasBeenSet = true; m_dhcpConfigurations = value; }
94 
98  inline void SetDhcpConfigurations(Aws::Vector<DhcpConfiguration>&& value) { m_dhcpConfigurationsHasBeenSet = true; m_dhcpConfigurations = value; }
99 
103  inline DhcpOptions& WithDhcpConfigurations(const Aws::Vector<DhcpConfiguration>& value) { SetDhcpConfigurations(value); return *this;}
104 
108  inline DhcpOptions& WithDhcpConfigurations(Aws::Vector<DhcpConfiguration>&& value) { SetDhcpConfigurations(value); return *this;}
109 
113  inline DhcpOptions& AddDhcpConfigurations(const DhcpConfiguration& value) { m_dhcpConfigurationsHasBeenSet = true; m_dhcpConfigurations.push_back(value); return *this; }
114 
118  inline DhcpOptions& AddDhcpConfigurations(DhcpConfiguration&& value) { m_dhcpConfigurationsHasBeenSet = true; m_dhcpConfigurations.push_back(value); return *this; }
119 
123  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
124 
128  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
129 
133  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = value; }
134 
138  inline DhcpOptions& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
139 
143  inline DhcpOptions& WithTags(Aws::Vector<Tag>&& value) { SetTags(value); return *this;}
144 
148  inline DhcpOptions& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
149 
153  inline DhcpOptions& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
154 
155  private:
156  Aws::String m_dhcpOptionsId;
157  bool m_dhcpOptionsIdHasBeenSet;
158  Aws::Vector<DhcpConfiguration> m_dhcpConfigurations;
159  bool m_dhcpConfigurationsHasBeenSet;
160  Aws::Vector<Tag> m_tags;
161  bool m_tagsHasBeenSet;
162  };
163 
164 } // namespace Model
165 } // namespace EC2
166 } // namespace Aws
void SetDhcpOptionsId(const char *value)
Definition: DhcpOptions.h:68
void SetTags(const Aws::Vector< Tag > &value)
Definition: DhcpOptions.h:128
DhcpOptions & AddDhcpConfigurations(const DhcpConfiguration &value)
Definition: DhcpOptions.h:113
DhcpOptions & WithDhcpOptionsId(const char *value)
Definition: DhcpOptions.h:83
void SetDhcpOptionsId(const Aws::String &value)
Definition: DhcpOptions.h:58
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
DhcpOptions & AddDhcpConfigurations(DhcpConfiguration &&value)
Definition: DhcpOptions.h:118
DhcpOptions & WithDhcpConfigurations(const Aws::Vector< DhcpConfiguration > &value)
Definition: DhcpOptions.h:103
DhcpOptions & AddTags(const Tag &value)
Definition: DhcpOptions.h:148
DhcpOptions & WithDhcpConfigurations(Aws::Vector< DhcpConfiguration > &&value)
Definition: DhcpOptions.h:108
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
DhcpOptions & WithDhcpOptionsId(const Aws::String &value)
Definition: DhcpOptions.h:73
const Aws::String & GetDhcpOptionsId() const
Definition: DhcpOptions.h:53
const Aws::Vector< Tag > & GetTags() const
Definition: DhcpOptions.h:123
DhcpOptions & WithTags(const Aws::Vector< Tag > &value)
Definition: DhcpOptions.h:138
void SetTags(Aws::Vector< Tag > &&value)
Definition: DhcpOptions.h:133
DhcpOptions & WithTags(Aws::Vector< Tag > &&value)
Definition: DhcpOptions.h:143
DhcpOptions & AddTags(Tag &&value)
Definition: DhcpOptions.h:153
DhcpOptions & WithDhcpOptionsId(Aws::String &&value)
Definition: DhcpOptions.h:78
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetDhcpOptionsId(Aws::String &&value)
Definition: DhcpOptions.h:63
void SetDhcpConfigurations(const Aws::Vector< DhcpConfiguration > &value)
Definition: DhcpOptions.h:93
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
void SetDhcpConfigurations(Aws::Vector< DhcpConfiguration > &&value)
Definition: DhcpOptions.h:98
const Aws::Vector< DhcpConfiguration > & GetDhcpConfigurations() const
Definition: DhcpOptions.h:88
JSON (JavaScript Object Notation).