AWS SDK for C++

AWS SDK for C++ Version 1.11.745

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/PlayerSessionCreationPolicy.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace GameLift {
26namespace Model {
27
41 public:
42 AWS_GAMELIFT_API GameSession() = default;
43 AWS_GAMELIFT_API GameSession(Aws::Utils::Json::JsonView jsonValue);
44 AWS_GAMELIFT_API GameSession& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
46
48
53 inline const Aws::String& GetGameSessionId() const { return m_gameSessionId; }
54 inline bool GameSessionIdHasBeenSet() const { return m_gameSessionIdHasBeenSet; }
55 template <typename GameSessionIdT = Aws::String>
56 void SetGameSessionId(GameSessionIdT&& value) {
57 m_gameSessionIdHasBeenSet = true;
58 m_gameSessionId = std::forward<GameSessionIdT>(value);
59 }
60 template <typename GameSessionIdT = Aws::String>
61 GameSession& WithGameSessionId(GameSessionIdT&& value) {
62 SetGameSessionId(std::forward<GameSessionIdT>(value));
63 return *this;
64 }
66
68
72 inline const Aws::String& GetName() const { return m_name; }
73 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
74 template <typename NameT = Aws::String>
75 void SetName(NameT&& value) {
76 m_nameHasBeenSet = true;
77 m_name = std::forward<NameT>(value);
78 }
79 template <typename NameT = Aws::String>
80 GameSession& WithName(NameT&& value) {
81 SetName(std::forward<NameT>(value));
82 return *this;
83 }
85
87
90 inline const Aws::String& GetFleetId() const { return m_fleetId; }
91 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
92 template <typename FleetIdT = Aws::String>
93 void SetFleetId(FleetIdT&& value) {
94 m_fleetIdHasBeenSet = true;
95 m_fleetId = std::forward<FleetIdT>(value);
96 }
97 template <typename FleetIdT = Aws::String>
98 GameSession& WithFleetId(FleetIdT&& value) {
99 SetFleetId(std::forward<FleetIdT>(value));
100 return *this;
101 }
103
105
110 inline const Aws::String& GetFleetArn() const { return m_fleetArn; }
111 inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; }
112 template <typename FleetArnT = Aws::String>
113 void SetFleetArn(FleetArnT&& value) {
114 m_fleetArnHasBeenSet = true;
115 m_fleetArn = std::forward<FleetArnT>(value);
116 }
117 template <typename FleetArnT = Aws::String>
118 GameSession& WithFleetArn(FleetArnT&& value) {
119 SetFleetArn(std::forward<FleetArnT>(value));
120 return *this;
121 }
123
125
130 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
131 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
132 template <typename CreationTimeT = Aws::Utils::DateTime>
133 void SetCreationTime(CreationTimeT&& value) {
134 m_creationTimeHasBeenSet = true;
135 m_creationTime = std::forward<CreationTimeT>(value);
136 }
137 template <typename CreationTimeT = Aws::Utils::DateTime>
138 GameSession& WithCreationTime(CreationTimeT&& value) {
139 SetCreationTime(std::forward<CreationTimeT>(value));
140 return *this;
141 }
143
145
150 inline const Aws::Utils::DateTime& GetTerminationTime() const { return m_terminationTime; }
151 inline bool TerminationTimeHasBeenSet() const { return m_terminationTimeHasBeenSet; }
152 template <typename TerminationTimeT = Aws::Utils::DateTime>
153 void SetTerminationTime(TerminationTimeT&& value) {
154 m_terminationTimeHasBeenSet = true;
155 m_terminationTime = std::forward<TerminationTimeT>(value);
156 }
157 template <typename TerminationTimeT = Aws::Utils::DateTime>
158 GameSession& WithTerminationTime(TerminationTimeT&& value) {
159 SetTerminationTime(std::forward<TerminationTimeT>(value));
160 return *this;
161 }
163
165
168 inline int GetCurrentPlayerSessionCount() const { return m_currentPlayerSessionCount; }
169 inline bool CurrentPlayerSessionCountHasBeenSet() const { return m_currentPlayerSessionCountHasBeenSet; }
170 inline void SetCurrentPlayerSessionCount(int value) {
171 m_currentPlayerSessionCountHasBeenSet = true;
172 m_currentPlayerSessionCount = value;
173 }
176 return *this;
177 }
179
181
185 inline int GetMaximumPlayerSessionCount() const { return m_maximumPlayerSessionCount; }
186 inline bool MaximumPlayerSessionCountHasBeenSet() const { return m_maximumPlayerSessionCountHasBeenSet; }
187 inline void SetMaximumPlayerSessionCount(int value) {
188 m_maximumPlayerSessionCountHasBeenSet = true;
189 m_maximumPlayerSessionCount = value;
190 }
193 return *this;
194 }
196
198
202 inline GameSessionStatus GetStatus() const { return m_status; }
203 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
204 inline void SetStatus(GameSessionStatus value) {
205 m_statusHasBeenSet = true;
206 m_status = value;
207 }
209 SetStatus(value);
210 return *this;
211 }
213
215
226 inline GameSessionStatusReason GetStatusReason() const { return m_statusReason; }
227 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
229 m_statusReasonHasBeenSet = true;
230 m_statusReason = value;
231 }
233 SetStatusReason(value);
234 return *this;
235 }
237
239
247 inline const Aws::Vector<GameProperty>& GetGameProperties() const { return m_gameProperties; }
248 inline bool GamePropertiesHasBeenSet() const { return m_gamePropertiesHasBeenSet; }
249 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
250 void SetGameProperties(GamePropertiesT&& value) {
251 m_gamePropertiesHasBeenSet = true;
252 m_gameProperties = std::forward<GamePropertiesT>(value);
253 }
254 template <typename GamePropertiesT = Aws::Vector<GameProperty>>
255 GameSession& WithGameProperties(GamePropertiesT&& value) {
256 SetGameProperties(std::forward<GamePropertiesT>(value));
257 return *this;
258 }
259 template <typename GamePropertiesT = GameProperty>
260 GameSession& AddGameProperties(GamePropertiesT&& value) {
261 m_gamePropertiesHasBeenSet = true;
262 m_gameProperties.emplace_back(std::forward<GamePropertiesT>(value));
263 return *this;
264 }
266
268
272 inline const Aws::String& GetIpAddress() const { return m_ipAddress; }
273 inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; }
274 template <typename IpAddressT = Aws::String>
275 void SetIpAddress(IpAddressT&& value) {
276 m_ipAddressHasBeenSet = true;
277 m_ipAddress = std::forward<IpAddressT>(value);
278 }
279 template <typename IpAddressT = Aws::String>
280 GameSession& WithIpAddress(IpAddressT&& value) {
281 SetIpAddress(std::forward<IpAddressT>(value));
282 return *this;
283 }
285
287
299 inline const Aws::String& GetDnsName() const { return m_dnsName; }
300 inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; }
301 template <typename DnsNameT = Aws::String>
302 void SetDnsName(DnsNameT&& value) {
303 m_dnsNameHasBeenSet = true;
304 m_dnsName = std::forward<DnsNameT>(value);
305 }
306 template <typename DnsNameT = Aws::String>
307 GameSession& WithDnsName(DnsNameT&& value) {
308 SetDnsName(std::forward<DnsNameT>(value));
309 return *this;
310 }
312
314
318 inline int GetPort() const { return m_port; }
319 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
320 inline void SetPort(int value) {
321 m_portHasBeenSet = true;
322 m_port = value;
323 }
324 inline GameSession& WithPort(int value) {
325 SetPort(value);
326 return *this;
327 }
329
331
334 inline PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const { return m_playerSessionCreationPolicy; }
335 inline bool PlayerSessionCreationPolicyHasBeenSet() const { return m_playerSessionCreationPolicyHasBeenSet; }
337 m_playerSessionCreationPolicyHasBeenSet = true;
338 m_playerSessionCreationPolicy = value;
339 }
342 return *this;
343 }
345
347
352 inline const Aws::String& GetCreatorId() const { return m_creatorId; }
353 inline bool CreatorIdHasBeenSet() const { return m_creatorIdHasBeenSet; }
354 template <typename CreatorIdT = Aws::String>
355 void SetCreatorId(CreatorIdT&& value) {
356 m_creatorIdHasBeenSet = true;
357 m_creatorId = std::forward<CreatorIdT>(value);
358 }
359 template <typename CreatorIdT = Aws::String>
360 GameSession& WithCreatorId(CreatorIdT&& value) {
361 SetCreatorId(std::forward<CreatorIdT>(value));
362 return *this;
363 }
365
367
374 inline const Aws::String& GetGameSessionData() const { return m_gameSessionData; }
375 inline bool GameSessionDataHasBeenSet() const { return m_gameSessionDataHasBeenSet; }
376 template <typename GameSessionDataT = Aws::String>
377 void SetGameSessionData(GameSessionDataT&& value) {
378 m_gameSessionDataHasBeenSet = true;
379 m_gameSessionData = std::forward<GameSessionDataT>(value);
380 }
381 template <typename GameSessionDataT = Aws::String>
382 GameSession& WithGameSessionData(GameSessionDataT&& value) {
383 SetGameSessionData(std::forward<GameSessionDataT>(value));
384 return *this;
385 }
387
389
400 inline const Aws::String& GetMatchmakerData() const { return m_matchmakerData; }
401 inline bool MatchmakerDataHasBeenSet() const { return m_matchmakerDataHasBeenSet; }
402 template <typename MatchmakerDataT = Aws::String>
403 void SetMatchmakerData(MatchmakerDataT&& value) {
404 m_matchmakerDataHasBeenSet = true;
405 m_matchmakerData = std::forward<MatchmakerDataT>(value);
406 }
407 template <typename MatchmakerDataT = Aws::String>
408 GameSession& WithMatchmakerData(MatchmakerDataT&& value) {
409 SetMatchmakerData(std::forward<MatchmakerDataT>(value));
410 return *this;
411 }
413
415
420 inline const Aws::String& GetLocation() const { return m_location; }
421 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
422 template <typename LocationT = Aws::String>
423 void SetLocation(LocationT&& value) {
424 m_locationHasBeenSet = true;
425 m_location = std::forward<LocationT>(value);
426 }
427 template <typename LocationT = Aws::String>
428 GameSession& WithLocation(LocationT&& value) {
429 SetLocation(std::forward<LocationT>(value));
430 return *this;
431 }
433 private:
434 Aws::String m_gameSessionId;
435
436 Aws::String m_name;
437
438 Aws::String m_fleetId;
439
440 Aws::String m_fleetArn;
441
442 Aws::Utils::DateTime m_creationTime{};
443
444 Aws::Utils::DateTime m_terminationTime{};
445
446 int m_currentPlayerSessionCount{0};
447
448 int m_maximumPlayerSessionCount{0};
449
451
453
454 Aws::Vector<GameProperty> m_gameProperties;
455
456 Aws::String m_ipAddress;
457
458 Aws::String m_dnsName;
459
460 int m_port{0};
461
463
464 Aws::String m_creatorId;
465
466 Aws::String m_gameSessionData;
467
468 Aws::String m_matchmakerData;
469
470 Aws::String m_location;
471 bool m_gameSessionIdHasBeenSet = false;
472 bool m_nameHasBeenSet = false;
473 bool m_fleetIdHasBeenSet = false;
474 bool m_fleetArnHasBeenSet = false;
475 bool m_creationTimeHasBeenSet = false;
476 bool m_terminationTimeHasBeenSet = false;
477 bool m_currentPlayerSessionCountHasBeenSet = false;
478 bool m_maximumPlayerSessionCountHasBeenSet = false;
479 bool m_statusHasBeenSet = false;
480 bool m_statusReasonHasBeenSet = false;
481 bool m_gamePropertiesHasBeenSet = false;
482 bool m_ipAddressHasBeenSet = false;
483 bool m_dnsNameHasBeenSet = false;
484 bool m_portHasBeenSet = false;
485 bool m_playerSessionCreationPolicyHasBeenSet = false;
486 bool m_creatorIdHasBeenSet = false;
487 bool m_gameSessionDataHasBeenSet = false;
488 bool m_matchmakerDataHasBeenSet = false;
489 bool m_locationHasBeenSet = false;
490};
491
492} // namespace Model
493} // namespace GameLift
494} // namespace Aws
PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const
const Aws::Utils::DateTime & GetTerminationTime() const
void SetGameProperties(GamePropertiesT &&value)
const Aws::String & GetFleetId() const
Definition GameSession.h:90
void SetMaximumPlayerSessionCount(int value)
GameSession & WithStatusReason(GameSessionStatusReason value)
GameSession & WithName(NameT &&value)
Definition GameSession.h:80
const Aws::String & GetGameSessionData() const
bool PlayerSessionCreationPolicyHasBeenSet() const
GameSession & WithGameSessionId(GameSessionIdT &&value)
Definition GameSession.h:61
GameSessionStatusReason GetStatusReason() const
GameSession & WithLocation(LocationT &&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)
void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy value)
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 SetGameSessionId(GameSessionIdT &&value)
Definition GameSession.h:56
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:72
void SetGameSessionData(GameSessionDataT &&value)
void SetCreationTime(CreationTimeT &&value)
GameSessionStatus GetStatus() const
GameSession & WithFleetArn(FleetArnT &&value)
void SetFleetId(FleetIdT &&value)
Definition GameSession.h:93
GameSession & WithMatchmakerData(MatchmakerDataT &&value)
GameSession & WithFleetId(FleetIdT &&value)
Definition GameSession.h:98
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:53
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