
commonMain.aws.sdk.kotlin.services.gamelift.model.GameSessionConnectionInfo.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.gamelift.model
/**
* Connection information for a new game session that is created in response to a start matchmaking request. Once a match is made, the FlexMatch engine creates a new game session for it. This information, including the game session endpoint and player sessions for each player in the original matchmaking request, is added to the matchmaking ticket.
*/
public class GameSessionConnectionInfo private constructor(builder: Builder) {
/**
* The DNS identifier assigned to the instance that is running the game session. Values have the following format:
* + TLS-enabled fleets: `..amazongamelift.com`.
* + Non-TLS-enabled fleets: `ec2-.compute.amazonaws.com`. (See [Amazon EC2 Instance IP Addressing](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses).)
*
* 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 val dnsName: kotlin.String? = builder.dnsName
/**
* A unique identifier for the game session. Use the game session ID.
*/
public val gameSessionArn: kotlin.String? = builder.gameSessionArn
/**
* 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.
*/
public val ipAddress: kotlin.String? = builder.ipAddress
/**
* A collection of player session IDs, one for each player ID that was included in the original matchmaking request.
*/
public val matchedPlayerSessions: List? = builder.matchedPlayerSessions
/**
* 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.
*/
public val port: kotlin.Int? = builder.port
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.gamelift.model.GameSessionConnectionInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GameSessionConnectionInfo(")
append("dnsName=$dnsName,")
append("gameSessionArn=$gameSessionArn,")
append("ipAddress=*** Sensitive Data Redacted ***,")
append("matchedPlayerSessions=$matchedPlayerSessions,")
append("port=$port")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dnsName?.hashCode() ?: 0
result = 31 * result + (gameSessionArn?.hashCode() ?: 0)
result = 31 * result + (ipAddress?.hashCode() ?: 0)
result = 31 * result + (matchedPlayerSessions?.hashCode() ?: 0)
result = 31 * result + (port ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as GameSessionConnectionInfo
if (dnsName != other.dnsName) return false
if (gameSessionArn != other.gameSessionArn) return false
if (ipAddress != other.ipAddress) return false
if (matchedPlayerSessions != other.matchedPlayerSessions) return false
if (port != other.port) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.gamelift.model.GameSessionConnectionInfo = Builder(this).apply(block).build()
public class Builder {
/**
* The DNS identifier assigned to the instance that is running the game session. Values have the following format:
* + TLS-enabled fleets: `..amazongamelift.com`.
* + Non-TLS-enabled fleets: `ec2-.compute.amazonaws.com`. (See [Amazon EC2 Instance IP Addressing](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses).)
*
* 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 var dnsName: kotlin.String? = null
/**
* A unique identifier for the game session. Use the game session ID.
*/
public var gameSessionArn: kotlin.String? = null
/**
* 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.
*/
public var ipAddress: kotlin.String? = null
/**
* A collection of player session IDs, one for each player ID that was included in the original matchmaking request.
*/
public var matchedPlayerSessions: List? = null
/**
* 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.
*/
public var port: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.gamelift.model.GameSessionConnectionInfo) : this() {
this.dnsName = x.dnsName
this.gameSessionArn = x.gameSessionArn
this.ipAddress = x.ipAddress
this.matchedPlayerSessions = x.matchedPlayerSessions
this.port = x.port
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.gamelift.model.GameSessionConnectionInfo = GameSessionConnectionInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy