@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class GameSession extends Object implements Serializable, Cloneable, StructuredPojo
Properties describing a game session.
A game session in ACTIVE status can host players. When a game session ends, its status is set to
TERMINATED
.
Once the session ends, the game session object is retained for 30 days. This means you can reuse idempotency token values after this time. Game session logs are retained for 14 days.
Game-session-related operations include:
Constructor and Description |
---|
GameSession() |
Modifier and Type | Method and Description |
---|---|
GameSession |
clone() |
boolean |
equals(Object obj) |
Date |
getCreationTime()
Time stamp indicating when this data object was created.
|
String |
getCreatorId()
Unique identifier for a player.
|
Integer |
getCurrentPlayerSessionCount()
Number of players currently in the game session.
|
String |
getFleetId()
Unique identifier for a fleet that the game session is running on.
|
List<GameProperty> |
getGameProperties()
Set of developer-defined properties for a game session, formatted as a set of type:value pairs.
|
String |
getGameSessionData()
Set of developer-defined game session properties, formatted as a single string value.
|
String |
getGameSessionId()
Unique identifier for the game session.
|
String |
getIpAddress()
IP address of the game session.
|
Integer |
getMaximumPlayerSessionCount()
Maximum number of players that can be connected simultaneously to the game session.
|
String |
getName()
Descriptive label that is associated with a game session.
|
String |
getPlayerSessionCreationPolicy()
Indicates whether or not the game session is accepting new players.
|
Integer |
getPort()
Port number for the game session.
|
String |
getStatus()
Current status of the game session.
|
Date |
getTerminationTime()
Time stamp indicating when this data object was terminated.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCreationTime(Date creationTime)
Time stamp indicating when this data object was created.
|
void |
setCreatorId(String creatorId)
Unique identifier for a player.
|
void |
setCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
|
void |
setFleetId(String fleetId)
Unique identifier for a fleet that the game session is running on.
|
void |
setGameProperties(Collection<GameProperty> gameProperties)
Set of developer-defined properties for a game session, formatted as a set of type:value pairs.
|
void |
setGameSessionData(String gameSessionData)
Set of developer-defined game session properties, formatted as a single string value.
|
void |
setGameSessionId(String gameSessionId)
Unique identifier for the game session.
|
void |
setIpAddress(String ipAddress)
IP address of the game session.
|
void |
setMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players that can be connected simultaneously to the game session.
|
void |
setName(String name)
Descriptive label that is associated with a game session.
|
void |
setPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
void |
setPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
void |
setPort(Integer port)
Port number for the game session.
|
void |
setStatus(GameSessionStatus status)
Current status of the game session.
|
void |
setStatus(String status)
Current status of the game session.
|
void |
setTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
GameSession |
withCreationTime(Date creationTime)
Time stamp indicating when this data object was created.
|
GameSession |
withCreatorId(String creatorId)
Unique identifier for a player.
|
GameSession |
withCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
|
GameSession |
withFleetId(String fleetId)
Unique identifier for a fleet that the game session is running on.
|
GameSession |
withGameProperties(Collection<GameProperty> gameProperties)
Set of developer-defined properties for a game session, formatted as a set of type:value pairs.
|
GameSession |
withGameProperties(GameProperty... gameProperties)
Set of developer-defined properties for a game session, formatted as a set of type:value pairs.
|
GameSession |
withGameSessionData(String gameSessionData)
Set of developer-defined game session properties, formatted as a single string value.
|
GameSession |
withGameSessionId(String gameSessionId)
Unique identifier for the game session.
|
GameSession |
withIpAddress(String ipAddress)
IP address of the game session.
|
GameSession |
withMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players that can be connected simultaneously to the game session.
|
GameSession |
withName(String name)
Descriptive label that is associated with a game session.
|
GameSession |
withPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
GameSession |
withPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
|
GameSession |
withPort(Integer port)
Port number for the game session.
|
GameSession |
withStatus(GameSessionStatus status)
Current status of the game session.
|
GameSession |
withStatus(String status)
Current status of the game session.
|
GameSession |
withTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated.
|
public void setGameSessionId(String gameSessionId)
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>
.
gameSessionId
- 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>
.public String getGameSessionId()
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>
.
arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>
.public GameSession withGameSessionId(String gameSessionId)
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>
.
gameSessionId
- 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>
.public void setName(String name)
Descriptive label that is associated with a game session. Session names do not need to be unique.
name
- Descriptive label that is associated with a game session. Session names do not need to be unique.public String getName()
Descriptive label that is associated with a game session. Session names do not need to be unique.
public GameSession withName(String name)
Descriptive label that is associated with a game session. Session names do not need to be unique.
name
- Descriptive label that is associated with a game session. Session names do not need to be unique.public void setFleetId(String fleetId)
Unique identifier for a fleet that the game session is running on.
fleetId
- Unique identifier for a fleet that the game session is running on.public String getFleetId()
Unique identifier for a fleet that the game session is running on.
public GameSession withFleetId(String fleetId)
Unique identifier for a fleet that the game session is running on.
fleetId
- Unique identifier for a fleet that the game session is running on.public void setCreationTime(Date creationTime)
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
creationTime
- Time stamp indicating when this data object was created. Format is a number expressed in Unix time as
milliseconds (for example "1469498468.057").public Date getCreationTime()
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
public GameSession withCreationTime(Date creationTime)
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
creationTime
- Time stamp indicating when this data object was created. Format is a number expressed in Unix time as
milliseconds (for example "1469498468.057").public void setTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
terminationTime
- Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as
milliseconds (for example "1469498468.057").public Date getTerminationTime()
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
public GameSession withTerminationTime(Date terminationTime)
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
terminationTime
- Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as
milliseconds (for example "1469498468.057").public void setCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
currentPlayerSessionCount
- Number of players currently in the game session.public Integer getCurrentPlayerSessionCount()
Number of players currently in the game session.
public GameSession withCurrentPlayerSessionCount(Integer currentPlayerSessionCount)
Number of players currently in the game session.
currentPlayerSessionCount
- Number of players currently in the game session.public void setMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players that can be connected simultaneously to the game session.
maximumPlayerSessionCount
- Maximum number of players that can be connected simultaneously to the game session.public Integer getMaximumPlayerSessionCount()
Maximum number of players that can be connected simultaneously to the game session.
public GameSession withMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)
Maximum number of players that can be connected simultaneously to the game session.
maximumPlayerSessionCount
- Maximum number of players that can be connected simultaneously to the game session.public void setStatus(String status)
Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.GameSessionStatus
public String getStatus()
Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.
ACTIVE
status to have player
sessions.GameSessionStatus
public GameSession withStatus(String status)
Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.GameSessionStatus
public void setStatus(GameSessionStatus status)
Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.GameSessionStatus
public GameSession withStatus(GameSessionStatus status)
Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.
status
- Current status of the game session. A game session must have an ACTIVE
status to have player
sessions.GameSessionStatus
public List<GameProperty> getGameProperties()
Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These properties are included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session).
public void setGameProperties(Collection<GameProperty> gameProperties)
Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These properties are included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session).
gameProperties
- Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These
properties are included in the GameSession object, which is passed to the game server with a
request to start a new game session (see Start a Game Session).public GameSession withGameProperties(GameProperty... gameProperties)
Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These properties are included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session).
NOTE: This method appends the values to the existing list (if any). Use
setGameProperties(java.util.Collection)
or withGameProperties(java.util.Collection)
if you want
to override the existing values.
gameProperties
- Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These
properties are included in the GameSession object, which is passed to the game server with a
request to start a new game session (see Start a Game Session).public GameSession withGameProperties(Collection<GameProperty> gameProperties)
Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These properties are included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session).
gameProperties
- Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These
properties are included in the GameSession object, which is passed to the game server with a
request to start a new game session (see Start a Game Session).public void setIpAddress(String ipAddress)
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
ipAddress
- IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP
address and port number.public String getIpAddress()
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
public GameSession withIpAddress(String ipAddress)
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
ipAddress
- IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP
address and port number.public void setPort(Integer port)
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
port
- Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP
address and port number.public Integer getPort()
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
public GameSession withPort(Integer port)
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
port
- Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP
address and port number.public void setPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public String getPlayerSessionCreationPolicy()
Indicates whether or not the game session is accepting new players.
PlayerSessionCreationPolicy
public GameSession withPlayerSessionCreationPolicy(String playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public void setPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public GameSession withPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)
Indicates whether or not the game session is accepting new players.
playerSessionCreationPolicy
- Indicates whether or not the game session is accepting new players.PlayerSessionCreationPolicy
public void setCreatorId(String creatorId)
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.
creatorId
- 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.public String getCreatorId()
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.
public GameSession withCreatorId(String creatorId)
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.
creatorId
- 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.public void setGameSessionData(String gameSessionData)
Set of developer-defined game session properties, formatted as a single string value. This data is included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session).
gameSessionData
- Set of developer-defined game session properties, formatted as a single string value. This data is
included in the GameSession object, which is passed to the game server with a request to start a
new game session (see Start a Game Session).public String getGameSessionData()
Set of developer-defined game session properties, formatted as a single string value. This data is included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session).
public GameSession withGameSessionData(String gameSessionData)
Set of developer-defined game session properties, formatted as a single string value. This data is included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session).
gameSessionData
- Set of developer-defined game session properties, formatted as a single string value. This data is
included in the GameSession object, which is passed to the game server with a request to start a
new game session (see Start a Game Session).public String toString()
toString
in class Object
Object.toString()
public GameSession clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.