/* * 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 { /// /// 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. /// /// /// /// All /// APIs by task /// /// public partial class GameSession { private DateTime? _creationTime; private string _creatorId; private int? _currentPlayerSessionCount; private string _dnsName; private string _fleetArn; private string _fleetId; private List _gameProperties = new List(); private string _gameSessionData; private string _gameSessionId; private string _ipAddress; private string _location; private string _matchmakerData; private int? _maximumPlayerSessionCount; private string _name; private PlayerSessionCreationPolicy _playerSessionCreationPolicy; private int? _port; private GameSessionStatus _status; private GameSessionStatusReason _statusReason; 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 CreatorId. /// /// 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. /// /// [AWSProperty(Min=1, Max=1024)] public string CreatorId { get { return this._creatorId; } set { this._creatorId = value; } } // Check to see if CreatorId property is set internal bool IsSetCreatorId() { return this._creatorId != null; } /// /// Gets and sets the property CurrentPlayerSessionCount. /// /// Number of players currently in the game session. /// /// [AWSProperty(Min=0)] public int CurrentPlayerSessionCount { get { return this._currentPlayerSessionCount.GetValueOrDefault(); } set { this._currentPlayerSessionCount = value; } } // Check to see if CurrentPlayerSessionCount property is set internal bool IsSetCurrentPlayerSessionCount() { return this._currentPlayerSessionCount.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: /// ///
  • /// /// 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. /// ///
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 this 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 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 GameProperties. /// /// A set of custom properties for a game session, formatted as key:value pairs. These /// properties are passed to a game server process with a request to start a new game /// session (see Start /// a Game Session). /// /// [AWSProperty(Max=16)] public List GameProperties { get { return this._gameProperties; } set { this._gameProperties = value; } } // Check to see if GameProperties property is set internal bool IsSetGameProperties() { return this._gameProperties != null && this._gameProperties.Count > 0; } /// /// Gets and sets the property GameSessionData. /// /// 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 /// (see Start /// a Game Session). /// /// [AWSProperty(Min=1, Max=262144)] public string GameSessionData { get { return this._gameSessionData; } set { this._gameSessionData = value; } } // Check to see if GameSessionData property is set internal bool IsSetGameSessionData() { return this._gameSessionData != null; } /// /// Gets and sets the property GameSessionId. /// /// 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>. /// /// [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 Location. /// /// 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. /// /// [AWSProperty(Min=1, Max=64)] public string Location { get { return this._location; } set { this._location = value; } } // Check to see if Location property is set internal bool IsSetLocation() { return this._location != null; } /// /// Gets and sets the property MatchmakerData. /// /// Information about the matchmaking process that was used to create the game session. /// It is in JSON syntax, formatted as a string. In addition the matchmaking configuration /// used, it contains data on all players assigned to the match, including player attributes /// and team assignments. For more details on matchmaker data, see Match /// Data. Matchmaker data is useful when requesting match backfills, and is updated /// whenever new players are added during a successful backfill (see StartMatchBackfill). /// /// /// [AWSProperty(Min=1, Max=390000)] public string MatchmakerData { get { return this._matchmakerData; } set { this._matchmakerData = value; } } // Check to see if MatchmakerData property is set internal bool IsSetMatchmakerData() { return this._matchmakerData != null; } /// /// Gets and sets the property MaximumPlayerSessionCount. /// /// The maximum number of players that can be connected simultaneously to the game session. /// /// [AWSProperty(Min=0)] public int MaximumPlayerSessionCount { get { return this._maximumPlayerSessionCount.GetValueOrDefault(); } set { this._maximumPlayerSessionCount = value; } } // Check to see if MaximumPlayerSessionCount property is set internal bool IsSetMaximumPlayerSessionCount() { return this._maximumPlayerSessionCount.HasValue; } /// /// Gets and sets the property Name. /// /// A descriptive label that is associated with a game session. Session names do not need /// to be unique. /// /// [AWSProperty(Min=1, Max=1024)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// /// Gets and sets the property PlayerSessionCreationPolicy. /// /// Indicates whether or not the game session is accepting new players. /// /// public PlayerSessionCreationPolicy PlayerSessionCreationPolicy { get { return this._playerSessionCreationPolicy; } set { this._playerSessionCreationPolicy = value; } } // Check to see if PlayerSessionCreationPolicy property is set internal bool IsSetPlayerSessionCreationPolicy() { return this._playerSessionCreationPolicy != null; } /// /// Gets and sets the property Port. /// /// 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. /// /// [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 game session. A game session must have an ACTIVE /// status to have player sessions. /// /// public GameSessionStatus 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 StatusReason. /// /// 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. /// /// public GameSessionStatusReason StatusReason { get { return this._statusReason; } set { this._statusReason = value; } } // Check to see if StatusReason property is set internal bool IsSetStatusReason() { return this._statusReason != 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; } } }