AWS SDK for C++

AWS SDK for C++ Version 1.11.782

Loading...
Searching...
No Matches
SubmitServiceJobRequest.h
1
6#pragma once
7#include <aws/batch/BatchRequest.h>
8#include <aws/batch/Batch_EXPORTS.h>
9#include <aws/batch/model/ServiceJobPreemptionConfiguration.h>
10#include <aws/batch/model/ServiceJobRetryStrategy.h>
11#include <aws/batch/model/ServiceJobTimeout.h>
12#include <aws/batch/model/ServiceJobType.h>
13#include <aws/core/utils/UUID.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Batch {
21namespace Model {
22
26 public:
27 AWS_BATCH_API SubmitServiceJobRequest() = 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 "SubmitServiceJob"; }
34
35 AWS_BATCH_API Aws::String SerializePayload() const override;
36
38
43 inline const Aws::String& GetJobName() const { return m_jobName; }
44 inline bool JobNameHasBeenSet() const { return m_jobNameHasBeenSet; }
45 template <typename JobNameT = Aws::String>
46 void SetJobName(JobNameT&& value) {
47 m_jobNameHasBeenSet = true;
48 m_jobName = std::forward<JobNameT>(value);
49 }
50 template <typename JobNameT = Aws::String>
52 SetJobName(std::forward<JobNameT>(value));
53 return *this;
54 }
56
58
63 inline const Aws::String& GetJobQueue() const { return m_jobQueue; }
64 inline bool JobQueueHasBeenSet() const { return m_jobQueueHasBeenSet; }
65 template <typename JobQueueT = Aws::String>
66 void SetJobQueue(JobQueueT&& value) {
67 m_jobQueueHasBeenSet = true;
68 m_jobQueue = std::forward<JobQueueT>(value);
69 }
70 template <typename JobQueueT = Aws::String>
72 SetJobQueue(std::forward<JobQueueT>(value));
73 return *this;
74 }
76
78
82 inline const ServiceJobRetryStrategy& GetRetryStrategy() const { return m_retryStrategy; }
83 inline bool RetryStrategyHasBeenSet() const { return m_retryStrategyHasBeenSet; }
84 template <typename RetryStrategyT = ServiceJobRetryStrategy>
85 void SetRetryStrategy(RetryStrategyT&& value) {
86 m_retryStrategyHasBeenSet = true;
87 m_retryStrategy = std::forward<RetryStrategyT>(value);
88 }
89 template <typename RetryStrategyT = ServiceJobRetryStrategy>
90 SubmitServiceJobRequest& WithRetryStrategy(RetryStrategyT&& value) {
91 SetRetryStrategy(std::forward<RetryStrategyT>(value));
92 return *this;
93 }
95
97
101 inline int GetSchedulingPriority() const { return m_schedulingPriority; }
102 inline bool SchedulingPriorityHasBeenSet() const { return m_schedulingPriorityHasBeenSet; }
103 inline void SetSchedulingPriority(int value) {
104 m_schedulingPriorityHasBeenSet = true;
105 m_schedulingPriority = value;
106 }
109 return *this;
110 }
112
114
118 inline const Aws::String& GetServiceRequestPayload() const { return m_serviceRequestPayload; }
119 inline bool ServiceRequestPayloadHasBeenSet() const { return m_serviceRequestPayloadHasBeenSet; }
120 template <typename ServiceRequestPayloadT = Aws::String>
121 void SetServiceRequestPayload(ServiceRequestPayloadT&& value) {
122 m_serviceRequestPayloadHasBeenSet = true;
123 m_serviceRequestPayload = std::forward<ServiceRequestPayloadT>(value);
124 }
125 template <typename ServiceRequestPayloadT = Aws::String>
126 SubmitServiceJobRequest& WithServiceRequestPayload(ServiceRequestPayloadT&& value) {
127 SetServiceRequestPayload(std::forward<ServiceRequestPayloadT>(value));
128 return *this;
129 }
131
133
137 inline ServiceJobType GetServiceJobType() const { return m_serviceJobType; }
138 inline bool ServiceJobTypeHasBeenSet() const { return m_serviceJobTypeHasBeenSet; }
140 m_serviceJobTypeHasBeenSet = true;
141 m_serviceJobType = value;
142 }
144 SetServiceJobType(value);
145 return *this;
146 }
148
150
155 inline const Aws::String& GetShareIdentifier() const { return m_shareIdentifier; }
156 inline bool ShareIdentifierHasBeenSet() const { return m_shareIdentifierHasBeenSet; }
157 template <typename ShareIdentifierT = Aws::String>
158 void SetShareIdentifier(ShareIdentifierT&& value) {
159 m_shareIdentifierHasBeenSet = true;
160 m_shareIdentifier = std::forward<ShareIdentifierT>(value);
161 }
162 template <typename ShareIdentifierT = Aws::String>
163 SubmitServiceJobRequest& WithShareIdentifier(ShareIdentifierT&& value) {
164 SetShareIdentifier(std::forward<ShareIdentifierT>(value));
165 return *this;
166 }
168
170
175 inline const Aws::String& GetQuotaShareName() const { return m_quotaShareName; }
176 inline bool QuotaShareNameHasBeenSet() const { return m_quotaShareNameHasBeenSet; }
177 template <typename QuotaShareNameT = Aws::String>
178 void SetQuotaShareName(QuotaShareNameT&& value) {
179 m_quotaShareNameHasBeenSet = true;
180 m_quotaShareName = std::forward<QuotaShareNameT>(value);
181 }
182 template <typename QuotaShareNameT = Aws::String>
183 SubmitServiceJobRequest& WithQuotaShareName(QuotaShareNameT&& value) {
184 SetQuotaShareName(std::forward<QuotaShareNameT>(value));
185 return *this;
186 }
188
190
193 inline const ServiceJobPreemptionConfiguration& GetPreemptionConfiguration() const { return m_preemptionConfiguration; }
194 inline bool PreemptionConfigurationHasBeenSet() const { return m_preemptionConfigurationHasBeenSet; }
195 template <typename PreemptionConfigurationT = ServiceJobPreemptionConfiguration>
196 void SetPreemptionConfiguration(PreemptionConfigurationT&& value) {
197 m_preemptionConfigurationHasBeenSet = true;
198 m_preemptionConfiguration = std::forward<PreemptionConfigurationT>(value);
199 }
200 template <typename PreemptionConfigurationT = ServiceJobPreemptionConfiguration>
201 SubmitServiceJobRequest& WithPreemptionConfiguration(PreemptionConfigurationT&& value) {
202 SetPreemptionConfiguration(std::forward<PreemptionConfigurationT>(value));
203 return *this;
204 }
206
208
212 inline const ServiceJobTimeout& GetTimeoutConfig() const { return m_timeoutConfig; }
213 inline bool TimeoutConfigHasBeenSet() const { return m_timeoutConfigHasBeenSet; }
214 template <typename TimeoutConfigT = ServiceJobTimeout>
215 void SetTimeoutConfig(TimeoutConfigT&& value) {
216 m_timeoutConfigHasBeenSet = true;
217 m_timeoutConfig = std::forward<TimeoutConfigT>(value);
218 }
219 template <typename TimeoutConfigT = ServiceJobTimeout>
221 SetTimeoutConfig(std::forward<TimeoutConfigT>(value));
222 return *this;
223 }
225
227
233 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
234 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
235 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
236 void SetTags(TagsT&& value) {
237 m_tagsHasBeenSet = true;
238 m_tags = std::forward<TagsT>(value);
239 }
240 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
242 SetTags(std::forward<TagsT>(value));
243 return *this;
244 }
245 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
246 SubmitServiceJobRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
247 m_tagsHasBeenSet = true;
248 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
249 return *this;
250 }
252
254
260 inline const Aws::String& GetClientToken() const { return m_clientToken; }
261 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
262 template <typename ClientTokenT = Aws::String>
263 void SetClientToken(ClientTokenT&& value) {
264 m_clientTokenHasBeenSet = true;
265 m_clientToken = std::forward<ClientTokenT>(value);
266 }
267 template <typename ClientTokenT = Aws::String>
269 SetClientToken(std::forward<ClientTokenT>(value));
270 return *this;
271 }
273 private:
274 Aws::String m_jobName;
275
276 Aws::String m_jobQueue;
277
278 ServiceJobRetryStrategy m_retryStrategy;
279
280 int m_schedulingPriority{0};
281
282 Aws::String m_serviceRequestPayload;
283
284 ServiceJobType m_serviceJobType{ServiceJobType::NOT_SET};
285
286 Aws::String m_shareIdentifier;
287
288 Aws::String m_quotaShareName;
289
290 ServiceJobPreemptionConfiguration m_preemptionConfiguration;
291
292 ServiceJobTimeout m_timeoutConfig;
293
295
297 bool m_jobNameHasBeenSet = false;
298 bool m_jobQueueHasBeenSet = false;
299 bool m_retryStrategyHasBeenSet = false;
300 bool m_schedulingPriorityHasBeenSet = false;
301 bool m_serviceRequestPayloadHasBeenSet = false;
302 bool m_serviceJobTypeHasBeenSet = false;
303 bool m_shareIdentifierHasBeenSet = false;
304 bool m_quotaShareNameHasBeenSet = false;
305 bool m_preemptionConfigurationHasBeenSet = false;
306 bool m_timeoutConfigHasBeenSet = false;
307 bool m_tagsHasBeenSet = false;
308 bool m_clientTokenHasBeenSet = true;
309};
310
311} // namespace Model
312} // namespace Batch
313} // namespace Aws
SubmitServiceJobRequest & WithClientToken(ClientTokenT &&value)
SubmitServiceJobRequest & WithTags(TagsT &&value)
virtual const char * GetServiceRequestName() const override
SubmitServiceJobRequest & WithQuotaShareName(QuotaShareNameT &&value)
const ServiceJobTimeout & GetTimeoutConfig() const
const ServiceJobPreemptionConfiguration & GetPreemptionConfiguration() const
SubmitServiceJobRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
AWS_BATCH_API Aws::String SerializePayload() const override
const ServiceJobRetryStrategy & GetRetryStrategy() const
SubmitServiceJobRequest & WithJobQueue(JobQueueT &&value)
SubmitServiceJobRequest & WithTimeoutConfig(TimeoutConfigT &&value)
SubmitServiceJobRequest & WithRetryStrategy(RetryStrategyT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
SubmitServiceJobRequest & WithServiceJobType(ServiceJobType value)
void SetServiceRequestPayload(ServiceRequestPayloadT &&value)
SubmitServiceJobRequest & WithSchedulingPriority(int value)
SubmitServiceJobRequest & WithShareIdentifier(ShareIdentifierT &&value)
SubmitServiceJobRequest & WithPreemptionConfiguration(PreemptionConfigurationT &&value)
SubmitServiceJobRequest & WithJobName(JobNameT &&value)
SubmitServiceJobRequest & WithServiceRequestPayload(ServiceRequestPayloadT &&value)
void SetPreemptionConfiguration(PreemptionConfigurationT &&value)
AWS_BATCH_API SubmitServiceJobRequest()=default
static Aws::Utils::UUID PseudoRandomUUID()
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