AWS SDK for C++  0.14.3
AWS SDK for C++
GameSession.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
23 
24 namespace Aws
25 {
26 namespace Utils
27 {
28 namespace Json
29 {
30  class JsonValue;
31 } // namespace Json
32 } // namespace Utils
33 namespace GameLift
34 {
35 namespace Model
36 {
37 
42  {
43  public:
44  GameSession();
45  GameSession(const Aws::Utils::Json::JsonValue& jsonValue);
46  GameSession& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
47  Aws::Utils::Json::JsonValue Jsonize() const;
48 
52  inline const Aws::String& GetGameSessionId() const{ return m_gameSessionId; }
53 
57  inline void SetGameSessionId(const Aws::String& value) { m_gameSessionIdHasBeenSet = true; m_gameSessionId = value; }
58 
62  inline void SetGameSessionId(Aws::String&& value) { m_gameSessionIdHasBeenSet = true; m_gameSessionId = value; }
63 
67  inline void SetGameSessionId(const char* value) { m_gameSessionIdHasBeenSet = true; m_gameSessionId.assign(value); }
68 
72  inline GameSession& WithGameSessionId(const Aws::String& value) { SetGameSessionId(value); return *this;}
73 
77  inline GameSession& WithGameSessionId(Aws::String&& value) { SetGameSessionId(value); return *this;}
78 
82  inline GameSession& WithGameSessionId(const char* value) { SetGameSessionId(value); return *this;}
83 
88  inline const Aws::String& GetName() const{ return m_name; }
89 
94  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
95 
100  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
101 
106  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
107 
112  inline GameSession& WithName(const Aws::String& value) { SetName(value); return *this;}
113 
118  inline GameSession& WithName(Aws::String&& value) { SetName(value); return *this;}
119 
124  inline GameSession& WithName(const char* value) { SetName(value); return *this;}
125 
129  inline const Aws::String& GetFleetId() const{ return m_fleetId; }
130 
134  inline void SetFleetId(const Aws::String& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; }
135 
139  inline void SetFleetId(Aws::String&& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; }
140 
144  inline void SetFleetId(const char* value) { m_fleetIdHasBeenSet = true; m_fleetId.assign(value); }
145 
149  inline GameSession& WithFleetId(const Aws::String& value) { SetFleetId(value); return *this;}
150 
154  inline GameSession& WithFleetId(Aws::String&& value) { SetFleetId(value); return *this;}
155 
159  inline GameSession& WithFleetId(const char* value) { SetFleetId(value); return *this;}
160 
165  inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; }
166 
171  inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; }
172 
177  inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; }
178 
183  inline GameSession& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;}
184 
189  inline GameSession& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(value); return *this;}
190 
195  inline const Aws::Utils::DateTime& GetTerminationTime() const{ return m_terminationTime; }
196 
201  inline void SetTerminationTime(const Aws::Utils::DateTime& value) { m_terminationTimeHasBeenSet = true; m_terminationTime = value; }
202 
207  inline void SetTerminationTime(Aws::Utils::DateTime&& value) { m_terminationTimeHasBeenSet = true; m_terminationTime = value; }
208 
213  inline GameSession& WithTerminationTime(const Aws::Utils::DateTime& value) { SetTerminationTime(value); return *this;}
214 
219  inline GameSession& WithTerminationTime(Aws::Utils::DateTime&& value) { SetTerminationTime(value); return *this;}
220 
224  inline int GetCurrentPlayerSessionCount() const{ return m_currentPlayerSessionCount; }
225 
229  inline void SetCurrentPlayerSessionCount(int value) { m_currentPlayerSessionCountHasBeenSet = true; m_currentPlayerSessionCount = value; }
230 
234  inline GameSession& WithCurrentPlayerSessionCount(int value) { SetCurrentPlayerSessionCount(value); return *this;}
235 
239  inline int GetMaximumPlayerSessionCount() const{ return m_maximumPlayerSessionCount; }
240 
244  inline void SetMaximumPlayerSessionCount(int value) { m_maximumPlayerSessionCountHasBeenSet = true; m_maximumPlayerSessionCount = value; }
245 
249  inline GameSession& WithMaximumPlayerSessionCount(int value) { SetMaximumPlayerSessionCount(value); return *this;}
250 
255  inline const GameSessionStatus& GetStatus() const{ return m_status; }
256 
261  inline void SetStatus(const GameSessionStatus& value) { m_statusHasBeenSet = true; m_status = value; }
262 
267  inline void SetStatus(GameSessionStatus&& value) { m_statusHasBeenSet = true; m_status = value; }
268 
273  inline GameSession& WithStatus(const GameSessionStatus& value) { SetStatus(value); return *this;}
274 
279  inline GameSession& WithStatus(GameSessionStatus&& value) { SetStatus(value); return *this;}
280 
284  inline const Aws::Vector<GameProperty>& GetGameProperties() const{ return m_gameProperties; }
285 
289  inline void SetGameProperties(const Aws::Vector<GameProperty>& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties = value; }
290 
294  inline void SetGameProperties(Aws::Vector<GameProperty>&& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties = value; }
295 
299  inline GameSession& WithGameProperties(const Aws::Vector<GameProperty>& value) { SetGameProperties(value); return *this;}
300 
304  inline GameSession& WithGameProperties(Aws::Vector<GameProperty>&& value) { SetGameProperties(value); return *this;}
305 
309  inline GameSession& AddGameProperties(const GameProperty& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties.push_back(value); return *this; }
310 
314  inline GameSession& AddGameProperties(GameProperty&& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties.push_back(value); return *this; }
315 
320  inline const Aws::String& GetIpAddress() const{ return m_ipAddress; }
321 
326  inline void SetIpAddress(const Aws::String& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; }
327 
332  inline void SetIpAddress(Aws::String&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; }
333 
338  inline void SetIpAddress(const char* value) { m_ipAddressHasBeenSet = true; m_ipAddress.assign(value); }
339 
344  inline GameSession& WithIpAddress(const Aws::String& value) { SetIpAddress(value); return *this;}
345 
350  inline GameSession& WithIpAddress(Aws::String&& value) { SetIpAddress(value); return *this;}
351 
356  inline GameSession& WithIpAddress(const char* value) { SetIpAddress(value); return *this;}
357 
362  inline int GetPort() const{ return m_port; }
363 
368  inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; }
369 
374  inline GameSession& WithPort(int value) { SetPort(value); return *this;}
375 
379  inline const PlayerSessionCreationPolicy& GetPlayerSessionCreationPolicy() const{ return m_playerSessionCreationPolicy; }
380 
384  inline void SetPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = value; }
385 
389  inline void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = value; }
390 
394  inline GameSession& WithPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { SetPlayerSessionCreationPolicy(value); return *this;}
395 
399  inline GameSession& WithPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { SetPlayerSessionCreationPolicy(value); return *this;}
400 
401  private:
402  Aws::String m_gameSessionId;
403  bool m_gameSessionIdHasBeenSet;
404  Aws::String m_name;
405  bool m_nameHasBeenSet;
406  Aws::String m_fleetId;
407  bool m_fleetIdHasBeenSet;
408  Aws::Utils::DateTime m_creationTime;
409  bool m_creationTimeHasBeenSet;
410  Aws::Utils::DateTime m_terminationTime;
411  bool m_terminationTimeHasBeenSet;
412  int m_currentPlayerSessionCount;
413  bool m_currentPlayerSessionCountHasBeenSet;
414  int m_maximumPlayerSessionCount;
415  bool m_maximumPlayerSessionCountHasBeenSet;
416  GameSessionStatus m_status;
417  bool m_statusHasBeenSet;
418  Aws::Vector<GameProperty> m_gameProperties;
419  bool m_gamePropertiesHasBeenSet;
420  Aws::String m_ipAddress;
421  bool m_ipAddressHasBeenSet;
422  int m_port;
423  bool m_portHasBeenSet;
424  PlayerSessionCreationPolicy m_playerSessionCreationPolicy;
425  bool m_playerSessionCreationPolicyHasBeenSet;
426  };
427 
428 } // namespace Model
429 } // namespace GameLift
430 } // namespace Aws
const Aws::Vector< GameProperty > & GetGameProperties() const
Definition: GameSession.h:284
GameSession & WithName(Aws::String &&value)
Definition: GameSession.h:118
void SetFleetId(const char *value)
Definition: GameSession.h:144
const Aws::String & GetName() const
Definition: GameSession.h:88
GameSession & WithGameSessionId(const char *value)
Definition: GameSession.h:82
GameSession & WithIpAddress(Aws::String &&value)
Definition: GameSession.h:350
GameSession & WithMaximumPlayerSessionCount(int value)
Definition: GameSession.h:249
GameSession & WithPlayerSessionCreationPolicy(PlayerSessionCreationPolicy &&value)
Definition: GameSession.h:399
void SetTerminationTime(const Aws::Utils::DateTime &value)
Definition: GameSession.h:201
void SetName(const Aws::String &value)
Definition: GameSession.h:94
void SetGameSessionId(const Aws::String &value)
Definition: GameSession.h:57
void SetTerminationTime(Aws::Utils::DateTime &&value)
Definition: GameSession.h:207
void SetMaximumPlayerSessionCount(int value)
Definition: GameSession.h:244
GameSession & WithStatus(GameSessionStatus &&value)
Definition: GameSession.h:279
#define AWS_GAMELIFT_API
void SetGameProperties(Aws::Vector< GameProperty > &&value)
Definition: GameSession.h:294
const GameSessionStatus & GetStatus() const
Definition: GameSession.h:255
void SetPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy &value)
Definition: GameSession.h:384
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
GameSession & WithCreationTime(const Aws::Utils::DateTime &value)
Definition: GameSession.h:183
GameSession & WithFleetId(Aws::String &&value)
Definition: GameSession.h:154
void SetIpAddress(Aws::String &&value)
Definition: GameSession.h:332
GameSession & AddGameProperties(const GameProperty &value)
Definition: GameSession.h:309
void SetName(Aws::String &&value)
Definition: GameSession.h:100
void SetCurrentPlayerSessionCount(int value)
Definition: GameSession.h:229
const Aws::Utils::DateTime & GetCreationTime() const
Definition: GameSession.h:165
GameSession & WithStatus(const GameSessionStatus &value)
Definition: GameSession.h:273
GameSession & WithName(const Aws::String &value)
Definition: GameSession.h:112
GameSession & WithName(const char *value)
Definition: GameSession.h:124
void SetStatus(const GameSessionStatus &value)
Definition: GameSession.h:261
const PlayerSessionCreationPolicy & GetPlayerSessionCreationPolicy() const
Definition: GameSession.h:379
GameSession & WithGameProperties(const Aws::Vector< GameProperty > &value)
Definition: GameSession.h:299
GameSession & WithPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy &value)
Definition: GameSession.h:394
const Aws::String & GetFleetId() const
Definition: GameSession.h:129
GameSession & WithTerminationTime(Aws::Utils::DateTime &&value)
Definition: GameSession.h:219
void SetIpAddress(const Aws::String &value)
Definition: GameSession.h:326
void SetGameSessionId(Aws::String &&value)
Definition: GameSession.h:62
void SetCreationTime(Aws::Utils::DateTime &&value)
Definition: GameSession.h:177
GameSession & AddGameProperties(GameProperty &&value)
Definition: GameSession.h:314
GameSession & WithGameSessionId(Aws::String &&value)
Definition: GameSession.h:77
void SetCreationTime(const Aws::Utils::DateTime &value)
Definition: GameSession.h:171
GameSession & WithTerminationTime(const Aws::Utils::DateTime &value)
Definition: GameSession.h:213
void SetGameProperties(const Aws::Vector< GameProperty > &value)
Definition: GameSession.h:289
void SetGameSessionId(const char *value)
Definition: GameSession.h:67
void SetFleetId(Aws::String &&value)
Definition: GameSession.h:139
GameSession & WithFleetId(const char *value)
Definition: GameSession.h:159
GameSession & WithFleetId(const Aws::String &value)
Definition: GameSession.h:149
void SetStatus(GameSessionStatus &&value)
Definition: GameSession.h:267
GameSession & WithCurrentPlayerSessionCount(int value)
Definition: GameSession.h:234
void SetName(const char *value)
Definition: GameSession.h:106
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy &&value)
Definition: GameSession.h:389
GameSession & WithCreationTime(Aws::Utils::DateTime &&value)
Definition: GameSession.h:189
void SetIpAddress(const char *value)
Definition: GameSession.h:338
GameSession & WithGameSessionId(const Aws::String &value)
Definition: GameSession.h:72
GameSession & WithPort(int value)
Definition: GameSession.h:374
const Aws::String & GetIpAddress() const
Definition: GameSession.h:320
const Aws::Utils::DateTime & GetTerminationTime() const
Definition: GameSession.h:195
void SetFleetId(const Aws::String &value)
Definition: GameSession.h:134
GameSession & WithIpAddress(const Aws::String &value)
Definition: GameSession.h:344
GameSession & WithIpAddress(const char *value)
Definition: GameSession.h:356
GameSession & WithGameProperties(Aws::Vector< GameProperty > &&value)
Definition: GameSession.h:304
const Aws::String & GetGameSessionId() const
Definition: GameSession.h:52
JSON (JavaScript Object Notation).