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.

There is a newer version: 1.12.782
Show newest version
/*
 * Copyright 2011-2016 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 com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Represents the input for a request action. *

*/ public class UpdateGameSessionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* Unique identifier for a game session. Specify the game session you want * to update. *

*/ private String gameSessionId; /** *

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

*/ private Integer maximumPlayerSessionCount; /** *

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

*/ private String name; /** *

* Policy determining whether or not the game session accepts 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; /** *

* Unique identifier for a game session. Specify the game session you want * to update. *

* * @param gameSessionId * Unique identifier for a game session. Specify the game session you * want to update. */ public void setGameSessionId(String gameSessionId) { this.gameSessionId = gameSessionId; } /** *

* Unique identifier for a game session. Specify the game session you want * to update. *

* * @return Unique identifier for a game session. Specify the game session * you want to update. */ public String getGameSessionId() { return this.gameSessionId; } /** *

* Unique identifier for a game session. Specify the game session you want * to update. *

* * @param gameSessionId * Unique identifier for a game session. Specify the game session you * want 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; } /** *

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

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

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

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

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

* * @param maximumPlayerSessionCount * Maximum number of players that can be simultaneously connected 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; } /** *

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

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

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

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

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

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

* Policy determining whether or not the game session accepts new players. *

* * @param playerSessionCreationPolicy * Policy determining whether or not the game session accepts new * players. * @see PlayerSessionCreationPolicy */ public void setPlayerSessionCreationPolicy( String playerSessionCreationPolicy) { this.playerSessionCreationPolicy = playerSessionCreationPolicy; } /** *

* Policy determining whether or not the game session accepts new players. *

* * @return Policy determining whether or not the game session accepts new * players. * @see PlayerSessionCreationPolicy */ public String getPlayerSessionCreationPolicy() { return this.playerSessionCreationPolicy; } /** *

* Policy determining whether or not the game session accepts new players. *

* * @param playerSessionCreationPolicy * Policy determining whether or not the game session accepts 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; } /** *

* Policy determining whether or not the game session accepts new players. *

* * @param playerSessionCreationPolicy * Policy determining whether or not the game session accepts new * players. * @see PlayerSessionCreationPolicy */ public void setPlayerSessionCreationPolicy( PlayerSessionCreationPolicy playerSessionCreationPolicy) { this.playerSessionCreationPolicy = playerSessionCreationPolicy .toString(); } /** *

* Policy determining whether or not the game session accepts new players. *

* * @param playerSessionCreationPolicy * Policy determining whether or not the game session accepts new * players. * @return Returns a reference to this object so that method calls can be * chained together. * @see PlayerSessionCreationPolicy */ public UpdateGameSessionRequest withPlayerSessionCreationPolicy( PlayerSessionCreationPolicy playerSessionCreationPolicy) { setPlayerSessionCreationPolicy(playerSessionCreationPolicy); 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) { this.protectionPolicy = protectionPolicy.toString(); } /** *

          * 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) { setProtectionPolicy(protectionPolicy); 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 (getGameSessionId() != null) sb.append("GameSessionId: " + getGameSessionId() + ","); if (getMaximumPlayerSessionCount() != null) sb.append("MaximumPlayerSessionCount: " + getMaximumPlayerSessionCount() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getPlayerSessionCreationPolicy() != null) sb.append("PlayerSessionCreationPolicy: " + getPlayerSessionCreationPolicy() + ","); if (getProtectionPolicy() != null) sb.append("ProtectionPolicy: " + getProtectionPolicy()); 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; 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()); return hashCode; } @Override public UpdateGameSessionRequest clone() { return (UpdateGameSessionRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy