AWS SDK for C++

AWS SDK for C++ Version 1.11.851

Loading...
Searching...
No Matches
GameSession.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/crt/cbor/Cbor.h>
11#include <aws/gamelift/GameLift_EXPORTS.h>
12#include <aws/gamelift/model/GameProperty.h>
13#include <aws/gamelift/model/GameSessionStatus.h>
14#include <aws/gamelift/model/GameSessionStatusReason.h>
15#include <aws/gamelift/model/PlayerGatewayStatus.h>
16#include <aws/gamelift/model/PlayerSessionCreationPolicy.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Cbor {
23class CborValue;
24} // namespace Cbor
25} // namespace Utils
26namespace GameLift {
27namespace Model {
28
42 public:
43 AWS_GAMELIFT_API GameSession() = default;
44 AWS_GAMELIFT_API GameSession(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
45 AWS_GAMELIFT_API GameSession& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
46 AWS_GAMELIFT_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
47
49
57 inline const Aws::String& GetGameSessionId() const { return m_gameSessionId; }
58 inline bool GameSessionIdHasBeenSet() const { return m_gameSessionIdHasBeenSet; }
59 template <typename GameSessionIdT = Aws::String>
60 void SetGameSessionId(GameSessionIdT&& value) {
61 m_gameSessionIdHasBeenSet = true;
62 m_gameSessionId = std::forward<GameSessionIdT>(value);
63 }
64 template <typename GameSessionIdT = Aws::String>
65 GameSession& WithGameSessionId(GameSessionIdT&& value) {
66 SetGameSessionId(std::forward<GameSessionIdT>(value));
67 return *this;
68 }
70
72
76 inline const Aws::String& GetName() const { return m_name; }
77 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
78 template <typename NameT = Aws::String>
79 void SetName(NameT&& value) {
80 m_nameHasBeenSet = true;
81 m_name = std::forward<NameT>(value);
82 }
83 template <typename NameT = Aws::String>
84 GameSession& WithName(NameT&& value) {
85 SetName(std::forward<NameT>(value));
86 return *this;
87 }
89
91
94 inline const Aws::String& GetFleetId() const { return m_fleetId; }
95 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
96 template <typename FleetIdT = Aws::String>
97 void SetFleetId(FleetIdT&& value) {
98 m_fleetIdHasBeenSet = true;
99 m_fleetId = std::forward<FleetIdT>(value);
100 }
101 template <typename FleetIdT = Aws::String>
102 GameSession& WithFleetId(FleetIdT&& value) {
103 SetFleetId(std::forward<FleetIdT>(value));
104 return *this;
105 }
107
109
114 inline const Aws::String& GetFleetArn() const { return m_fleetArn; }
115 inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; }
116 template <typename FleetArnT = Aws::String>
117 void SetFleetArn(FleetArnT&& value) {
118 m_fleetArnHasBeenSet = true;
119 m_fleetArn = std::forward<FleetArnT>(value);
120 }
121 template <typename FleetArnT = Aws::String>
122 GameSession& WithFleetArn(FleetArnT&& value) {
123 SetFleetArn(std::forward<FleetArnT>(value));
124 return *this;
125 }
127
129
134 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
135 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
136 template <typename CreationTimeT = Aws::Utils::DateTime>
137 void SetCreationTime(CreationTimeT&& value) {
138 m_creationTimeHasBeenSet = true;
139 m_creationTime = std::forward<CreationTimeT>(value);
140 }
141 template <typename CreationTimeT = Aws::Utils::DateTime>
142 GameSession& WithCreationTime(CreationTimeT&& value) {
143 SetCreationTime(std::forward<CreationTimeT>(value));
144 return *this;
145 }
147
149
154 inline const Aws::Utils::DateTime& GetTerminationTime() const { return m_terminationTime; }
155 inline bool TerminationTimeHasBeenSet() const { return m_terminationTimeHasBeenSet; }
156 template <typename TerminationTimeT = Aws::Utils::DateTime>
157 void SetTerminationTime(TerminationTimeT&& value) {
158 m_terminationTimeHasBeenSet = true;
159 m_terminationTime = std::forward<TerminationTimeT>(value);
160 }
161 template <typename TerminationTimeT = Aws::Utils::DateTime>
162 GameSession& WithTerminationTime(TerminationTimeT&& value) {
163 SetTerminationTime(std::forward<TerminationTimeT>(value));
164 return *this;
165 }
167
169
172 inline int64_t GetCurrentPlayerSessionCount() const { return m_currentPlayerSessionCount; }
173 inline bool CurrentPlayerSessionCountHasBeenSet() const { return m_currentPlayerSessionCountHasBeenSet; }
174 inline void SetCurrentPlayerSessionCount(int64_t value) {
175 m_currentPlayerSessionCountHasBeenSet = true;
176 m_currentPlayerSessionCount = value;
177 }
180 return *this;
181 }
183
185
189 inline int64_t GetMaximumPlayerSessionCount() const { return m_maximumPlayerSessionCount; }
190 inline bool MaximumPlayerSessionCountHasBeenSet() const { return m_maximumPlayerSessionCountHasBeenSet; }
191 inline void SetMaximumPlayerSessionCount(int64_t value) {
192 m_maximumPlayerSessionCountHasBeenSet = true;
193 m_maximumPlayerSessionCount = value;
194 }
197 return *this;
198 }
200
202
206 inline GameSessionStatus GetStatus() const { return m_status; }
207 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
208 inline void SetStatus(GameSessionStatus value) {
209 m_statusHasBeenSet = true;
210 m_status = value;
211 }
213 SetStatus(value);
214 return *this;
215 }
217
219
230 inline GameSessionStatusReason GetStatusReason() const { return m_statusReason; }
231 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
233 m_statusReasonHasBeenSet = true;
234 m_statusReason = value;
235 }
237 SetStatusReason(value);
238 return *this;
239 }
241
243
254 inline const Aws::Vector<GameProperty>& GetGameProperties() const { return m_gameProperties; }
255 inline bool GamePropertiesHasBeenSet() const { return m_gamePropertiesHasBeenSet; }
256 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
257 void SetGameProperties(GamePropertiesT&& value) {
258 m_gamePropertiesHasBeenSet = true;
259 m_gameProperties = std::forward<GamePropertiesT>(value);
260 }
261 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
262 GameSession& WithGameProperties(GamePropertiesT&& value) {
263 SetGameProperties(std::forward<GamePropertiesT>(value));
264 return *this;
265 }
266 template <typename GamePropertiesT = GameProperty>
267 GameSession& AddGameProperties(GamePropertiesT&& value) {
268 m_gamePropertiesHasBeenSet = true;
269 m_gameProperties.emplace_back(std::forward<GamePropertiesT>(value));
270 return *this;
271 }
273
275
279 inline const Aws::String& GetIpAddress() const { return m_ipAddress; }
280 inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; }
281 template <typename IpAddressT = Aws::String>
282 void SetIpAddress(IpAddressT&& value) {
283 m_ipAddressHasBeenSet = true;
284 m_ipAddress = std::forward<IpAddressT>(value);
285 }
286 template <typename IpAddressT = Aws::String>
287 GameSession& WithIpAddress(IpAddressT&& value) {
288 SetIpAddress(std::forward<IpAddressT>(value));
289 return *this;
290 }
292
294
306 inline const Aws::String& GetDnsName() const { return m_dnsName; }
307 inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; }
308 template <typename DnsNameT = Aws::String>
309 void SetDnsName(DnsNameT&& value) {
310 m_dnsNameHasBeenSet = true;
311 m_dnsName = std::forward<DnsNameT>(value);
312 }
313 template <typename DnsNameT = Aws::String>
314 GameSession& WithDnsName(DnsNameT&& value) {
315 SetDnsName(std::forward<DnsNameT>(value));
316 return *this;
317 }
319
321
325 inline int64_t GetPort() const { return m_port; }
326 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
327 inline void SetPort(int64_t value) {
328 m_portHasBeenSet = true;
329 m_port = value;
330 }
331 inline GameSession& WithPort(int64_t value) {
332 SetPort(value);
333 return *this;
334 }
336
338
341 inline PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const { return m_playerSessionCreationPolicy; }
342 inline bool PlayerSessionCreationPolicyHasBeenSet() const { return m_playerSessionCreationPolicyHasBeenSet; }
344 m_playerSessionCreationPolicyHasBeenSet = true;
345 m_playerSessionCreationPolicy = value;
346 }
349 return *this;
350 }
352
354
359 inline const Aws::String& GetCreatorId() const { return m_creatorId; }
360 inline bool CreatorIdHasBeenSet() const { return m_creatorIdHasBeenSet; }
361 template <typename CreatorIdT = Aws::String>
362 void SetCreatorId(CreatorIdT&& value) {
363 m_creatorIdHasBeenSet = true;
364 m_creatorId = std::forward<CreatorIdT>(value);
365 }
366 template <typename CreatorIdT = Aws::String>
367 GameSession& WithCreatorId(CreatorIdT&& value) {
368 SetCreatorId(std::forward<CreatorIdT>(value));
369 return *this;
370 }
372
374
381 inline const Aws::String& GetGameSessionData() const { return m_gameSessionData; }
382 inline bool GameSessionDataHasBeenSet() const { return m_gameSessionDataHasBeenSet; }
383 template <typename GameSessionDataT = Aws::String>
384 void SetGameSessionData(GameSessionDataT&& value) {
385 m_gameSessionDataHasBeenSet = true;
386 m_gameSessionData = std::forward<GameSessionDataT>(value);
387 }
388 template <typename GameSessionDataT = Aws::String>
389 GameSession& WithGameSessionData(GameSessionDataT&& value) {
390 SetGameSessionData(std::forward<GameSessionDataT>(value));
391 return *this;
392 }
394
396
407 inline const Aws::String& GetMatchmakerData() const { return m_matchmakerData; }
408 inline bool MatchmakerDataHasBeenSet() const { return m_matchmakerDataHasBeenSet; }
409 template <typename MatchmakerDataT = Aws::String>
410 void SetMatchmakerData(MatchmakerDataT&& value) {
411 m_matchmakerDataHasBeenSet = true;
412 m_matchmakerData = std::forward<MatchmakerDataT>(value);
413 }
414 template <typename MatchmakerDataT = Aws::String>
415 GameSession& WithMatchmakerData(MatchmakerDataT&& value) {
416 SetMatchmakerData(std::forward<MatchmakerDataT>(value));
417 return *this;
418 }
420
422
427 inline const Aws::String& GetLocation() const { return m_location; }
428 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
429 template <typename LocationT = Aws::String>
430 void SetLocation(LocationT&& value) {
431 m_locationHasBeenSet = true;
432 m_location = std::forward<LocationT>(value);
433 }
434 template <typename LocationT = Aws::String>
435 GameSession& WithLocation(LocationT&& value) {
436 SetLocation(std::forward<LocationT>(value));
437 return *this;
438 }
440
442
449 inline const Aws::String& GetComputeName() const { return m_computeName; }
450 inline bool ComputeNameHasBeenSet() const { return m_computeNameHasBeenSet; }
451 template <typename ComputeNameT = Aws::String>
452 void SetComputeName(ComputeNameT&& value) {
453 m_computeNameHasBeenSet = true;
454 m_computeName = std::forward<ComputeNameT>(value);
455 }
456 template <typename ComputeNameT = Aws::String>
457 GameSession& WithComputeName(ComputeNameT&& value) {
458 SetComputeName(std::forward<ComputeNameT>(value));
459 return *this;
460 }
462
464
475 inline PlayerGatewayStatus GetPlayerGatewayStatus() const { return m_playerGatewayStatus; }
476 inline bool PlayerGatewayStatusHasBeenSet() const { return m_playerGatewayStatusHasBeenSet; }
478 m_playerGatewayStatusHasBeenSet = true;
479 m_playerGatewayStatus = value;
480 }
483 return *this;
484 }
486 private:
487 Aws::String m_gameSessionId;
488
489 Aws::String m_name;
490
491 Aws::String m_fleetId;
492
493 Aws::String m_fleetArn;
494
495 Aws::Utils::DateTime m_creationTime{};
496
497 Aws::Utils::DateTime m_terminationTime{};
498
499 int64_t m_currentPlayerSessionCount{0};
500
501 int64_t m_maximumPlayerSessionCount{0};
502
504
506
507 Aws::Vector<GameProperty> m_gameProperties;
508
509 Aws::String m_ipAddress;
510
511 Aws::String m_dnsName;
512
513 int64_t m_port{0};
514
516
517 Aws::String m_creatorId;
518
519 Aws::String m_gameSessionData;
520
521 Aws::String m_matchmakerData;
522
523 Aws::String m_location;
524
525 Aws::String m_computeName;
526
528 bool m_gameSessionIdHasBeenSet = false;
529 bool m_nameHasBeenSet = false;
530 bool m_fleetIdHasBeenSet = false;
531 bool m_fleetArnHasBeenSet = false;
532 bool m_creationTimeHasBeenSet = false;
533 bool m_terminationTimeHasBeenSet = false;
534 bool m_currentPlayerSessionCountHasBeenSet = false;
535 bool m_maximumPlayerSessionCountHasBeenSet = false;
536 bool m_statusHasBeenSet = false;
537 bool m_statusReasonHasBeenSet = false;
538 bool m_gamePropertiesHasBeenSet = false;
539 bool m_ipAddressHasBeenSet = false;
540 bool m_dnsNameHasBeenSet = false;
541 bool m_portHasBeenSet = false;
542 bool m_playerSessionCreationPolicyHasBeenSet = false;
543 bool m_creatorIdHasBeenSet = false;
544 bool m_gameSessionDataHasBeenSet = false;
545 bool m_matchmakerDataHasBeenSet = false;
546 bool m_locationHasBeenSet = false;
547 bool m_computeNameHasBeenSet = false;
548 bool m_playerGatewayStatusHasBeenSet = false;
549};
550
551} // namespace Model
552} // namespace GameLift
553} // namespace Aws
PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const
int64_t GetMaximumPlayerSessionCount() const
const Aws::Utils::DateTime & GetTerminationTime() const
void SetGameProperties(GamePropertiesT &&value)
const Aws::String & GetFleetId() const
Definition GameSession.h:94
GameSession & WithStatusReason(GameSessionStatusReason value)
GameSession & WithPlayerGatewayStatus(PlayerGatewayStatus value)
GameSession & WithName(NameT &&value)
Definition GameSession.h:84
const Aws::String & GetGameSessionData() const
AWS_GAMELIFT_API GameSession(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
bool PlayerSessionCreationPolicyHasBeenSet() const
GameSession & WithGameSessionId(GameSessionIdT &&value)
Definition GameSession.h:65
GameSession & WithPort(int64_t value)
GameSessionStatusReason GetStatusReason() const
GameSession & WithLocation(LocationT &&value)
void SetComputeName(ComputeNameT &&value)
GameSession & WithComputeName(ComputeNameT &&value)
GameSession & WithIpAddress(IpAddressT &&value)
void SetFleetArn(FleetArnT &&value)
void SetCurrentPlayerSessionCount(int64_t value)
GameSession & WithCurrentPlayerSessionCount(int64_t value)
void SetIpAddress(IpAddressT &&value)
AWS_GAMELIFT_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
PlayerGatewayStatus GetPlayerGatewayStatus() const
void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy value)
const Aws::String & GetComputeName() const
const Aws::String & GetDnsName() const
GameSession & WithMaximumPlayerSessionCount(int64_t value)
GameSession & WithGameProperties(GamePropertiesT &&value)
const Aws::String & GetFleetArn() const
const Aws::String & GetLocation() const
GameSession & WithCreationTime(CreationTimeT &&value)
void SetMatchmakerData(MatchmakerDataT &&value)
void SetPlayerGatewayStatus(PlayerGatewayStatus value)
void SetGameSessionId(GameSessionIdT &&value)
Definition GameSession.h:60
bool MaximumPlayerSessionCountHasBeenSet() const
GameSession & WithCreatorId(CreatorIdT &&value)
AWS_GAMELIFT_API GameSession()=default
AWS_GAMELIFT_API GameSession & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
GameSession & WithTerminationTime(TerminationTimeT &&value)
void SetCreatorId(CreatorIdT &&value)
GameSession & AddGameProperties(GamePropertiesT &&value)
void SetTerminationTime(TerminationTimeT &&value)
const Aws::String & GetCreatorId() const
bool CurrentPlayerSessionCountHasBeenSet() const
int64_t GetCurrentPlayerSessionCount() const
const Aws::String & GetName() const
Definition GameSession.h:76
void SetGameSessionData(GameSessionDataT &&value)
void SetCreationTime(CreationTimeT &&value)
GameSessionStatus GetStatus() const
GameSession & WithFleetArn(FleetArnT &&value)
void SetFleetId(FleetIdT &&value)
Definition GameSession.h:97
void SetMaximumPlayerSessionCount(int64_t value)
GameSession & WithMatchmakerData(MatchmakerDataT &&value)
GameSession & WithFleetId(FleetIdT &&value)
GameSession & WithGameSessionData(GameSessionDataT &&value)
const Aws::Vector< GameProperty > & GetGameProperties() const
void SetStatusReason(GameSessionStatusReason value)
const Aws::Utils::DateTime & GetCreationTime() const
GameSession & WithPlayerSessionCreationPolicy(PlayerSessionCreationPolicy value)
void SetDnsName(DnsNameT &&value)
void SetLocation(LocationT &&value)
const Aws::String & GetGameSessionId() const
Definition GameSession.h:57
void SetStatus(GameSessionStatus value)
GameSession & WithStatus(GameSessionStatus value)
const Aws::String & GetMatchmakerData() const
const Aws::String & GetIpAddress() const
GameSession & WithDnsName(DnsNameT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector