AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
GameSession.h
1
6#pragma once
7#include <aws/gamelift/GameLift_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/gamelift/model/GameSessionStatus.h>
11#include <aws/gamelift/model/GameSessionStatusReason.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/gamelift/model/PlayerSessionCreationPolicy.h>
14#include <aws/gamelift/model/GameProperty.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Json
22{
23 class JsonValue;
24 class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace GameLift
28{
29namespace Model
30{
31
45 {
46 public:
47 AWS_GAMELIFT_API GameSession() = default;
48 AWS_GAMELIFT_API GameSession(Aws::Utils::Json::JsonView jsonValue);
49 AWS_GAMELIFT_API GameSession& operator=(Aws::Utils::Json::JsonView jsonValue);
50 AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
51
52
54
59 inline const Aws::String& GetGameSessionId() const { return m_gameSessionId; }
60 inline bool GameSessionIdHasBeenSet() const { return m_gameSessionIdHasBeenSet; }
61 template<typename GameSessionIdT = Aws::String>
62 void SetGameSessionId(GameSessionIdT&& value) { m_gameSessionIdHasBeenSet = true; m_gameSessionId = std::forward<GameSessionIdT>(value); }
63 template<typename GameSessionIdT = Aws::String>
64 GameSession& WithGameSessionId(GameSessionIdT&& value) { SetGameSessionId(std::forward<GameSessionIdT>(value)); return *this;}
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) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
76 template<typename NameT = Aws::String>
77 GameSession& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
79
81
84 inline const Aws::String& GetFleetId() const { return m_fleetId; }
85 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
86 template<typename FleetIdT = Aws::String>
87 void SetFleetId(FleetIdT&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::forward<FleetIdT>(value); }
88 template<typename FleetIdT = Aws::String>
89 GameSession& WithFleetId(FleetIdT&& value) { SetFleetId(std::forward<FleetIdT>(value)); return *this;}
91
93
98 inline const Aws::String& GetFleetArn() const { return m_fleetArn; }
99 inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; }
100 template<typename FleetArnT = Aws::String>
101 void SetFleetArn(FleetArnT&& value) { m_fleetArnHasBeenSet = true; m_fleetArn = std::forward<FleetArnT>(value); }
102 template<typename FleetArnT = Aws::String>
103 GameSession& WithFleetArn(FleetArnT&& value) { SetFleetArn(std::forward<FleetArnT>(value)); return *this;}
105
107
112 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
113 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
114 template<typename CreationTimeT = Aws::Utils::DateTime>
115 void SetCreationTime(CreationTimeT&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::forward<CreationTimeT>(value); }
116 template<typename CreationTimeT = Aws::Utils::DateTime>
117 GameSession& WithCreationTime(CreationTimeT&& value) { SetCreationTime(std::forward<CreationTimeT>(value)); return *this;}
119
121
126 inline const Aws::Utils::DateTime& GetTerminationTime() const { return m_terminationTime; }
127 inline bool TerminationTimeHasBeenSet() const { return m_terminationTimeHasBeenSet; }
128 template<typename TerminationTimeT = Aws::Utils::DateTime>
129 void SetTerminationTime(TerminationTimeT&& value) { m_terminationTimeHasBeenSet = true; m_terminationTime = std::forward<TerminationTimeT>(value); }
130 template<typename TerminationTimeT = Aws::Utils::DateTime>
131 GameSession& WithTerminationTime(TerminationTimeT&& value) { SetTerminationTime(std::forward<TerminationTimeT>(value)); return *this;}
133
135
138 inline int GetCurrentPlayerSessionCount() const { return m_currentPlayerSessionCount; }
139 inline bool CurrentPlayerSessionCountHasBeenSet() const { return m_currentPlayerSessionCountHasBeenSet; }
140 inline void SetCurrentPlayerSessionCount(int value) { m_currentPlayerSessionCountHasBeenSet = true; m_currentPlayerSessionCount = value; }
143
145
149 inline int GetMaximumPlayerSessionCount() const { return m_maximumPlayerSessionCount; }
150 inline bool MaximumPlayerSessionCountHasBeenSet() const { return m_maximumPlayerSessionCountHasBeenSet; }
151 inline void SetMaximumPlayerSessionCount(int value) { m_maximumPlayerSessionCountHasBeenSet = true; m_maximumPlayerSessionCount = value; }
154
156
160 inline GameSessionStatus GetStatus() const { return m_status; }
161 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
162 inline void SetStatus(GameSessionStatus value) { m_statusHasBeenSet = true; m_status = value; }
163 inline GameSession& WithStatus(GameSessionStatus value) { SetStatus(value); return *this;}
165
167
178 inline GameSessionStatusReason GetStatusReason() const { return m_statusReason; }
179 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
180 inline void SetStatusReason(GameSessionStatusReason value) { m_statusReasonHasBeenSet = true; m_statusReason = value; }
183
185
189 inline const Aws::Vector<GameProperty>& GetGameProperties() const { return m_gameProperties; }
190 inline bool GamePropertiesHasBeenSet() const { return m_gamePropertiesHasBeenSet; }
191 template<typename GamePropertiesT = Aws::Vector<GameProperty>>
192 void SetGameProperties(GamePropertiesT&& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties = std::forward<GamePropertiesT>(value); }
193 template<typename GamePropertiesT = Aws::Vector<GameProperty>>
194 GameSession& WithGameProperties(GamePropertiesT&& value) { SetGameProperties(std::forward<GamePropertiesT>(value)); return *this;}
195 template<typename GamePropertiesT = GameProperty>
196 GameSession& AddGameProperties(GamePropertiesT&& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties.emplace_back(std::forward<GamePropertiesT>(value)); return *this; }
198
200
204 inline const Aws::String& GetIpAddress() const { return m_ipAddress; }
205 inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; }
206 template<typename IpAddressT = Aws::String>
207 void SetIpAddress(IpAddressT&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = std::forward<IpAddressT>(value); }
208 template<typename IpAddressT = Aws::String>
209 GameSession& WithIpAddress(IpAddressT&& value) { SetIpAddress(std::forward<IpAddressT>(value)); return *this;}
211
213
225 inline const Aws::String& GetDnsName() const { return m_dnsName; }
226 inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; }
227 template<typename DnsNameT = Aws::String>
228 void SetDnsName(DnsNameT&& value) { m_dnsNameHasBeenSet = true; m_dnsName = std::forward<DnsNameT>(value); }
229 template<typename DnsNameT = Aws::String>
230 GameSession& WithDnsName(DnsNameT&& value) { SetDnsName(std::forward<DnsNameT>(value)); return *this;}
232
234
238 inline int GetPort() const { return m_port; }
239 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
240 inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; }
241 inline GameSession& WithPort(int value) { SetPort(value); return *this;}
243
245
248 inline PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const { return m_playerSessionCreationPolicy; }
249 inline bool PlayerSessionCreationPolicyHasBeenSet() const { return m_playerSessionCreationPolicyHasBeenSet; }
250 inline void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = value; }
253
255
260 inline const Aws::String& GetCreatorId() const { return m_creatorId; }
261 inline bool CreatorIdHasBeenSet() const { return m_creatorIdHasBeenSet; }
262 template<typename CreatorIdT = Aws::String>
263 void SetCreatorId(CreatorIdT&& value) { m_creatorIdHasBeenSet = true; m_creatorId = std::forward<CreatorIdT>(value); }
264 template<typename CreatorIdT = Aws::String>
265 GameSession& WithCreatorId(CreatorIdT&& value) { SetCreatorId(std::forward<CreatorIdT>(value)); return *this;}
267
269
276 inline const Aws::String& GetGameSessionData() const { return m_gameSessionData; }
277 inline bool GameSessionDataHasBeenSet() const { return m_gameSessionDataHasBeenSet; }
278 template<typename GameSessionDataT = Aws::String>
279 void SetGameSessionData(GameSessionDataT&& value) { m_gameSessionDataHasBeenSet = true; m_gameSessionData = std::forward<GameSessionDataT>(value); }
280 template<typename GameSessionDataT = Aws::String>
281 GameSession& WithGameSessionData(GameSessionDataT&& value) { SetGameSessionData(std::forward<GameSessionDataT>(value)); return *this;}
283
285
296 inline const Aws::String& GetMatchmakerData() const { return m_matchmakerData; }
297 inline bool MatchmakerDataHasBeenSet() const { return m_matchmakerDataHasBeenSet; }
298 template<typename MatchmakerDataT = Aws::String>
299 void SetMatchmakerData(MatchmakerDataT&& value) { m_matchmakerDataHasBeenSet = true; m_matchmakerData = std::forward<MatchmakerDataT>(value); }
300 template<typename MatchmakerDataT = Aws::String>
301 GameSession& WithMatchmakerData(MatchmakerDataT&& value) { SetMatchmakerData(std::forward<MatchmakerDataT>(value)); return *this;}
303
305
310 inline const Aws::String& GetLocation() const { return m_location; }
311 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
312 template<typename LocationT = Aws::String>
313 void SetLocation(LocationT&& value) { m_locationHasBeenSet = true; m_location = std::forward<LocationT>(value); }
314 template<typename LocationT = Aws::String>
315 GameSession& WithLocation(LocationT&& value) { SetLocation(std::forward<LocationT>(value)); return *this;}
317 private:
318
319 Aws::String m_gameSessionId;
320 bool m_gameSessionIdHasBeenSet = false;
321
322 Aws::String m_name;
323 bool m_nameHasBeenSet = false;
324
325 Aws::String m_fleetId;
326 bool m_fleetIdHasBeenSet = false;
327
328 Aws::String m_fleetArn;
329 bool m_fleetArnHasBeenSet = false;
330
331 Aws::Utils::DateTime m_creationTime{};
332 bool m_creationTimeHasBeenSet = false;
333
334 Aws::Utils::DateTime m_terminationTime{};
335 bool m_terminationTimeHasBeenSet = false;
336
337 int m_currentPlayerSessionCount{0};
338 bool m_currentPlayerSessionCountHasBeenSet = false;
339
340 int m_maximumPlayerSessionCount{0};
341 bool m_maximumPlayerSessionCountHasBeenSet = false;
342
344 bool m_statusHasBeenSet = false;
345
347 bool m_statusReasonHasBeenSet = false;
348
349 Aws::Vector<GameProperty> m_gameProperties;
350 bool m_gamePropertiesHasBeenSet = false;
351
352 Aws::String m_ipAddress;
353 bool m_ipAddressHasBeenSet = false;
354
355 Aws::String m_dnsName;
356 bool m_dnsNameHasBeenSet = false;
357
358 int m_port{0};
359 bool m_portHasBeenSet = false;
360
362 bool m_playerSessionCreationPolicyHasBeenSet = false;
363
364 Aws::String m_creatorId;
365 bool m_creatorIdHasBeenSet = false;
366
367 Aws::String m_gameSessionData;
368 bool m_gameSessionDataHasBeenSet = false;
369
370 Aws::String m_matchmakerData;
371 bool m_matchmakerDataHasBeenSet = false;
372
373 Aws::String m_location;
374 bool m_locationHasBeenSet = false;
375 };
376
377} // namespace Model
378} // namespace GameLift
379} // namespace Aws
PlayerSessionCreationPolicy GetPlayerSessionCreationPolicy() const
const Aws::Utils::DateTime & GetTerminationTime() const
void SetGameProperties(GamePropertiesT &&value)
const Aws::String & GetFleetId() const
Definition GameSession.h:84
void SetMaximumPlayerSessionCount(int value)
GameSession & WithStatusReason(GameSessionStatusReason value)
GameSession & WithName(NameT &&value)
Definition GameSession.h:77
const Aws::String & GetGameSessionData() const
bool PlayerSessionCreationPolicyHasBeenSet() const
GameSession & WithGameSessionId(GameSessionIdT &&value)
Definition GameSession.h:64
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
Definition GameSession.h:98
const Aws::String & GetLocation() const
GameSession & WithCreationTime(CreationTimeT &&value)
void SetMatchmakerData(MatchmakerDataT &&value)
void SetGameSessionId(GameSessionIdT &&value)
Definition GameSession.h:62
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:87
GameSession & WithMatchmakerData(MatchmakerDataT &&value)
GameSession & WithFleetId(FleetIdT &&value)
Definition GameSession.h:89
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:59
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