AWS SDK for C++

AWS SDK for C++ Version 1.11.851

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/Configuration.h>
12#include <aws/elasticmapreduce/model/SessionMonitoringConfiguration.h>
13#include <aws/elasticmapreduce/model/SessionState.h>
14#include <aws/elasticmapreduce/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace EMR {
26namespace Model {
27
34class Session {
35 public:
36 AWS_EMR_API Session() = default;
37 AWS_EMR_API Session(Aws::Utils::Json::JsonView jsonValue);
40
42
45 inline const Aws::String& GetId() const { return m_id; }
46 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
47 template <typename IdT = Aws::String>
48 void SetId(IdT&& value) {
49 m_idHasBeenSet = true;
50 m_id = std::forward<IdT>(value);
51 }
52 template <typename IdT = Aws::String>
53 Session& WithId(IdT&& value) {
54 SetId(std::forward<IdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetClusterId() const { return m_clusterId; }
64 inline bool ClusterIdHasBeenSet() const { return m_clusterIdHasBeenSet; }
65 template <typename ClusterIdT = Aws::String>
66 void SetClusterId(ClusterIdT&& value) {
67 m_clusterIdHasBeenSet = true;
68 m_clusterId = std::forward<ClusterIdT>(value);
69 }
70 template <typename ClusterIdT = Aws::String>
71 Session& WithClusterId(ClusterIdT&& value) {
72 SetClusterId(std::forward<ClusterIdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetName() const { return m_name; }
82 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
83 template <typename NameT = Aws::String>
84 void SetName(NameT&& value) {
85 m_nameHasBeenSet = true;
86 m_name = std::forward<NameT>(value);
87 }
88 template <typename NameT = Aws::String>
89 Session& WithName(NameT&& value) {
90 SetName(std::forward<NameT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetArn() const { return m_arn; }
100 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
101 template <typename ArnT = Aws::String>
102 void SetArn(ArnT&& value) {
103 m_arnHasBeenSet = true;
104 m_arn = std::forward<ArnT>(value);
105 }
106 template <typename ArnT = Aws::String>
107 Session& WithArn(ArnT&& value) {
108 SetArn(std::forward<ArnT>(value));
109 return *this;
110 }
112
114
120 inline SessionState GetState() const { return m_state; }
121 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
122 inline void SetState(SessionState value) {
123 m_stateHasBeenSet = true;
124 m_state = value;
125 }
127 SetState(value);
128 return *this;
129 }
131
133
136 inline const Aws::String& GetStateChangeReason() const { return m_stateChangeReason; }
137 inline bool StateChangeReasonHasBeenSet() const { return m_stateChangeReasonHasBeenSet; }
138 template <typename StateChangeReasonT = Aws::String>
139 void SetStateChangeReason(StateChangeReasonT&& value) {
140 m_stateChangeReasonHasBeenSet = true;
141 m_stateChangeReason = std::forward<StateChangeReasonT>(value);
142 }
143 template <typename StateChangeReasonT = Aws::String>
144 Session& WithStateChangeReason(StateChangeReasonT&& value) {
145 SetStateChangeReason(std::forward<StateChangeReasonT>(value));
146 return *this;
147 }
149
151
155 inline const Aws::String& GetReleaseLabel() const { return m_releaseLabel; }
156 inline bool ReleaseLabelHasBeenSet() const { return m_releaseLabelHasBeenSet; }
157 template <typename ReleaseLabelT = Aws::String>
158 void SetReleaseLabel(ReleaseLabelT&& value) {
159 m_releaseLabelHasBeenSet = true;
160 m_releaseLabel = std::forward<ReleaseLabelT>(value);
161 }
162 template <typename ReleaseLabelT = Aws::String>
163 Session& WithReleaseLabel(ReleaseLabelT&& value) {
164 SetReleaseLabel(std::forward<ReleaseLabelT>(value));
165 return *this;
166 }
168
170
174 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
175 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
176 template <typename ExecutionRoleArnT = Aws::String>
177 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
178 m_executionRoleArnHasBeenSet = true;
179 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
180 }
181 template <typename ExecutionRoleArnT = Aws::String>
182 Session& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
183 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
184 return *this;
185 }
187
189
192 inline const Aws::String& GetAccountId() const { return m_accountId; }
193 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
194 template <typename AccountIdT = Aws::String>
195 void SetAccountId(AccountIdT&& value) {
196 m_accountIdHasBeenSet = true;
197 m_accountId = std::forward<AccountIdT>(value);
198 }
199 template <typename AccountIdT = Aws::String>
200 Session& WithAccountId(AccountIdT&& value) {
201 SetAccountId(std::forward<AccountIdT>(value));
202 return *this;
203 }
205
207
210 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
211 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
212 template <typename CreatedAtT = Aws::Utils::DateTime>
213 void SetCreatedAt(CreatedAtT&& value) {
214 m_createdAtHasBeenSet = true;
215 m_createdAt = std::forward<CreatedAtT>(value);
216 }
217 template <typename CreatedAtT = Aws::Utils::DateTime>
218 Session& WithCreatedAt(CreatedAtT&& value) {
219 SetCreatedAt(std::forward<CreatedAtT>(value));
220 return *this;
221 }
223
225
228 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
229 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
230 template <typename UpdatedAtT = Aws::Utils::DateTime>
231 void SetUpdatedAt(UpdatedAtT&& value) {
232 m_updatedAtHasBeenSet = true;
233 m_updatedAt = std::forward<UpdatedAtT>(value);
234 }
235 template <typename UpdatedAtT = Aws::Utils::DateTime>
236 Session& WithUpdatedAt(UpdatedAtT&& value) {
237 SetUpdatedAt(std::forward<UpdatedAtT>(value));
238 return *this;
239 }
241
243
247 inline const Aws::Utils::DateTime& GetStartedAt() const { return m_startedAt; }
248 inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; }
249 template <typename StartedAtT = Aws::Utils::DateTime>
250 void SetStartedAt(StartedAtT&& value) {
251 m_startedAtHasBeenSet = true;
252 m_startedAt = std::forward<StartedAtT>(value);
253 }
254 template <typename StartedAtT = Aws::Utils::DateTime>
255 Session& WithStartedAt(StartedAtT&& value) {
256 SetStartedAt(std::forward<StartedAtT>(value));
257 return *this;
258 }
260
262
265 inline const Aws::Utils::DateTime& GetEndedAt() const { return m_endedAt; }
266 inline bool EndedAtHasBeenSet() const { return m_endedAtHasBeenSet; }
267 template <typename EndedAtT = Aws::Utils::DateTime>
268 void SetEndedAt(EndedAtT&& value) {
269 m_endedAtHasBeenSet = true;
270 m_endedAt = std::forward<EndedAtT>(value);
271 }
272 template <typename EndedAtT = Aws::Utils::DateTime>
273 Session& WithEndedAt(EndedAtT&& value) {
274 SetEndedAt(std::forward<EndedAtT>(value));
275 return *this;
276 }
278
280
284 inline const Aws::Utils::DateTime& GetIdleSince() const { return m_idleSince; }
285 inline bool IdleSinceHasBeenSet() const { return m_idleSinceHasBeenSet; }
286 template <typename IdleSinceT = Aws::Utils::DateTime>
287 void SetIdleSince(IdleSinceT&& value) {
288 m_idleSinceHasBeenSet = true;
289 m_idleSince = std::forward<IdleSinceT>(value);
290 }
291 template <typename IdleSinceT = Aws::Utils::DateTime>
292 Session& WithIdleSince(IdleSinceT&& value) {
293 SetIdleSince(std::forward<IdleSinceT>(value));
294 return *this;
295 }
297
299
303 inline const Aws::Vector<Configuration>& GetEngineConfigurations() const { return m_engineConfigurations; }
304 inline bool EngineConfigurationsHasBeenSet() const { return m_engineConfigurationsHasBeenSet; }
305 template <typename EngineConfigurationsT = Aws::Vector<Configuration>>
306 void SetEngineConfigurations(EngineConfigurationsT&& value) {
307 m_engineConfigurationsHasBeenSet = true;
308 m_engineConfigurations = std::forward<EngineConfigurationsT>(value);
309 }
310 template <typename EngineConfigurationsT = Aws::Vector<Configuration>>
311 Session& WithEngineConfigurations(EngineConfigurationsT&& value) {
312 SetEngineConfigurations(std::forward<EngineConfigurationsT>(value));
313 return *this;
314 }
315 template <typename EngineConfigurationsT = Configuration>
316 Session& AddEngineConfigurations(EngineConfigurationsT&& value) {
317 m_engineConfigurationsHasBeenSet = true;
318 m_engineConfigurations.emplace_back(std::forward<EngineConfigurationsT>(value));
319 return *this;
320 }
322
324
327 inline const SessionMonitoringConfiguration& GetMonitoringConfiguration() const { return m_monitoringConfiguration; }
328 inline bool MonitoringConfigurationHasBeenSet() const { return m_monitoringConfigurationHasBeenSet; }
329 template <typename MonitoringConfigurationT = SessionMonitoringConfiguration>
330 void SetMonitoringConfiguration(MonitoringConfigurationT&& value) {
331 m_monitoringConfigurationHasBeenSet = true;
332 m_monitoringConfiguration = std::forward<MonitoringConfigurationT>(value);
333 }
334 template <typename MonitoringConfigurationT = SessionMonitoringConfiguration>
335 Session& WithMonitoringConfiguration(MonitoringConfigurationT&& value) {
336 SetMonitoringConfiguration(std::forward<MonitoringConfigurationT>(value));
337 return *this;
338 }
340
342
346 inline long long GetSessionIdleTimeoutInMinutes() const { return m_sessionIdleTimeoutInMinutes; }
347 inline bool SessionIdleTimeoutInMinutesHasBeenSet() const { return m_sessionIdleTimeoutInMinutesHasBeenSet; }
348 inline void SetSessionIdleTimeoutInMinutes(long long value) {
349 m_sessionIdleTimeoutInMinutesHasBeenSet = true;
350 m_sessionIdleTimeoutInMinutes = value;
351 }
352 inline Session& WithSessionIdleTimeoutInMinutes(long long value) {
354 return *this;
355 }
357
359
364 inline const Aws::String& GetServerUrl() const { return m_serverUrl; }
365 inline bool ServerUrlHasBeenSet() const { return m_serverUrlHasBeenSet; }
366 template <typename ServerUrlT = Aws::String>
367 void SetServerUrl(ServerUrlT&& value) {
368 m_serverUrlHasBeenSet = true;
369 m_serverUrl = std::forward<ServerUrlT>(value);
370 }
371 template <typename ServerUrlT = Aws::String>
372 Session& WithServerUrl(ServerUrlT&& value) {
373 SetServerUrl(std::forward<ServerUrlT>(value));
374 return *this;
375 }
377
379
382 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
383 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
384 template <typename TagsT = Aws::Vector<Tag>>
385 void SetTags(TagsT&& value) {
386 m_tagsHasBeenSet = true;
387 m_tags = std::forward<TagsT>(value);
388 }
389 template <typename TagsT = Aws::Vector<Tag>>
390 Session& WithTags(TagsT&& value) {
391 SetTags(std::forward<TagsT>(value));
392 return *this;
393 }
394 template <typename TagsT = Tag>
395 Session& AddTags(TagsT&& value) {
396 m_tagsHasBeenSet = true;
397 m_tags.emplace_back(std::forward<TagsT>(value));
398 return *this;
399 }
401 private:
402 Aws::String m_id;
403
404 Aws::String m_clusterId;
405
406 Aws::String m_name;
407
408 Aws::String m_arn;
409
411
412 Aws::String m_stateChangeReason;
413
414 Aws::String m_releaseLabel;
415
416 Aws::String m_executionRoleArn;
417
418 Aws::String m_accountId;
419
420 Aws::Utils::DateTime m_createdAt{};
421
422 Aws::Utils::DateTime m_updatedAt{};
423
424 Aws::Utils::DateTime m_startedAt{};
425
426 Aws::Utils::DateTime m_endedAt{};
427
428 Aws::Utils::DateTime m_idleSince{};
429
430 Aws::Vector<Configuration> m_engineConfigurations;
431
432 SessionMonitoringConfiguration m_monitoringConfiguration;
433
434 long long m_sessionIdleTimeoutInMinutes{0};
435
436 Aws::String m_serverUrl;
437
438 Aws::Vector<Tag> m_tags;
439 bool m_idHasBeenSet = false;
440 bool m_clusterIdHasBeenSet = false;
441 bool m_nameHasBeenSet = false;
442 bool m_arnHasBeenSet = false;
443 bool m_stateHasBeenSet = false;
444 bool m_stateChangeReasonHasBeenSet = false;
445 bool m_releaseLabelHasBeenSet = false;
446 bool m_executionRoleArnHasBeenSet = false;
447 bool m_accountIdHasBeenSet = false;
448 bool m_createdAtHasBeenSet = false;
449 bool m_updatedAtHasBeenSet = false;
450 bool m_startedAtHasBeenSet = false;
451 bool m_endedAtHasBeenSet = false;
452 bool m_idleSinceHasBeenSet = false;
453 bool m_engineConfigurationsHasBeenSet = false;
454 bool m_monitoringConfigurationHasBeenSet = false;
455 bool m_sessionIdleTimeoutInMinutesHasBeenSet = false;
456 bool m_serverUrlHasBeenSet = false;
457 bool m_tagsHasBeenSet = false;
458};
459
460} // namespace Model
461} // namespace EMR
462} // namespace Aws
Session & WithState(SessionState value)
Definition Session.h:126
const Aws::String & GetArn() const
Definition Session.h:99
Session & WithUpdatedAt(UpdatedAtT &&value)
Definition Session.h:236
AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetId() const
Definition Session.h:45
Session & WithName(NameT &&value)
Definition Session.h:89
const SessionMonitoringConfiguration & GetMonitoringConfiguration() const
Definition Session.h:327
bool StateHasBeenSet() const
Definition Session.h:121
const Aws::String & GetName() const
Definition Session.h:81
void SetStateChangeReason(StateChangeReasonT &&value)
Definition Session.h:139
const Aws::Utils::DateTime & GetStartedAt() const
Definition Session.h:247
long long GetSessionIdleTimeoutInMinutes() const
Definition Session.h:346
const Aws::Utils::DateTime & GetIdleSince() const
Definition Session.h:284
AWS_EMR_API Session(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetStateChangeReason() const
Definition Session.h:136
Session & WithEngineConfigurations(EngineConfigurationsT &&value)
Definition Session.h:311
Session & WithExecutionRoleArn(ExecutionRoleArnT &&value)
Definition Session.h:182
bool IdHasBeenSet() const
Definition Session.h:46
void SetState(SessionState value)
Definition Session.h:122
void SetSessionIdleTimeoutInMinutes(long long value)
Definition Session.h:348
void SetName(NameT &&value)
Definition Session.h:84
Session & WithMonitoringConfiguration(MonitoringConfigurationT &&value)
Definition Session.h:335
Session & WithAccountId(AccountIdT &&value)
Definition Session.h:200
Session & WithId(IdT &&value)
Definition Session.h:53
Session & WithClusterId(ClusterIdT &&value)
Definition Session.h:71
Session & WithTags(TagsT &&value)
Definition Session.h:390
const Aws::String & GetClusterId() const
Definition Session.h:63
const Aws::Utils::DateTime & GetUpdatedAt() const
Definition Session.h:228
const Aws::Vector< Configuration > & GetEngineConfigurations() const
Definition Session.h:303
Session & WithStartedAt(StartedAtT &&value)
Definition Session.h:255
void SetReleaseLabel(ReleaseLabelT &&value)
Definition Session.h:158
const Aws::String & GetAccountId() const
Definition Session.h:192
void SetCreatedAt(CreatedAtT &&value)
Definition Session.h:213
bool ExecutionRoleArnHasBeenSet() const
Definition Session.h:175
Session & AddTags(TagsT &&value)
Definition Session.h:395
bool EndedAtHasBeenSet() const
Definition Session.h:266
Session & WithStateChangeReason(StateChangeReasonT &&value)
Definition Session.h:144
Session & WithEndedAt(EndedAtT &&value)
Definition Session.h:273
bool ServerUrlHasBeenSet() const
Definition Session.h:365
void SetTags(TagsT &&value)
Definition Session.h:385
bool SessionIdleTimeoutInMinutesHasBeenSet() const
Definition Session.h:347
void SetIdleSince(IdleSinceT &&value)
Definition Session.h:287
const Aws::String & GetReleaseLabel() const
Definition Session.h:155
Session & WithIdleSince(IdleSinceT &&value)
Definition Session.h:292
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Session.h:210
SessionState GetState() const
Definition Session.h:120
Session & WithServerUrl(ServerUrlT &&value)
Definition Session.h:372
void SetArn(ArnT &&value)
Definition Session.h:102
bool NameHasBeenSet() const
Definition Session.h:82
const Aws::String & GetServerUrl() const
Definition Session.h:364
void SetEndedAt(EndedAtT &&value)
Definition Session.h:268
const Aws::Vector< Tag > & GetTags() const
Definition Session.h:382
Session & AddEngineConfigurations(EngineConfigurationsT &&value)
Definition Session.h:316
bool TagsHasBeenSet() const
Definition Session.h:383
bool ClusterIdHasBeenSet() const
Definition Session.h:64
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
Definition Session.h:177
bool ArnHasBeenSet() const
Definition Session.h:100
void SetUpdatedAt(UpdatedAtT &&value)
Definition Session.h:231
bool StartedAtHasBeenSet() const
Definition Session.h:248
bool IdleSinceHasBeenSet() const
Definition Session.h:285
const Aws::Utils::DateTime & GetEndedAt() const
Definition Session.h:265
bool AccountIdHasBeenSet() const
Definition Session.h:193
Session & WithArn(ArnT &&value)
Definition Session.h:107
Session & WithSessionIdleTimeoutInMinutes(long long value)
Definition Session.h:352
bool StateChangeReasonHasBeenSet() const
Definition Session.h:137
bool EngineConfigurationsHasBeenSet() const
Definition Session.h:304
void SetAccountId(AccountIdT &&value)
Definition Session.h:195
bool MonitoringConfigurationHasBeenSet() const
Definition Session.h:328
void SetClusterId(ClusterIdT &&value)
Definition Session.h:66
void SetEngineConfigurations(EngineConfigurationsT &&value)
Definition Session.h:306
bool CreatedAtHasBeenSet() const
Definition Session.h:211
void SetServerUrl(ServerUrlT &&value)
Definition Session.h:367
void SetId(IdT &&value)
Definition Session.h:48
void SetMonitoringConfiguration(MonitoringConfigurationT &&value)
Definition Session.h:330
AWS_EMR_API Session & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_EMR_API Session()=default
Session & WithCreatedAt(CreatedAtT &&value)
Definition Session.h:218
const Aws::String & GetExecutionRoleArn() const
Definition Session.h:174
bool ReleaseLabelHasBeenSet() const
Definition Session.h:156
bool UpdatedAtHasBeenSet() const
Definition Session.h:229
void SetStartedAt(StartedAtT &&value)
Definition Session.h:250
Session & WithReleaseLabel(ReleaseLabelT &&value)
Definition Session.h:163
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue