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

com.amazonaws.services.gamelift.model.UpdateGameSessionRequest 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.

The newest version!
/*
 * Copyright 2019-2024 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 UpdateGameSessionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* A unique identifier for the game session to update. *

*/ private String gameSessionId; /** *

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

*/ private Integer maximumPlayerSessionCount; /** *

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

*/ private String name; /** *

* A policy that determines whether the game session is accepting new players. *

*/ private String playerSessionCreationPolicy; /** *

* Game session protection policy to apply to this game session only. *

*
    *
  • *

    * NoProtection -- The game session can be terminated during a scale-down event. *

    *
  • *
  • *

    * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during * a scale-down event. *

    *
  • *
*/ private String protectionPolicy; /** *

* A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game properties in an * active game session. This action adds new properties and modifies existing properties. There is no way to delete * properties. For an example, see Update the value of a game property. *

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

* A unique identifier for the game session to update. *

* * @param gameSessionId * A unique identifier for the game session to update. */ public void setGameSessionId(String gameSessionId) { this.gameSessionId = gameSessionId; } /** *

* A unique identifier for the game session to update. *

* * @return A unique identifier for the game session to update. */ public String getGameSessionId() { return this.gameSessionId; } /** *

* A unique identifier for the game session to update. *

* * @param gameSessionId * A unique identifier for the game session to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateGameSessionRequest withGameSessionId(String gameSessionId) { setGameSessionId(gameSessionId); return this; } /** *

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

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

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

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

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

* * @param maximumPlayerSessionCount * The 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 UpdateGameSessionRequest withMaximumPlayerSessionCount(Integer maximumPlayerSessionCount) { setMaximumPlayerSessionCount(maximumPlayerSessionCount); return this; } /** *

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

* * @param name * A 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; } /** *

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

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

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

* * @param name * A 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 UpdateGameSessionRequest withName(String name) { setName(name); return this; } /** *

* A policy that determines whether the game session is accepting new players. *

* * @param playerSessionCreationPolicy * A policy that determines whether the game session is accepting new players. * @see PlayerSessionCreationPolicy */ public void setPlayerSessionCreationPolicy(String playerSessionCreationPolicy) { this.playerSessionCreationPolicy = playerSessionCreationPolicy; } /** *

* A policy that determines whether the game session is accepting new players. *

* * @return A policy that determines whether the game session is accepting new players. * @see PlayerSessionCreationPolicy */ public String getPlayerSessionCreationPolicy() { return this.playerSessionCreationPolicy; } /** *

* A policy that determines whether the game session is accepting new players. *

* * @param playerSessionCreationPolicy * A policy that determines whether the game session is accepting new players. * @return Returns a reference to this object so that method calls can be chained together. * @see PlayerSessionCreationPolicy */ public UpdateGameSessionRequest withPlayerSessionCreationPolicy(String playerSessionCreationPolicy) { setPlayerSessionCreationPolicy(playerSessionCreationPolicy); return this; } /** *

* A policy that determines whether the game session is accepting new players. *

* * @param playerSessionCreationPolicy * A policy that determines whether the game session is accepting new players. * @see PlayerSessionCreationPolicy */ public void setPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy) { withPlayerSessionCreationPolicy(playerSessionCreationPolicy); } /** *

* A policy that determines whether the game session is accepting new players. *

* * @param playerSessionCreationPolicy * A policy that determines whether the game session is accepting new players. * @return Returns a reference to this object so that method calls can be chained together. * @see PlayerSessionCreationPolicy */ public UpdateGameSessionRequest withPlayerSessionCreationPolicy(PlayerSessionCreationPolicy playerSessionCreationPolicy) { this.playerSessionCreationPolicy = playerSessionCreationPolicy.toString(); return this; } /** *

* Game session protection policy to apply to this game session only. *

*
    *
  • *

    * NoProtection -- The game session can be terminated during a scale-down event. *

    *
  • *
  • *

    * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during * a scale-down event. *

    *
  • *
* * @param protectionPolicy * Game session protection policy to apply to this game session only.

*
    *
  • *

    * NoProtection -- The game session can be terminated during a scale-down event. *

    *
  • *
  • *

    * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated * during a scale-down event. *

    *
  • * @see ProtectionPolicy */ public void setProtectionPolicy(String protectionPolicy) { this.protectionPolicy = protectionPolicy; } /** *

    * Game session protection policy to apply to this game session only. *

    *
      *
    • *

      * NoProtection -- The game session can be terminated during a scale-down event. *

      *
    • *
    • *

      * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during * a scale-down event. *

      *
    • *
    * * @return Game session protection policy to apply to this game session only.

    *
      *
    • *

      * NoProtection -- The game session can be terminated during a scale-down event. *

      *
    • *
    • *

      * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated * during a scale-down event. *

      *
    • * @see ProtectionPolicy */ public String getProtectionPolicy() { return this.protectionPolicy; } /** *

      * Game session protection policy to apply to this game session only. *

      *
        *
      • *

        * NoProtection -- The game session can be terminated during a scale-down event. *

        *
      • *
      • *

        * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during * a scale-down event. *

        *
      • *
      * * @param protectionPolicy * Game session protection policy to apply to this game session only.

      *
        *
      • *

        * NoProtection -- The game session can be terminated during a scale-down event. *

        *
      • *
      • *

        * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated * during a scale-down event. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionPolicy */ public UpdateGameSessionRequest withProtectionPolicy(String protectionPolicy) { setProtectionPolicy(protectionPolicy); return this; } /** *

        * Game session protection policy to apply to this game session only. *

        *
          *
        • *

          * NoProtection -- The game session can be terminated during a scale-down event. *

          *
        • *
        • *

          * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during * a scale-down event. *

          *
        • *
        * * @param protectionPolicy * Game session protection policy to apply to this game session only.

        *
          *
        • *

          * NoProtection -- The game session can be terminated during a scale-down event. *

          *
        • *
        • *

          * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated * during a scale-down event. *

          *
        • * @see ProtectionPolicy */ public void setProtectionPolicy(ProtectionPolicy protectionPolicy) { withProtectionPolicy(protectionPolicy); } /** *

          * Game session protection policy to apply to this game session only. *

          *
            *
          • *

            * NoProtection -- The game session can be terminated during a scale-down event. *

            *
          • *
          • *

            * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during * a scale-down event. *

            *
          • *
          * * @param protectionPolicy * Game session protection policy to apply to this game session only.

          *
            *
          • *

            * NoProtection -- The game session can be terminated during a scale-down event. *

            *
          • *
          • *

            * FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated * during a scale-down event. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionPolicy */ public UpdateGameSessionRequest withProtectionPolicy(ProtectionPolicy protectionPolicy) { this.protectionPolicy = protectionPolicy.toString(); return this; } /** *

            * A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game properties in an * active game session. This action adds new properties and modifies existing properties. There is no way to delete * properties. For an example, see Update the value of a game property. *

            * * @return A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game * properties in an active game session. This action adds new properties and modifies existing properties. * There is no way to delete properties. For an example, see Update the value of a game property. */ public java.util.List getGameProperties() { return gameProperties; } /** *

            * A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game properties in an * active game session. This action adds new properties and modifies existing properties. There is no way to delete * properties. For an example, see Update the value of a game property. *

            * * @param gameProperties * A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game * properties in an active game session. This action adds new properties and modifies existing properties. * There is no way to delete properties. For an example, see Update the value of a game property. */ public void setGameProperties(java.util.Collection gameProperties) { if (gameProperties == null) { this.gameProperties = null; return; } this.gameProperties = new java.util.ArrayList(gameProperties); } /** *

            * A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game properties in an * active game session. This action adds new properties and modifies existing properties. There is no way to delete * properties. For an example, see Update the value of a game property. *

            *

            * 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 * A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game * properties in an active game session. This action adds new properties and modifies existing properties. * There is no way to delete properties. For an example, see Update the value of a game property. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateGameSessionRequest withGameProperties(GameProperty... gameProperties) { if (this.gameProperties == null) { setGameProperties(new java.util.ArrayList(gameProperties.length)); } for (GameProperty ele : gameProperties) { this.gameProperties.add(ele); } return this; } /** *

            * A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game properties in an * active game session. This action adds new properties and modifies existing properties. There is no way to delete * properties. For an example, see Update the value of a game property. *

            * * @param gameProperties * A set of key-value pairs that can store custom data in a game session. For example: * {"Key": "difficulty", "Value": "novice"}. You can use this parameter to modify game * properties in an active game session. This action adds new properties and modifies existing properties. * There is no way to delete properties. For an example, see Update the value of a game property. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateGameSessionRequest withGameProperties(java.util.Collection gameProperties) { setGameProperties(gameProperties); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getGameSessionId() != null) sb.append("GameSessionId: ").append(getGameSessionId()).append(","); if (getMaximumPlayerSessionCount() != null) sb.append("MaximumPlayerSessionCount: ").append(getMaximumPlayerSessionCount()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getPlayerSessionCreationPolicy() != null) sb.append("PlayerSessionCreationPolicy: ").append(getPlayerSessionCreationPolicy()).append(","); if (getProtectionPolicy() != null) sb.append("ProtectionPolicy: ").append(getProtectionPolicy()).append(","); if (getGameProperties() != null) sb.append("GameProperties: ").append(getGameProperties()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateGameSessionRequest == false) return false; UpdateGameSessionRequest other = (UpdateGameSessionRequest) obj; if (other.getGameSessionId() == null ^ this.getGameSessionId() == null) return false; if (other.getGameSessionId() != null && other.getGameSessionId().equals(this.getGameSessionId()) == 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.getPlayerSessionCreationPolicy() == null ^ this.getPlayerSessionCreationPolicy() == null) return false; if (other.getPlayerSessionCreationPolicy() != null && other.getPlayerSessionCreationPolicy().equals(this.getPlayerSessionCreationPolicy()) == false) return false; if (other.getProtectionPolicy() == null ^ this.getProtectionPolicy() == null) return false; if (other.getProtectionPolicy() != null && other.getProtectionPolicy().equals(this.getProtectionPolicy()) == false) return false; if (other.getGameProperties() == null ^ this.getGameProperties() == null) return false; if (other.getGameProperties() != null && other.getGameProperties().equals(this.getGameProperties()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGameSessionId() == null) ? 0 : getGameSessionId().hashCode()); hashCode = prime * hashCode + ((getMaximumPlayerSessionCount() == null) ? 0 : getMaximumPlayerSessionCount().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getPlayerSessionCreationPolicy() == null) ? 0 : getPlayerSessionCreationPolicy().hashCode()); hashCode = prime * hashCode + ((getProtectionPolicy() == null) ? 0 : getProtectionPolicy().hashCode()); hashCode = prime * hashCode + ((getGameProperties() == null) ? 0 : getGameProperties().hashCode()); return hashCode; } @Override public UpdateGameSessionRequest clone() { return (UpdateGameSessionRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy