/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace GameLift { namespace Model { /** */ class UpdateGameSessionRequest : public GameLiftRequest { public: AWS_GAMELIFT_API UpdateGameSessionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateGameSession"; } AWS_GAMELIFT_API Aws::String SerializePayload() const override; AWS_GAMELIFT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; ///@{ /** *

A unique identifier for the game session to update.

*/ inline const Aws::String& GetGameSessionId() const{ return m_gameSessionId; } inline bool GameSessionIdHasBeenSet() const { return m_gameSessionIdHasBeenSet; } inline void SetGameSessionId(const Aws::String& value) { m_gameSessionIdHasBeenSet = true; m_gameSessionId = value; } inline void SetGameSessionId(Aws::String&& value) { m_gameSessionIdHasBeenSet = true; m_gameSessionId = std::move(value); } inline void SetGameSessionId(const char* value) { m_gameSessionIdHasBeenSet = true; m_gameSessionId.assign(value); } inline UpdateGameSessionRequest& WithGameSessionId(const Aws::String& value) { SetGameSessionId(value); return *this;} inline UpdateGameSessionRequest& WithGameSessionId(Aws::String&& value) { SetGameSessionId(std::move(value)); return *this;} inline UpdateGameSessionRequest& WithGameSessionId(const char* value) { SetGameSessionId(value); return *this;} ///@} ///@{ /** *

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

*/ inline int GetMaximumPlayerSessionCount() const{ return m_maximumPlayerSessionCount; } inline bool MaximumPlayerSessionCountHasBeenSet() const { return m_maximumPlayerSessionCountHasBeenSet; } inline void SetMaximumPlayerSessionCount(int value) { m_maximumPlayerSessionCountHasBeenSet = true; m_maximumPlayerSessionCount = value; } inline UpdateGameSessionRequest& WithMaximumPlayerSessionCount(int value) { SetMaximumPlayerSessionCount(value); return *this;} ///@} ///@{ /** *

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

*/ inline const Aws::String& GetName() const{ return m_name; } inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } inline UpdateGameSessionRequest& WithName(const Aws::String& value) { SetName(value); return *this;} inline UpdateGameSessionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} inline UpdateGameSessionRequest& WithName(const char* value) { SetName(value); return *this;} ///@} ///@{ /** *

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

*/ inline const PlayerSessionCreationPolicy& GetPlayerSessionCreationPolicy() const{ return m_playerSessionCreationPolicy; } inline bool PlayerSessionCreationPolicyHasBeenSet() const { return m_playerSessionCreationPolicyHasBeenSet; } inline void SetPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = value; } inline void SetPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { m_playerSessionCreationPolicyHasBeenSet = true; m_playerSessionCreationPolicy = std::move(value); } inline UpdateGameSessionRequest& WithPlayerSessionCreationPolicy(const PlayerSessionCreationPolicy& value) { SetPlayerSessionCreationPolicy(value); return *this;} inline UpdateGameSessionRequest& WithPlayerSessionCreationPolicy(PlayerSessionCreationPolicy&& value) { SetPlayerSessionCreationPolicy(std::move(value)); 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.

*/ inline const ProtectionPolicy& GetProtectionPolicy() const{ return m_protectionPolicy; } inline bool ProtectionPolicyHasBeenSet() const { return m_protectionPolicyHasBeenSet; } inline void SetProtectionPolicy(const ProtectionPolicy& value) { m_protectionPolicyHasBeenSet = true; m_protectionPolicy = value; } inline void SetProtectionPolicy(ProtectionPolicy&& value) { m_protectionPolicyHasBeenSet = true; m_protectionPolicy = std::move(value); } inline UpdateGameSessionRequest& WithProtectionPolicy(const ProtectionPolicy& value) { SetProtectionPolicy(value); return *this;} inline UpdateGameSessionRequest& WithProtectionPolicy(ProtectionPolicy&& value) { SetProtectionPolicy(std::move(value)); 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.

*/ inline const Aws::Vector& GetGameProperties() const{ return m_gameProperties; } inline bool GamePropertiesHasBeenSet() const { return m_gamePropertiesHasBeenSet; } inline void SetGameProperties(const Aws::Vector& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties = value; } inline void SetGameProperties(Aws::Vector&& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties = std::move(value); } inline UpdateGameSessionRequest& WithGameProperties(const Aws::Vector& value) { SetGameProperties(value); return *this;} inline UpdateGameSessionRequest& WithGameProperties(Aws::Vector&& value) { SetGameProperties(std::move(value)); return *this;} inline UpdateGameSessionRequest& AddGameProperties(const GameProperty& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties.push_back(value); return *this; } inline UpdateGameSessionRequest& AddGameProperties(GameProperty&& value) { m_gamePropertiesHasBeenSet = true; m_gameProperties.push_back(std::move(value)); return *this; } ///@} private: Aws::String m_gameSessionId; bool m_gameSessionIdHasBeenSet = false; int m_maximumPlayerSessionCount; bool m_maximumPlayerSessionCountHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; PlayerSessionCreationPolicy m_playerSessionCreationPolicy; bool m_playerSessionCreationPolicyHasBeenSet = false; ProtectionPolicy m_protectionPolicy; bool m_protectionPolicyHasBeenSet = false; Aws::Vector m_gameProperties; bool m_gamePropertiesHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws