/* * 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.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreatePlayerSessionsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A unique identifier for the game session to add players to. *
*/ private String gameSessionId; /** ** List of unique identifiers for the players to be added. *
*/ private java.util.List
* Map of string pairs, each specifying a player ID and a set of developer-defined information related to the
* player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Any player
* data strings for player IDs that are not included in the PlayerIds
parameter are ignored.
*
* A unique identifier for the game session to add players to. *
* * @param gameSessionId * A unique identifier for the game session to add players to. */ public void setGameSessionId(String gameSessionId) { this.gameSessionId = gameSessionId; } /** ** A unique identifier for the game session to add players to. *
* * @return A unique identifier for the game session to add players to. */ public String getGameSessionId() { return this.gameSessionId; } /** ** A unique identifier for the game session to add players to. *
* * @param gameSessionId * A unique identifier for the game session to add players to. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePlayerSessionsRequest withGameSessionId(String gameSessionId) { setGameSessionId(gameSessionId); return this; } /** ** List of unique identifiers for the players to be added. *
* * @return List of unique identifiers for the players to be added. */ public java.util.List* List of unique identifiers for the players to be added. *
* * @param playerIds * List of unique identifiers for the players to be added. */ public void setPlayerIds(java.util.Collection* List of unique identifiers for the players to be added. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPlayerIds(java.util.Collection)} or {@link #withPlayerIds(java.util.Collection)} if you want to * override the existing values. *
* * @param playerIds * List of unique identifiers for the players to be added. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePlayerSessionsRequest withPlayerIds(String... playerIds) { if (this.playerIds == null) { setPlayerIds(new java.util.ArrayList* List of unique identifiers for the players to be added. *
* * @param playerIds * List of unique identifiers for the players to be added. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePlayerSessionsRequest withPlayerIds(java.util.Collection
* Map of string pairs, each specifying a player ID and a set of developer-defined information related to the
* player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Any player
* data strings for player IDs that are not included in the PlayerIds
parameter are ignored.
*
PlayerIds
parameter are
* ignored.
*/
public java.util.Map
* Map of string pairs, each specifying a player ID and a set of developer-defined information related to the
* player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Any player
* data strings for player IDs that are not included in the PlayerIds
parameter are ignored.
*
PlayerIds
parameter are
* ignored.
*/
public void setPlayerDataMap(java.util.Map
* Map of string pairs, each specifying a player ID and a set of developer-defined information related to the
* player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Any player
* data strings for player IDs that are not included in the PlayerIds
parameter are ignored.
*
PlayerIds
parameter are
* ignored.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlayerSessionsRequest withPlayerDataMap(java.util.Map