AWS SDK for C++

AWS SDK for C++ Version 1.11.788

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/gamelift/GameLift_EXPORTS.h>
11#include <aws/gamelift/model/GameProperty.h>
12#include <aws/gamelift/model/GameSessionStatus.h>
13#include <aws/gamelift/model/GameSessionStatusReason.h>
14#include <aws/gamelift/model/PlayerGatewayStatus.h>
15#include <aws/gamelift/model/PlayerSessionCreationPolicy.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace GameLift {
27namespace Model {
28
42 public:
43 AWS_GAMELIFT_API GameSession() = default;
44 AWS_GAMELIFT_API GameSession(Aws::Utils::Json::JsonView jsonValue);
45 AWS_GAMELIFT_API GameSession& operator=(Aws::Utils::Json::JsonView jsonValue);
46 AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
47
49
54 inline const Aws::String& GetGameSessionId() const { return m_gameSessionId; }
55 inline bool GameSessionIdHasBeenSet() const { return m_gameSessionIdHasBeenSet; }
56 template <typename GameSessionIdT = Aws::String>
57 void SetGameSessionId(GameSessionIdT&& value) {
58 m_gameSessionIdHasBeenSet = true;
59 m_gameSessionId = std::forward<GameSessionIdT>(value);
60 }
61 template <typename GameSessionIdT = Aws::String>
62 GameSession& WithGameSessionId(GameSessionIdT&& value) {
63 SetGameSessionId(std::forward<GameSessionIdT>(value));
64 return *this;
65 }
67
69
73 inline const Aws::String& GetName() const { return m_name; }
74 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
75 template <typename NameT = Aws::String>
76 void SetName(NameT&& value) {
77 m_nameHasBeenSet = true;
78 m_name = std::forward<NameT>(value);
79 }
80 template <typename NameT = Aws::String>
81 GameSession& WithName(NameT&& value) {
82 SetName(std::forward<NameT>(value));
83 return *this;
84 }
86
88
91 inline const Aws::String& GetFleetId() const { return m_fleetId; }
92 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
93 template <typename FleetIdT = Aws::String>
94 void SetFleetId(FleetIdT&& value) {
95 m_fleetIdHasBeenSet = true;
96 m_fleetId = std::forward<FleetIdT>(value);
97 }
98 template <typename FleetIdT = Aws::String>
99 GameSession& WithFleetId(FleetIdT&& value) {
100 SetFleetId(std::forward<FleetIdT>(value));
101 return *this;
102 }
104
106
111 inline const Aws::String& GetFleetArn() const { return m_fleetArn; }
112 inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; }
113 template <typename FleetArnT = Aws::String>
114 void SetFleetArn(FleetArnT&& value) {
115 m_fleetArnHasBeenSet = true;
116 m_fleetArn = std::forward<FleetArnT>(value);
117 }
118 template <typename FleetArnT = Aws::String>
119 GameSession& WithFleetArn(FleetArnT&& value) {
120 SetFleetArn(std::forward<FleetArnT>(value));
121 return *this;
122 }
124
126
131 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
132 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
133 template <typename CreationTimeT = Aws::Utils::DateTime>
134 void SetCreationTime(CreationTimeT&& value) {
135 m_creationTimeHasBeenSet = true;
136 m_creationTime = std::forward<CreationTimeT>(value);
137 }
138 template <typename CreationTimeT = Aws::Utils::DateTime>
139 GameSession& WithCreationTime(CreationTimeT&& value) {
140 SetCreationTime(std::forward<CreationTimeT>(value));
141 return *this;
142 }
144
146
151 inline const Aws::Utils::DateTime& GetTerminationTime() const { return m_terminationTime; }
152 inline bool TerminationTimeHasBeenSet() const { return m_terminationTimeHasBeenSet; }
153 template <typename TerminationTimeT = Aws::Utils::DateTime>
154 void SetTerminationTime(TerminationTimeT&& value) {
155 m_terminationTimeHasBeenSet = true;
156 m_terminationTime = std::forward<TerminationTimeT>(value);
157 }
158 template <typename TerminationTimeT = Aws::Utils::DateTime>
159 GameSession& WithTerminationTime(TerminationTimeT&& value) {
160 SetTerminationTime(std::forward<TerminationTimeT>(value));
161 return *this;
162 }
164
166
169 inline int GetCurrentPlayerSessionCount() const { return m_currentPlayerSessionCount; }
170 inline bool CurrentPlayerSessionCountHasBeenSet() const { return m_currentPlayerSessionCountHasBeenSet; }
171 inline void SetCurrentPlayerSessionCount(int value) {
172 m_currentPlayerSessionCountHasBeenSet = true;
173 m_currentPlayerSessionCount = value;
174 }
177 return *this;
178 }
180
182
186 inline int GetMaximumPlayerSessionCount() const { return m_maximumPlayerSessionCount; }
187 inline bool MaximumPlayerSessionCountHasBeenSet() const { return m_maximumPlayerSessionCountHasBeenSet; }
188 inline void SetMaximumPlayerSessionCount(int value) {
189 m_maximumPlayerSessionCountHasBeenSet = true;
190 m_maximumPlayerSessionCount = value;
191 }
194 return *this;
195 }
197
199
203 inline GameSessionStatus GetStatus() const { return m_status; }
204 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
205 inline void SetStatus(GameSessionStatus value) {
206 m_statusHasBeenSet = true;
207 m_status = value;
208 }
210 SetStatus(value);
211 return *this;
212 }
214
216
227 inline GameSessionStatusReason GetStatusReason() const { return m_statusReason; }
228 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
230 m_statusReasonHasBeenSet = true;
231 m_statusReason = value;
232 }
234 SetStatusReason(value);
235 return *this;
236 }
238
240
251 inline const Aws::Vector<GameProperty>& GetGameProperties() const { return m_gameProperties; }
252 inline bool GamePropertiesHasBeenSet() const { return m_gamePropertiesHasBeenSet; }
253 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
254 void SetGameProperties(GamePropertiesT&& value) {
255 m_gamePropertiesHasBeenSet = true;
256 m_gameProperties = std::forward<GamePropertiesT>(value);
257 }
258 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
259 GameSession& WithGameProperties(GamePropertiesT&& value) {
260 SetGameProperties(std::forward<GamePropertiesT>(value));
261 return *this;
262 }
263 template <typename GamePropertiesT = GameProperty>
264 GameSession& AddGameProperties(GamePropertiesT&& value) {
265 m_gamePropertiesHasBeenSet = true;
266 m_gameProperties.emplace_back(std::forward<GamePropertiesT>(value));
267 return *this;
268 }
270
272
276 inline const Aws::String& GetIpAddress() const { return m_ipAddress; }
277 inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; }
278 template <typename IpAddressT = Aws::String>
279 void SetIpAddress(IpAddressT&& value) {
280 m_ipAddressHasBeenSet = true;
281 m_ipAddress = std::forward<IpAddressT>(value);
282 }
283 template <typename IpAddressT = Aws::String>
284 GameSession& WithIpAddress(IpAddressT&& value) {
285 SetIpAddress(std::forward<IpAddressT>(value));
286 return *this;
287 }
289
291
303 inline const Aws::String& GetDnsName() const { return m_dnsName; }
304 inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; }
305 template <typename DnsNameT = Aws::String>
306 void SetDnsName(DnsNameT&& value) {
307 m_dnsNameHasBeenSet = true;
308 m_dnsName = std::forward<DnsNameT>(value);
309 }
310 template <typename DnsNameT = Aws::String>
311 GameSession& WithDnsName(DnsNameT&& value) {
312 SetDnsName(std::forward<DnsNameT>(value));
313 return *this;
314 }
316
318
322 inline int GetPort() const { return m_port; }
323 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
324 inline void SetPort(int value) {
325 m_portHasBeenSet = true;
326 m_port = value;
327 }
328 inline GameSession& WithPort(int value) {
329 SetPort(value);
330 return *this;
331 }
333
335
338 inline PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const { return m_playerSessionCreationPolicy; }
339 inline bool PlayerSessionCreationPolicyHasBeenSet() const { return m_playerSessionCreationPolicyHasBeenSet; }
341 m_playerSessionCreationPolicyHasBeenSet = true;
342 m_playerSessionCreationPolicy = value;
343 }
346 return *this;
347 }
349
351
356 inline const Aws::String& GetCreatorId() const { return m_creatorId; }
357 inline bool CreatorIdHasBeenSet() const { return m_creatorIdHasBeenSet; }
358 template <typename CreatorIdT = Aws::String>
359 void SetCreatorId(CreatorIdT&& value) {
360 m_creatorIdHasBeenSet = true;
361 m_creatorId = std::forward<CreatorIdT>(value);
362 }
363 template <typename CreatorIdT = Aws::String>
364 GameSession& WithCreatorId(CreatorIdT&& value) {
365 SetCreatorId(std::forward<CreatorIdT>(value));
366 return *this;
367 }
369
371
378 inline const Aws::String& GetGameSessionData() const { return m_gameSessionData; }
379 inline bool GameSessionDataHasBeenSet() const { return m_gameSessionDataHasBeenSet; }
380 template <typename GameSessionDataT = Aws::String>
381 void SetGameSessionData(GameSessionDataT&& value) {
382 m_gameSessionDataHasBeenSet = true;
383 m_gameSessionData = std::forward<GameSessionDataT>(value);
384 }
385 template <typename GameSessionDataT = Aws::String>
386 GameSession& WithGameSessionData(GameSessionDataT&& value) {
387 SetGameSessionData(std::forward<GameSessionDataT>(value));
388 return *this;
389 }
391
393
404 inline const Aws::String& GetMatchmakerData() const { return m_matchmakerData; }
405 inline bool MatchmakerDataHasBeenSet() const { return m_matchmakerDataHasBeenSet; }
406 template <typename MatchmakerDataT = Aws::String>
407 void SetMatchmakerData(MatchmakerDataT&& value) {
408 m_matchmakerDataHasBeenSet = true;
409 m_matchmakerData = std::forward<MatchmakerDataT>(value);
410 }
411 template <typename MatchmakerDataT = Aws::String>
412 GameSession& WithMatchmakerData(MatchmakerDataT&& value) {
413 SetMatchmakerData(std::forward<MatchmakerDataT>(value));
414 return *this;
415 }
417
419
424 inline const Aws::String& GetLocation() const { return m_location; }
425 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
426 template <typename LocationT = Aws::String>
427 void SetLocation(LocationT&& value) {
428 m_locationHasBeenSet = true;
429 m_location = std::forward<LocationT>(value);
430 }
431 template <typename LocationT = Aws::String>
432 GameSession& WithLocation(LocationT&& value) {
433 SetLocation(std::forward<LocationT>(value));
434 return *this;
435 }
437
439
446 inline const Aws::String& GetComputeName() const { return m_computeName; }
447 inline bool ComputeNameHasBeenSet() const { return m_computeNameHasBeenSet; }
448 template <typename ComputeNameT = Aws::String>
449 void SetComputeName(ComputeNameT&& value) {
450 m_computeNameHasBeenSet = true;
451 m_computeName = std::forward<ComputeNameT>(value);
452 }
453 template <typename ComputeNameT = Aws::String>
454 GameSession& WithComputeName(ComputeNameT&& value) {
455 SetComputeName(std::forward<ComputeNameT>(value));
456 return *this;
457 }
459
461
472 inline PlayerGatewayStatus GetPlayerGatewayStatus() const { return m_playerGatewayStatus; }
473 inline bool PlayerGatewayStatusHasBeenSet() const { return m_playerGatewayStatusHasBeenSet; }
475 m_playerGatewayStatusHasBeenSet = true;
476 m_playerGatewayStatus = value;
477 }
480 return *this;
481 }
483 private:
484 Aws::String m_gameSessionId;
485
486 Aws::String m_name;
487
488 Aws::String m_fleetId;
489
490 Aws::String m_fleetArn;
491
492 Aws::Utils::DateTime m_creationTime{};
493
494 Aws::Utils::DateTime m_terminationTime{};
495
496 int m_currentPlayerSessionCount{0};
497
498 int m_maximumPlayerSessionCount{0};
499
501
503
504 Aws::Vector<GameProperty> m_gameProperties;
505
506 Aws::String m_ipAddress;
507
508 Aws::String m_dnsName;
509
510 int m_port{0};
511
513
514 Aws::String m_creatorId;
515
516 Aws::String m_gameSessionData;
517
518 Aws::String m_matchmakerData;
519
520 Aws::String m_location;
521
522 Aws::String m_computeName;
523
525 bool m_gameSessionIdHasBeenSet = false;
526 bool m_nameHasBeenSet = false;
527 bool m_fleetIdHasBeenSet = false;
528 bool m_fleetArnHasBeenSet = false;
529 bool m_creationTimeHasBeenSet = false;
530 bool m_terminationTimeHasBeenSet = false;
531 bool m_currentPlayerSessionCountHasBeenSet = false;
532 bool m_maximumPlayerSessionCountHasBeenSet = false;
533 bool m_statusHasBeenSet = false;
534 bool m_statusReasonHasBeenSet = false;
535 bool m_gamePropertiesHasBeenSet = false;
536 bool m_ipAddressHasBeenSet = false;
537 bool m_dnsNameHasBeenSet = false;
538 bool m_portHasBeenSet = false;
539 bool m_playerSessionCreationPolicyHasBeenSet = false;
540 bool m_creatorIdHasBeenSet = false;
541 bool m_gameSessionDataHasBeenSet = false;
542 bool m_matchmakerDataHasBeenSet = false;
543 bool m_locationHasBeenSet = false;
544 bool m_computeNameHasBeenSet = false;
545 bool m_playerGatewayStatusHasBeenSet = false;
546};
547
548} // namespace Model
549} // namespace GameLift
550} // namespace Aws
PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const
const Aws::Utils::DateTime & GetTerminationTime() const
void SetGameProperties(GamePropertiesT &&value)
const Aws::String & GetFleetId() const
Definition GameSession.h:91
void SetMaximumPlayerSessionCount(int value)
GameSession & WithStatusReason(GameSessionStatusReason value)
GameSession & WithPlayerGatewayStatus(PlayerGatewayStatus value)
GameSession & WithName(NameT &&value)
Definition GameSession.h:81
const Aws::String & GetGameSessionData() const
bool PlayerSessionCreationPolicyHasBeenSet() const
GameSession & WithGameSessionId(GameSessionIdT &&value)
Definition GameSession.h:62
GameSessionStatusReason GetStatusReason() const
GameSession & WithLocation(LocationT &&value)
void SetComputeName(ComputeNameT &&value)
GameSession & WithComputeName(ComputeNameT &&value)
GameSession & WithIpAddress(IpAddressT &&value)
void SetFleetArn(FleetArnT &&value)
GameSession & WithCurrentPlayerSessionCount(int value)
GameSession & WithMaximumPlayerSessionCount(int value)
AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetIpAddress(IpAddressT &&value)
AWS_GAMELIFT_API GameSession(Aws::Utils::Json::JsonView jsonValue)
PlayerGatewayStatus GetPlayerGatewayStatus() const
void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy value)
const Aws::String & GetComputeName() const
const Aws::String & GetDnsName() const
GameSession & WithPort(int 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:57
bool MaximumPlayerSessionCountHasBeenSet() const
GameSession & WithCreatorId(CreatorIdT &&value)
AWS_GAMELIFT_API GameSession()=default
GameSession & WithTerminationTime(TerminationTimeT &&value)
void SetCreatorId(CreatorIdT &&value)
GameSession & AddGameProperties(GamePropertiesT &&value)
void SetTerminationTime(TerminationTimeT &&value)
const Aws::String & GetCreatorId() const
bool CurrentPlayerSessionCountHasBeenSet() const
const Aws::String & GetName() const
Definition GameSession.h:73
void SetGameSessionData(GameSessionDataT &&value)
void SetCreationTime(CreationTimeT &&value)
GameSessionStatus GetStatus() const
GameSession & WithFleetArn(FleetArnT &&value)
void SetFleetId(FleetIdT &&value)
Definition GameSession.h:94
GameSession & WithMatchmakerData(MatchmakerDataT &&value)
GameSession & WithFleetId(FleetIdT &&value)
Definition GameSession.h:99
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 SetCurrentPlayerSessionCount(int value)
void SetLocation(LocationT &&value)
const Aws::String & GetGameSessionId() const
Definition GameSession.h:54
void SetStatus(GameSessionStatus value)
AWS_GAMELIFT_API GameSession & operator=(Aws::Utils::Json::JsonView jsonValue)
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
Aws::Utils::Json::JsonValue JsonValue