/* * 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; /** *
* 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. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GameSessionConnectionInfo implements Serializable, Cloneable, StructuredPojo { /** ** A unique identifier for the game session. Use the game session ID. *
*/ private String 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. *
*/ private String ipAddress; /** ** 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. *
*/ private String dnsName; /** ** 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. *
*/ private Integer port; /** ** A collection of player session IDs, one for each player ID that was included in the original matchmaking request. *
*/ private java.util.List* A unique identifier for the game session. Use the game session ID. *
* * @param gameSessionArn * A unique identifier for the game session. Use the game session ID. */ public void setGameSessionArn(String gameSessionArn) { this.gameSessionArn = gameSessionArn; } /** ** A unique identifier for the game session. Use the game session ID. *
* * @return A unique identifier for the game session. Use the game session ID. */ public String getGameSessionArn() { return this.gameSessionArn; } /** ** A unique identifier for the game session. Use the game session ID. *
* * @param gameSessionArn * A unique identifier for the game session. Use the game session ID. * @return Returns a reference to this object so that method calls can be chained together. */ public GameSessionConnectionInfo withGameSessionArn(String gameSessionArn) { setGameSessionArn(gameSessionArn); return this; } /** ** 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. *
* * @param 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. */ public void setIpAddress(String ipAddress) { this.ipAddress = 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. *
* * @return 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 String getIpAddress() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public GameSessionConnectionInfo withIpAddress(String ipAddress) { setIpAddress(ipAddress); return this; } /** ** 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. *
* * @param 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 void setDnsName(String dnsName) { this.dnsName = 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. *
* * @return 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 getDnsName() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public GameSessionConnectionInfo withDnsName(String dnsName) { setDnsName(dnsName); return this; } /** *
* 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. *
* * @param 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. */ public void setPort(Integer port) { this.port = 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. *
* * @return 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 Integer getPort() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public GameSessionConnectionInfo withPort(Integer port) { setPort(port); return this; } /** ** A collection of player session IDs, one for each player ID that was included in the original matchmaking request. *
* * @return A collection of player session IDs, one for each player ID that was included in the original matchmaking * request. */ public java.util.List* A collection of player session IDs, one for each player ID that was included in the original matchmaking request. *
* * @param matchedPlayerSessions * A collection of player session IDs, one for each player ID that was included in the original matchmaking * request. */ public void setMatchedPlayerSessions(java.util.Collection* A collection of player session IDs, one for each player ID that was included in the original matchmaking request. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMatchedPlayerSessions(java.util.Collection)} or * {@link #withMatchedPlayerSessions(java.util.Collection)} if you want to override the existing values. *
* * @param matchedPlayerSessions * A collection of player session IDs, one for each player ID that was included in the original matchmaking * request. * @return Returns a reference to this object so that method calls can be chained together. */ public GameSessionConnectionInfo withMatchedPlayerSessions(MatchedPlayerSession... matchedPlayerSessions) { if (this.matchedPlayerSessions == null) { setMatchedPlayerSessions(new java.util.ArrayList* A collection of player session IDs, one for each player ID that was included in the original matchmaking request. *
* * @param matchedPlayerSessions * A collection of player session IDs, one for each player ID that was included in the original matchmaking * request. * @return Returns a reference to this object so that method calls can be chained together. */ public GameSessionConnectionInfo withMatchedPlayerSessions(java.util.Collection