/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the gamelift-2015-10-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.GameLift.Model { /// /// Represents a player session. Player sessions are created either for a specific game /// session, or as part of a game session placement or matchmaking request. A player session /// can represents a reserved player slot in a game session (when status is RESERVED) /// or actual player activity in a game session (when status is ACTIVE). /// A player session object, including player data, is automatically passed to a game /// session when the player connects to the game session and is validated. After the game /// session ends, player sessions information is retained for 30 days and then removed. /// /// /// /// Related actions /// /// /// /// All /// APIs by task /// /// public partial class PlayerSession { private DateTime? _creationTime; private string _dnsName; private string _fleetArn; private string _fleetId; private string _gameSessionId; private string _ipAddress; private string _playerData; private string _playerId; private string _playerSessionId; private int? _port; private PlayerSessionStatus _status; private DateTime? _terminationTime; /// /// Gets and sets the property CreationTime. /// /// A time stamp indicating when this data object was created. Format is a number expressed /// in Unix time as milliseconds (for example "1469498468.057"). /// /// public DateTime CreationTime { get { return this._creationTime.GetValueOrDefault(); } set { this._creationTime = value; } } // Check to see if CreationTime property is set internal bool IsSetCreationTime() { return this._creationTime.HasValue; } /// /// Gets and sets the property DnsName. /// /// The DNS identifier assigned to the instance that is running the game session. Values /// have the following format: /// /// /// /// When connecting to a game session that is running on a TLS-enabled fleet, you must /// use the DNS name, not the IP address. /// /// public string DnsName { get { return this._dnsName; } set { this._dnsName = value; } } // Check to see if DnsName property is set internal bool IsSetDnsName() { return this._dnsName != null; } /// /// Gets and sets the property FleetArn. /// /// The Amazon Resource Name (ARN) /// associated with the GameLift fleet that the player's game session is running on. /// /// public string FleetArn { get { return this._fleetArn; } set { this._fleetArn = value; } } // Check to see if FleetArn property is set internal bool IsSetFleetArn() { return this._fleetArn != null; } /// /// Gets and sets the property FleetId. /// /// A unique identifier for the fleet that the player's game session is running on. /// /// public string FleetId { get { return this._fleetId; } set { this._fleetId = value; } } // Check to see if FleetId property is set internal bool IsSetFleetId() { return this._fleetId != null; } /// /// Gets and sets the property GameSessionId. /// /// A unique identifier for the game session that the player session is connected to. /// /// [AWSProperty(Min=1, Max=1024)] public string GameSessionId { get { return this._gameSessionId; } set { this._gameSessionId = value; } } // Check to see if GameSessionId property is set internal bool IsSetGameSessionId() { return this._gameSessionId != null; } /// /// Gets and sets the property IpAddress. /// /// 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. /// /// [AWSProperty(Min=1, Max=128)] public string IpAddress { get { return this._ipAddress; } set { this._ipAddress = value; } } // Check to see if IpAddress property is set internal bool IsSetIpAddress() { return this._ipAddress != null; } /// /// Gets and sets the property PlayerData. /// /// Developer-defined information related to a player. Amazon GameLift does not use this /// data, so it can be formatted as needed for use in the game. /// /// [AWSProperty(Min=1, Max=2048)] public string PlayerData { get { return this._playerData; } set { this._playerData = value; } } // Check to see if PlayerData property is set internal bool IsSetPlayerData() { return this._playerData != null; } /// /// Gets and sets the property PlayerId. /// /// A unique identifier for a player that is associated with this player session. /// /// [AWSProperty(Min=1, Max=1024)] public string PlayerId { get { return this._playerId; } set { this._playerId = value; } } // Check to see if PlayerId property is set internal bool IsSetPlayerId() { return this._playerId != null; } /// /// Gets and sets the property PlayerSessionId. /// /// A unique identifier for a player session. /// /// public string PlayerSessionId { get { return this._playerSessionId; } set { this._playerSessionId = value; } } // Check to see if PlayerSessionId property is set internal bool IsSetPlayerSessionId() { return this._playerSessionId != null; } /// /// Gets and sets the property Port. /// /// Port number for the game session. To connect to a Amazon GameLift server process, /// an app needs both the IP address and port number. /// /// [AWSProperty(Min=1, Max=60000)] public int Port { get { return this._port.GetValueOrDefault(); } set { this._port = value; } } // Check to see if Port property is set internal bool IsSetPort() { return this._port.HasValue; } /// /// Gets and sets the property Status. /// /// Current status of the player session. /// /// /// /// Possible player session statuses include the following: /// /// /// public PlayerSessionStatus Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// /// Gets and sets the property TerminationTime. /// /// A time stamp indicating when this data object was terminated. Format is a number expressed /// in Unix time as milliseconds (for example "1469498468.057"). /// /// public DateTime TerminationTime { get { return this._terminationTime.GetValueOrDefault(); } set { this._terminationTime = value; } } // Check to see if TerminationTime property is set internal bool IsSetTerminationTime() { return this._terminationTime.HasValue; } } }