AWS SDK for C++

AWS SDK for C++ Version 1.11.936

Loading...
Searching...
No Matches
Session.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/emr-serverless/EMRServerless_EXPORTS.h>
11#include <aws/emr-serverless/model/NetworkConfiguration.h>
12#include <aws/emr-serverless/model/ResourceUtilization.h>
13#include <aws/emr-serverless/model/SessionConfigurationOverrides.h>
14#include <aws/emr-serverless/model/SessionState.h>
15#include <aws/emr-serverless/model/TotalResourceUtilization.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace EMRServerless {
27namespace Model {
28
35class Session {
36 public:
37 AWS_EMRSERVERLESS_API Session() = default;
38 AWS_EMRSERVERLESS_API Session(Aws::Utils::Json::JsonView jsonValue);
39 AWS_EMRSERVERLESS_API Session& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_EMRSERVERLESS_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetApplicationId() const { return m_applicationId; }
47 inline bool ApplicationIdHasBeenSet() const { return m_applicationIdHasBeenSet; }
48 template <typename ApplicationIdT = Aws::String>
49 void SetApplicationId(ApplicationIdT&& value) {
50 m_applicationIdHasBeenSet = true;
51 m_applicationId = std::forward<ApplicationIdT>(value);
52 }
53 template <typename ApplicationIdT = Aws::String>
54 Session& WithApplicationId(ApplicationIdT&& value) {
55 SetApplicationId(std::forward<ApplicationIdT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetSessionId() const { return m_sessionId; }
65 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
66 template <typename SessionIdT = Aws::String>
67 void SetSessionId(SessionIdT&& value) {
68 m_sessionIdHasBeenSet = true;
69 m_sessionId = std::forward<SessionIdT>(value);
70 }
71 template <typename SessionIdT = Aws::String>
72 Session& WithSessionId(SessionIdT&& value) {
73 SetSessionId(std::forward<SessionIdT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetArn() const { return m_arn; }
83 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
84 template <typename ArnT = Aws::String>
85 void SetArn(ArnT&& value) {
86 m_arnHasBeenSet = true;
87 m_arn = std::forward<ArnT>(value);
88 }
89 template <typename ArnT = Aws::String>
90 Session& WithArn(ArnT&& value) {
91 SetArn(std::forward<ArnT>(value));
92 return *this;
93 }
95
97
100 inline const Aws::String& GetName() const { return m_name; }
101 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
102 template <typename NameT = Aws::String>
103 void SetName(NameT&& value) {
104 m_nameHasBeenSet = true;
105 m_name = std::forward<NameT>(value);
106 }
107 template <typename NameT = Aws::String>
108 Session& WithName(NameT&& value) {
109 SetName(std::forward<NameT>(value));
110 return *this;
111 }
113
115
118 inline SessionState GetState() const { return m_state; }
119 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
120 inline void SetState(SessionState value) {
121 m_stateHasBeenSet = true;
122 m_state = value;
123 }
125 SetState(value);
126 return *this;
127 }
129
131
134 inline const Aws::String& GetStateDetails() const { return m_stateDetails; }
135 inline bool StateDetailsHasBeenSet() const { return m_stateDetailsHasBeenSet; }
136 template <typename StateDetailsT = Aws::String>
137 void SetStateDetails(StateDetailsT&& value) {
138 m_stateDetailsHasBeenSet = true;
139 m_stateDetails = std::forward<StateDetailsT>(value);
140 }
141 template <typename StateDetailsT = Aws::String>
142 Session& WithStateDetails(StateDetailsT&& value) {
143 SetStateDetails(std::forward<StateDetailsT>(value));
144 return *this;
145 }
147
149
152 inline const Aws::String& GetReleaseLabel() const { return m_releaseLabel; }
153 inline bool ReleaseLabelHasBeenSet() const { return m_releaseLabelHasBeenSet; }
154 template <typename ReleaseLabelT = Aws::String>
155 void SetReleaseLabel(ReleaseLabelT&& value) {
156 m_releaseLabelHasBeenSet = true;
157 m_releaseLabel = std::forward<ReleaseLabelT>(value);
158 }
159 template <typename ReleaseLabelT = Aws::String>
160 Session& WithReleaseLabel(ReleaseLabelT&& value) {
161 SetReleaseLabel(std::forward<ReleaseLabelT>(value));
162 return *this;
163 }
165
167
170 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
171 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
172 template <typename ExecutionRoleArnT = Aws::String>
173 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
174 m_executionRoleArnHasBeenSet = true;
175 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
176 }
177 template <typename ExecutionRoleArnT = Aws::String>
178 Session& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
179 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
180 return *this;
181 }
183
185
188 inline const Aws::String& GetCreatedBy() const { return m_createdBy; }
189 inline bool CreatedByHasBeenSet() const { return m_createdByHasBeenSet; }
190 template <typename CreatedByT = Aws::String>
191 void SetCreatedBy(CreatedByT&& value) {
192 m_createdByHasBeenSet = true;
193 m_createdBy = std::forward<CreatedByT>(value);
194 }
195 template <typename CreatedByT = Aws::String>
196 Session& WithCreatedBy(CreatedByT&& value) {
197 SetCreatedBy(std::forward<CreatedByT>(value));
198 return *this;
199 }
201
203
206 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
207 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
208 template <typename CreatedAtT = Aws::Utils::DateTime>
209 void SetCreatedAt(CreatedAtT&& value) {
210 m_createdAtHasBeenSet = true;
211 m_createdAt = std::forward<CreatedAtT>(value);
212 }
213 template <typename CreatedAtT = Aws::Utils::DateTime>
214 Session& WithCreatedAt(CreatedAtT&& value) {
215 SetCreatedAt(std::forward<CreatedAtT>(value));
216 return *this;
217 }
219
221
224 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
225 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
226 template <typename UpdatedAtT = Aws::Utils::DateTime>
227 void SetUpdatedAt(UpdatedAtT&& value) {
228 m_updatedAtHasBeenSet = true;
229 m_updatedAt = std::forward<UpdatedAtT>(value);
230 }
231 template <typename UpdatedAtT = Aws::Utils::DateTime>
232 Session& WithUpdatedAt(UpdatedAtT&& value) {
233 SetUpdatedAt(std::forward<UpdatedAtT>(value));
234 return *this;
235 }
237
239
242 inline const Aws::Utils::DateTime& GetStartedAt() const { return m_startedAt; }
243 inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; }
244 template <typename StartedAtT = Aws::Utils::DateTime>
245 void SetStartedAt(StartedAtT&& value) {
246 m_startedAtHasBeenSet = true;
247 m_startedAt = std::forward<StartedAtT>(value);
248 }
249 template <typename StartedAtT = Aws::Utils::DateTime>
250 Session& WithStartedAt(StartedAtT&& value) {
251 SetStartedAt(std::forward<StartedAtT>(value));
252 return *this;
253 }
255
257
260 inline const Aws::Utils::DateTime& GetEndedAt() const { return m_endedAt; }
261 inline bool EndedAtHasBeenSet() const { return m_endedAtHasBeenSet; }
262 template <typename EndedAtT = Aws::Utils::DateTime>
263 void SetEndedAt(EndedAtT&& value) {
264 m_endedAtHasBeenSet = true;
265 m_endedAt = std::forward<EndedAtT>(value);
266 }
267 template <typename EndedAtT = Aws::Utils::DateTime>
268 Session& WithEndedAt(EndedAtT&& value) {
269 SetEndedAt(std::forward<EndedAtT>(value));
270 return *this;
271 }
273
275
278 inline const Aws::Utils::DateTime& GetIdleSince() const { return m_idleSince; }
279 inline bool IdleSinceHasBeenSet() const { return m_idleSinceHasBeenSet; }
280 template <typename IdleSinceT = Aws::Utils::DateTime>
281 void SetIdleSince(IdleSinceT&& value) {
282 m_idleSinceHasBeenSet = true;
283 m_idleSince = std::forward<IdleSinceT>(value);
284 }
285 template <typename IdleSinceT = Aws::Utils::DateTime>
286 Session& WithIdleSince(IdleSinceT&& value) {
287 SetIdleSince(std::forward<IdleSinceT>(value));
288 return *this;
289 }
291
293
297 inline const SessionConfigurationOverrides& GetConfigurationOverrides() const { return m_configurationOverrides; }
298 inline bool ConfigurationOverridesHasBeenSet() const { return m_configurationOverridesHasBeenSet; }
299 template <typename ConfigurationOverridesT = SessionConfigurationOverrides>
300 void SetConfigurationOverrides(ConfigurationOverridesT&& value) {
301 m_configurationOverridesHasBeenSet = true;
302 m_configurationOverrides = std::forward<ConfigurationOverridesT>(value);
303 }
304 template <typename ConfigurationOverridesT = SessionConfigurationOverrides>
305 Session& WithConfigurationOverrides(ConfigurationOverridesT&& value) {
306 SetConfigurationOverrides(std::forward<ConfigurationOverridesT>(value));
307 return *this;
308 }
310
312
315 inline const NetworkConfiguration& GetNetworkConfiguration() const { return m_networkConfiguration; }
316 inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; }
317 template <typename NetworkConfigurationT = NetworkConfiguration>
318 void SetNetworkConfiguration(NetworkConfigurationT&& value) {
319 m_networkConfigurationHasBeenSet = true;
320 m_networkConfiguration = std::forward<NetworkConfigurationT>(value);
321 }
322 template <typename NetworkConfigurationT = NetworkConfiguration>
323 Session& WithNetworkConfiguration(NetworkConfigurationT&& value) {
324 SetNetworkConfiguration(std::forward<NetworkConfigurationT>(value));
325 return *this;
326 }
328
330
334 inline long long GetIdleTimeoutMinutes() const { return m_idleTimeoutMinutes; }
335 inline bool IdleTimeoutMinutesHasBeenSet() const { return m_idleTimeoutMinutesHasBeenSet; }
336 inline void SetIdleTimeoutMinutes(long long value) {
337 m_idleTimeoutMinutesHasBeenSet = true;
338 m_idleTimeoutMinutes = value;
339 }
340 inline Session& WithIdleTimeoutMinutes(long long value) {
342 return *this;
343 }
345
347
350 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
351 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
352 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
353 void SetTags(TagsT&& value) {
354 m_tagsHasBeenSet = true;
355 m_tags = std::forward<TagsT>(value);
356 }
357 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
358 Session& WithTags(TagsT&& value) {
359 SetTags(std::forward<TagsT>(value));
360 return *this;
361 }
362 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
363 Session& AddTags(TagsKeyT&& key, TagsValueT&& value) {
364 m_tagsHasBeenSet = true;
365 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
366 return *this;
367 }
369
371
376 inline const TotalResourceUtilization& GetTotalResourceUtilization() const { return m_totalResourceUtilization; }
377 inline bool TotalResourceUtilizationHasBeenSet() const { return m_totalResourceUtilizationHasBeenSet; }
378 template <typename TotalResourceUtilizationT = TotalResourceUtilization>
379 void SetTotalResourceUtilization(TotalResourceUtilizationT&& value) {
380 m_totalResourceUtilizationHasBeenSet = true;
381 m_totalResourceUtilization = std::forward<TotalResourceUtilizationT>(value);
382 }
383 template <typename TotalResourceUtilizationT = TotalResourceUtilization>
384 Session& WithTotalResourceUtilization(TotalResourceUtilizationT&& value) {
385 SetTotalResourceUtilization(std::forward<TotalResourceUtilizationT>(value));
386 return *this;
387 }
389
391
397 inline const ResourceUtilization& GetBilledResourceUtilization() const { return m_billedResourceUtilization; }
398 inline bool BilledResourceUtilizationHasBeenSet() const { return m_billedResourceUtilizationHasBeenSet; }
399 template <typename BilledResourceUtilizationT = ResourceUtilization>
400 void SetBilledResourceUtilization(BilledResourceUtilizationT&& value) {
401 m_billedResourceUtilizationHasBeenSet = true;
402 m_billedResourceUtilization = std::forward<BilledResourceUtilizationT>(value);
403 }
404 template <typename BilledResourceUtilizationT = ResourceUtilization>
405 Session& WithBilledResourceUtilization(BilledResourceUtilizationT&& value) {
406 SetBilledResourceUtilization(std::forward<BilledResourceUtilizationT>(value));
407 return *this;
408 }
410
412
415 inline long long GetTotalExecutionDurationSeconds() const { return m_totalExecutionDurationSeconds; }
416 inline bool TotalExecutionDurationSecondsHasBeenSet() const { return m_totalExecutionDurationSecondsHasBeenSet; }
417 inline void SetTotalExecutionDurationSeconds(long long value) {
418 m_totalExecutionDurationSecondsHasBeenSet = true;
419 m_totalExecutionDurationSeconds = value;
420 }
423 return *this;
424 }
426 private:
427 Aws::String m_applicationId;
428
429 Aws::String m_sessionId;
430
431 Aws::String m_arn;
432
433 Aws::String m_name;
434
436
437 Aws::String m_stateDetails;
438
439 Aws::String m_releaseLabel;
440
441 Aws::String m_executionRoleArn;
442
443 Aws::String m_createdBy;
444
445 Aws::Utils::DateTime m_createdAt{};
446
447 Aws::Utils::DateTime m_updatedAt{};
448
449 Aws::Utils::DateTime m_startedAt{};
450
451 Aws::Utils::DateTime m_endedAt{};
452
453 Aws::Utils::DateTime m_idleSince{};
454
455 SessionConfigurationOverrides m_configurationOverrides;
456
457 NetworkConfiguration m_networkConfiguration;
458
459 long long m_idleTimeoutMinutes{0};
460
462
463 TotalResourceUtilization m_totalResourceUtilization;
464
465 ResourceUtilization m_billedResourceUtilization;
466
467 long long m_totalExecutionDurationSeconds{0};
468 bool m_applicationIdHasBeenSet = false;
469 bool m_sessionIdHasBeenSet = false;
470 bool m_arnHasBeenSet = false;
471 bool m_nameHasBeenSet = false;
472 bool m_stateHasBeenSet = false;
473 bool m_stateDetailsHasBeenSet = false;
474 bool m_releaseLabelHasBeenSet = false;
475 bool m_executionRoleArnHasBeenSet = false;
476 bool m_createdByHasBeenSet = false;
477 bool m_createdAtHasBeenSet = false;
478 bool m_updatedAtHasBeenSet = false;
479 bool m_startedAtHasBeenSet = false;
480 bool m_endedAtHasBeenSet = false;
481 bool m_idleSinceHasBeenSet = false;
482 bool m_configurationOverridesHasBeenSet = false;
483 bool m_networkConfigurationHasBeenSet = false;
484 bool m_idleTimeoutMinutesHasBeenSet = false;
485 bool m_tagsHasBeenSet = false;
486 bool m_totalResourceUtilizationHasBeenSet = false;
487 bool m_billedResourceUtilizationHasBeenSet = false;
488 bool m_totalExecutionDurationSecondsHasBeenSet = false;
489};
490
491} // namespace Model
492} // namespace EMRServerless
493} // namespace Aws
const Aws::Utils::DateTime & GetIdleSince() const
Definition Session.h:278
void SetStateDetails(StateDetailsT &&value)
Definition Session.h:137
const Aws::String & GetStateDetails() const
Definition Session.h:134
void SetBilledResourceUtilization(BilledResourceUtilizationT &&value)
Definition Session.h:400
Session & WithTags(TagsT &&value)
Definition Session.h:358
const Aws::Utils::DateTime & GetEndedAt() const
Definition Session.h:260
const Aws::String & GetSessionId() const
Definition Session.h:64
Session & WithExecutionRoleArn(ExecutionRoleArnT &&value)
Definition Session.h:178
bool TotalResourceUtilizationHasBeenSet() const
Definition Session.h:377
const Aws::String & GetCreatedBy() const
Definition Session.h:188
void SetCreatedBy(CreatedByT &&value)
Definition Session.h:191
Session & WithApplicationId(ApplicationIdT &&value)
Definition Session.h:54
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Session.h:350
void SetTags(TagsT &&value)
Definition Session.h:353
void SetReleaseLabel(ReleaseLabelT &&value)
Definition Session.h:155
void SetEndedAt(EndedAtT &&value)
Definition Session.h:263
Session & WithStartedAt(StartedAtT &&value)
Definition Session.h:250
void SetIdleTimeoutMinutes(long long value)
Definition Session.h:336
const Aws::Utils::DateTime & GetUpdatedAt() const
Definition Session.h:224
SessionState GetState() const
Definition Session.h:118
const NetworkConfiguration & GetNetworkConfiguration() const
Definition Session.h:315
Session & WithNetworkConfiguration(NetworkConfigurationT &&value)
Definition Session.h:323
void SetConfigurationOverrides(ConfigurationOverridesT &&value)
Definition Session.h:300
const Aws::String & GetArn() const
Definition Session.h:82
void SetStartedAt(StartedAtT &&value)
Definition Session.h:245
Session & WithTotalResourceUtilization(TotalResourceUtilizationT &&value)
Definition Session.h:384
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Session.h:206
void SetTotalResourceUtilization(TotalResourceUtilizationT &&value)
Definition Session.h:379
Session & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Session.h:363
Session & WithConfigurationOverrides(ConfigurationOverridesT &&value)
Definition Session.h:305
Session & WithReleaseLabel(ReleaseLabelT &&value)
Definition Session.h:160
void SetName(NameT &&value)
Definition Session.h:103
Session & WithBilledResourceUtilization(BilledResourceUtilizationT &&value)
Definition Session.h:405
AWS_EMRSERVERLESS_API Session & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetIdleSince(IdleSinceT &&value)
Definition Session.h:281
Session & WithSessionId(SessionIdT &&value)
Definition Session.h:72
Session & WithIdleSince(IdleSinceT &&value)
Definition Session.h:286
Session & WithTotalExecutionDurationSeconds(long long value)
Definition Session.h:421
void SetApplicationId(ApplicationIdT &&value)
Definition Session.h:49
bool IdleTimeoutMinutesHasBeenSet() const
Definition Session.h:335
Session & WithCreatedBy(CreatedByT &&value)
Definition Session.h:196
void SetTotalExecutionDurationSeconds(long long value)
Definition Session.h:417
bool NetworkConfigurationHasBeenSet() const
Definition Session.h:316
void SetArn(ArnT &&value)
Definition Session.h:85
const Aws::String & GetExecutionRoleArn() const
Definition Session.h:170
long long GetIdleTimeoutMinutes() const
Definition Session.h:334
AWS_EMRSERVERLESS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetState(SessionState value)
Definition Session.h:120
long long GetTotalExecutionDurationSeconds() const
Definition Session.h:415
const Aws::String & GetApplicationId() const
Definition Session.h:46
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
Definition Session.h:173
Session & WithState(SessionState value)
Definition Session.h:124
Session & WithIdleTimeoutMinutes(long long value)
Definition Session.h:340
const Aws::String & GetName() const
Definition Session.h:100
const TotalResourceUtilization & GetTotalResourceUtilization() const
Definition Session.h:376
void SetSessionId(SessionIdT &&value)
Definition Session.h:67
bool TotalExecutionDurationSecondsHasBeenSet() const
Definition Session.h:416
bool ConfigurationOverridesHasBeenSet() const
Definition Session.h:298
const ResourceUtilization & GetBilledResourceUtilization() const
Definition Session.h:397
bool BilledResourceUtilizationHasBeenSet() const
Definition Session.h:398
Session & WithCreatedAt(CreatedAtT &&value)
Definition Session.h:214
void SetUpdatedAt(UpdatedAtT &&value)
Definition Session.h:227
Session & WithArn(ArnT &&value)
Definition Session.h:90
AWS_EMRSERVERLESS_API Session(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetReleaseLabel() const
Definition Session.h:152
AWS_EMRSERVERLESS_API Session()=default
Session & WithEndedAt(EndedAtT &&value)
Definition Session.h:268
Session & WithUpdatedAt(UpdatedAtT &&value)
Definition Session.h:232
Session & WithStateDetails(StateDetailsT &&value)
Definition Session.h:142
Session & WithName(NameT &&value)
Definition Session.h:108
const Aws::Utils::DateTime & GetStartedAt() const
Definition Session.h:242
const SessionConfigurationOverrides & GetConfigurationOverrides() const
Definition Session.h:297
void SetCreatedAt(CreatedAtT &&value)
Definition Session.h:209
bool ExecutionRoleArnHasBeenSet() const
Definition Session.h:171
void SetNetworkConfiguration(NetworkConfigurationT &&value)
Definition Session.h:318
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
Aws::Utils::Json::JsonValue JsonValue