All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.gamelift.model.CreateGameSessionRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS GameLift module holds the client classes that are used for communicating with AWS GameLift service.

There is a newer version: 1.12.782
Show newest version
/*
 * Copyright 2013-2018 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;

/**
 * 

* Represents the input for a request action. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateGameSessionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias * ID, but not both. *

*/ private String fleetId; /** *

* Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference * either a fleet ID or alias ID, but not both. *

*/ private String aliasId; /** *

* Maximum number of players that can be connected simultaneously to the game session. *

*/ private Integer maximumPlayerSessionCount; /** *

* Descriptive label that is associated with a game session. Session names do not need to be unique. *

*/ private String name; /** *

* Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). *

*/ private java.util.List gameProperties; /** *

* Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource * protection policy (if one exists) that limits the number of concurrent active game sessions one player can have. *

*/ private String creatorId; /** *

* This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string * that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, * this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) *

*/ private String gameSessionId; /** *

* Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. * If provided, this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained * for this time period and then deleted. *

*/ private String idempotencyToken; /** *

* Set of custom game session properties, formatted as a single string value. This data is passed to a game server * process in the GameSession object with a request to start a new game session (see Start a Game Session). *

*/ private String gameSessionData; /** *

* Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias * ID, but not both. *

* * @param fleetId * Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID * or alias ID, but not both. */ public void setFleetId(String fleetId) { this.fleetId = fleetId; } /** *

* Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias * ID, but not both. *

* * @return Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID * or alias ID, but not both. */ public String getFleetId() { return this.fleetId; } /** *

* Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias * ID, but not both. *

* * @param fleetId * Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID * or alias ID, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withFleetId(String fleetId) { setFleetId(fleetId); return this; } /** *

* Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference * either a fleet ID or alias ID, but not both. *

* * @param aliasId * Unique identifier for an alias associated with the fleet to create a game session in. Each request must * reference either a fleet ID or alias ID, but not both. */ public void setAliasId(String aliasId) { this.aliasId = aliasId; } /** *

* Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference * either a fleet ID or alias ID, but not both. *

* * @return Unique identifier for an alias associated with the fleet to create a game session in. Each request must * reference either a fleet ID or alias ID, but not both. */ public String getAliasId() { return this.aliasId; } /** *

* Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference * either a fleet ID or alias ID, but not both. *

* * @param aliasId * Unique identifier for an alias associated with the fleet to create a game session in. Each request must * reference either a fleet ID or alias ID, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withAliasId(String aliasId) { setAliasId(aliasId); return this; } /** *

* Maximum number of players that can be connected simultaneously to the game session. *

* * @param maximumPlayerSessionCount * Maximum number of players that can be connected simultaneously to the game session. */ public void setMaximumPlayerSessionCount(Integer maximumPlayerSessionCount) { this.maximumPlayerSessionCount = maximumPlayerSessionCount; } /** *

* Maximum number of players that can be connected simultaneously to the game session. *

* * @return Maximum number of players that can be connected simultaneously to the game session. */ public Integer getMaximumPlayerSessionCount() { return this.maximumPlayerSessionCount; } /** *

* Maximum number of players that can be connected simultaneously to the game session. *

* * @param maximumPlayerSessionCount * Maximum number of players that can be connected simultaneously to the game session. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withMaximumPlayerSessionCount(Integer maximumPlayerSessionCount) { setMaximumPlayerSessionCount(maximumPlayerSessionCount); return this; } /** *

* Descriptive label that is associated with a game session. Session names do not need to be unique. *

* * @param name * Descriptive label that is associated with a game session. Session names do not need to be unique. */ public void setName(String name) { this.name = name; } /** *

* Descriptive label that is associated with a game session. Session names do not need to be unique. *

* * @return Descriptive label that is associated with a game session. Session names do not need to be unique. */ public String getName() { return this.name; } /** *

* Descriptive label that is associated with a game session. Session names do not need to be unique. *

* * @param name * Descriptive label that is associated with a game session. Session names do not need to be unique. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withName(String name) { setName(name); return this; } /** *

* Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). *

* * @return Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to * a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). */ public java.util.List getGameProperties() { return gameProperties; } /** *

* Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). *

* * @param gameProperties * Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to * a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). */ public void setGameProperties(java.util.Collection gameProperties) { if (gameProperties == null) { this.gameProperties = null; return; } this.gameProperties = new java.util.ArrayList(gameProperties); } /** *

* Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setGameProperties(java.util.Collection)} or {@link #withGameProperties(java.util.Collection)} if you want * to override the existing values. *

* * @param gameProperties * Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to * a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withGameProperties(GameProperty... gameProperties) { if (this.gameProperties == null) { setGameProperties(new java.util.ArrayList(gameProperties.length)); } for (GameProperty ele : gameProperties) { this.gameProperties.add(ele); } return this; } /** *

* Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). *

* * @param gameProperties * Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to * a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withGameProperties(java.util.Collection gameProperties) { setGameProperties(gameProperties); return this; } /** *

* Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource * protection policy (if one exists) that limits the number of concurrent active game sessions one player can have. *

* * @param creatorId * Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource * protection policy (if one exists) that limits the number of concurrent active game sessions one player can * have. */ public void setCreatorId(String creatorId) { this.creatorId = creatorId; } /** *

* Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource * protection policy (if one exists) that limits the number of concurrent active game sessions one player can have. *

* * @return Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource * protection policy (if one exists) that limits the number of concurrent active game sessions one player * can have. */ public String getCreatorId() { return this.creatorId; } /** *

* Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource * protection policy (if one exists) that limits the number of concurrent active game sessions one player can have. *

* * @param creatorId * Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource * protection policy (if one exists) that limits the number of concurrent active game sessions one player can * have. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withCreatorId(String creatorId) { setCreatorId(creatorId); return this; } /** *

* This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string * that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, * this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) *

* * @param gameSessionId * This parameter is no longer preferred. Please use IdempotencyToken instead. Custom * string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. * If provided, this string is included in the new game session's ID. (A game session ARN has the following * format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) */ public void setGameSessionId(String gameSessionId) { this.gameSessionId = gameSessionId; } /** *

* This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string * that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, * this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) *

* * @return This parameter is no longer preferred. Please use IdempotencyToken instead. Custom * string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. * If provided, this string is included in the new game session's ID. (A game session ARN has the following * format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) */ public String getGameSessionId() { return this.gameSessionId; } /** *

* This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string * that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, * this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) *

* * @param gameSessionId * This parameter is no longer preferred. Please use IdempotencyToken instead. Custom * string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. * If provided, this string is included in the new game session's ID. (A game session ARN has the following * format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withGameSessionId(String gameSessionId) { setGameSessionId(gameSessionId); return this; } /** *

* Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. * If provided, this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained * for this time period and then deleted. *

* * @param idempotencyToken * Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 * characters. If provided, this string is included in the new game session's ID. (A game session ARN has the * following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are * retained for this time period and then deleted. */ public void setIdempotencyToken(String idempotencyToken) { this.idempotencyToken = idempotencyToken; } /** *

* Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. * If provided, this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained * for this time period and then deleted. *

* * @return Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 * characters. If provided, this string is included in the new game session's ID. (A game session ARN has * the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are * retained for this time period and then deleted. */ public String getIdempotencyToken() { return this.idempotencyToken; } /** *

* Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. * If provided, this string is included in the new game session's ID. (A game session ARN has the following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained * for this time period and then deleted. *

* * @param idempotencyToken * Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 * characters. If provided, this string is included in the new game session's ID. (A game session ARN has the * following format: * arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token> * .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are * retained for this time period and then deleted. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withIdempotencyToken(String idempotencyToken) { setIdempotencyToken(idempotencyToken); return this; } /** *

* Set of custom game session properties, formatted as a single string value. This data is passed to a game server * process in the GameSession object with a request to start a new game session (see Start a Game Session). *

* * @param gameSessionData * Set of custom game session properties, formatted as a single string value. This data is passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). */ public void setGameSessionData(String gameSessionData) { this.gameSessionData = gameSessionData; } /** *

* Set of custom game session properties, formatted as a single string value. This data is passed to a game server * process in the GameSession object with a request to start a new game session (see Start a Game Session). *

* * @return Set of custom game session properties, formatted as a single string value. This data is passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). */ public String getGameSessionData() { return this.gameSessionData; } /** *

* Set of custom game session properties, formatted as a single string value. This data is passed to a game server * process in the GameSession object with a request to start a new game session (see Start a Game Session). *

* * @param gameSessionData * Set of custom game session properties, formatted as a single string value. This data is passed to a game * server process in the GameSession object with a request to start a new game session (see Start a Game Session). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateGameSessionRequest withGameSessionData(String gameSessionData) { setGameSessionData(gameSessionData); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFleetId() != null) sb.append("FleetId: ").append(getFleetId()).append(","); if (getAliasId() != null) sb.append("AliasId: ").append(getAliasId()).append(","); if (getMaximumPlayerSessionCount() != null) sb.append("MaximumPlayerSessionCount: ").append(getMaximumPlayerSessionCount()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getGameProperties() != null) sb.append("GameProperties: ").append(getGameProperties()).append(","); if (getCreatorId() != null) sb.append("CreatorId: ").append(getCreatorId()).append(","); if (getGameSessionId() != null) sb.append("GameSessionId: ").append(getGameSessionId()).append(","); if (getIdempotencyToken() != null) sb.append("IdempotencyToken: ").append(getIdempotencyToken()).append(","); if (getGameSessionData() != null) sb.append("GameSessionData: ").append(getGameSessionData()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateGameSessionRequest == false) return false; CreateGameSessionRequest other = (CreateGameSessionRequest) obj; if (other.getFleetId() == null ^ this.getFleetId() == null) return false; if (other.getFleetId() != null && other.getFleetId().equals(this.getFleetId()) == false) return false; if (other.getAliasId() == null ^ this.getAliasId() == null) return false; if (other.getAliasId() != null && other.getAliasId().equals(this.getAliasId()) == false) return false; if (other.getMaximumPlayerSessionCount() == null ^ this.getMaximumPlayerSessionCount() == null) return false; if (other.getMaximumPlayerSessionCount() != null && other.getMaximumPlayerSessionCount().equals(this.getMaximumPlayerSessionCount()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getGameProperties() == null ^ this.getGameProperties() == null) return false; if (other.getGameProperties() != null && other.getGameProperties().equals(this.getGameProperties()) == false) return false; if (other.getCreatorId() == null ^ this.getCreatorId() == null) return false; if (other.getCreatorId() != null && other.getCreatorId().equals(this.getCreatorId()) == false) return false; if (other.getGameSessionId() == null ^ this.getGameSessionId() == null) return false; if (other.getGameSessionId() != null && other.getGameSessionId().equals(this.getGameSessionId()) == false) return false; if (other.getIdempotencyToken() == null ^ this.getIdempotencyToken() == null) return false; if (other.getIdempotencyToken() != null && other.getIdempotencyToken().equals(this.getIdempotencyToken()) == false) return false; if (other.getGameSessionData() == null ^ this.getGameSessionData() == null) return false; if (other.getGameSessionData() != null && other.getGameSessionData().equals(this.getGameSessionData()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFleetId() == null) ? 0 : getFleetId().hashCode()); hashCode = prime * hashCode + ((getAliasId() == null) ? 0 : getAliasId().hashCode()); hashCode = prime * hashCode + ((getMaximumPlayerSessionCount() == null) ? 0 : getMaximumPlayerSessionCount().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getGameProperties() == null) ? 0 : getGameProperties().hashCode()); hashCode = prime * hashCode + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); hashCode = prime * hashCode + ((getGameSessionId() == null) ? 0 : getGameSessionId().hashCode()); hashCode = prime * hashCode + ((getIdempotencyToken() == null) ? 0 : getIdempotencyToken().hashCode()); hashCode = prime * hashCode + ((getGameSessionData() == null) ? 0 : getGameSessionData().hashCode()); return hashCode; } @Override public CreateGameSessionRequest clone() { return (CreateGameSessionRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy