Class GameSession

java.lang.Object
com.amazonaws.services.gamelift.model.GameSession
All Implemented Interfaces:
Serializable, Cloneable

public class GameSession extends Object implements Serializable, Cloneable

Properties describing a game session.

See Also:
  • Constructor Details

    • GameSession

      public GameSession()
  • Method Details

    • setGameSessionId

      public void setGameSessionId(String gameSessionId)

      Unique identifier for a game session.

      Parameters:
      gameSessionId - Unique identifier for a game session.
    • getGameSessionId

      public String getGameSessionId()

      Unique identifier for a game session.

      Returns:
      Unique identifier for a game session.
    • withGameSessionId

      public GameSession withGameSessionId(String gameSessionId)

      Unique identifier for a game session.

      Parameters:
      gameSessionId - Unique identifier for a game session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setName

      public void setName(String name)

      Descriptive label associated with this game session. Session names do not need to be unique.

      Parameters:
      name - Descriptive label associated with this game session. Session names do not need to be unique.
    • getName

      public String getName()

      Descriptive label associated with this game session. Session names do not need to be unique.

      Returns:
      Descriptive label associated with this game session. Session names do not need to be unique.
    • withName

      public GameSession withName(String name)

      Descriptive label associated with this game session. Session names do not need to be unique.

      Parameters:
      name - Descriptive label associated with this game session. Session names do not need to be unique.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setFleetId

      public void setFleetId(String fleetId)

      Unique identifier for a fleet.

      Parameters:
      fleetId - Unique identifier for a fleet.
    • getFleetId

      public String getFleetId()

      Unique identifier for a fleet.

      Returns:
      Unique identifier for a fleet.
    • withFleetId

      public GameSession withFleetId(String fleetId)

      Unique identifier for a fleet.

      Parameters:
      fleetId - Unique identifier for a fleet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setCreationTime

      public void setCreationTime(Date creationTime)

      Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).

      Parameters:
      creationTime - Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
    • getCreationTime

      public Date getCreationTime()

      Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).

      Returns:
      Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
    • withCreationTime

      public GameSession withCreationTime(Date creationTime)

      Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).

      Parameters:
      creationTime - Time stamp indicating when this object was created. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setTerminationTime

      public void setTerminationTime(Date terminationTime)

      Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).

      Parameters:
      terminationTime - Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
    • getTerminationTime

      public Date getTerminationTime()

      Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).

      Returns:
      Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
    • withTerminationTime

      public GameSession withTerminationTime(Date terminationTime)

      Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).

      Parameters:
      terminationTime - Time stamp indicating when this fleet was terminated. Format is an integer representing the number of seconds since the Unix epoch (Unix time).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setCurrentPlayerSessionCount

      public void setCurrentPlayerSessionCount(Integer currentPlayerSessionCount)

      Number of players currently in the game session.

      Parameters:
      currentPlayerSessionCount - Number of players currently in the game session.
    • getCurrentPlayerSessionCount

      public Integer getCurrentPlayerSessionCount()

      Number of players currently in the game session.

      Returns:
      Number of players currently in the game session.
    • withCurrentPlayerSessionCount

      public GameSession withCurrentPlayerSessionCount(Integer currentPlayerSessionCount)

      Number of players currently in the game session.

      Parameters:
      currentPlayerSessionCount - Number of players currently in the game session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setMaximumPlayerSessionCount

      public void setMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)

      Maximum number of players allowed in the game session.

      Parameters:
      maximumPlayerSessionCount - Maximum number of players allowed in the game session.
    • getMaximumPlayerSessionCount

      public Integer getMaximumPlayerSessionCount()

      Maximum number of players allowed in the game session.

      Returns:
      Maximum number of players allowed in the game session.
    • withMaximumPlayerSessionCount

      public GameSession withMaximumPlayerSessionCount(Integer maximumPlayerSessionCount)

      Maximum number of players allowed in the game session.

      Parameters:
      maximumPlayerSessionCount - Maximum number of players allowed in the game session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setStatus

      public void setStatus(String status)

      Current status of the game session. A game session must be in an ACTIVE state to have player sessions.

      Parameters:
      status - Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
      See Also:
    • getStatus

      public String getStatus()

      Current status of the game session. A game session must be in an ACTIVE state to have player sessions.

      Returns:
      Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
      See Also:
    • withStatus

      public GameSession withStatus(String status)

      Current status of the game session. A game session must be in an ACTIVE state to have player sessions.

      Parameters:
      status - Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setStatus

      public void setStatus(GameSessionStatus status)

      Current status of the game session. A game session must be in an ACTIVE state to have player sessions.

      Parameters:
      status - Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
      See Also:
    • withStatus

      public GameSession withStatus(GameSessionStatus status)

      Current status of the game session. A game session must be in an ACTIVE state to have player sessions.

      Parameters:
      status - Current status of the game session. A game session must be in an ACTIVE state to have player sessions.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • getGameProperties

      public List<GameProperty> getGameProperties()

      Set of custom properties for the game session.

      Returns:
      Set of custom properties for the game session.
    • setGameProperties

      public void setGameProperties(Collection<GameProperty> gameProperties)

      Set of custom properties for the game session.

      Parameters:
      gameProperties - Set of custom properties for the game session.
    • withGameProperties

      public GameSession withGameProperties(GameProperty... gameProperties)

      Set of custom properties for the 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.

      Parameters:
      gameProperties - Set of custom properties for the game session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withGameProperties

      public GameSession withGameProperties(Collection<GameProperty> gameProperties)

      Set of custom properties for the game session.

      Parameters:
      gameProperties - Set of custom properties for the game session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setIpAddress

      public void setIpAddress(String ipAddress)

      IP address of the game session.

      Parameters:
      ipAddress - IP address of the game session.
    • getIpAddress

      public String getIpAddress()

      IP address of the game session.

      Returns:
      IP address of the game session.
    • withIpAddress

      public GameSession withIpAddress(String ipAddress)

      IP address of the game session.

      Parameters:
      ipAddress - IP address of the game session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setPlayerSessionCreationPolicy

      public void setPlayerSessionCreationPolicy(String playerSessionCreationPolicy)

      Indicates whether or not the game session is accepting new players.

      Parameters:
      playerSessionCreationPolicy - Indicates whether or not the game session is accepting new players.
      See Also:
    • getPlayerSessionCreationPolicy

      public String getPlayerSessionCreationPolicy()

      Indicates whether or not the game session is accepting new players.

      Returns:
      Indicates whether or not the game session is accepting new players.
      See Also:
    • withPlayerSessionCreationPolicy

      public GameSession withPlayerSessionCreationPolicy(String playerSessionCreationPolicy)

      Indicates whether or not the game session is accepting new players.

      Parameters:
      playerSessionCreationPolicy - Indicates whether or not the game session is accepting new players.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setPlayerSessionCreationPolicy

      public void setPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)

      Indicates whether or not the game session is accepting new players.

      Parameters:
      playerSessionCreationPolicy - Indicates whether or not the game session is accepting new players.
      See Also:
    • withPlayerSessionCreationPolicy

      public GameSession withPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy)

      Indicates whether or not the game session is accepting new players.

      Parameters:
      playerSessionCreationPolicy - Indicates whether or not the game session is accepting new players.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public GameSession clone()
      Overrides:
      clone in class Object