AWS SDK for C++

AWS SDK for C++ Version 1.11.816

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
55 inline const Aws::String& GetGameSessionId() const { return m_gameSessionId; }
56 inline bool GameSessionIdHasBeenSet() const { return m_gameSessionIdHasBeenSet; }
57 template <typename GameSessionIdT = Aws::String>
58 void SetGameSessionId(GameSessionIdT&& value) {
59 m_gameSessionIdHasBeenSet = true;
60 m_gameSessionId = std::forward<GameSessionIdT>(value);
61 }
62 template <typename GameSessionIdT = Aws::String>
63 GameSession& WithGameSessionId(GameSessionIdT&& value) {
64 SetGameSessionId(std::forward<GameSessionIdT>(value));
65 return *this;
66 }
68
70
74 inline const Aws::String& GetName() const { return m_name; }
75 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
76 template <typename NameT = Aws::String>
77 void SetName(NameT&& value) {
78 m_nameHasBeenSet = true;
79 m_name = std::forward<NameT>(value);
80 }
81 template <typename NameT = Aws::String>
82 GameSession& WithName(NameT&& value) {
83 SetName(std::forward<NameT>(value));
84 return *this;
85 }
87
89
92 inline const Aws::String& GetFleetId() const { return m_fleetId; }
93 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
94 template <typename FleetIdT = Aws::String>
95 void SetFleetId(FleetIdT&& value) {
96 m_fleetIdHasBeenSet = true;
97 m_fleetId = std::forward<FleetIdT>(value);
98 }
99 template <typename FleetIdT = Aws::String>
100 GameSession& WithFleetId(FleetIdT&& value) {
101 SetFleetId(std::forward<FleetIdT>(value));
102 return *this;
103 }
105
107
112 inline const Aws::String& GetFleetArn() const { return m_fleetArn; }
113 inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; }
114 template <typename FleetArnT = Aws::String>
115 void SetFleetArn(FleetArnT&& value) {
116 m_fleetArnHasBeenSet = true;
117 m_fleetArn = std::forward<FleetArnT>(value);
118 }
119 template <typename FleetArnT = Aws::String>
120 GameSession& WithFleetArn(FleetArnT&& value) {
121 SetFleetArn(std::forward<FleetArnT>(value));
122 return *this;
123 }
125
127
132 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
133 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
134 template <typename CreationTimeT = Aws::Utils::DateTime>
135 void SetCreationTime(CreationTimeT&& value) {
136 m_creationTimeHasBeenSet = true;
137 m_creationTime = std::forward<CreationTimeT>(value);
138 }
139 template <typename CreationTimeT = Aws::Utils::DateTime>
140 GameSession& WithCreationTime(CreationTimeT&& value) {
141 SetCreationTime(std::forward<CreationTimeT>(value));
142 return *this;
143 }
145
147
152 inline const Aws::Utils::DateTime& GetTerminationTime() const { return m_terminationTime; }
153 inline bool TerminationTimeHasBeenSet() const { return m_terminationTimeHasBeenSet; }
154 template <typename TerminationTimeT = Aws::Utils::DateTime>
155 void SetTerminationTime(TerminationTimeT&& value) {
156 m_terminationTimeHasBeenSet = true;
157 m_terminationTime = std::forward<TerminationTimeT>(value);
158 }
159 template <typename TerminationTimeT = Aws::Utils::DateTime>
160 GameSession& WithTerminationTime(TerminationTimeT&& value) {
161 SetTerminationTime(std::forward<TerminationTimeT>(value));
162 return *this;
163 }
165
167
170 inline int64_t GetCurrentPlayerSessionCount() const { return m_currentPlayerSessionCount; }
171 inline bool CurrentPlayerSessionCountHasBeenSet() const { return m_currentPlayerSessionCountHasBeenSet; }
172 inline void SetCurrentPlayerSessionCount(int64_t value) {
173 m_currentPlayerSessionCountHasBeenSet = true;
174 m_currentPlayerSessionCount = value;
175 }
178 return *this;
179 }
181
183
187 inline int64_t GetMaximumPlayerSessionCount() const { return m_maximumPlayerSessionCount; }
188 inline bool MaximumPlayerSessionCountHasBeenSet() const { return m_maximumPlayerSessionCountHasBeenSet; }
189 inline void SetMaximumPlayerSessionCount(int64_t value) {
190 m_maximumPlayerSessionCountHasBeenSet = true;
191 m_maximumPlayerSessionCount = value;
192 }
195 return *this;
196 }
198
200
204 inline GameSessionStatus GetStatus() const { return m_status; }
205 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
206 inline void SetStatus(GameSessionStatus value) {
207 m_statusHasBeenSet = true;
208 m_status = value;
209 }
211 SetStatus(value);
212 return *this;
213 }
215
217
228 inline GameSessionStatusReason GetStatusReason() const { return m_statusReason; }
229 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
231 m_statusReasonHasBeenSet = true;
232 m_statusReason = value;
233 }
235 SetStatusReason(value);
236 return *this;
237 }
239
241
252 inline const Aws::Vector<GameProperty>& GetGameProperties() const { return m_gameProperties; }
253 inline bool GamePropertiesHasBeenSet() const { return m_gamePropertiesHasBeenSet; }
254 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
255 void SetGameProperties(GamePropertiesT&& value) {
256 m_gamePropertiesHasBeenSet = true;
257 m_gameProperties = std::forward<GamePropertiesT>(value);
258 }
259 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
260 GameSession& WithGameProperties(GamePropertiesT&& value) {
261 SetGameProperties(std::forward<GamePropertiesT>(value));
262 return *this;
263 }
264 template <typename GamePropertiesT = GameProperty>
265 GameSession& AddGameProperties(GamePropertiesT&& value) {
266 m_gamePropertiesHasBeenSet = true;
267 m_gameProperties.emplace_back(std::forward<GamePropertiesT>(value));
268 return *this;
269 }
271
273
277 inline const Aws::String& GetIpAddress() const { return m_ipAddress; }
278 inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; }
279 template <typename IpAddressT = Aws::String>
280 void SetIpAddress(IpAddressT&& value) {
281 m_ipAddressHasBeenSet = true;
282 m_ipAddress = std::forward<IpAddressT>(value);
283 }
284 template <typename IpAddressT = Aws::String>
285 GameSession& WithIpAddress(IpAddressT&& value) {
286 SetIpAddress(std::forward<IpAddressT>(value));
287 return *this;
288 }
290
292
304 inline const Aws::String& GetDnsName() const { return m_dnsName; }
305 inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; }
306 template <typename DnsNameT = Aws::String>
307 void SetDnsName(DnsNameT&& value) {
308 m_dnsNameHasBeenSet = true;
309 m_dnsName = std::forward<DnsNameT>(value);
310 }
311 template <typename DnsNameT = Aws::String>
312 GameSession& WithDnsName(DnsNameT&& value) {
313 SetDnsName(std::forward<DnsNameT>(value));
314 return *this;
315 }
317
319
323 inline int64_t GetPort() const { return m_port; }
324 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
325 inline void SetPort(int64_t value) {
326 m_portHasBeenSet = true;
327 m_port = value;
328 }
329 inline GameSession& WithPort(int64_t value) {
330 SetPort(value);
331 return *this;
332 }
334
336
339 inline PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const { return m_playerSessionCreationPolicy; }
340 inline bool PlayerSessionCreationPolicyHasBeenSet() const { return m_playerSessionCreationPolicyHasBeenSet; }
342 m_playerSessionCreationPolicyHasBeenSet = true;
343 m_playerSessionCreationPolicy = value;
344 }
347 return *this;
348 }
350
352
357 inline const Aws::String& GetCreatorId() const { return m_creatorId; }
358 inline bool CreatorIdHasBeenSet() const { return m_creatorIdHasBeenSet; }
359 template <typename CreatorIdT = Aws::String>
360 void SetCreatorId(CreatorIdT&& value) {
361 m_creatorIdHasBeenSet = true;
362 m_creatorId = std::forward<CreatorIdT>(value);
363 }
364 template <typename CreatorIdT = Aws::String>
365 GameSession& WithCreatorId(CreatorIdT&& value) {
366 SetCreatorId(std::forward<CreatorIdT>(value));
367 return *this;
368 }
370
372
379 inline const Aws::String& GetGameSessionData() const { return m_gameSessionData; }
380 inline bool GameSessionDataHasBeenSet() const { return m_gameSessionDataHasBeenSet; }
381 template <typename GameSessionDataT = Aws::String>
382 void SetGameSessionData(GameSessionDataT&& value) {
383 m_gameSessionDataHasBeenSet = true;
384 m_gameSessionData = std::forward<GameSessionDataT>(value);
385 }
386 template <typename GameSessionDataT = Aws::String>
387 GameSession& WithGameSessionData(GameSessionDataT&& value) {
388 SetGameSessionData(std::forward<GameSessionDataT>(value));
389 return *this;
390 }
392
394
405 inline const Aws::String& GetMatchmakerData() const { return m_matchmakerData; }
406 inline bool MatchmakerDataHasBeenSet() const { return m_matchmakerDataHasBeenSet; }
407 template <typename MatchmakerDataT = Aws::String>
408 void SetMatchmakerData(MatchmakerDataT&& value) {
409 m_matchmakerDataHasBeenSet = true;
410 m_matchmakerData = std::forward<MatchmakerDataT>(value);
411 }
412 template <typename MatchmakerDataT = Aws::String>
413 GameSession& WithMatchmakerData(MatchmakerDataT&& value) {
414 SetMatchmakerData(std::forward<MatchmakerDataT>(value));
415 return *this;
416 }
418
420
425 inline const Aws::String& GetLocation() const { return m_location; }
426 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
427 template <typename LocationT = Aws::String>
428 void SetLocation(LocationT&& value) {
429 m_locationHasBeenSet = true;
430 m_location = std::forward<LocationT>(value);
431 }
432 template <typename LocationT = Aws::String>
433 GameSession& WithLocation(LocationT&& value) {
434 SetLocation(std::forward<LocationT>(value));
435 return *this;
436 }
438
440
447 inline const Aws::String& GetComputeName() const { return m_computeName; }
448 inline bool ComputeNameHasBeenSet() const { return m_computeNameHasBeenSet; }
449 template <typename ComputeNameT = Aws::String>
450 void SetComputeName(ComputeNameT&& value) {
451 m_computeNameHasBeenSet = true;
452 m_computeName = std::forward<ComputeNameT>(value);
453 }
454 template <typename ComputeNameT = Aws::String>
455 GameSession& WithComputeName(ComputeNameT&& value) {
456 SetComputeName(std::forward<ComputeNameT>(value));
457 return *this;
458 }
460
462
473 inline PlayerGatewayStatus GetPlayerGatewayStatus() const { return m_playerGatewayStatus; }
474 inline bool PlayerGatewayStatusHasBeenSet() const { return m_playerGatewayStatusHasBeenSet; }
476 m_playerGatewayStatusHasBeenSet = true;
477 m_playerGatewayStatus = value;
478 }
481 return *this;
482 }
484 private:
485 Aws::String m_gameSessionId;
486
487 Aws::String m_name;
488
489 Aws::String m_fleetId;
490
491 Aws::String m_fleetArn;
492
493 Aws::Utils::DateTime m_creationTime{};
494
495 Aws::Utils::DateTime m_terminationTime{};
496
497 int64_t m_currentPlayerSessionCount{0};
498
499 int64_t m_maximumPlayerSessionCount{0};
500
502
504
505 Aws::Vector<GameProperty> m_gameProperties;
506
507 Aws::String m_ipAddress;
508
509 Aws::String m_dnsName;
510
511 int64_t m_port{0};
512
514
515 Aws::String m_creatorId;
516
517 Aws::String m_gameSessionData;
518
519 Aws::String m_matchmakerData;
520
521 Aws::String m_location;
522
523 Aws::String m_computeName;
524
526 bool m_gameSessionIdHasBeenSet = false;
527 bool m_nameHasBeenSet = false;
528 bool m_fleetIdHasBeenSet = false;
529 bool m_fleetArnHasBeenSet = false;
530 bool m_creationTimeHasBeenSet = false;
531 bool m_terminationTimeHasBeenSet = false;
532 bool m_currentPlayerSessionCountHasBeenSet = false;
533 bool m_maximumPlayerSessionCountHasBeenSet = false;
534 bool m_statusHasBeenSet = false;
535 bool m_statusReasonHasBeenSet = false;
536 bool m_gamePropertiesHasBeenSet = false;
537 bool m_ipAddressHasBeenSet = false;
538 bool m_dnsNameHasBeenSet = false;
539 bool m_portHasBeenSet = false;
540 bool m_playerSessionCreationPolicyHasBeenSet = false;
541 bool m_creatorIdHasBeenSet = false;
542 bool m_gameSessionDataHasBeenSet = false;
543 bool m_matchmakerDataHasBeenSet = false;
544 bool m_locationHasBeenSet = false;
545 bool m_computeNameHasBeenSet = false;
546 bool m_playerGatewayStatusHasBeenSet = false;
547};
548
549} // namespace Model
550} // namespace GameLift
551} // 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:92
GameSession & WithStatusReason(GameSessionStatusReason value)
GameSession & WithPlayerGatewayStatus(PlayerGatewayStatus value)
GameSession & WithName(NameT &&value)
Definition GameSession.h:82
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:63
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:58
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:74
void SetGameSessionData(GameSessionDataT &&value)
void SetCreationTime(CreationTimeT &&value)
GameSessionStatus GetStatus() const
GameSession & WithFleetArn(FleetArnT &&value)
void SetFleetId(FleetIdT &&value)
Definition GameSession.h:95
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:55
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