/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Properties describing a game session. A game session in ACTIVE status
* can host players. When a game session ends, its status is set to
* Amazon GameLift retains a game session resource
* for 30 days after the game session ends. You can reuse idempotency token values
* after this time. Game session logs are retained for 14 days.TERMINATED. See Also:
AWS
* API Reference
A unique identifier for the game session. A game session ARN has the
* following format: arn:aws:gamelift:<region>::gamesession/<fleet
* ID>/<custom ID string or idempotency token>.
A descriptive label that is associated with a game session. Session names do * not need to be unique.
*/ inline const Aws::String& GetName() const{ return m_name; } inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } inline GameSession& WithName(const Aws::String& value) { SetName(value); return *this;} inline GameSession& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} inline GameSession& WithName(const char* value) { SetName(value); return *this;} ///@} ///@{ /** *A unique identifier for the fleet that the game session is running on.
*/ inline const Aws::String& GetFleetId() const{ return m_fleetId; } inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; } inline void SetFleetId(const Aws::String& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; } inline void SetFleetId(Aws::String&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::move(value); } inline void SetFleetId(const char* value) { m_fleetIdHasBeenSet = true; m_fleetId.assign(value); } inline GameSession& WithFleetId(const Aws::String& value) { SetFleetId(value); return *this;} inline GameSession& WithFleetId(Aws::String&& value) { SetFleetId(std::move(value)); return *this;} inline GameSession& WithFleetId(const char* value) { SetFleetId(value); return *this;} ///@} ///@{ /** *The Amazon Resource Name (ARN) * associated with the GameLift fleet that this game session is running on.
*/ inline const Aws::String& GetFleetArn() const{ return m_fleetArn; } inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; } inline void SetFleetArn(const Aws::String& value) { m_fleetArnHasBeenSet = true; m_fleetArn = value; } inline void SetFleetArn(Aws::String&& value) { m_fleetArnHasBeenSet = true; m_fleetArn = std::move(value); } inline void SetFleetArn(const char* value) { m_fleetArnHasBeenSet = true; m_fleetArn.assign(value); } inline GameSession& WithFleetArn(const Aws::String& value) { SetFleetArn(value); return *this;} inline GameSession& WithFleetArn(Aws::String&& value) { SetFleetArn(std::move(value)); return *this;} inline GameSession& WithFleetArn(const char* value) { SetFleetArn(value); return *this;} ///@} ///@{ /** *A time stamp indicating when this data object was created. Format is a number
* expressed in Unix time as milliseconds (for example
* "1469498468.057").
A time stamp indicating when this data object was terminated. Format is a
* number expressed in Unix time as milliseconds (for example
* "1469498468.057").
Number of players currently in the game session.
*/ inline int GetCurrentPlayerSessionCount() const{ return m_currentPlayerSessionCount; } inline bool CurrentPlayerSessionCountHasBeenSet() const { return m_currentPlayerSessionCountHasBeenSet; } inline void SetCurrentPlayerSessionCount(int value) { m_currentPlayerSessionCountHasBeenSet = true; m_currentPlayerSessionCount = value; } inline GameSession& WithCurrentPlayerSessionCount(int value) { SetCurrentPlayerSessionCount(value); return *this;} ///@} ///@{ /** *The maximum number of players that can be connected simultaneously to the * game session.
*/ inline int GetMaximumPlayerSessionCount() const{ return m_maximumPlayerSessionCount; } inline bool MaximumPlayerSessionCountHasBeenSet() const { return m_maximumPlayerSessionCountHasBeenSet; } inline void SetMaximumPlayerSessionCount(int value) { m_maximumPlayerSessionCountHasBeenSet = true; m_maximumPlayerSessionCount = value; } inline GameSession& WithMaximumPlayerSessionCount(int value) { SetMaximumPlayerSessionCount(value); return *this;} ///@} ///@{ /** *Current status of the game session. A game session must have an
* ACTIVE status to have player sessions.
Provides additional information about game session status.
* INTERRUPTED indicates that the game session was hosted on a spot
* instance that was reclaimed, causing the active game session to be
* terminated.
A set of key-value pairs that can store custom data in a game session. For
* example: {"Key": "difficulty", "Value": "novice"}.
The IP address of the game session. To connect to a Amazon GameLift game * server, an app needs both the IP address and port number.
*/ inline const Aws::String& GetIpAddress() const{ return m_ipAddress; } inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; } inline void SetIpAddress(const Aws::String& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; } inline void SetIpAddress(Aws::String&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = std::move(value); } inline void SetIpAddress(const char* value) { m_ipAddressHasBeenSet = true; m_ipAddress.assign(value); } inline GameSession& WithIpAddress(const Aws::String& value) { SetIpAddress(value); return *this;} inline GameSession& WithIpAddress(Aws::String&& value) { SetIpAddress(std::move(value)); return *this;} inline GameSession& WithIpAddress(const char* value) { SetIpAddress(value); return *this;} ///@} ///@{ /** *The DNS identifier assigned to the instance that is running the game session. * Values have the following format:
TLS-enabled fleets:
* <unique identifier>.<region
* identifier>.amazongamelift.com.
Non-TLS-enabled
* fleets: ec2-<unique identifier>.compute.amazonaws.com. (See
* Amazon
* EC2 Instance IP Addressing.)
When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.
*/ inline const Aws::String& GetDnsName() const{ return m_dnsName; } inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; } inline void SetDnsName(const Aws::String& value) { m_dnsNameHasBeenSet = true; m_dnsName = value; } inline void SetDnsName(Aws::String&& value) { m_dnsNameHasBeenSet = true; m_dnsName = std::move(value); } inline void SetDnsName(const char* value) { m_dnsNameHasBeenSet = true; m_dnsName.assign(value); } inline GameSession& WithDnsName(const Aws::String& value) { SetDnsName(value); return *this;} inline GameSession& WithDnsName(Aws::String&& value) { SetDnsName(std::move(value)); return *this;} inline GameSession& WithDnsName(const char* value) { SetDnsName(value); return *this;} ///@} ///@{ /** *The port number for the game session. To connect to a Amazon GameLift game * server, an app needs both the IP address and port number.
*/ inline int GetPort() const{ return m_port; } inline bool PortHasBeenSet() const { return m_portHasBeenSet; } inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; } inline GameSession& WithPort(int value) { SetPort(value); return *this;} ///@} ///@{ /** *Indicates whether or not the game session is accepting new players.
*/ inline const PlayerSessionCreationPolicy& GetPlayerSessionCreationPolicy() const{ return m_playerSessionCreationPolicy; } inline bool PlayerSessionCreationPolicyHasBeenSet() const { return m_playerSessionCreationPolicyHasBeenSet; } inline void SetPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = value; } inline void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = std::move(value); } inline GameSession& WithPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { SetPlayerSessionCreationPolicy(value); return *this;} inline GameSession& WithPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { SetPlayerSessionCreationPolicy(std::move(value)); return *this;} ///@} ///@{ /** *A unique identifier for a player. This ID is used to enforce a resource * protection policy (if one exists), that limits the number of game sessions a * player can create.
*/ inline const Aws::String& GetCreatorId() const{ return m_creatorId; } inline bool CreatorIdHasBeenSet() const { return m_creatorIdHasBeenSet; } inline void SetCreatorId(const Aws::String& value) { m_creatorIdHasBeenSet = true; m_creatorId = value; } inline void SetCreatorId(Aws::String&& value) { m_creatorIdHasBeenSet = true; m_creatorId = std::move(value); } inline void SetCreatorId(const char* value) { m_creatorIdHasBeenSet = true; m_creatorId.assign(value); } inline GameSession& WithCreatorId(const Aws::String& value) { SetCreatorId(value); return *this;} inline GameSession& WithCreatorId(Aws::String&& value) { SetCreatorId(std::move(value)); return *this;} inline GameSession& WithCreatorId(const char* value) { SetCreatorId(value); return *this;} ///@} ///@{ /** *A set of custom game session properties, formatted as a single string value. * This data is passed to a game server process with a request to start a new game * session. For more information, see Start * a game session.
*/ inline const Aws::String& GetGameSessionData() const{ return m_gameSessionData; } inline bool GameSessionDataHasBeenSet() const { return m_gameSessionDataHasBeenSet; } inline void SetGameSessionData(const Aws::String& value) { m_gameSessionDataHasBeenSet = true; m_gameSessionData = value; } inline void SetGameSessionData(Aws::String&& value) { m_gameSessionDataHasBeenSet = true; m_gameSessionData = std::move(value); } inline void SetGameSessionData(const char* value) { m_gameSessionDataHasBeenSet = true; m_gameSessionData.assign(value); } inline GameSession& WithGameSessionData(const Aws::String& value) { SetGameSessionData(value); return *this;} inline GameSession& WithGameSessionData(Aws::String&& value) { SetGameSessionData(std::move(value)); return *this;} inline GameSession& WithGameSessionData(const char* value) { SetGameSessionData(value); return *this;} ///@} ///@{ /** *Information about the matchmaking process that resulted in the game session, * if matchmaking was used. Data is in JSON syntax, formatted as a string. * Information includes the matchmaker ID as well as player attributes and team * assignments. For more details on matchmaker data, see Match * Data. Matchmaker data is updated whenever new players are added during a * successful backfill (see StartMatchBackfill). *
*/ inline const Aws::String& GetMatchmakerData() const{ return m_matchmakerData; } inline bool MatchmakerDataHasBeenSet() const { return m_matchmakerDataHasBeenSet; } inline void SetMatchmakerData(const Aws::String& value) { m_matchmakerDataHasBeenSet = true; m_matchmakerData = value; } inline void SetMatchmakerData(Aws::String&& value) { m_matchmakerDataHasBeenSet = true; m_matchmakerData = std::move(value); } inline void SetMatchmakerData(const char* value) { m_matchmakerDataHasBeenSet = true; m_matchmakerData.assign(value); } inline GameSession& WithMatchmakerData(const Aws::String& value) { SetMatchmakerData(value); return *this;} inline GameSession& WithMatchmakerData(Aws::String&& value) { SetMatchmakerData(std::move(value)); return *this;} inline GameSession& WithMatchmakerData(const char* value) { SetMatchmakerData(value); return *this;} ///@} ///@{ /** *The fleet location where the game session is running. This value might
* specify the fleet's home Region or a remote location. Location is expressed as
* an Amazon Web Services Region code such as us-west-2.