AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
AwsVpcConfiguration.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ecs/ECS_EXPORTS.h>
10#include <aws/ecs/model/AssignPublicIp.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace ECS {
22namespace Model {
23
33 public:
34 AWS_ECS_API AwsVpcConfiguration() = default;
38
40
45 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
46 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
47 template <typename SubnetsT = Aws::Vector<Aws::String>>
48 void SetSubnets(SubnetsT&& value) {
49 m_subnetsHasBeenSet = true;
50 m_subnets = std::forward<SubnetsT>(value);
51 }
52 template <typename SubnetsT = Aws::Vector<Aws::String>>
53 AwsVpcConfiguration& WithSubnets(SubnetsT&& value) {
54 SetSubnets(std::forward<SubnetsT>(value));
55 return *this;
56 }
57 template <typename SubnetsT = Aws::String>
58 AwsVpcConfiguration& AddSubnets(SubnetsT&& value) {
59 m_subnetsHasBeenSet = true;
60 m_subnets.emplace_back(std::forward<SubnetsT>(value));
61 return *this;
62 }
64
66
72 inline const Aws::Vector<Aws::String>& GetSecurityGroups() const { return m_securityGroups; }
73 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
74 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
75 void SetSecurityGroups(SecurityGroupsT&& value) {
76 m_securityGroupsHasBeenSet = true;
77 m_securityGroups = std::forward<SecurityGroupsT>(value);
78 }
79 template <typename SecurityGroupsT = Aws::Vector<Aws::String>>
80 AwsVpcConfiguration& WithSecurityGroups(SecurityGroupsT&& value) {
81 SetSecurityGroups(std::forward<SecurityGroupsT>(value));
82 return *this;
83 }
84 template <typename SecurityGroupsT = Aws::String>
85 AwsVpcConfiguration& AddSecurityGroups(SecurityGroupsT&& value) {
86 m_securityGroupsHasBeenSet = true;
87 m_securityGroups.emplace_back(std::forward<SecurityGroupsT>(value));
88 return *this;
89 }
91
93
101 inline AssignPublicIp GetAssignPublicIp() const { return m_assignPublicIp; }
102 inline bool AssignPublicIpHasBeenSet() const { return m_assignPublicIpHasBeenSet; }
104 m_assignPublicIpHasBeenSet = true;
105 m_assignPublicIp = value;
106 }
108 SetAssignPublicIp(value);
109 return *this;
110 }
112 private:
113 Aws::Vector<Aws::String> m_subnets;
114
115 Aws::Vector<Aws::String> m_securityGroups;
116
117 AssignPublicIp m_assignPublicIp{AssignPublicIp::NOT_SET};
118 bool m_subnetsHasBeenSet = false;
119 bool m_securityGroupsHasBeenSet = false;
120 bool m_assignPublicIpHasBeenSet = false;
121};
122
123} // namespace Model
124} // namespace ECS
125} // namespace Aws
AwsVpcConfiguration & WithSubnets(SubnetsT &&value)
void SetAssignPublicIp(AssignPublicIp value)
AWS_ECS_API AwsVpcConfiguration()=default
AWS_ECS_API AwsVpcConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AwsVpcConfiguration & AddSecurityGroups(SecurityGroupsT &&value)
AWS_ECS_API AwsVpcConfiguration(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetSecurityGroups() const
const Aws::Vector< Aws::String > & GetSubnets() const
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
AwsVpcConfiguration & AddSubnets(SubnetsT &&value)
AwsVpcConfiguration & WithAssignPublicIp(AssignPublicIp value)
AwsVpcConfiguration & WithSecurityGroups(SecurityGroupsT &&value)
void SetSecurityGroups(SecurityGroupsT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue