AWS SDK for C++

AWS SDK for C++ Version 1.11.830

Loading...
Searching...
No Matches
Session.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/elasticmapreduce/EMR_EXPORTS.h>
11#include <aws/elasticmapreduce/model/CertificateAuthority.h>
12#include <aws/elasticmapreduce/model/Configuration.h>
13#include <aws/elasticmapreduce/model/SessionMonitoringConfiguration.h>
14#include <aws/elasticmapreduce/model/SessionState.h>
15#include <aws/elasticmapreduce/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace EMR {
27namespace Model {
28
35class Session {
36 public:
37 AWS_EMR_API Session() = default;
38 AWS_EMR_API Session(Aws::Utils::Json::JsonView jsonValue);
41
43
46 inline const Aws::String& GetId() const { return m_id; }
47 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
48 template <typename IdT = Aws::String>
49 void SetId(IdT&& value) {
50 m_idHasBeenSet = true;
51 m_id = std::forward<IdT>(value);
52 }
53 template <typename IdT = Aws::String>
54 Session& WithId(IdT&& value) {
55 SetId(std::forward<IdT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetClusterId() const { return m_clusterId; }
65 inline bool ClusterIdHasBeenSet() const { return m_clusterIdHasBeenSet; }
66 template <typename ClusterIdT = Aws::String>
67 void SetClusterId(ClusterIdT&& value) {
68 m_clusterIdHasBeenSet = true;
69 m_clusterId = std::forward<ClusterIdT>(value);
70 }
71 template <typename ClusterIdT = Aws::String>
72 Session& WithClusterId(ClusterIdT&& value) {
73 SetClusterId(std::forward<ClusterIdT>(value));
74 return *this;
75 }
77
79
82 inline const Aws::String& GetName() const { return m_name; }
83 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
84 template <typename NameT = Aws::String>
85 void SetName(NameT&& value) {
86 m_nameHasBeenSet = true;
87 m_name = std::forward<NameT>(value);
88 }
89 template <typename NameT = Aws::String>
90 Session& WithName(NameT&& value) {
91 SetName(std::forward<NameT>(value));
92 return *this;
93 }
95
97
100 inline const Aws::String& GetArn() const { return m_arn; }
101 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
102 template <typename ArnT = Aws::String>
103 void SetArn(ArnT&& value) {
104 m_arnHasBeenSet = true;
105 m_arn = std::forward<ArnT>(value);
106 }
107 template <typename ArnT = Aws::String>
108 Session& WithArn(ArnT&& value) {
109 SetArn(std::forward<ArnT>(value));
110 return *this;
111 }
113
115
121 inline SessionState GetState() const { return m_state; }
122 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
123 inline void SetState(SessionState value) {
124 m_stateHasBeenSet = true;
125 m_state = value;
126 }
128 SetState(value);
129 return *this;
130 }
132
134
137 inline const Aws::String& GetStateChangeReason() const { return m_stateChangeReason; }
138 inline bool StateChangeReasonHasBeenSet() const { return m_stateChangeReasonHasBeenSet; }
139 template <typename StateChangeReasonT = Aws::String>
140 void SetStateChangeReason(StateChangeReasonT&& value) {
141 m_stateChangeReasonHasBeenSet = true;
142 m_stateChangeReason = std::forward<StateChangeReasonT>(value);
143 }
144 template <typename StateChangeReasonT = Aws::String>
145 Session& WithStateChangeReason(StateChangeReasonT&& value) {
146 SetStateChangeReason(std::forward<StateChangeReasonT>(value));
147 return *this;
148 }
150
152
156 inline const Aws::String& GetReleaseLabel() const { return m_releaseLabel; }
157 inline bool ReleaseLabelHasBeenSet() const { return m_releaseLabelHasBeenSet; }
158 template <typename ReleaseLabelT = Aws::String>
159 void SetReleaseLabel(ReleaseLabelT&& value) {
160 m_releaseLabelHasBeenSet = true;
161 m_releaseLabel = std::forward<ReleaseLabelT>(value);
162 }
163 template <typename ReleaseLabelT = Aws::String>
164 Session& WithReleaseLabel(ReleaseLabelT&& value) {
165 SetReleaseLabel(std::forward<ReleaseLabelT>(value));
166 return *this;
167 }
169
171
175 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
176 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
177 template <typename ExecutionRoleArnT = Aws::String>
178 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
179 m_executionRoleArnHasBeenSet = true;
180 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
181 }
182 template <typename ExecutionRoleArnT = Aws::String>
183 Session& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
184 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
185 return *this;
186 }
188
190
193 inline const Aws::String& GetAccountId() const { return m_accountId; }
194 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
195 template <typename AccountIdT = Aws::String>
196 void SetAccountId(AccountIdT&& value) {
197 m_accountIdHasBeenSet = true;
198 m_accountId = std::forward<AccountIdT>(value);
199 }
200 template <typename AccountIdT = Aws::String>
201 Session& WithAccountId(AccountIdT&& value) {
202 SetAccountId(std::forward<AccountIdT>(value));
203 return *this;
204 }
206
208
211 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
212 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
213 template <typename CreatedAtT = Aws::Utils::DateTime>
214 void SetCreatedAt(CreatedAtT&& value) {
215 m_createdAtHasBeenSet = true;
216 m_createdAt = std::forward<CreatedAtT>(value);
217 }
218 template <typename CreatedAtT = Aws::Utils::DateTime>
219 Session& WithCreatedAt(CreatedAtT&& value) {
220 SetCreatedAt(std::forward<CreatedAtT>(value));
221 return *this;
222 }
224
226
229 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
230 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
231 template <typename UpdatedAtT = Aws::Utils::DateTime>
232 void SetUpdatedAt(UpdatedAtT&& value) {
233 m_updatedAtHasBeenSet = true;
234 m_updatedAt = std::forward<UpdatedAtT>(value);
235 }
236 template <typename UpdatedAtT = Aws::Utils::DateTime>
237 Session& WithUpdatedAt(UpdatedAtT&& value) {
238 SetUpdatedAt(std::forward<UpdatedAtT>(value));
239 return *this;
240 }
242
244
248 inline const Aws::Utils::DateTime& GetStartedAt() const { return m_startedAt; }
249 inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; }
250 template <typename StartedAtT = Aws::Utils::DateTime>
251 void SetStartedAt(StartedAtT&& value) {
252 m_startedAtHasBeenSet = true;
253 m_startedAt = std::forward<StartedAtT>(value);
254 }
255 template <typename StartedAtT = Aws::Utils::DateTime>
256 Session& WithStartedAt(StartedAtT&& value) {
257 SetStartedAt(std::forward<StartedAtT>(value));
258 return *this;
259 }
261
263
266 inline const Aws::Utils::DateTime& GetEndedAt() const { return m_endedAt; }
267 inline bool EndedAtHasBeenSet() const { return m_endedAtHasBeenSet; }
268 template <typename EndedAtT = Aws::Utils::DateTime>
269 void SetEndedAt(EndedAtT&& value) {
270 m_endedAtHasBeenSet = true;
271 m_endedAt = std::forward<EndedAtT>(value);
272 }
273 template <typename EndedAtT = Aws::Utils::DateTime>
274 Session& WithEndedAt(EndedAtT&& value) {
275 SetEndedAt(std::forward<EndedAtT>(value));
276 return *this;
277 }
279
281
285 inline const Aws::Utils::DateTime& GetIdleSince() const { return m_idleSince; }
286 inline bool IdleSinceHasBeenSet() const { return m_idleSinceHasBeenSet; }
287 template <typename IdleSinceT = Aws::Utils::DateTime>
288 void SetIdleSince(IdleSinceT&& value) {
289 m_idleSinceHasBeenSet = true;
290 m_idleSince = std::forward<IdleSinceT>(value);
291 }
292 template <typename IdleSinceT = Aws::Utils::DateTime>
293 Session& WithIdleSince(IdleSinceT&& value) {
294 SetIdleSince(std::forward<IdleSinceT>(value));
295 return *this;
296 }
298
300
304 inline const Aws::Vector<Configuration>& GetEngineConfigurations() const { return m_engineConfigurations; }
305 inline bool EngineConfigurationsHasBeenSet() const { return m_engineConfigurationsHasBeenSet; }
306 template <typename EngineConfigurationsT = Aws::Vector<Configuration>>
307 void SetEngineConfigurations(EngineConfigurationsT&& value) {
308 m_engineConfigurationsHasBeenSet = true;
309 m_engineConfigurations = std::forward<EngineConfigurationsT>(value);
310 }
311 template <typename EngineConfigurationsT = Aws::Vector<Configuration>>
312 Session& WithEngineConfigurations(EngineConfigurationsT&& value) {
313 SetEngineConfigurations(std::forward<EngineConfigurationsT>(value));
314 return *this;
315 }
316 template <typename EngineConfigurationsT = Configuration>
317 Session& AddEngineConfigurations(EngineConfigurationsT&& value) {
318 m_engineConfigurationsHasBeenSet = true;
319 m_engineConfigurations.emplace_back(std::forward<EngineConfigurationsT>(value));
320 return *this;
321 }
323
325
328 inline const SessionMonitoringConfiguration& GetMonitoringConfiguration() const { return m_monitoringConfiguration; }
329 inline bool MonitoringConfigurationHasBeenSet() const { return m_monitoringConfigurationHasBeenSet; }
330 template <typename MonitoringConfigurationT = SessionMonitoringConfiguration>
331 void SetMonitoringConfiguration(MonitoringConfigurationT&& value) {
332 m_monitoringConfigurationHasBeenSet = true;
333 m_monitoringConfiguration = std::forward<MonitoringConfigurationT>(value);
334 }
335 template <typename MonitoringConfigurationT = SessionMonitoringConfiguration>
336 Session& WithMonitoringConfiguration(MonitoringConfigurationT&& value) {
337 SetMonitoringConfiguration(std::forward<MonitoringConfigurationT>(value));
338 return *this;
339 }
341
343
347 inline long long GetSessionIdleTimeoutInMinutes() const { return m_sessionIdleTimeoutInMinutes; }
348 inline bool SessionIdleTimeoutInMinutesHasBeenSet() const { return m_sessionIdleTimeoutInMinutesHasBeenSet; }
349 inline void SetSessionIdleTimeoutInMinutes(long long value) {
350 m_sessionIdleTimeoutInMinutesHasBeenSet = true;
351 m_sessionIdleTimeoutInMinutes = value;
352 }
353 inline Session& WithSessionIdleTimeoutInMinutes(long long value) {
355 return *this;
356 }
358
360
364 inline const CertificateAuthority& GetCertificateAuthority() const { return m_certificateAuthority; }
365 inline bool CertificateAuthorityHasBeenSet() const { return m_certificateAuthorityHasBeenSet; }
366 template <typename CertificateAuthorityT = CertificateAuthority>
367 void SetCertificateAuthority(CertificateAuthorityT&& value) {
368 m_certificateAuthorityHasBeenSet = true;
369 m_certificateAuthority = std::forward<CertificateAuthorityT>(value);
370 }
371 template <typename CertificateAuthorityT = CertificateAuthority>
372 Session& WithCertificateAuthority(CertificateAuthorityT&& value) {
373 SetCertificateAuthority(std::forward<CertificateAuthorityT>(value));
374 return *this;
375 }
377
379
384 inline const Aws::String& GetServerUrl() const { return m_serverUrl; }
385 inline bool ServerUrlHasBeenSet() const { return m_serverUrlHasBeenSet; }
386 template <typename ServerUrlT = Aws::String>
387 void SetServerUrl(ServerUrlT&& value) {
388 m_serverUrlHasBeenSet = true;
389 m_serverUrl = std::forward<ServerUrlT>(value);
390 }
391 template <typename ServerUrlT = Aws::String>
392 Session& WithServerUrl(ServerUrlT&& value) {
393 SetServerUrl(std::forward<ServerUrlT>(value));
394 return *this;
395 }
397
399
402 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
403 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
404 template <typename TagsT = Aws::Vector<Tag>>
405 void SetTags(TagsT&& value) {
406 m_tagsHasBeenSet = true;
407 m_tags = std::forward<TagsT>(value);
408 }
409 template <typename TagsT = Aws::Vector<Tag>>
410 Session& WithTags(TagsT&& value) {
411 SetTags(std::forward<TagsT>(value));
412 return *this;
413 }
414 template <typename TagsT = Tag>
415 Session& AddTags(TagsT&& value) {
416 m_tagsHasBeenSet = true;
417 m_tags.emplace_back(std::forward<TagsT>(value));
418 return *this;
419 }
421 private:
422 Aws::String m_id;
423
424 Aws::String m_clusterId;
425
426 Aws::String m_name;
427
428 Aws::String m_arn;
429
431
432 Aws::String m_stateChangeReason;
433
434 Aws::String m_releaseLabel;
435
436 Aws::String m_executionRoleArn;
437
438 Aws::String m_accountId;
439
440 Aws::Utils::DateTime m_createdAt{};
441
442 Aws::Utils::DateTime m_updatedAt{};
443
444 Aws::Utils::DateTime m_startedAt{};
445
446 Aws::Utils::DateTime m_endedAt{};
447
448 Aws::Utils::DateTime m_idleSince{};
449
450 Aws::Vector<Configuration> m_engineConfigurations;
451
452 SessionMonitoringConfiguration m_monitoringConfiguration;
453
454 long long m_sessionIdleTimeoutInMinutes{0};
455
456 CertificateAuthority m_certificateAuthority;
457
458 Aws::String m_serverUrl;
459
460 Aws::Vector<Tag> m_tags;
461 bool m_idHasBeenSet = false;
462 bool m_clusterIdHasBeenSet = false;
463 bool m_nameHasBeenSet = false;
464 bool m_arnHasBeenSet = false;
465 bool m_stateHasBeenSet = false;
466 bool m_stateChangeReasonHasBeenSet = false;
467 bool m_releaseLabelHasBeenSet = false;
468 bool m_executionRoleArnHasBeenSet = false;
469 bool m_accountIdHasBeenSet = false;
470 bool m_createdAtHasBeenSet = false;
471 bool m_updatedAtHasBeenSet = false;
472 bool m_startedAtHasBeenSet = false;
473 bool m_endedAtHasBeenSet = false;
474 bool m_idleSinceHasBeenSet = false;
475 bool m_engineConfigurationsHasBeenSet = false;
476 bool m_monitoringConfigurationHasBeenSet = false;
477 bool m_sessionIdleTimeoutInMinutesHasBeenSet = false;
478 bool m_certificateAuthorityHasBeenSet = false;
479 bool m_serverUrlHasBeenSet = false;
480 bool m_tagsHasBeenSet = false;
481};
482
483} // namespace Model
484} // namespace EMR
485} // namespace Aws
Session & WithState(SessionState value)
Definition Session.h:127
const Aws::String & GetArn() const
Definition Session.h:100
Session & WithUpdatedAt(UpdatedAtT &&value)
Definition Session.h:237
AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetId() const
Definition Session.h:46
Session & WithName(NameT &&value)
Definition Session.h:90
const SessionMonitoringConfiguration & GetMonitoringConfiguration() const
Definition Session.h:328
bool StateHasBeenSet() const
Definition Session.h:122
const Aws::String & GetName() const
Definition Session.h:82
void SetStateChangeReason(StateChangeReasonT &&value)
Definition Session.h:140
const Aws::Utils::DateTime & GetStartedAt() const
Definition Session.h:248
Session & WithCertificateAuthority(CertificateAuthorityT &&value)
Definition Session.h:372
long long GetSessionIdleTimeoutInMinutes() const
Definition Session.h:347
const Aws::Utils::DateTime & GetIdleSince() const
Definition Session.h:285
AWS_EMR_API Session(Aws::Utils::Json::JsonView jsonValue)
const CertificateAuthority & GetCertificateAuthority() const
Definition Session.h:364
const Aws::String & GetStateChangeReason() const
Definition Session.h:137
Session & WithEngineConfigurations(EngineConfigurationsT &&value)
Definition Session.h:312
Session & WithExecutionRoleArn(ExecutionRoleArnT &&value)
Definition Session.h:183
bool IdHasBeenSet() const
Definition Session.h:47
void SetState(SessionState value)
Definition Session.h:123
void SetSessionIdleTimeoutInMinutes(long long value)
Definition Session.h:349
void SetName(NameT &&value)
Definition Session.h:85
Session & WithMonitoringConfiguration(MonitoringConfigurationT &&value)
Definition Session.h:336
Session & WithAccountId(AccountIdT &&value)
Definition Session.h:201
Session & WithId(IdT &&value)
Definition Session.h:54
Session & WithClusterId(ClusterIdT &&value)
Definition Session.h:72
Session & WithTags(TagsT &&value)
Definition Session.h:410
const Aws::String & GetClusterId() const
Definition Session.h:64
const Aws::Utils::DateTime & GetUpdatedAt() const
Definition Session.h:229
const Aws::Vector< Configuration > & GetEngineConfigurations() const
Definition Session.h:304
Session & WithStartedAt(StartedAtT &&value)
Definition Session.h:256
void SetReleaseLabel(ReleaseLabelT &&value)
Definition Session.h:159
const Aws::String & GetAccountId() const
Definition Session.h:193
void SetCreatedAt(CreatedAtT &&value)
Definition Session.h:214
bool ExecutionRoleArnHasBeenSet() const
Definition Session.h:176
Session & AddTags(TagsT &&value)
Definition Session.h:415
bool EndedAtHasBeenSet() const
Definition Session.h:267
Session & WithStateChangeReason(StateChangeReasonT &&value)
Definition Session.h:145
Session & WithEndedAt(EndedAtT &&value)
Definition Session.h:274
bool ServerUrlHasBeenSet() const
Definition Session.h:385
void SetTags(TagsT &&value)
Definition Session.h:405
bool SessionIdleTimeoutInMinutesHasBeenSet() const
Definition Session.h:348
bool CertificateAuthorityHasBeenSet() const
Definition Session.h:365
void SetIdleSince(IdleSinceT &&value)
Definition Session.h:288
const Aws::String & GetReleaseLabel() const
Definition Session.h:156
Session & WithIdleSince(IdleSinceT &&value)
Definition Session.h:293
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Session.h:211
SessionState GetState() const
Definition Session.h:121
Session & WithServerUrl(ServerUrlT &&value)
Definition Session.h:392
void SetArn(ArnT &&value)
Definition Session.h:103
bool NameHasBeenSet() const
Definition Session.h:83
const Aws::String & GetServerUrl() const
Definition Session.h:384
void SetEndedAt(EndedAtT &&value)
Definition Session.h:269
const Aws::Vector< Tag > & GetTags() const
Definition Session.h:402
Session & AddEngineConfigurations(EngineConfigurationsT &&value)
Definition Session.h:317
bool TagsHasBeenSet() const
Definition Session.h:403
bool ClusterIdHasBeenSet() const
Definition Session.h:65
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
Definition Session.h:178
bool ArnHasBeenSet() const
Definition Session.h:101
void SetUpdatedAt(UpdatedAtT &&value)
Definition Session.h:232
bool StartedAtHasBeenSet() const
Definition Session.h:249
bool IdleSinceHasBeenSet() const
Definition Session.h:286
const Aws::Utils::DateTime & GetEndedAt() const
Definition Session.h:266
bool AccountIdHasBeenSet() const
Definition Session.h:194
Session & WithArn(ArnT &&value)
Definition Session.h:108
Session & WithSessionIdleTimeoutInMinutes(long long value)
Definition Session.h:353
bool StateChangeReasonHasBeenSet() const
Definition Session.h:138
bool EngineConfigurationsHasBeenSet() const
Definition Session.h:305
void SetAccountId(AccountIdT &&value)
Definition Session.h:196
bool MonitoringConfigurationHasBeenSet() const
Definition Session.h:329
void SetClusterId(ClusterIdT &&value)
Definition Session.h:67
void SetEngineConfigurations(EngineConfigurationsT &&value)
Definition Session.h:307
bool CreatedAtHasBeenSet() const
Definition Session.h:212
void SetServerUrl(ServerUrlT &&value)
Definition Session.h:387
void SetId(IdT &&value)
Definition Session.h:49
void SetMonitoringConfiguration(MonitoringConfigurationT &&value)
Definition Session.h:331
void SetCertificateAuthority(CertificateAuthorityT &&value)
Definition Session.h:367
AWS_EMR_API Session & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_EMR_API Session()=default
Session & WithCreatedAt(CreatedAtT &&value)
Definition Session.h:219
const Aws::String & GetExecutionRoleArn() const
Definition Session.h:175
bool ReleaseLabelHasBeenSet() const
Definition Session.h:157
bool UpdatedAtHasBeenSet() const
Definition Session.h:230
void SetStartedAt(StartedAtT &&value)
Definition Session.h:251
Session & WithReleaseLabel(ReleaseLabelT &&value)
Definition Session.h:164
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue