AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreatePlacementGroupRequest.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/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/PlacementStrategy.h>
12#include <aws/ec2/model/SpreadLevel.h>
13#include <aws/ec2/model/TagSpecification.h>
14
15#include <utility>
16
17namespace Aws {
18namespace EC2 {
19namespace Model {
20
24 public:
25 AWS_EC2_API CreatePlacementGroupRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "CreatePlacementGroup"; }
32
33 AWS_EC2_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
44 inline int GetPartitionCount() const { return m_partitionCount; }
45 inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; }
46 inline void SetPartitionCount(int value) {
47 m_partitionCountHasBeenSet = true;
48 m_partitionCount = value;
49 }
51 SetPartitionCount(value);
52 return *this;
53 }
55
57
60 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
61 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
62 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
63 void SetTagSpecifications(TagSpecificationsT&& value) {
64 m_tagSpecificationsHasBeenSet = true;
65 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
66 }
67 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
69 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
70 return *this;
71 }
72 template <typename TagSpecificationsT = TagSpecification>
74 m_tagSpecificationsHasBeenSet = true;
75 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
76 return *this;
77 }
79
81
86 inline SpreadLevel GetSpreadLevel() const { return m_spreadLevel; }
87 inline bool SpreadLevelHasBeenSet() const { return m_spreadLevelHasBeenSet; }
88 inline void SetSpreadLevel(SpreadLevel value) {
89 m_spreadLevelHasBeenSet = true;
90 m_spreadLevel = value;
91 }
93 SetSpreadLevel(value);
94 return *this;
95 }
97
99
102 inline const Aws::String& GetLinkedGroupId() const { return m_linkedGroupId; }
103 inline bool LinkedGroupIdHasBeenSet() const { return m_linkedGroupIdHasBeenSet; }
104 template <typename LinkedGroupIdT = Aws::String>
105 void SetLinkedGroupId(LinkedGroupIdT&& value) {
106 m_linkedGroupIdHasBeenSet = true;
107 m_linkedGroupId = std::forward<LinkedGroupIdT>(value);
108 }
109 template <typename LinkedGroupIdT = Aws::String>
111 SetLinkedGroupId(std::forward<LinkedGroupIdT>(value));
112 return *this;
113 }
115
117
123 inline bool GetDryRun() const { return m_dryRun; }
124 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
125 inline void SetDryRun(bool value) {
126 m_dryRunHasBeenSet = true;
127 m_dryRun = value;
128 }
130 SetDryRun(value);
131 return *this;
132 }
134
136
140 inline const Aws::String& GetGroupName() const { return m_groupName; }
141 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
142 template <typename GroupNameT = Aws::String>
143 void SetGroupName(GroupNameT&& value) {
144 m_groupNameHasBeenSet = true;
145 m_groupName = std::forward<GroupNameT>(value);
146 }
147 template <typename GroupNameT = Aws::String>
149 SetGroupName(std::forward<GroupNameT>(value));
150 return *this;
151 }
153
155
158 inline PlacementStrategy GetStrategy() const { return m_strategy; }
159 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
160 inline void SetStrategy(PlacementStrategy value) {
161 m_strategyHasBeenSet = true;
162 m_strategy = value;
163 }
165 SetStrategy(value);
166 return *this;
167 }
169 private:
170 int m_partitionCount{0};
171
172 Aws::Vector<TagSpecification> m_tagSpecifications;
173
174 SpreadLevel m_spreadLevel{SpreadLevel::NOT_SET};
175
176 Aws::String m_linkedGroupId;
177
178 bool m_dryRun{false};
179
180 Aws::String m_groupName;
181
183 bool m_partitionCountHasBeenSet = false;
184 bool m_tagSpecificationsHasBeenSet = false;
185 bool m_spreadLevelHasBeenSet = false;
186 bool m_linkedGroupIdHasBeenSet = false;
187 bool m_dryRunHasBeenSet = false;
188 bool m_groupNameHasBeenSet = false;
189 bool m_strategyHasBeenSet = false;
190};
191
192} // namespace Model
193} // namespace EC2
194} // namespace Aws
CreatePlacementGroupRequest & WithLinkedGroupId(LinkedGroupIdT &&value)
AWS_EC2_API CreatePlacementGroupRequest()=default
CreatePlacementGroupRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
CreatePlacementGroupRequest & AddTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreatePlacementGroupRequest & WithSpreadLevel(SpreadLevel value)
CreatePlacementGroupRequest & WithGroupName(GroupNameT &&value)
virtual const char * GetServiceRequestName() const override
CreatePlacementGroupRequest & WithPartitionCount(int value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreatePlacementGroupRequest & WithStrategy(PlacementStrategy value)
CreatePlacementGroupRequest & WithDryRun(bool value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector