AWS SDK for C++  0.12.9
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 long GetCurrentPlayerSessionCount() const{ return m_currentPlayerSessionCount; }
225 
229  inline void SetCurrentPlayerSessionCount(long value) { m_currentPlayerSessionCountHasBeenSet = true; m_currentPlayerSessionCount = value; }
230 
234  inline GameSession& WithCurrentPlayerSessionCount(long value) { SetCurrentPlayerSessionCount(value); return *this;}
235 
239  inline long GetMaximumPlayerSessionCount() const{ return m_maximumPlayerSessionCount; }
240 
244  inline void SetMaximumPlayerSessionCount(long value) { m_maximumPlayerSessionCountHasBeenSet = true; m_maximumPlayerSessionCount = value; }
245 
249  inline GameSession& WithMaximumPlayerSessionCount(long 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 
319  inline const Aws::String& GetIpAddress() const{ return m_ipAddress; }
320 
324  inline void SetIpAddress(const Aws::String& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; }
325 
329  inline void SetIpAddress(Aws::String&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; }
330 
334  inline void SetIpAddress(const char* value) { m_ipAddressHasBeenSet = true; m_ipAddress.assign(value); }
335 
339  inline GameSession& WithIpAddress(const Aws::String& value) { SetIpAddress(value); return *this;}
340 
344  inline GameSession& WithIpAddress(Aws::String&& value) { SetIpAddress(value); return *this;}
345 
349  inline GameSession& WithIpAddress(const char* value) { SetIpAddress(value); return *this;}
350 
354  inline const PlayerSessionCreationPolicy& GetPlayerSessionCreationPolicy() const{ return m_playerSessionCreationPolicy; }
355 
359  inline void SetPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = value; }
360 
364  inline void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = value; }
365 
369  inline GameSession& WithPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { SetPlayerSessionCreationPolicy(value); return *this;}
370 
374  inline GameSession& WithPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { SetPlayerSessionCreationPolicy(value); return *this;}
375 
376  private:
377  Aws::String m_gameSessionId;
378  bool m_gameSessionIdHasBeenSet;
379  Aws::String m_name;
380  bool m_nameHasBeenSet;
381  Aws::String m_fleetId;
382  bool m_fleetIdHasBeenSet;
383  Aws::Utils::DateTime m_creationTime;
384  bool m_creationTimeHasBeenSet;
385  Aws::Utils::DateTime m_terminationTime;
386  bool m_terminationTimeHasBeenSet;
387  long m_currentPlayerSessionCount;
388  bool m_currentPlayerSessionCountHasBeenSet;
389  long m_maximumPlayerSessionCount;
390  bool m_maximumPlayerSessionCountHasBeenSet;
391  GameSessionStatus m_status;
392  bool m_statusHasBeenSet;
393  Aws::Vector<GameProperty> m_gameProperties;
394  bool m_gamePropertiesHasBeenSet;
395  Aws::String m_ipAddress;
396  bool m_ipAddressHasBeenSet;
397  PlayerSessionCreationPolicy m_playerSessionCreationPolicy;
398  bool m_playerSessionCreationPolicyHasBeenSet;
399  };
400 
401 } // namespace Model
402 } // namespace GameLift
403 } // 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:344
GameSession & WithPlayerSessionCreationPolicy(PlayerSessionCreationPolicy &&value)
Definition: GameSession.h:374
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(long 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:359
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
GameSession & WithCurrentPlayerSessionCount(long value)
Definition: GameSession.h:234
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:329
GameSession & AddGameProperties(const GameProperty &value)
Definition: GameSession.h:309
void SetName(Aws::String &&value)
Definition: GameSession.h:100
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:354
GameSession & WithGameProperties(const Aws::Vector< GameProperty > &value)
Definition: GameSession.h:299
GameSession & WithPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy &value)
Definition: GameSession.h:369
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:324
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 SetCurrentPlayerSessionCount(long value)
Definition: GameSession.h:229
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 & WithMaximumPlayerSessionCount(long value)
Definition: GameSession.h:249
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
long GetMaximumPlayerSessionCount() const
Definition: GameSession.h:239
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:364
GameSession & WithCreationTime(Aws::Utils::DateTime &&value)
Definition: GameSession.h:189
void SetIpAddress(const char *value)
Definition: GameSession.h:334
GameSession & WithGameSessionId(const Aws::String &value)
Definition: GameSession.h:72
const Aws::String & GetIpAddress() const
Definition: GameSession.h:319
const Aws::Utils::DateTime & GetTerminationTime() const
Definition: GameSession.h:195
long GetCurrentPlayerSessionCount() const
Definition: GameSession.h:224
void SetFleetId(const Aws::String &value)
Definition: GameSession.h:134
GameSession & WithIpAddress(const Aws::String &value)
Definition: GameSession.h:339
GameSession & WithIpAddress(const char *value)
Definition: GameSession.h:349
GameSession & WithGameProperties(Aws::Vector< GameProperty > &&value)
Definition: GameSession.h:304
const Aws::String & GetGameSessionId() const
Definition: GameSession.h:52
JSON (JavaScript Object Notation).