AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateNetworkInterfaceRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2Request.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/ConnectionTrackingSpecificationRequest.h>
13#include <aws/ec2/model/InstanceIpv6Address.h>
14#include <aws/ec2/model/Ipv4PrefixSpecificationRequest.h>
15#include <aws/ec2/model/Ipv6PrefixSpecificationRequest.h>
16#include <aws/ec2/model/NetworkInterfaceCreationType.h>
17#include <aws/ec2/model/OperatorRequest.h>
18#include <aws/ec2/model/PrivateIpAddressSpecification.h>
19#include <aws/ec2/model/TagSpecification.h>
20
21#include <utility>
22
23namespace Aws {
24namespace EC2 {
25namespace Model {
26
30 public:
31 AWS_EC2_API CreateNetworkInterfaceRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateNetworkInterface"; }
38
39 AWS_EC2_API Aws::String SerializePayload() const override;
40
41 protected:
42 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
43
44 public:
46
52 inline const Aws::Vector<Ipv4PrefixSpecificationRequest>& GetIpv4Prefixes() const { return m_ipv4Prefixes; }
53 inline bool Ipv4PrefixesHasBeenSet() const { return m_ipv4PrefixesHasBeenSet; }
54 template <typename Ipv4PrefixesT = Aws::Vector<Ipv4PrefixSpecificationRequest>>
55 void SetIpv4Prefixes(Ipv4PrefixesT&& value) {
56 m_ipv4PrefixesHasBeenSet = true;
57 m_ipv4Prefixes = std::forward<Ipv4PrefixesT>(value);
58 }
59 template <typename Ipv4PrefixesT = Aws::Vector<Ipv4PrefixSpecificationRequest>>
61 SetIpv4Prefixes(std::forward<Ipv4PrefixesT>(value));
62 return *this;
63 }
64 template <typename Ipv4PrefixesT = Ipv4PrefixSpecificationRequest>
66 m_ipv4PrefixesHasBeenSet = true;
67 m_ipv4Prefixes.emplace_back(std::forward<Ipv4PrefixesT>(value));
68 return *this;
69 }
71
73
79 inline int GetIpv4PrefixCount() const { return m_ipv4PrefixCount; }
80 inline bool Ipv4PrefixCountHasBeenSet() const { return m_ipv4PrefixCountHasBeenSet; }
81 inline void SetIpv4PrefixCount(int value) {
82 m_ipv4PrefixCountHasBeenSet = true;
83 m_ipv4PrefixCount = value;
84 }
86 SetIpv4PrefixCount(value);
87 return *this;
88 }
90
92
97 inline const Aws::Vector<Ipv6PrefixSpecificationRequest>& GetIpv6Prefixes() const { return m_ipv6Prefixes; }
98 inline bool Ipv6PrefixesHasBeenSet() const { return m_ipv6PrefixesHasBeenSet; }
99 template <typename Ipv6PrefixesT = Aws::Vector<Ipv6PrefixSpecificationRequest>>
100 void SetIpv6Prefixes(Ipv6PrefixesT&& value) {
101 m_ipv6PrefixesHasBeenSet = true;
102 m_ipv6Prefixes = std::forward<Ipv6PrefixesT>(value);
103 }
104 template <typename Ipv6PrefixesT = Aws::Vector<Ipv6PrefixSpecificationRequest>>
106 SetIpv6Prefixes(std::forward<Ipv6PrefixesT>(value));
107 return *this;
108 }
109 template <typename Ipv6PrefixesT = Ipv6PrefixSpecificationRequest>
111 m_ipv6PrefixesHasBeenSet = true;
112 m_ipv6Prefixes.emplace_back(std::forward<Ipv6PrefixesT>(value));
113 return *this;
114 }
116
118
124 inline int GetIpv6PrefixCount() const { return m_ipv6PrefixCount; }
125 inline bool Ipv6PrefixCountHasBeenSet() const { return m_ipv6PrefixCountHasBeenSet; }
126 inline void SetIpv6PrefixCount(int value) {
127 m_ipv6PrefixCountHasBeenSet = true;
128 m_ipv6PrefixCount = value;
129 }
131 SetIpv6PrefixCount(value);
132 return *this;
133 }
135
137
144 inline NetworkInterfaceCreationType GetInterfaceType() const { return m_interfaceType; }
145 inline bool InterfaceTypeHasBeenSet() const { return m_interfaceTypeHasBeenSet; }
147 m_interfaceTypeHasBeenSet = true;
148 m_interfaceType = value;
149 }
151 SetInterfaceType(value);
152 return *this;
153 }
155
157
160 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
161 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
162 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
163 void SetTagSpecifications(TagSpecificationsT&& value) {
164 m_tagSpecificationsHasBeenSet = true;
165 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
166 }
167 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
169 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
170 return *this;
171 }
172 template <typename TagSpecificationsT = TagSpecification>
174 m_tagSpecificationsHasBeenSet = true;
175 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
176 return *this;
177 }
179
181
187 inline const Aws::String& GetClientToken() const { return m_clientToken; }
188 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
189 template <typename ClientTokenT = Aws::String>
190 void SetClientToken(ClientTokenT&& value) {
191 m_clientTokenHasBeenSet = true;
192 m_clientToken = std::forward<ClientTokenT>(value);
193 }
194 template <typename ClientTokenT = Aws::String>
196 SetClientToken(std::forward<ClientTokenT>(value));
197 return *this;
198 }
200
202
217 inline bool GetEnablePrimaryIpv6() const { return m_enablePrimaryIpv6; }
218 inline bool EnablePrimaryIpv6HasBeenSet() const { return m_enablePrimaryIpv6HasBeenSet; }
219 inline void SetEnablePrimaryIpv6(bool value) {
220 m_enablePrimaryIpv6HasBeenSet = true;
221 m_enablePrimaryIpv6 = value;
222 }
225 return *this;
226 }
228
230
234 return m_connectionTrackingSpecification;
235 }
236 inline bool ConnectionTrackingSpecificationHasBeenSet() const { return m_connectionTrackingSpecificationHasBeenSet; }
237 template <typename ConnectionTrackingSpecificationT = ConnectionTrackingSpecificationRequest>
238 void SetConnectionTrackingSpecification(ConnectionTrackingSpecificationT&& value) {
239 m_connectionTrackingSpecificationHasBeenSet = true;
240 m_connectionTrackingSpecification = std::forward<ConnectionTrackingSpecificationT>(value);
241 }
242 template <typename ConnectionTrackingSpecificationT = ConnectionTrackingSpecificationRequest>
243 CreateNetworkInterfaceRequest& WithConnectionTrackingSpecification(ConnectionTrackingSpecificationT&& value) {
244 SetConnectionTrackingSpecification(std::forward<ConnectionTrackingSpecificationT>(value));
245 return *this;
246 }
248
250
253 inline const OperatorRequest& GetOperator() const { return m_operator; }
254 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
255 template <typename OperatorT = OperatorRequest>
256 void SetOperator(OperatorT&& value) {
257 m_operatorHasBeenSet = true;
258 m_operator = std::forward<OperatorT>(value);
259 }
260 template <typename OperatorT = OperatorRequest>
262 SetOperator(std::forward<OperatorT>(value));
263 return *this;
264 }
266
268
271 inline const Aws::String& GetSubnetId() const { return m_subnetId; }
272 inline bool SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
273 template <typename SubnetIdT = Aws::String>
274 void SetSubnetId(SubnetIdT&& value) {
275 m_subnetIdHasBeenSet = true;
276 m_subnetId = std::forward<SubnetIdT>(value);
277 }
278 template <typename SubnetIdT = Aws::String>
280 SetSubnetId(std::forward<SubnetIdT>(value));
281 return *this;
282 }
284
286
289 inline const Aws::String& GetDescription() const { return m_description; }
290 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
291 template <typename DescriptionT = Aws::String>
292 void SetDescription(DescriptionT&& value) {
293 m_descriptionHasBeenSet = true;
294 m_description = std::forward<DescriptionT>(value);
295 }
296 template <typename DescriptionT = Aws::String>
298 SetDescription(std::forward<DescriptionT>(value));
299 return *this;
300 }
302
304
311 inline const Aws::String& GetPrivateIpAddress() const { return m_privateIpAddress; }
312 inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; }
313 template <typename PrivateIpAddressT = Aws::String>
314 void SetPrivateIpAddress(PrivateIpAddressT&& value) {
315 m_privateIpAddressHasBeenSet = true;
316 m_privateIpAddress = std::forward<PrivateIpAddressT>(value);
317 }
318 template <typename PrivateIpAddressT = Aws::String>
320 SetPrivateIpAddress(std::forward<PrivateIpAddressT>(value));
321 return *this;
322 }
324
326
329 inline const Aws::Vector<Aws::String>& GetGroups() const { return m_groups; }
330 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
331 template <typename GroupsT = Aws::Vector<Aws::String>>
332 void SetGroups(GroupsT&& value) {
333 m_groupsHasBeenSet = true;
334 m_groups = std::forward<GroupsT>(value);
335 }
336 template <typename GroupsT = Aws::Vector<Aws::String>>
338 SetGroups(std::forward<GroupsT>(value));
339 return *this;
340 }
341 template <typename GroupsT = Aws::String>
343 m_groupsHasBeenSet = true;
344 m_groups.emplace_back(std::forward<GroupsT>(value));
345 return *this;
346 }
348
350
355 inline const Aws::Vector<PrivateIpAddressSpecification>& GetPrivateIpAddresses() const { return m_privateIpAddresses; }
356 inline bool PrivateIpAddressesHasBeenSet() const { return m_privateIpAddressesHasBeenSet; }
357 template <typename PrivateIpAddressesT = Aws::Vector<PrivateIpAddressSpecification>>
358 void SetPrivateIpAddresses(PrivateIpAddressesT&& value) {
359 m_privateIpAddressesHasBeenSet = true;
360 m_privateIpAddresses = std::forward<PrivateIpAddressesT>(value);
361 }
362 template <typename PrivateIpAddressesT = Aws::Vector<PrivateIpAddressSpecification>>
364 SetPrivateIpAddresses(std::forward<PrivateIpAddressesT>(value));
365 return *this;
366 }
367 template <typename PrivateIpAddressesT = PrivateIpAddressSpecification>
369 m_privateIpAddressesHasBeenSet = true;
370 m_privateIpAddresses.emplace_back(std::forward<PrivateIpAddressesT>(value));
371 return *this;
372 }
374
376
385 inline int GetSecondaryPrivateIpAddressCount() const { return m_secondaryPrivateIpAddressCount; }
386 inline bool SecondaryPrivateIpAddressCountHasBeenSet() const { return m_secondaryPrivateIpAddressCountHasBeenSet; }
387 inline void SetSecondaryPrivateIpAddressCount(int value) {
388 m_secondaryPrivateIpAddressCountHasBeenSet = true;
389 m_secondaryPrivateIpAddressCount = value;
390 }
393 return *this;
394 }
396
398
404 inline const Aws::Vector<InstanceIpv6Address>& GetIpv6Addresses() const { return m_ipv6Addresses; }
405 inline bool Ipv6AddressesHasBeenSet() const { return m_ipv6AddressesHasBeenSet; }
406 template <typename Ipv6AddressesT = Aws::Vector<InstanceIpv6Address>>
407 void SetIpv6Addresses(Ipv6AddressesT&& value) {
408 m_ipv6AddressesHasBeenSet = true;
409 m_ipv6Addresses = std::forward<Ipv6AddressesT>(value);
410 }
411 template <typename Ipv6AddressesT = Aws::Vector<InstanceIpv6Address>>
413 SetIpv6Addresses(std::forward<Ipv6AddressesT>(value));
414 return *this;
415 }
416 template <typename Ipv6AddressesT = InstanceIpv6Address>
418 m_ipv6AddressesHasBeenSet = true;
419 m_ipv6Addresses.emplace_back(std::forward<Ipv6AddressesT>(value));
420 return *this;
421 }
423
425
434 inline int GetIpv6AddressCount() const { return m_ipv6AddressCount; }
435 inline bool Ipv6AddressCountHasBeenSet() const { return m_ipv6AddressCountHasBeenSet; }
436 inline void SetIpv6AddressCount(int value) {
437 m_ipv6AddressCountHasBeenSet = true;
438 m_ipv6AddressCount = value;
439 }
441 SetIpv6AddressCount(value);
442 return *this;
443 }
445
447
453 inline bool GetDryRun() const { return m_dryRun; }
454 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
455 inline void SetDryRun(bool value) {
456 m_dryRunHasBeenSet = true;
457 m_dryRun = value;
458 }
460 SetDryRun(value);
461 return *this;
462 }
464 private:
466
467 int m_ipv4PrefixCount{0};
468
470
471 int m_ipv6PrefixCount{0};
472
474
475 Aws::Vector<TagSpecification> m_tagSpecifications;
476
478
479 bool m_enablePrimaryIpv6{false};
480
481 ConnectionTrackingSpecificationRequest m_connectionTrackingSpecification;
482
483 OperatorRequest m_operator;
484
485 Aws::String m_subnetId;
486
487 Aws::String m_description;
488
489 Aws::String m_privateIpAddress;
490
492
494
495 int m_secondaryPrivateIpAddressCount{0};
496
497 Aws::Vector<InstanceIpv6Address> m_ipv6Addresses;
498
499 int m_ipv6AddressCount{0};
500
501 bool m_dryRun{false};
502 bool m_ipv4PrefixesHasBeenSet = false;
503 bool m_ipv4PrefixCountHasBeenSet = false;
504 bool m_ipv6PrefixesHasBeenSet = false;
505 bool m_ipv6PrefixCountHasBeenSet = false;
506 bool m_interfaceTypeHasBeenSet = false;
507 bool m_tagSpecificationsHasBeenSet = false;
508 bool m_clientTokenHasBeenSet = true;
509 bool m_enablePrimaryIpv6HasBeenSet = false;
510 bool m_connectionTrackingSpecificationHasBeenSet = false;
511 bool m_operatorHasBeenSet = false;
512 bool m_subnetIdHasBeenSet = false;
513 bool m_descriptionHasBeenSet = false;
514 bool m_privateIpAddressHasBeenSet = false;
515 bool m_groupsHasBeenSet = false;
516 bool m_privateIpAddressesHasBeenSet = false;
517 bool m_secondaryPrivateIpAddressCountHasBeenSet = false;
518 bool m_ipv6AddressesHasBeenSet = false;
519 bool m_ipv6AddressCountHasBeenSet = false;
520 bool m_dryRunHasBeenSet = false;
521};
522
523} // namespace Model
524} // namespace EC2
525} // namespace Aws
const Aws::Vector< Aws::String > & GetGroups() const
CreateNetworkInterfaceRequest & WithSecondaryPrivateIpAddressCount(int value)
CreateNetworkInterfaceRequest & WithPrivateIpAddress(PrivateIpAddressT &&value)
const Aws::Vector< PrivateIpAddressSpecification > & GetPrivateIpAddresses() const
void SetConnectionTrackingSpecification(ConnectionTrackingSpecificationT &&value)
const Aws::Vector< Ipv6PrefixSpecificationRequest > & GetIpv6Prefixes() const
CreateNetworkInterfaceRequest & AddPrivateIpAddresses(PrivateIpAddressesT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateNetworkInterfaceRequest & WithPrivateIpAddresses(PrivateIpAddressesT &&value)
CreateNetworkInterfaceRequest & WithIpv4PrefixCount(int value)
CreateNetworkInterfaceRequest & WithIpv6AddressCount(int value)
CreateNetworkInterfaceRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateNetworkInterfaceRequest & WithOperator(OperatorT &&value)
CreateNetworkInterfaceRequest & WithClientToken(ClientTokenT &&value)
CreateNetworkInterfaceRequest & AddIpv4Prefixes(Ipv4PrefixesT &&value)
const ConnectionTrackingSpecificationRequest & GetConnectionTrackingSpecification() const
CreateNetworkInterfaceRequest & WithEnablePrimaryIpv6(bool value)
CreateNetworkInterfaceRequest & WithDryRun(bool value)
CreateNetworkInterfaceRequest & WithIpv4Prefixes(Ipv4PrefixesT &&value)
const Aws::Vector< InstanceIpv6Address > & GetIpv6Addresses() const
CreateNetworkInterfaceRequest & WithIpv6PrefixCount(int value)
CreateNetworkInterfaceRequest & WithSubnetId(SubnetIdT &&value)
CreateNetworkInterfaceRequest & WithIpv6Addresses(Ipv6AddressesT &&value)
CreateNetworkInterfaceRequest & AddIpv6Addresses(Ipv6AddressesT &&value)
CreateNetworkInterfaceRequest & AddIpv6Prefixes(Ipv6PrefixesT &&value)
CreateNetworkInterfaceRequest & WithInterfaceType(NetworkInterfaceCreationType value)
CreateNetworkInterfaceRequest & WithGroups(GroupsT &&value)
CreateNetworkInterfaceRequest & WithDescription(DescriptionT &&value)
CreateNetworkInterfaceRequest & AddTagSpecifications(TagSpecificationsT &&value)
void SetInterfaceType(NetworkInterfaceCreationType value)
CreateNetworkInterfaceRequest & WithConnectionTrackingSpecification(ConnectionTrackingSpecificationT &&value)
CreateNetworkInterfaceRequest & AddGroups(GroupsT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
const Aws::Vector< Ipv4PrefixSpecificationRequest > & GetIpv4Prefixes() const
virtual const char * GetServiceRequestName() const override
CreateNetworkInterfaceRequest & WithIpv6Prefixes(Ipv6PrefixesT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector