AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreatePlacementGroupRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/model/SpreadLevel.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/ec2/model/PlacementStrategy.h>
13#include <aws/ec2/model/TagSpecification.h>
14#include <utility>
15
16namespace Aws
17{
18namespace EC2
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_EC2_API CreatePlacementGroupRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreatePlacementGroup"; }
35
36 AWS_EC2_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
48 inline int GetPartitionCount() const { return m_partitionCount; }
49 inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; }
50 inline void SetPartitionCount(int value) { m_partitionCountHasBeenSet = true; m_partitionCount = value; }
51 inline CreatePlacementGroupRequest& WithPartitionCount(int value) { SetPartitionCount(value); return *this;}
53
55
58 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
59 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
60 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
61 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
62 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
63 CreatePlacementGroupRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
64 template<typename TagSpecificationsT = TagSpecification>
65 CreatePlacementGroupRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
67
69
74 inline SpreadLevel GetSpreadLevel() const { return m_spreadLevel; }
75 inline bool SpreadLevelHasBeenSet() const { return m_spreadLevelHasBeenSet; }
76 inline void SetSpreadLevel(SpreadLevel value) { m_spreadLevelHasBeenSet = true; m_spreadLevel = value; }
79
81
87 inline bool GetDryRun() const { return m_dryRun; }
88 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
89 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
90 inline CreatePlacementGroupRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
92
94
98 inline const Aws::String& GetGroupName() const { return m_groupName; }
99 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
100 template<typename GroupNameT = Aws::String>
101 void SetGroupName(GroupNameT&& value) { m_groupNameHasBeenSet = true; m_groupName = std::forward<GroupNameT>(value); }
102 template<typename GroupNameT = Aws::String>
103 CreatePlacementGroupRequest& WithGroupName(GroupNameT&& value) { SetGroupName(std::forward<GroupNameT>(value)); return *this;}
105
107
110 inline PlacementStrategy GetStrategy() const { return m_strategy; }
111 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
112 inline void SetStrategy(PlacementStrategy value) { m_strategyHasBeenSet = true; m_strategy = value; }
115 private:
116
117 int m_partitionCount{0};
118 bool m_partitionCountHasBeenSet = false;
119
120 Aws::Vector<TagSpecification> m_tagSpecifications;
121 bool m_tagSpecificationsHasBeenSet = false;
122
123 SpreadLevel m_spreadLevel{SpreadLevel::NOT_SET};
124 bool m_spreadLevelHasBeenSet = false;
125
126 bool m_dryRun{false};
127 bool m_dryRunHasBeenSet = false;
128
129 Aws::String m_groupName;
130 bool m_groupNameHasBeenSet = false;
131
133 bool m_strategyHasBeenSet = false;
134 };
135
136} // namespace Model
137} // namespace EC2
138} // namespace Aws
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