/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.gamelift.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* This data type is used with the Amazon GameLift FleetIQ and game server groups. *

*

* Properties describing a game server that is running on an instance in a game server group. *

*

* A game server is created by a successful call to RegisterGameServer and deleted by calling * DeregisterGameServer. A game server is claimed to host a game session by calling * ClaimGameServer. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GameServer implements Serializable, Cloneable, StructuredPojo { /** *

* A unique identifier for the game server group where the game server is running. *

*/ private String gameServerGroupName; /** *

* The ARN identifier for the game server group where the game server is located. *

*/ private String gameServerGroupArn; /** *

* A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique * across all game server groups in an Amazon Web Services account. *

*/ private String gameServerId; /** *

* The unique identifier for the instance where the game server is running. This ID is available in the instance * metadata. EC2 instance IDs use a 17-character format, for example: i-1234567890abcdef0. *

*/ private String instanceId; /** *

* The port and IP address that must be used to establish a client connection to the game server. *

*/ private String connectionInfo; /** *

* A set of custom game server properties, formatted as a single string value. This data is passed to a game client * or service when it requests information on game servers. *

*/ private String gameServerData; /** *

* Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game. * Once it is claimed, the game server remains in CLAIMED status for a maximum of one minute. During * this time, game clients connect to the game server to start the game and trigger the game server to update its * utilization status. After one minute, the game server claim status reverts to null. *

*/ private String claimStatus; /** *

* Indicates whether the game server is currently available for new games or is busy. Possible statuses include: *

* */ private String utilizationStatus; /** *

* Timestamp that indicates when the game server registered. The format is a number expressed in Unix time as * milliseconds (for example "1469498468.057"). *

*/ private java.util.Date registrationTime; /** *

* Timestamp that indicates the last time the game server was claimed. The format is a number expressed in Unix time * as milliseconds (for example "1469498468.057"). This value is used to calculate when a claimed game * server's status should revert to null. *

*/ private java.util.Date lastClaimTime; /** *

* Timestamp that indicates the last time the game server was updated with health status. The format is a number * expressed in Unix time as milliseconds (for example "1469498468.057"). After game server * registration, this property is only changed when a game server update specifies a health check value. *

*/ private java.util.Date lastHealthCheckTime; /** *

* A unique identifier for the game server group where the game server is running. *

* * @param gameServerGroupName * A unique identifier for the game server group where the game server is running. */ public void setGameServerGroupName(String gameServerGroupName) { this.gameServerGroupName = gameServerGroupName; } /** *

* A unique identifier for the game server group where the game server is running. *

* * @return A unique identifier for the game server group where the game server is running. */ public String getGameServerGroupName() { return this.gameServerGroupName; } /** *

* A unique identifier for the game server group where the game server is running. *

* * @param gameServerGroupName * A unique identifier for the game server group where the game server is running. * @return Returns a reference to this object so that method calls can be chained together. */ public GameServer withGameServerGroupName(String gameServerGroupName) { setGameServerGroupName(gameServerGroupName); return this; } /** *

* The ARN identifier for the game server group where the game server is located. *

* * @param gameServerGroupArn * The ARN identifier for the game server group where the game server is located. */ public void setGameServerGroupArn(String gameServerGroupArn) { this.gameServerGroupArn = gameServerGroupArn; } /** *

* The ARN identifier for the game server group where the game server is located. *

* * @return The ARN identifier for the game server group where the game server is located. */ public String getGameServerGroupArn() { return this.gameServerGroupArn; } /** *

* The ARN identifier for the game server group where the game server is located. *

* * @param gameServerGroupArn * The ARN identifier for the game server group where the game server is located. * @return Returns a reference to this object so that method calls can be chained together. */ public GameServer withGameServerGroupArn(String gameServerGroupArn) { setGameServerGroupArn(gameServerGroupArn); return this; } /** *

* A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique * across all game server groups in an Amazon Web Services account. *

* * @param gameServerId * A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are * unique across all game server groups in an Amazon Web Services account. */ public void setGameServerId(String gameServerId) { this.gameServerId = gameServerId; } /** *

* A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique * across all game server groups in an Amazon Web Services account. *

* * @return A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are * unique across all game server groups in an Amazon Web Services account. */ public String getGameServerId() { return this.gameServerId; } /** *

* A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique * across all game server groups in an Amazon Web Services account. *

* * @param gameServerId * A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are * unique across all game server groups in an Amazon Web Services account. * @return Returns a reference to this object so that method calls can be chained together. */ public GameServer withGameServerId(String gameServerId) { setGameServerId(gameServerId); return this; } /** *

* The unique identifier for the instance where the game server is running. This ID is available in the instance * metadata. EC2 instance IDs use a 17-character format, for example: i-1234567890abcdef0. *

* * @param instanceId * The unique identifier for the instance where the game server is running. This ID is available in the * instance metadata. EC2 instance IDs use a 17-character format, for example: * i-1234567890abcdef0. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** *

* The unique identifier for the instance where the game server is running. This ID is available in the instance * metadata. EC2 instance IDs use a 17-character format, for example: i-1234567890abcdef0. *

* * @return The unique identifier for the instance where the game server is running. This ID is available in the * instance metadata. EC2 instance IDs use a 17-character format, for example: * i-1234567890abcdef0. */ public String getInstanceId() { return this.instanceId; } /** *

* The unique identifier for the instance where the game server is running. This ID is available in the instance * metadata. EC2 instance IDs use a 17-character format, for example: i-1234567890abcdef0. *

* * @param instanceId * The unique identifier for the instance where the game server is running. This ID is available in the * instance metadata. EC2 instance IDs use a 17-character format, for example: * i-1234567890abcdef0. * @return Returns a reference to this object so that method calls can be chained together. */ public GameServer withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

* The port and IP address that must be used to establish a client connection to the game server. *

* * @param connectionInfo * The port and IP address that must be used to establish a client connection to the game server. */ public void setConnectionInfo(String connectionInfo) { this.connectionInfo = connectionInfo; } /** *

* The port and IP address that must be used to establish a client connection to the game server. *

* * @return The port and IP address that must be used to establish a client connection to the game server. */ public String getConnectionInfo() { return this.connectionInfo; } /** *

* The port and IP address that must be used to establish a client connection to the game server. *

* * @param connectionInfo * The port and IP address that must be used to establish a client connection to the game server. * @return Returns a reference to this object so that method calls can be chained together. */ public GameServer withConnectionInfo(String connectionInfo) { setConnectionInfo(connectionInfo); return this; } /** *

* A set of custom game server properties, formatted as a single string value. This data is passed to a game client * or service when it requests information on game servers. *

* * @param gameServerData * A set of custom game server properties, formatted as a single string value. This data is passed to a game * client or service when it requests information on game servers. */ public void setGameServerData(String gameServerData) { this.gameServerData = gameServerData; } /** *

* A set of custom game server properties, formatted as a single string value. This data is passed to a game client * or service when it requests information on game servers. *

* * @return A set of custom game server properties, formatted as a single string value. This data is passed to a game * client or service when it requests information on game servers. */ public String getGameServerData() { return this.gameServerData; } /** *

* A set of custom game server properties, formatted as a single string value. This data is passed to a game client * or service when it requests information on game servers. *

* * @param gameServerData * A set of custom game server properties, formatted as a single string value. This data is passed to a game * client or service when it requests information on game servers. * @return Returns a reference to this object so that method calls can be chained together. */ public GameServer withGameServerData(String gameServerData) { setGameServerData(gameServerData); return this; } /** *

* Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game. * Once it is claimed, the game server remains in CLAIMED status for a maximum of one minute. During * this time, game clients connect to the game server to start the game and trigger the game server to update its * utilization status. After one minute, the game server claim status reverts to null. *

* * @param claimStatus * Indicates when an available game server has been reserved for gameplay but has not yet started hosting a * game. Once it is claimed, the game server remains in CLAIMED status for a maximum of one * minute. During this time, game clients connect to the game server to start the game and trigger the game * server to update its utilization status. After one minute, the game server claim status reverts to null. * @see GameServerClaimStatus */ public void setClaimStatus(String claimStatus) { this.claimStatus = claimStatus; } /** *

* Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game. * Once it is claimed, the game server remains in CLAIMED status for a maximum of one minute. During * this time, game clients connect to the game server to start the game and trigger the game server to update its * utilization status. After one minute, the game server claim status reverts to null. *

* * @return Indicates when an available game server has been reserved for gameplay but has not yet started hosting a * game. Once it is claimed, the game server remains in CLAIMED status for a maximum of one * minute. During this time, game clients connect to the game server to start the game and trigger the game * server to update its utilization status. After one minute, the game server claim status reverts to null. * @see GameServerClaimStatus */ public String getClaimStatus() { return this.claimStatus; } /** *

* Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game. * Once it is claimed, the game server remains in CLAIMED status for a maximum of one minute. During * this time, game clients connect to the game server to start the game and trigger the game server to update its * utilization status. After one minute, the game server claim status reverts to null. *

* * @param claimStatus * Indicates when an available game server has been reserved for gameplay but has not yet started hosting a * game. Once it is claimed, the game server remains in CLAIMED status for a maximum of one * minute. During this time, game clients connect to the game server to start the game and trigger the game * server to update its utilization status. After one minute, the game server claim status reverts to null. * @return Returns a reference to this object so that method calls can be chained together. * @see GameServerClaimStatus */ public GameServer withClaimStatus(String claimStatus) { setClaimStatus(claimStatus); return this; } /** *

* Indicates when an available game server has been reserved for gameplay but has not yet started hosting a game. * Once it is claimed, the game server remains in CLAIMED status for a maximum of one minute. During * this time, game clients connect to the game server to start the game and trigger the game server to update its * utilization status. After one minute, the game server claim status reverts to null. *

* * @param claimStatus * Indicates when an available game server has been reserved for gameplay but has not yet started hosting a * game. Once it is claimed, the game server remains in CLAIMED status for a maximum of one * minute. During this time, game clients connect to the game server to start the game and trigger the game * server to update its utilization status. After one minute, the game server claim status reverts to null. * @return Returns a reference to this object so that method calls can be chained together. * @see GameServerClaimStatus */ public GameServer withClaimStatus(GameServerClaimStatus claimStatus) { this.claimStatus = claimStatus.toString(); return this; } /** *

* Indicates whether the game server is currently available for new games or is busy. Possible statuses include: *

* * * @param utilizationStatus * Indicates whether the game server is currently available for new games or is busy. Possible statuses * include:

*