AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreateClusterRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/pcs/PCSRequest.h>
11#include <aws/pcs/PCS_EXPORTS.h>
12#include <aws/pcs/model/ClusterSlurmConfigurationRequest.h>
13#include <aws/pcs/model/NetworkingRequest.h>
14#include <aws/pcs/model/SchedulerRequest.h>
15#include <aws/pcs/model/Size.h>
16
17#include <utility>
18
19namespace Aws {
20namespace PCS {
21namespace Model {
22
26 public:
27 AWS_PCS_API CreateClusterRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateCluster"; }
34
35 AWS_PCS_API Aws::String SerializePayload() const override;
36
38
40
43 inline const Aws::String& GetClusterName() const { return m_clusterName; }
44 inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }
45 template <typename ClusterNameT = Aws::String>
46 void SetClusterName(ClusterNameT&& value) {
47 m_clusterNameHasBeenSet = true;
48 m_clusterName = std::forward<ClusterNameT>(value);
49 }
50 template <typename ClusterNameT = Aws::String>
51 CreateClusterRequest& WithClusterName(ClusterNameT&& value) {
52 SetClusterName(std::forward<ClusterNameT>(value));
53 return *this;
54 }
56
58
62 inline const SchedulerRequest& GetScheduler() const { return m_scheduler; }
63 inline bool SchedulerHasBeenSet() const { return m_schedulerHasBeenSet; }
64 template <typename SchedulerT = SchedulerRequest>
65 void SetScheduler(SchedulerT&& value) {
66 m_schedulerHasBeenSet = true;
67 m_scheduler = std::forward<SchedulerT>(value);
68 }
69 template <typename SchedulerT = SchedulerRequest>
70 CreateClusterRequest& WithScheduler(SchedulerT&& value) {
71 SetScheduler(std::forward<SchedulerT>(value));
72 return *this;
73 }
75
77
84 inline Size GetSize() const { return m_size; }
85 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
86 inline void SetSize(Size value) {
87 m_sizeHasBeenSet = true;
88 m_size = value;
89 }
91 SetSize(value);
92 return *this;
93 }
95
97
100 inline const NetworkingRequest& GetNetworking() const { return m_networking; }
101 inline bool NetworkingHasBeenSet() const { return m_networkingHasBeenSet; }
102 template <typename NetworkingT = NetworkingRequest>
103 void SetNetworking(NetworkingT&& value) {
104 m_networkingHasBeenSet = true;
105 m_networking = std::forward<NetworkingT>(value);
106 }
107 template <typename NetworkingT = NetworkingRequest>
108 CreateClusterRequest& WithNetworking(NetworkingT&& value) {
109 SetNetworking(std::forward<NetworkingT>(value));
110 return *this;
111 }
113
115
118 inline const ClusterSlurmConfigurationRequest& GetSlurmConfiguration() const { return m_slurmConfiguration; }
119 inline bool SlurmConfigurationHasBeenSet() const { return m_slurmConfigurationHasBeenSet; }
120 template <typename SlurmConfigurationT = ClusterSlurmConfigurationRequest>
121 void SetSlurmConfiguration(SlurmConfigurationT&& value) {
122 m_slurmConfigurationHasBeenSet = true;
123 m_slurmConfiguration = std::forward<SlurmConfigurationT>(value);
124 }
125 template <typename SlurmConfigurationT = ClusterSlurmConfigurationRequest>
126 CreateClusterRequest& WithSlurmConfiguration(SlurmConfigurationT&& value) {
127 SetSlurmConfiguration(std::forward<SlurmConfigurationT>(value));
128 return *this;
129 }
131
133
142 inline const Aws::String& GetClientToken() const { return m_clientToken; }
143 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
144 template <typename ClientTokenT = Aws::String>
145 void SetClientToken(ClientTokenT&& value) {
146 m_clientTokenHasBeenSet = true;
147 m_clientToken = std::forward<ClientTokenT>(value);
148 }
149 template <typename ClientTokenT = Aws::String>
150 CreateClusterRequest& WithClientToken(ClientTokenT&& value) {
151 SetClientToken(std::forward<ClientTokenT>(value));
152 return *this;
153 }
155
157
161 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
162 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
163 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
164 void SetTags(TagsT&& value) {
165 m_tagsHasBeenSet = true;
166 m_tags = std::forward<TagsT>(value);
167 }
168 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
170 SetTags(std::forward<TagsT>(value));
171 return *this;
172 }
173 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
174 CreateClusterRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
175 m_tagsHasBeenSet = true;
176 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
177 return *this;
178 }
180 private:
181 Aws::String m_clusterName;
182
183 SchedulerRequest m_scheduler;
184
185 Size m_size{Size::NOT_SET};
186
187 NetworkingRequest m_networking;
188
189 ClusterSlurmConfigurationRequest m_slurmConfiguration;
190
192
194 bool m_clusterNameHasBeenSet = false;
195 bool m_schedulerHasBeenSet = false;
196 bool m_sizeHasBeenSet = false;
197 bool m_networkingHasBeenSet = false;
198 bool m_slurmConfigurationHasBeenSet = false;
199 bool m_clientTokenHasBeenSet = true;
200 bool m_tagsHasBeenSet = false;
201};
202
203} // namespace Model
204} // namespace PCS
205} // namespace Aws
CreateClusterRequest & WithSize(Size value)
AWS_PCS_API Aws::String SerializePayload() const override
CreateClusterRequest & WithSlurmConfiguration(SlurmConfigurationT &&value)
CreateClusterRequest & WithClientToken(ClientTokenT &&value)
const NetworkingRequest & GetNetworking() const
virtual const char * GetServiceRequestName() const override
CreateClusterRequest & WithTags(TagsT &&value)
AWS_PCS_API CreateClusterRequest()=default
const Aws::Map< Aws::String, Aws::String > & GetTags() const
const Aws::String & GetClusterName() const
CreateClusterRequest & WithNetworking(NetworkingT &&value)
CreateClusterRequest & WithClusterName(ClusterNameT &&value)
const Aws::String & GetClientToken() const
const SchedulerRequest & GetScheduler() const
void SetSlurmConfiguration(SlurmConfigurationT &&value)
CreateClusterRequest & WithScheduler(SchedulerT &&value)
void SetClusterName(ClusterNameT &&value)
AWS_PCS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateClusterRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
const ClusterSlurmConfigurationRequest & GetSlurmConfiguration() const
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String